/* ============================================
   Abhishek Neupane - Portfolio
   Modern, responsive, themeable
   Fonts: Manrope (body) + Sora (headings)
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  --color-sky: #219ebc;
  --color-navy: #023047;
  --color-orange: #fb8500;
  --color-red: #ff0002;
  --color-green: #16a34a;
  --color-white: #ffffff;
  --color-matte: #18181b;
  --gray-50: #f0f2fa;
  --gray-100: #e4e8f4;
  --gray-200: #d8deea;
  --gray-500: #5a6688;
  --gray-800: #2b3253;

  --brand-facebook: #1877f2;
  --brand-instagram: #e4405f;
  --brand-instagram-gradient: linear-gradient(135deg, #833ab4 0%, #e4405f 45%, #f77737 100%);
  --brand-whatsapp: #25d366;
  --brand-github: #181717;
  --brand-gmail: var(--color-red);
  --brand-android: var(--color-sky);

  --bg: var(--color-matte);
  --bg-elev: var(--color-navy);
  --bg-soft: var(--color-matte);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --text: var(--color-white);
  --text-muted: var(--gray-200);
  --text-soft: var(--gray-100);
  --primary: var(--color-navy);
  --primary-2: var(--color-sky);
  --accent: var(--color-orange);
  --yellow: var(--color-orange);
  --yellow-soft: var(--color-orange);
  --success: var(--color-green);
  --danger: var(--color-red);
  --grad: linear-gradient(135deg, var(--color-navy) 0%, var(--color-sky) 58%, var(--color-orange) 100%);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.45);

  --container: 1360px;
  --nav-h: 88px;

  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head: 'Sora', 'Manrope', sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: var(--gray-200);
  --bg-elev: var(--gray-50);
  --bg-soft: var(--gray-100);
  --surface: rgba(24, 24, 27, 0.1);
  --surface-hover: rgba(24, 24, 27, 0.16);
  --border: rgba(24, 24, 27, 0.18);
  --text: var(--color-navy);
  --text-muted: var(--gray-500);
  --text-soft: var(--gray-800);
  --shadow: 0 10px 30px rgba(24, 24, 27, 0.08);
  --shadow-lg: 0 30px 60px rgba(24, 24, 27, 0.12);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  overflow-x: hidden;
}

section[id] {
  scroll-margin-top: var(--nav-h);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  letter-spacing: -0.02em;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea {
  font: inherit;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  color: var(--primary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  box-shadow: none;
  transform: none;
}

.btn svg,
.btn i {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--primary);
  color: var(--color-white);
  border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: color-mix(in srgb, var(--primary) 84%, var(--primary-2));
  border-color: var(--primary);
  color: var(--color-white);
}

.btn-quote {
  position: static;
  min-width: 0;
  min-height: 0;
  padding-right: 26px;
  overflow: visible;
}

.btn-quote span {
  position: static;
  z-index: auto;
  transition: none;
}

.btn-quote i {
  position: static;
  z-index: auto;
  transform: none;
  transition: none;
  pointer-events: none;
}

.btn-quote:hover span,
.btn-quote:focus-visible span {
  transform: none;
}

.btn-quote:hover i,
.btn-quote:focus-visible i {
  transform: none;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--color-matte);
  border-color: var(--color-matte);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: var(--color-white);
  color: var(--color-matte);
  border-color: var(--color-matte);
}

.btn-block {
  width: 100%;
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
  border-bottom-color: var(--border);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  position: relative;
  display: inline-grid;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(1.02rem, 2vw, 1.24rem);
  letter-spacing: 0.01em;
  color: var(--text);
  transition: color 0.2s ease;
}

.logo:hover {
  color: var(--accent);
}

.brand-logo-current,
.brand-logo-hover {
  grid-area: 1 / 1;
  transition: opacity 0.22s ease-in-out, color 0.22s ease-in-out;
}

.brand-logo-hover {
  display: none;
  color: var(--accent);
  opacity: 0;
}

.logo:hover .brand-logo-current,
.logo:focus-visible .brand-logo-current {
  color: var(--accent);
  opacity: 1;
}

.logo::after {
  content: attr(data-hover-hook);
  position: absolute;
  left: 0;
  top: calc(100% + 12px);
  width: max-content;
  max-width: min(280px, calc(100vw - 48px));
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 78%, var(--border));
  border-radius: 8px;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
  color: var(--color-white);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.3;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.logo::before {
  content: '';
  position: absolute;
  left: 18px;
  top: calc(100% + 7px);
  width: 10px;
  height: 10px;
  border-left: 1px solid color-mix(in srgb, var(--primary) 78%, var(--border));
  border-top: 1px solid color-mix(in srgb, var(--primary) 78%, var(--border));
  background: var(--primary);
  opacity: 0;
  pointer-events: none;
  transform: rotate(45deg) translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 21;
}

.logo:hover::after,
.logo:focus-visible::after,
.logo:hover::before,
.logo:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.logo:hover::before,
.logo:focus-visible::before {
  transform: rotate(45deg) translateY(0);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 2px 6px;
  transition: color 0.2s ease;
}

.nav-link i {
  display: none;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link.active {
  color: var(--text);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--yellow);
  border-radius: 3px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 52%, transparent);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 90px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float 14s ease-in-out infinite;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  bottom: -120px;
  right: -80px;
  animation-delay: -7s;
}

[data-theme="light"] .blob {
  opacity: 0.35;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(40px, -40px) scale(1.1);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  width: 100%;
}

.hero-text {
  text-align: left;
}

.hero-eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  font-weight: 500;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5.2vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: max-content;
  max-width: 100%;
}

.hero-line-1 {
  display: block;
}

.hero-line-2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: nowrap;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 6px;
  width: max-content;
  max-width: none;
  overflow: visible;
}

.hero-static {
  white-space: nowrap;
}

.typed-wrap {
  display: inline-flex;
  align-items: baseline;
  width: 18ch;
  min-width: 18ch;
  min-height: 1.1em;
  position: relative;
  overflow: visible;
  padding-right: 0.18em;
}

.typed-text {
  display: inline-block;
  color: var(--primary-2);
  white-space: nowrap;
  padding-right: 0.04em;
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--primary);
  animation: blink 1s infinite;
  font-weight: 300;
  letter-spacing: 0;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

.hero-subtitle {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 32px;
  text-align: justify;
  hyphens: auto;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Hero Showcase (right side) ---------- */
.hero-showcase {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.showcase-wrapper {
  position: relative;
  width: min(320px, 100%);
  margin-left: auto;
  margin-right: -30px;
}

.showcase-card {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 18px 18px 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.showcase-decor {
  position: absolute;
  inset: -16px;
  border: 2px dashed var(--border);
  border-radius: 30px;
  z-index: 0;
  animation: rotate 30s linear infinite;
}

.showcase-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-soft);
}

.showcase-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.showcase-slide.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.showcase-skill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--bg-soft);
  color: var(--primary);
  font-size: clamp(4.6rem, 11vw, 6.8rem);
  will-change: transform, opacity;
}

.skill-software {
  color: var(--color-matte);
}

.skill-android {
  color: #3ddc84;
}

.skill-ios {
  color: var(--color-matte);
}

.skill-websites {
  color: var(--color-matte);
}

.skill-webapps {
  color: var(--color-matte);
}

.skill-marketing,
.skill-graphic,
.skill-uiux,
.skill-business {
  color: var(--color-matte);
}

.skill-automation {
  color: var(--color-matte);
}

.skill-ai {
  color: var(--color-matte);
}

.skill-ml {
  color: var(--color-matte);
}

.showcase-meta {
  text-align: center;
  padding: 7px 8px 0;
}

.showcase-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.showcase-brand {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.2vw, 1.3rem);
  font-weight: 700;
  color: var(--primary-2);
  transition: opacity 0.3s ease;
}

/* ---------- Section Defaults ---------- */
.section {
  padding: 2vh 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
  max-width: 700px;
  margin-inline: auto;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  display: flex;
  justify-content: center;
}

.image-wrapper {
  position: relative;
  width: min(340px, 100%);
  aspect-ratio: 1;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 8rem;
  font-weight: 800;
  color: white;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
  letter-spacing: -0.05em;
}

.image-decor {
  position: absolute;
  inset: -16px;
  border: 2px dashed var(--border);
  border-radius: 30px;
  z-index: 0;
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

.about-text h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.3;
}

.about-text p {
  color: var(--text-soft);
  margin-bottom: 14px;
  text-align: justify;
  hyphens: auto;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 30px 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.stat h4 {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.skills h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags span {
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: all 0.2s ease;
}

.skill-tags span:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  color: var(--text);
}

/* ---------- Portfolio ---------- */
.portfolio-carousel {
  position: relative;
  --portfolio-edge: max(56px, calc((100vw - var(--container)) / 2 + 24px));
  --portfolio-arrow-width: 24px;
  --portfolio-arrow-gap: 6px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-inline: var(--portfolio-edge);
  overflow-x: clip;
}

.portfolio-window {
  overflow-x: hidden;
  overflow-y: hidden;
  padding: 4px 2px 18px;
  width: 100%;
  scrollbar-width: none;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.portfolio-grid {
  display: flex;
  gap: 24px;
  overflow: visible;
  scrollbar-width: none;
  padding: 0;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.portfolio-grid.is-moving {
  transition: transform 0.62s var(--ease);
}

.portfolio-grid::-webkit-scrollbar {
  display: none;
}

.portfolio-arrow {
  position: absolute;
  top: 4px;
  bottom: 18px;
  transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--portfolio-arrow-width);
  height: auto;
  min-height: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent);
  border: 0;
  color: var(--text);
  box-shadow: none;
  opacity: 0.18;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
  z-index: 3;
  backdrop-filter: blur(8px);
}

.portfolio-carousel:hover .portfolio-arrow {
  background: color-mix(in srgb, var(--bg-elev) 94%, var(--color-matte));
  opacity: 0.72;
}

.portfolio-arrow-prev {
  left: max(6px, calc(var(--portfolio-edge) - var(--portfolio-arrow-width) - var(--portfolio-arrow-gap)));
}

.portfolio-arrow-next {
  right: max(6px, calc(var(--portfolio-edge) - var(--portfolio-arrow-width) - var(--portfolio-arrow-gap)));
}

.portfolio-arrow:hover,
.portfolio-arrow:focus-visible,
.portfolio-arrow:active {
  color: var(--text);
  background: color-mix(in srgb, var(--bg-elev) 96%, var(--color-matte));
  opacity: 0.86;
}

.project-card {
  flex: 0 0 calc((100% - 72px) / 4);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  color: inherit;
  min-width: 0;
}

.project-card:hover {
  box-shadow: none;
  border-color: var(--border);
}

.project-thumb {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
}

.project-khajalaya .project-thumb {
  background: var(--color-matte);
}

.project-color-lab .project-thumb {
  background: var(--color-white);
}

.project-ordash .project-thumb {
  background: #040517;
}

.project-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}

.project-body {
  padding: 22px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 124px;
}

.project-card:hover .project-body {
  background: transparent;
}

.project-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  white-space: nowrap;
  line-height: 1.15;
}

.project-card .project-title-long {
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  flex-grow: 1;
  text-align: justify;
  hyphens: auto;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  align-items: center;
}

.project-stack span {
  font-size: 0.72rem;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: var(--gray-800);
  border: 0;
  box-shadow: none;
  font-weight: 900;
  letter-spacing: 0.02em;
  transition: color 0.62s ease-in-out;
}

.project-stack span:nth-child(1) {
  transition-delay: 0s;
}

.project-stack span:nth-child(2) {
  transition-delay: 0.16s;
}

.project-stack span:nth-child(3) {
  transition-delay: 0.32s;
}

.project-stack span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--color-navy);
  transform: translateY(-1px);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover .project-stack span {
  color: var(--accent);
}

.project-card:hover .project-stack span:not(:last-child)::after {
  background: var(--color-navy);
  box-shadow: none;
}

/* ---------- Credentials + Build ---------- */
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--primary-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.credentials-grid,
.build-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
  gap: 56px;
  align-items: stretch;
}

.credentials-grid {
  padding: 34px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  align-items: center;
  min-height: 320px;
}

.credentials-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.credentials-desc,
.build-desc {
  max-width: 520px;
  margin: 18px 0 24px;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.8;
  text-align: justify;
  hyphens: auto;
}

.credentials-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.credential-stats {
  align-self: center;
}

.credential-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.credential-stat {
  min-height: 150px;
  padding: 26px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--primary);
}

.credential-stat strong {
  display: flex;
  align-items: baseline;
  margin-bottom: 9px;
  color: var(--primary);
  font-family: var(--font-head);
  font-size: clamp(2.3rem, 3.8vw, 3.1rem);
  line-height: 1;
}

.stat-value,
.stat-plus {
  display: inline-block;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: none;
}

.stat-plus {
  opacity: 0;
  transform: translateX(-0.18em);
  transition: opacity 0.24s ease, transform 0.34s var(--ease);
}

.stat-plus.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.credential-stat > span {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.build-links {
  display: flex;
  flex-direction: column;
}

.build-grid {
  align-items: stretch;
}

.build-copy,
.build .contact-form {
  padding: 26px 32px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.build .contact-form .form-heading .section-title {
  font-size: clamp(1.9rem, 3.2vw, 2.55rem);
  line-height: 1.05;
}

.build-link {
  display: grid;
  grid-template-columns: 48px 82px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
}

.build-link:last-child {
  border-bottom: none;
}

.build-link i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid transparent;
  color: var(--color-white);
  font-size: 1.12rem;
  transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.build-link span {
  color: var(--color-matte);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.build-link strong {
  min-width: 0;
  color: var(--color-matte);
  font-size: 0.88rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.build-facebook i {
  background: var(--brand-facebook);
}

.build-instagram i {
  background: var(--brand-instagram-gradient);
}

.build-whatsapp i {
  background: var(--brand-whatsapp);
}

.build-github i {
  background: var(--brand-github);
}

.build-gmail i {
  background: var(--brand-gmail);
}

.build-whatsapp i,
.build-github i,
.build-instagram i {
  width: 48px;
  height: 48px;
  font-size: 1.28rem;
}

.build-link:hover i {
  transform: none;
}

.build-whatsapp:hover span {
  color: var(--brand-whatsapp);
}

.build-gmail:hover span {
  color: var(--brand-gmail);
}

.build-github:hover span {
  color: var(--brand-github);
}

.build-facebook:hover span {
  color: var(--brand-facebook);
}

.build-instagram:hover span {
  color: var(--brand-instagram);
}

.build-form {
  min-height: 0;
}

.build-form .btn-block {
  margin-top: auto;
}

/* ---------- CV ---------- */
.cv-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  text-align: center;
  margin-bottom: 50px;
}

.qualification-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  gap: 50px;
  align-items: stretch;
}

.cv-column {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.qualification-card {
  height: 100%;
}

.cv-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.cv-heading i {
  width: 22px;
  color: var(--primary-2);
}

.qualification-group {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 4px 0 18px;
  padding-left: 32px;
}

.qualification-group:not(:first-child) {
  margin-top: 10px;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 32px;
  padding-bottom: 28px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 0 4px var(--bg-elev), 0 0 0 5px var(--border);
}

.timeline-date {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-2);
  letter-spacing: 0.08em;
}

.timeline-content h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 4px 0 2px;
}

.timeline-org {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.timeline-content>p:last-child {
  color: var(--text-soft);
  font-size: 0.95rem;
  text-align: justify;
  hyphens: auto;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
  gap: 60px;
  align-items: stretch;
}

.contact-photo {
  height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.contact-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.3;
}

.contact-info p {
  color: var(--text-soft);
  margin-bottom: 26px;
  text-align: justify;
  hyphens: auto;
}

.contact-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.contact-list li {
  display: block;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.95rem;
}

.contact-link {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 12px 0;
  color: var(--text-soft);
  transition: color 0.2s ease;
}

.contact-link i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 1.25rem;
  color: var(--primary-2);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.contact-link>span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contact-value {
  overflow-wrap: anywhere;
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-whatsapp:hover,
.contact-whatsapp:hover i {
  color: var(--brand-whatsapp);
}

.contact-whatsapp:hover i {
  background: var(--brand-whatsapp);
  border-color: var(--brand-whatsapp);
  color: var(--color-white);
}

.contact-email:hover,
.contact-email:hover i {
  color: var(--brand-gmail);
}

.contact-email:hover i {
  background: var(--brand-gmail);
  border-color: var(--brand-gmail);
  color: var(--color-white);
}

.contact-phone:hover,
.contact-phone:hover i {
  color: var(--primary);
}

.contact-phone:hover i {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--color-white);
}

.contact-location i {
  color: var(--primary-2);
}

.contact-location:hover i {
  background: var(--primary-2);
  border-color: var(--primary-2);
  color: var(--color-white);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: all 0.25s var(--ease);
}

.social-link i {
  font-size: 1.1rem;
}

.social-link:hover {
  color: var(--color-white);
  border-color: transparent;
  transform: none;
}

.social-github:hover {
  background: var(--brand-github);
}

.social-instagram:hover {
  background: var(--brand-instagram-gradient);
}

.social-facebook:hover {
  background: var(--brand-facebook);
}

.contact-form {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  height: 100%;
}

.form-group {
  margin-bottom: 11px;
}

.form-group label,
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-soft);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  resize: vertical;
}

.form-group select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

.form-group textarea {
  font-size: 0.9rem;
  height: 72px;
  min-height: 72px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 18%, transparent);
}

.selected-projects {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.selected-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 7px 8px 7px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 750;
}

.selected-project-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--text-muted);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
}

.selected-project-remove:hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}

.selected-projects.invalid {
  min-height: 40px;
  border: 1px dashed var(--danger);
  border-radius: 10px;
}

.form-status {
  margin-top: 10px;
  font-size: 0.9rem;
  text-align: center;
  min-height: 0;
}

.form-status:empty {
  display: none;
}

.form-status.success {
  color: var(--success);
}

.form-status.error {
  color: var(--danger);
}

/* ---------- Footer ---------- */
.footer {
  padding: 64px 0 44px;
  background: var(--primary);
  color: var(--color-white);
}

.footer-inner {
  display: grid;
  gap: 46px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, 1fr) minmax(130px, 0.8fr);
  gap: 42px;
  align-items: start;
}

.footer-identity {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.footer-brand {
  display: inline-grid;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: fit-content;
  color: var(--color-white);
  transition: color 0.35s ease-in-out;
}

.footer-brand span {
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  transition: color 0.35s ease-in-out;
}

.footer-brand .brand-logo-current,
.footer-brand .brand-logo-hover {
  grid-area: 1 / 1;
}

.footer-brand .brand-logo-hover {
  color: var(--accent);
}

.footer-brand small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.35s ease-in-out;
}

.footer-column {
  display: grid;
  gap: 8px;
}

.footer-column a {
  width: fit-content;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.footer-brand:hover,
.footer-column a:hover {
  color: var(--accent);
}

.footer-brand:hover .brand-logo-current,
.footer-brand:focus-visible .brand-logo-current {
  color: var(--accent);
  opacity: 1;
}

.footer-brand:hover small {
  color: var(--color-white);
}

.footer-social,
.footer-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--color-white);
  color: var(--color-white);
  transition: transform 0.22s var(--ease), background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.footer-social i,
.footer-top-link i {
  font-size: 1.2rem;
}

.footer-facebook:hover {
  background: var(--brand-facebook);
  border-color: transparent;
  color: var(--color-white);
  transform: none;
}

.footer-instagram:hover {
  background: var(--brand-instagram);
  border-color: transparent;
  color: var(--color-white);
  transform: none;
}

.footer-top-link {
  width: auto;
  min-width: 112px;
  height: 54px;
  gap: 9px;
  padding: 0 18px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  align-items: flex-end;
  overflow: hidden;
}

.footer-top-link:hover {
  color: var(--color-white);
  border-color: var(--color-white);
}

.footer-top-link i {
  transition: transform 0.34s var(--ease);
  transform: translateY(0);
}

.footer-top-link span {
  transition: transform 0.34s var(--ease);
  transform: translateY(0);
}

.footer-top-link:hover i,
.footer-top-link:hover span {
  transform: translateY(-16px);
}

.footer-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.26);
}

.footer-copy {
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.footer-copy a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  color: inherit;
  font-family: inherit;
  font-weight: 800;
  transition: color 0.2s ease;
}

.footer-copy a::after {
  content: "\f061";
  display: inline-block;
  flex: 0 0 auto;
  color: var(--accent);
  font-family: "Font Awesome 6 Free";
  font-size: 0.78em;
  font-weight: 900;
  opacity: 0;
  transform: translateX(-0.35em);
  transition: opacity 0.22s ease, transform 0.3s var(--ease);
}

.footer-copy a:hover {
  color: var(--accent);
}

.footer-copy a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Selection ---------- */
::selection {
  background: var(--primary);
  color: white;
}

/* ---------- Scrollbar (webkit) ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-soft);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---------- Responsive ---------- */
@media (min-width: 1537px) {
  :root {
    --container: 1564px;
    --nav-h: 96px;
  }

  .container {
    padding-inline: 28px;
  }

  .logo {
    font-size: clamp(1.18rem, 1.55vw, 1.42rem);
  }

  .nav-link {
    font-size: 1.08rem;
  }

  .hero {
    padding: calc(var(--nav-h) + 46px) 0 104px;
  }

  .hero-content {
    gap: 56px;
  }

  .hero-title {
    font-size: clamp(4.2rem, 5.8vw, 5.25rem);
  }

  .hero-line-2 {
    font-size: clamp(2.4rem, 3.5vw, 3rem);
  }

  .hero-subtitle {
    max-width: 650px;
    font-size: 1.25rem;
  }

  .btn {
    padding: 16px 30px;
    font-size: 1.08rem;
  }

  .btn-quote {
    min-width: 0;
    min-height: 0;
  }

  .credential-stat strong {
    font-size: clamp(2.75rem, 3.4vw, 3.35rem);
  }

  .credential-stat > span {
    font-size: 0.8rem;
  }

  .showcase-wrapper {
    width: min(368px, 100%);
    margin-right: 0;
  }

  .section-title {
    font-size: clamp(2.65rem, 4.5vw, 3.45rem);
  }

  .portfolio-carousel {
    --portfolio-edge: max(48px, calc((100vw - var(--container)) / 2 + 28px));
  }
}

@media (min-width: 761px) and (max-width: 1536px) {
  :root {
    --container: 1220px;
    --nav-h: 72px;
  }

  .container {
    padding-inline: 32px;
  }

  .logo {
    font-size: 1rem;
  }

  .nav-links {
    gap: 24px;
  }

  .nav-link {
    font-size: 0.84rem;
  }

  .hero {
    min-height: auto;
    padding: calc(var(--nav-h) + 30px) 0 70px;
  }

  .hero-content {
    grid-template-columns: minmax(0, 1.04fr) minmax(260px, 0.76fr);
    gap: 42px;
  }

  .hero-eyebrow {
    font-size: 0.78rem;
    margin-bottom: 18px;
  }

  .hero-title {
    font-size: clamp(2.35rem, 4.2vw, 3.35rem);
    margin-bottom: 18px;
  }

  .hero-line-2 {
    font-size: clamp(1.45rem, 2.55vw, 2rem);
  }

  .hero-subtitle {
    max-width: 520px;
    font-size: 0.96rem;
    line-height: 1.7;
    margin-bottom: 28px;
  }

  .btn {
    padding: 12px 22px;
    font-size: 0.86rem;
  }

  .credential-stat strong {
    font-size: clamp(2.2rem, 3.4vw, 2.8rem);
  }

  .showcase-wrapper {
    width: min(270px, 100%);
    margin-right: 0;
  }

  .showcase-card {
    border-radius: 24px;
    padding: 14px 14px 10px;
  }

  .showcase-frame {
    border-radius: 18px;
  }

  .showcase-skill-icon {
    font-size: clamp(4rem, 8vw, 5.5rem);
  }

  .showcase-brand {
    font-size: 1.08rem;
  }

  .portfolio-carousel {
    --portfolio-edge: 32px;
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 1100px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: center;
    padding-right: 0;
  }

  .hero-text {
    text-align: center;
  }

  .hero-title {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-line-2 {
    justify-content: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-showcase {
    order: -1;
    justify-content: center;
  }

  .showcase-wrapper {
    width: min(360px, 100%);
    margin-left: 0;
    margin-right: 0;
  }

  .hero-showcase {
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .showcase-wrapper {
    width: min(240px, 100%);
  }
}

@media (max-width: 980px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .image-wrapper {
    width: min(280px, 100%);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .credentials-grid,
  .build-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .qualification-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-photo {
    height: 360px;
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 28px;
  }

  .footer-identity {
    grid-column: 1 / -1;
  }

  .project-card {
    flex-basis: calc((100% - 48px) / 3);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 0.92rem;
  }

  .menu-toggle {
    display: none;
  }

  .nav-links {
    position: static;
    width: auto;
    gap: 10px;
    transform: none;
    background: transparent;
    border-left: 0;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav-links.open {
    transform: none;
  }

  .nav-link {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-elev);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
  }

  .nav-home,
  .nav-cv {
    display: none;
  }

  .nav-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .nav-link i {
    display: block;
    font-size: 1rem;
  }

  .nav-link.active {
    border-color: var(--accent);
    color: var(--accent);
  }

  .nav-link.active::after {
    display: none;
  }

  .section {
    padding: 28px 0 46px;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .section-title {
    font-size: clamp(1.65rem, 8vw, 2.25rem);
    line-height: 1.14;
  }

  .hero {
    padding: calc(var(--nav-h) + 30px) 0 60px;
  }

  .hero-content {
    gap: 34px;
  }

  .showcase-wrapper {
    width: min(300px, calc(100vw - 88px));
  }

  .showcase-decor {
    inset: 0;
  }

  .showcase-card {
    min-height: 292px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 10px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-line-2 {
    flex-direction: column;
    gap: 4px;
    align-items: center;
    min-height: 2.75em;
  }

  .hero-title {
    width: 100%;
    letter-spacing: -0.055em;
  }

  .hero-line-1 {
    white-space: nowrap;
  }

  .hero-line-2 {
    letter-spacing: 0.035em;
    width: 100%;
    max-width: 100%;
  }

  .typed-wrap {
    width: min(18ch, 100%);
    min-width: min(18ch, 100%);
    min-height: 1.35em;
    justify-content: center;
  }

  .project-card {
    flex-basis: 100%;
  }

  .credential-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .credential-stat {
    min-height: 122px;
    padding: 18px 14px;
  }

  .credential-stat strong {
    font-size: clamp(1.9rem, 8vw, 2.35rem);
  }

  .credential-stat:nth-child(4) strong {
    font-size: clamp(1.45rem, 6.2vw, 1.9rem);
  }

  .credential-stat > span {
    font-size: 0.58rem;
    line-height: 1.45;
    letter-spacing: 0.07em;
    overflow-wrap: anywhere;
  }

  .cv-column {
    padding: 24px;
  }

  .qualification-group {
    padding-left: 28px;
  }

  .contact-info p {
    text-align: left;
  }

  .contact-info,
  .contact-form {
    padding: 24px;
  }

  .build-copy,
  .build .contact-form {
    padding: 28px 24px;
  }

  .build-copy .section-title {
    font-size: clamp(1.65rem, 7.2vw, 2rem);
    line-height: 1.15;
    white-space: nowrap;
  }

  .build-desc {
    display: none;
  }

  .portfolio-arrow {
    --portfolio-edge: 48px;
    width: 24px;
    height: auto;
    min-height: 0;
    opacity: 0.24;
  }

  .portfolio-carousel {
    --portfolio-edge: 36px;
    width: 100%;
    margin-left: 0;
    overflow-x: visible;
  }

  .portfolio-arrow-prev {
    left: max(6px, calc(var(--portfolio-edge) - var(--portfolio-arrow-width) - var(--portfolio-arrow-gap)));
  }

  .portfolio-arrow-next {
    right: max(6px, calc(var(--portfolio-edge) - var(--portfolio-arrow-width) - var(--portfolio-arrow-gap)));
  }

  .build-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }

  .build-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 0;
    border-bottom: 0;
    text-align: center;
  }

  .build-link span {
    display: none;
  }

  .build-link strong {
    width: 100%;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .build-link i {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .build-whatsapp i,
  .build-github i,
  .build-instagram i {
    width: 46px;
    height: 46px;
    font-size: 1.16rem;
  }

  .selected-project {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .contact-photo {
    height: 300px;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px;
  }

  .stat {
    display: flex;
    align-items: baseline;
    gap: 12px;
  }

  .stat h4 {
    font-size: 1.6rem;
  }

  .footer {
    padding: 38px 0 32px;
  }

  .footer-top {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "top top"
      "brand links";
    justify-items: stretch;
    align-items: start;
    gap: 22px 24px;
    text-align: left;
  }

  .footer-identity {
    grid-area: brand;
    justify-self: start;
  }

  .footer-brand {
    align-items: flex-start;
    justify-self: start;
  }

  .footer-column {
    grid-area: links;
    justify-items: end;
    text-align: right;
  }

  .footer-column a {
    justify-self: end;
  }

  .footer-top-link {
    grid-area: top;
    justify-self: end;
    min-width: 96px;
    height: 42px;
    padding: 0 12px 6px;
    font-size: 0.64rem;
  }

  .footer-brand span {
    font-size: 0.92rem;
  }

  .footer-brand small,
  .footer-column a {
    font-size: 0.64rem;
  }
}

@media (max-width: 420px) {
  .container {
    padding: 0 18px;
  }

  .showcase-wrapper {
    width: min(280px, calc(100vw - 76px));
  }

  .hero-eyebrow {
    font-size: 0.78rem;
  }

  .image-wrapper {
    width: min(240px, 100%);
  }

  .avatar {
    font-size: 6rem;
    border-radius: 24px;
  }
  .credentials-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .credentials-actions .btn {
    justify-content: center;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
