:root {
  /* Core colors */
  --bg: #0b0b0b;
  --text: #ffffff;
  --muted: #9ca3af;
  --accent: #fbbf24;
  --accent-2: #ffd24d;
  --green: #3be27a;
  --border: #2a2a2a;

  /* Sizing and layout */
  --max-width: 680px;
  --header-height: 70px;
  --header-top-offset: 0px;
  --header-hide-buffer: 8px;
  --dock-height: 84px;

  /* Portrait sizing - mobile first */
  --portrait-border-radius: 16px;

  /* Spacing system */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --space-8: 96px;

  /* Mobile adjustments */
  --mobile-container-padding: 20px;

  /* Typography */
  --font-xs: 0.75rem; /* 12px */
  --font-sm: 0.875rem; /* 14px */
  --font-base: 1rem; /* 16px */
  --font-md: 1.125rem; /* 18px */
  --font-lg: 1.25rem; /* 20px */
  --font-xl: 1.5rem; /* 24px */
  --font-2xl: 1.875rem; /* 30px */
  --font-3xl: 2.25rem; /* 36px */

  /* Font weights */
  --font-light: 300;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
}

/* Basic reset & normalization */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  /* scroll-behavior removed — Lenis handles smooth scrolling */
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

body {
  margin: 0;
  /* Section reordering: the DOM order is Hero → About → Projects →
     Experience → Contact, but inline `order` styles on the sections
     (with body as a grid container) reflow them into place. */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  font-family:
    "Inter Tight",
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: var(--font-base);
  line-height: 1.45;
  letter-spacing: -0.01em;
  background-color: var(--bg);
  background-image:
    radial-gradient(
      circle at 18% 20%,
      rgba(255, 193, 7, 0.08),
      transparent 0 18%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(59, 226, 122, 0.06),
      transparent 0 16%
    ),
    radial-gradient(
      circle at 50% 82%,
      rgba(255, 255, 255, 0.04),
      transparent 0 22%
    ),
    radial-gradient(circle, rgba(255, 255, 255, 0.045) 1px, transparent 1.5px);
  background-size:
    auto,
    auto,
    auto,
    28px 28px;
  background-position:
    center,
    center,
    center,
    0 0;
  /* NOTE: background-attachment: fixed is intentionally removed.
     On macOS Safari/Chrome it forces the body to be repainted on every
     scroll frame, which is THE #1 cause of janky parallax/scrolling.
     Keeping it as `scroll` gives the browser full compositor freedom. */
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  padding-top: 0;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background-image:
    radial-gradient(
      circle at 20% 30%,
      rgba(255, 255, 255, 0.16) 0 1.5px,
      transparent 1.6px
    ),
    radial-gradient(
      circle at 75% 12%,
      rgba(255, 255, 255, 0.13) 0 1.5px,
      transparent 1.6px
    ),
    radial-gradient(
      circle at 88% 78%,
      rgba(255, 255, 255, 0.12) 0 1.5px,
      transparent 1.6px
    ),
    radial-gradient(
      circle at 14% 82%,
      rgba(255, 255, 255, 0.1) 0 1.5px,
      transparent 1.6px
    );
  background-size:
    140px 140px,
    180px 180px,
    220px 220px,
    260px 260px;
  opacity: 1;
}

body::after {
  inset: -12%;
  background-image:
    radial-gradient(
      circle at 18% 22%,
      rgba(255, 193, 7, 0.28),
      transparent 0 18%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(59, 226, 122, 0.22),
      transparent 0 16%
    ),
    radial-gradient(
      circle at 50% 78%,
      rgba(88, 166, 255, 0.18),
      transparent 0 20%
    );
  filter: blur(52px);
  opacity: 0.55;
  animation: background-drift 22s ease-in-out infinite alternate;
}

@keyframes background-drift {
  from {
    transform: translate3d(-1.5%, -1%, 0) scale(1);
  }

  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.05);
  }
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.loading-cat {
  width: 56px;
  height: 56px;
  color: #ffffff;
  animation: cat-bounce 1.6s ease-in-out infinite;
}

.loading-cat .loading-eyes {
  animation: cat-blink 2.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes cat-bounce {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  30% {
    transform: translateY(-10px) rotate(-3deg);
  }

  50% {
    transform: translateY(4px) rotate(2deg);
  }

  70% {
    transform: translateY(-5px) rotate(-1deg);
  }

  85% {
    transform: translateY(1px) rotate(0deg);
  }
}

@keyframes cat-blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }

  96% {
    transform: scaleY(0.1);
  }
}

.loading-quote {
  font-size: 0.75rem;
  font-family:
    "JetBrains Mono", "SFMono-Regular", "Fira Code", "Consolas",
    "Liberation Mono", Menlo, monospace;
  font-weight: var(--font-light);
  font-style: normal;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  text-align: center;
  letter-spacing: 0.02em;
  max-width: 240px;
  animation: quote-fade 3s ease-in-out infinite;
}

@keyframes quote-fade {
  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

.loading-number {
  font-size: 0.8rem;
  font-weight: var(--font-semibold);
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.loading-bar {
  width: 160px;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: #ffffff;
  transition: width 0.2s ease;
}

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

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

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

/* Header */
.site-header {
  position: fixed;
  top: var(--header-top-offset);
  left: 0;
  width: 100%;
  height: var(--header-height);
  overflow: visible;
  z-index: 100;
  opacity: 1;
  filter: blur(0);
  background: rgba(11, 11, 11, 0.6);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 320ms ease,
    filter 320ms ease,
    box-shadow 600ms cubic-bezier(0.16, 1, 0.3, 1),
    background 600ms cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 600ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}

/* Slightly more opaque on scroll */
.site-header.scrolled {
  background: rgba(11, 11, 11, 0.85);
}

/* Light header state — active when scrolling over light-background
   sections (Projects, Experience). Uses a seamless frosted glass
   gradient that blends with white backgrounds. */
.site-header.header--light {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.72),
    rgba(255, 255, 255, 0.42)
  );
  backdrop-filter: blur(25px) saturate(1.4);
  -webkit-backdrop-filter: blur(25px) saturate(1.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 4px 24px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* Seamless dark → light cross-fade: when transitioning INTO the
   light theme, the gradient starts slightly more transparent so the
   change feels like a continuous frosting rather than a switch. */
.site-header:not(.header--light) {
  background: linear-gradient(
    to bottom,
    rgba(11, 11, 11, 0.55),
    rgba(11, 11, 11, 0.35)
  );
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.site-header.header--light.scrolled {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.88),
    rgba(255, 255, 255, 0.65)
  );
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 8px 32px rgba(0, 0, 0, 0.05);
}

/* Glassy animated underline — a golden shimmer that glides along the
   bottom of the header while it is in the white state. */
.site-header.header--light::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 12%,
    rgba(212, 162, 23, 0) 22%,
    rgba(212, 162, 23, 0.7) 50%,
    rgba(255, 255, 255, 1) 50.5%,
    rgba(212, 162, 23, 0.7) 51%,
    rgba(212, 162, 23, 0) 78%,
    transparent 88%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: header-light-shimmer 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  opacity: 0.9;
}

@keyframes header-light-shimmer {
  0% {
    background-position: 200% 0;
  }
  55% {
    background-position: -120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.site-header.header--light .brand {
  color: #151515;
  text-shadow: none;
  transition-delay: 0ms;
}

.site-header.header--light .nav-toggle {
  color: #374151;
}

.site-header.header--light .nav-toggle:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.site-header.header--light .hamburger-line {
  background-color: #374151;
}

.site-header.header--light .mobile-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e5e5e0;
}

.site-header.header--light .mobile-nav a {
  color: #1f2937;
  border-bottom-color: #ecece7;
}

.site-header.header--light .mobile-nav a:hover,
.site-header.header--light .mobile-nav a:focus {
  color: #d4a217;
}

.site-header.header--light .settings-panel {
  background: rgba(255, 255, 255, 0.97);
  border-color: #e5e5e0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.site-header.header--light .settings-option {
  color: #1f2937;
}

.site-header.header--light .settings-option:hover,
.site-header.header--light .settings-option:focus-visible {
  background: rgba(0, 0, 0, 0.05);
}

.site-header.header--light .settings-option.on {
  background: rgba(212, 162, 23, 0.14);
  color: #926c06;
}

.site-header.header--light .settings-option.on i {
  color: var(--green);
}

.site-header.header--hidden {
  transform: translateY(
    calc(-100% - var(--header-top-offset) - var(--header-hide-buffer))
  );
  opacity: 0;
  filter: blur(0);
  box-shadow: none;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Override .container's 680px max-width so brand is far-left
     and nav links are far-right across the full viewport */
  max-width: 100%;
  width: 100%;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
  margin: 0;
}

.brand {
  font-size: var(--font-lg);
  font-weight: var(--font-bold);
  color: whitesmoke;
  letter-spacing: 0.5px;
  transition: color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: flex;
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  padding: 0;
  color: var(--accent);
  transition: transform 0.3s ease;
  border-radius: 8px;
}

.nav-toggle:hover {
  transform: scale(1.05);
  background-color: rgba(255, 255, 255, 0.05);
}

.hamburger-icon {
  position: relative;
  width: 24px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Navigation Menu */
.mobile-nav {
  position: absolute;
  top: var(--header-height);
  right: 0;
  width: 100%;
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--space-4);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    visibility 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  z-index: 90;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: var(--font-lg);
  font-weight: var(--font-medium);
  padding: var(--space-3) var(--space-2);
  transition: color 0.2s ease;
  display: block;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  letter-spacing: 0.5px;
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav a:hover,
.mobile-nav a:focus {
  color: var(--accent);
}

@media (min-width: 992px) {
  .nav-toggle {
    display: none !important;
  }

  .mobile-nav {
    display: none;
  }
}

/* Settings dropdown panel */
.settings-panel {
  position: absolute;
  top: calc(var(--header-height) + var(--space-2));
  right: var(--space-4);
  min-width: 220px;
  background: rgba(15, 20, 25, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: var(--space-2);
  z-index: 120;
  transform-origin: top right;
  animation: settings-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-panel[hidden] {
  display: none;
}

@keyframes settings-pop {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-size: var(--font-sm);
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.settings-option i {
  width: 16px;
  text-align: center;
  color: var(--accent);
  flex-shrink: 0;
}

.settings-option:hover,
.settings-option:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.settings-option.on {
  background: rgba(251, 191, 36, 0.12);
  color: var(--accent);
}

.settings-option.on i {
  color: var(--green);
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--header-height) + var(--space-4));
  padding-bottom: var(--space-7);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: 'const developer = {\A  name: "Mathew",\A  stack: ["Laravel", "React"]\A}';
  position: absolute;
  right: clamp(16px, 4vw, 56px);
  top: 50%;
  transform: translateY(-50%);
  white-space: pre;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: clamp(0.7rem, 1vw, 0.95rem);
  line-height: 1.7;
  letter-spacing: 0;
  color: rgba(230, 238, 246, 0.287);
  max-width: 18rem;
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  width: 100%;
  max-width: 980px;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.hero-text {
  text-align: center;
  opacity: 1;
  transform: translateY(0);
}

.hero-portrait {
  order: -1;
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.5s ease 0.4s,
    transform 0.5s ease 0.4s;
}

.greeting,
.subtitle,
.cta-row,
.code-line {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(8px);
}

.name {
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  filter: blur(10px);
}

body.hero-ready .greeting {
  animation: text-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

body.hero-ready .name {
  animation: name-pop 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.28s forwards;
}

body.hero-ready .subtitle {
  animation: text-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.44s forwards;
}

body.hero-ready .code-line {
  animation: text-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.62s forwards;
}

body.hero-ready .cta-row {
  animation: text-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.78s forwards;
}

@keyframes text-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes name-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .greeting,
  .name,
  .subtitle,
  .cta-row,
  .code-line {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }
}

@media (min-width: 768px) {
  .hero-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-7);
  }

  .hero-text {
    flex: 1;
    max-width: 440px;
    text-align: left;
    padding-right: 0;
  }

  .hero-portrait {
    order: 2;
    flex: 0 0 min(320px, 36vw);
    justify-content: flex-end;
  }
}

@media (max-width: 767px) {
  .hero::before {
    display: none;
  }
}

/* Hero Typography */
.greeting {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  line-height: 1.05;
  color: var(--text);
  margin-bottom: var(--space-2);
  font-weight: var(--font-bold);
  letter-spacing: -0.04em;
}

.name {
  display: block;
  font-size: clamp(2rem, 4vw, 4.25rem);
  font-weight: var(--font-extrabold);
  color: var(--accent);
  margin: var(--space-1) 0 var(--space-3);
  letter-spacing: -0.04em;
}

.subtitle {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--muted);
  margin-bottom: var(--space-4);
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .subtitle {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Code Line */
.code-line {
  display: inline-flex;
  align-items: center;
  margin: var(--space-4) 0;
  font-family: monospace;
  color: var(--green);
  font-weight: var(--font-semibold);
  letter-spacing: -0.02em;
}

.code-prefix,
.code-suffix {
  opacity: 0.8;
}

.typing {
  min-width: 160px;
  display: inline-block;
}

.typing::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 18px;
  background: var(--green);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* CTA Buttons */
.cta-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-5);
  width: 100%;
  align-items: center;
}

@media (min-width: 768px) {
  .cta-row {
    flex-direction: row;
    max-width: 400px;
    justify-content: center;
  }
}

.btn-primary,
.btn-ghost {
  display: inline-block;
  padding: var(--space-3) var(--space-4);
  border-radius: 15px;
  font-weight: var(--font-bold);
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  font-size: var(--font-md);
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(to right, var(--accent), var(--accent-2));
  color: #111111;
  box-shadow: 0 8px 16px rgba(251, 191, 36, 0.18);
  border: 1px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(251, 191, 36, 0.24);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-ghost {
  background: rgba(20, 20, 20, 0.9);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

/* Portrait Styling */
.portrait-container {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 0.86 / 1;
  border-radius: var(--portrait-border-radius);
  overflow: hidden;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 193, 7, 0.06)
  );
  box-shadow: 0 18px 40px rgba(2, 6, 8, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--portrait-border-radius);
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
  filter: contrast(1.04) brightness(1.02) saturate(0.95);
}

.portrait-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(2, 6, 8, 0.8);
}

.portrait-container:hover .portrait-img {
  transform: scale(1.02);
}

.portrait-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% + 20px);
  height: calc(100% + 20px);
  border-radius: calc(var(--portrait-border-radius) + 2px);
  pointer-events: none;
  background: conic-gradient(
    from 90deg at 50% 50%,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 193, 7, 0.15) 60%
  );
  opacity: 0.8;
  filter: blur(10px);
  z-index: -1;
}

/* Dock Styling */
.dock-wrapper {
  position: fixed;
  left: 0;
  bottom: var(--space-4);
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 90;
  pointer-events: none;
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.dock {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: rgba(15, 20, 25, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 99px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.dock-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.2s ease;
  position: relative;
}

.dock-icon:hover {
  color: var(--accent);
  transform: translateY(-4px) scale(1.1);
}

.dock-icon svg {
  width: 20px;
  height: 20px;
}

.tooltip {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 20, 25, 0.9);
  color: var(--text);
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  font-size: var(--font-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.dock-icon:hover .tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* Dock scroll behavior - slides away when scrolling down,
   pops back in when scrolling up (macOS-style) */
.dock-wrapper.dock--hidden {
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
}

.dock-wrapper.dock--pop .dock {
  animation: dock-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dock-pop {
  0% {
    transform: scale(0.85) translateY(16px);
    opacity: 0;
  }
  60% {
    transform: scale(1.04) translateY(-5px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Sections */
section {
  padding: var(--space-6) 0;
  scroll-margin-top: var(--header-height);
  scroll-snap-align: start;
}

/* Section reorder — the footer carries order 7 so it appears after
   the contact section (order 6) which has the highest inline order. */
.site-footer {
  order: 7;
  grid-column: 1;
}

/* Section eyebrow / label (small caps) */
.section-eyebrow {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  font-weight: var(--font-semibold);
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.section-divider {
  width: 60%;
  max-width: 480px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12) 20%,
    rgba(255, 255, 255, 0.12) 80%,
    transparent
  );
  margin: 0 auto;
}

/* ============================================
   TECH STACK — "Built With" style
   ============================================ */
.techstack {
  padding: var(--space-7) 0 var(--space-5);
  background: var(--bg);
  text-align: center;
  /* Seamless join with surrounding dark sections */
  margin-top: 0;
  border-radius: 0;
}

/* Text block positioned center-right, leaving the
   left side open for additional content. */
.techstack-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 960px;
}

.techstack-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 55%;
  text-align: right;
}

.techstack-text .section-eyebrow {
  text-align: right;
}

.techstack-text .techstack-sub {
  margin-left: auto;
  text-align: right;
}

.techstack-text .tech-brand-ribbon {
  width: 100%;
  margin-top: var(--space-5);
}

/* Mobile — full width centered */
@media (max-width: 767px) {
  .techstack-container {
    max-width: 100%;
    padding: 0 var(--mobile-container-padding);
    align-items: center;
  }

  .techstack-text {
    width: 100%;
    text-align: center;
    align-items: center;
  }

  .techstack-text .section-eyebrow {
    text-align: center;
  }

  .techstack-text .techstack-sub {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .techstack-text .tech-brand-ribbon {
    margin-top: var(--space-4);
  }
}

.techstack-heading {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: var(--font-extrabold);
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.techstack-sub {
  color: var(--muted);
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto var(--space-6);
  opacity: 0;
  transform: translateY(30px);
  filter: blur(10px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s,
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s,
    filter 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}

.techstack-sub.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ============================================
   SCROLL-DRIVEN TYPOGRAPHY MOTION
   The heading splits into individual words that
   each animate (translate + blur + opacity) as
   the section scrolls into the viewport.
   ============================================ */
.techstack-heading .tw {
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotateX(40deg);
  filter: blur(14px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
  transform-origin: center bottom;
}

.techstack-heading .tw.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
  filter: blur(0);
}

/* Stagger delays applied via inline --tw-i set by JS */
.techstack-heading .tw {
  transition-delay: calc(var(--tw-i, 0) * 120ms);
}

/* Brand ribbon fade-in */
.tech-brand-ribbon {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.8s,
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.8s;
}

.tech-brand-ribbon.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .techstack-heading .tw,
  .techstack-sub,
  .tech-brand-ribbon {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* ============================================
   TECH BRAND RIBBON — auto-scrolling horizontal
   ticker that sits below the tech icons grid.
   ============================================ */
.tech-brand-ribbon {
  overflow: hidden;
  width: 100%;
  max-width: 800px;
  margin: var(--space-6) auto 0;
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.tech-brand-track {
  display: flex;
  gap: var(--space-3);
  width: max-content;
  animation: tech-brand-scroll 28s linear infinite;
}

.tech-brand-track:hover {
  animation-play-state: paused;
}

@keyframes tech-brand-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.tech-brand-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  transition: all 0.25s ease;
}

.tech-brand-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.tech-brand-item i {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.25s ease;
}

.tech-brand-item span {
  font-size: var(--font-xs);
  font-weight: var(--font-medium);
  color: var(--muted);
  letter-spacing: -0.01em;
}

.tech-brand-item:hover i {
  color: rgba(255, 255, 255, 0.75);
}

.tech-brand-item[data-brand="html5"] i { color: #e34f26; }
.tech-brand-item[data-brand="css3"] i { color: #1572b6; }
.tech-brand-item[data-brand="javascript"] i { color: #f7df1e; }
.tech-brand-item[data-brand="react"] i { color: #61dafb; }
.tech-brand-item[data-brand="bootstrap"] i { color: #7952b3; }
.tech-brand-item[data-brand="tailwind"] i { color: #38bdf8; }
.tech-brand-item[data-brand="nodejs"] i { color: #339933; }
.tech-brand-item[data-brand="php"] i { color: #777bb4; }
.tech-brand-item[data-brand="laravel"] i { color: #ff2d20; }
.tech-brand-item[data-brand="mysql"] i { color: #4479a1; }
.tech-brand-item[data-brand="git"] i { color: #f05032; }
.tech-brand-item[data-brand="github"] i { color: #fff; }
.tech-brand-item[data-brand="vscode"] i { color: #007acc; }
.tech-brand-item[data-brand="npm"] i { color: #cb3837; }
.tech-brand-item[data-brand="docker"] i { color: #2496ed; }
.tech-brand-item[data-brand="terminal"] i { color: #3be27a; }

/* ============================================
   FAN CAROUSEL — horizontal spread of project cards
   ============================================ */
.projects-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-5);
  position: relative;
  z-index: 1;
}

.projects-heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #151515;
  line-height: 1.1;
  margin-bottom: var(--space-3);
  text-align: center;
}

.projects-sub {
  color: #4b5563;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto var(--space-6);
  text-align: center;
}

.projects-controls {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  text-align: left;
}

.project-filters {
  display: flex;
  gap: var(--space-3);
}

.project-filter-btn {
  background: transparent;
  color: #6b7280;
  padding: var(--space-2) var(--space-4);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: var(--font-sm);
  font-weight: var(--font-medium);
  font-family: inherit;
  transition: all 0.3s ease;
  letter-spacing: -0.01em;
}

.project-filter-btn:hover {
  color: #151515;
  background: rgba(0, 0, 0, 0.04);
}

.project-filter-btn.active {
  color: #151515;
  font-weight: var(--font-semibold);
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: 1px solid #d1d5db;
  border-radius: 99px;
  font-size: var(--font-sm);
  font-weight: var(--font-medium);
  color: #374151;
  text-decoration: none;
  transition: all 0.3s ease;
}

.view-all-link:hover {
  border-color: #151515;
  color: #151515;
  transform: translateY(-1px);
}

.view-all-link i {
  font-size: var(--font-xs);
  transition: transform 0.2s ease;
}

.view-all-link:hover i {
  transform: translate(2px, -2px);
}

.projects .section-eyebrow {
  color: #151515;
}

/* Fan carousel wrapper */
.fan-carousel {
  width: 100%;
  overflow: visible;
  cursor: grab;
  user-select: none;
}

.fan-carousel.is-grabbing {
  cursor: grabbing;
}

.fan-track {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  transition: transform 0.15s ease-out;
}

/* Individual fan card — Apple 2026 Liquid Glass */
.fan-card {
  flex: 0 0 auto;
  width: 320px;
  height: 220px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  transform: rotate(calc((var(--i) - 1) * -5deg));
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  /* Liquid glass: translucent frosted panel absorbing the blobs */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(25px) saturate(140%);
  -webkit-backdrop-filter: blur(25px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.35);
}

.fan-card:nth-child(2) {
  z-index: 2;
  transform: translateY(-12px) rotate(0deg) scale(1.06);
}

.fan-card:nth-child(1) {
  z-index: 1;
  transform: translateX(20px) rotate(6deg);
}

.fan-card:nth-child(3) {
  z-index: 1;
  transform: translateX(-20px) rotate(-6deg);
}

.fan-card:hover {
  transform: translateY(-18px) rotate(0deg) scale(1.1) !important;
  z-index: 10;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45);
}

.fan-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fan-card:hover img {
  transform: scale(1.06);
}

.fan-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 30%,
    rgba(0, 0, 0, 0.65) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fan-card:hover .fan-card-overlay {
  opacity: 1;
}

.fan-card-title {
  font-size: 0.85rem;
  font-weight: var(--font-bold);
  color: #fff;
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.fan-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fan-card-tags span {
  font-size: 0.6rem;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
  font-weight: var(--font-medium);
}

.fan-card-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: 0.55rem;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.88);
  color: #374151;
  font-weight: var(--font-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Fan carousel mobile — horizontal snap scrolling inside
   the pinned canvas (not a vertical column) */
@media (max-width: 767px) {
  .projects-pin-spacer {
    height: 340vh;
  }

  .fan-carousel {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: var(--space-3);
    cursor: grab;
  }

  .fan-carousel::-webkit-scrollbar {
    display: none;
  }

  .fan-track {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    transform: none !important;
  }

  .fan-card,
  .fan-card:nth-child(n) {
    flex: 0 0 auto;
    width: 76vw;
    height: 170px;
    transform: rotate(0deg) translateY(0) scale(1) !important;
    scroll-snap-align: center;
  }

  .fan-card:nth-child(1),
  .fan-card:nth-child(2),
  .fan-card:nth-child(3) {
    transform: rotate(0deg) translateY(0) scale(1) !important;
  }

  .fan-card:hover {
    transform: translateY(-4px) scale(1.03) !important;
  }
}

/* ============================================
   PROJECTS — PINNED LIQUID GLASS CANVAS
   The pin-spacer provides 220vh of scroll room
   (340vh on mobile). The sticky child pins the
   entire Selected Work canvas to the viewport.
   ============================================ */

/* Pin spacer — provides the scroll room for the pin */
.projects-pin-spacer {
  height: 220vh;
  position: relative;
}

/* Sticky pinned canvas — pins at top, 100vh */
.projects-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  /* Light canvas — glass panels absorb glowing blobs */
  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(255, 193, 7, 0.1),
      transparent 0 22%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(59, 226, 122, 0.08),
      transparent 0 20%
    ),
    radial-gradient(
      circle at 50% 82%,
      rgba(88, 166, 255, 0.07),
      transparent 0 24%
    ),
    linear-gradient(180deg, #f5f5f1 0%, #fafaf7 50%, #f5f5f1 100%);
}

.projects {
  position: relative;
  background: linear-gradient(
    180deg,
    #f5f5f1 0%,
    #fafaf7 15%,
    #ffffff 40%,
    #ffffff 70%,
    #fafaf7 90%,
    #f5f5f1 100%
  );
  color: #151515;
  /* Pinned canvas provides its own height via the spacer */
  padding: 0;
}

.section-title {
  font-size: var(--font-2xl);
  margin-bottom: var(--space-4);
  color: var(--text);
  text-align: center;
  letter-spacing: -0.03em;
}

@media (min-width: 768px) {
  .section-title {
    font-size: var(--font-3xl);
  }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   HERO → ABOUT MOTION
   As the hero scrolls away (--hero-progress 0→1),
   the hero content drifts upward, scales down
   slightly, and softens with blur + fade.
   ============================================ */
.hero .hero-inner {
  transform: translateY(calc(var(--hero-progress, 0) * -90px))
    scale(calc(1 - var(--hero-progress, 0) * 0.06));
  opacity: calc(1 - var(--hero-progress, 0) * 0.85);
  filter: blur(calc(var(--hero-progress, 0) * 14px));
  transition: none; /* driven continuously by scroll */
  will-change: transform, opacity, filter;
}

.hero .hero-parallax-bg,
.hero .hero-sphere,
.hero .parallax-cards {
  opacity: calc(1 - var(--hero-progress, 0) * 0.9);
  filter: blur(calc(var(--hero-progress, 0) * 20px));
  transform: translateZ(0);
  will-change: opacity, filter;
}

/* Text motion — soft rise + de-blur entrance.
   Elements are tagged .text-motion by JS when they
   enter the viewport, then .text-motion-in plays the
   final state. Initial state hides them below/blurred. */
.text-motion {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(12px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.text-motion.text-motion-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .hero .hero-inner,
  .hero .hero-parallax-bg,
  .hero .hero-sphere,
  .hero .parallax-cards,
  .text-motion {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* ============================================
   ABOUT SECTION — Parallax Sticky Layout
   ============================================ */
.about {
  position: relative;
  min-height: 130vh;
  overflow: hidden;
}

/* Fixed dark background — stays pinned behind the sticky content. */
.about-fixed-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  /* Translucent so the body dots + glow layers keep showing through */
  background-color: rgba(11, 11, 11, 0.72);
  background-image:
    radial-gradient(
      circle at 18% 20%,
      rgba(255, 193, 7, 0.16),
      transparent 0 18%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(59, 226, 122, 0.12),
      transparent 0 16%
    ),
    radial-gradient(
      circle at 50% 78%,
      rgba(88, 166, 255, 0.1),
      transparent 0 20%
    );
  transform: translateZ(0);
  will-change: transform;
  /* Hidden until the About section enters the viewport */
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.about-fixed-bg.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Sticky inner container — pins at top while the About section
   is within the viewport, then scrolls out naturally. */
.about-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  z-index: 1;
  padding: var(--space-7) clamp(32px, 6vw, 96px);
  gap: clamp(24px, 5vw, 72px);
  max-width: 1200px;
  margin: 0 auto;
}

/* Left column — text + chips */
.about-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 40px);
  min-width: 0;
}

/* Stacked bold words: DEFINE / DESIGN / DELIVER */
.about-text-layer {
  display: flex;
  flex-direction: column;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.about-word-group {
  position: relative;
  cursor: pointer;
}

.about-word-hover-content {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%) translateX(20px);
  width: clamp(250px, 25vw, 350px);
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.about-word-group:hover .about-word-hover-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

.about-word-group:hover .about-big-word {
  color: var(--accent) !important;
  transform: translateX(10px);
}

.hover-label {
  font-size: var(--font-xs);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.hover-heading {
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
}

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

.hover-text {
  font-size: var(--font-sm);
  color: var(--muted);
  line-height: 1.5;
}

.about-big-word {
  display: block;
  font-family:
    "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  text-transform: uppercase;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.3s ease;
}

.about-big-word.word-white {
  color: var(--text);
}

.about-big-word.word-muted {
  color: rgba(255, 255, 255, 0.35);
}

.about-big-word.word-dim {
  color: rgba(255, 255, 255, 0.12);
}

/* About bio text */
.about-details {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about-bio {
  color: var(--muted);
  font-size: clamp(var(--font-sm), 1.1vw, var(--font-base));
  line-height: 1.65;
  max-width: 420px;
}

/* Right column — portrait image card */
.about-portrait {
  flex: 0 0 clamp(220px, 35vw, 420px);
  display: flex;
  justify-content: center;
}

.about-portrait-card {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 193, 7, 0.04)
  );
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-portrait-card:hover {
  transform: scale(1.015);
}

/* --- About Mockup Avatar --- */
.about-mockup-avatar {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10%;
}

.about-mockup-avatar svg {
  width: 80%;
  height: 80%;
}

.about-mockup-card-ui {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin: 0 16px 20px;
}

.mockup-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mockup-dot--red {
  background: #f87171;
}

.mockup-dot--yellow {
  background: #fbbf24;
}

.mockup-dot--green {
  background: #34d399;
}

.mockup-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mockup-line {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.mockup-line--name {
  width: 70%;
}

.mockup-line--role {
  width: 50%;
  opacity: 0.6;
}

.mockup-line--short {
  width: 30%;
  opacity: 0.4;
}

/* --- Mobile layout --- */
@media (max-width: 767px) {
  .about {
    min-height: 120vh;
  }

  .about-sticky {
    flex-direction: column;
    padding: var(--space-7) var(--mobile-container-padding);
    justify-content: center;
    text-align: center;
  }

  .about-left {
    align-items: center;
  }

  .about-text-layer {
    align-items: center;
  }

  .about-big-word {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .about-bio {
    text-align: center;
    max-width: 100%;
  }

  .about-portrait {
    flex: 0 0 auto;
    max-width: 260px;
    margin-top: var(--space-4);
  }

  .about-portrait-card {
    border-radius: 16px;
  }

  .about-word-hover-content {
    display: none;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
  .about-sticky {
    padding: var(--space-7) clamp(20px, 5vw, 56px);
    gap: clamp(16px, 3vw, 40px);
  }

  .about-big-word {
    font-size: clamp(2.5rem, 6vw, 5rem);
  }

  .about-portrait {
    flex: 0 0 clamp(180px, 28vw, 300px);
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .about-big-word,
  .about-portrait-card {
    transition: none;
  }
}

/* ============================================
   EXPERIENCE / TIMELINE SECTION
   ============================================ */
.experience {
  position: relative;
  overflow: hidden;
  padding: var(--space-7) 0;
  transform: translateZ(0);
  /* Pull this section up over the pinned Selected Work canvas */
  margin-top: -100vh;
  z-index: 5;
  /* Frosted reveal — blurs the static projects beneath as it glides over */
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
}

/* Parallax background layer that melts into off-white */
.experience-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    #f5f5f1 0%,
    #f8f8f4 30%,
    #fafaf7 55%,
    #f3f3ef 80%,
    #efefea 100%
  );
  opacity: var(--exp-progress, 0);
  pointer-events: none;
  box-shadow: 0 0 80px rgba(255, 255, 255, 0.06) inset;
  transform: translateZ(0);
  will-change: opacity;
  /* Smooth sculpted entrance over the pinned projects */
  border-radius: 0 0 48px 48px;
  clip-path: inset(
    calc((1 - var(--exp-progress, 0)) * 0px)
    calc((1 - var(--exp-progress, 0)) * 0px)
    0
    calc((1 - var(--exp-progress, 0)) * 0px)
  );
}

.experience .container {
  position: relative;
  z-index: 1;
}

/* Seamless dark → light theme blending.
   Every color is interpolated continuously with
   --exp-progress (0 = dark theme, 1 = light theme). */
.experience .section-title {
  color: color-mix(in srgb, #151515 calc(var(--exp-progress, 0) * 100%), var(--text));
}

.experience .timeline::before {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, #d4a217 calc(var(--exp-progress, 0) * 100%), var(--accent)),
    color-mix(in srgb, #d6d6d0 calc(var(--exp-progress, 0) * 100%), var(--border))
  );
}

.experience .timeline-marker {
  background: color-mix(in srgb, #d4a217 calc(var(--exp-progress, 0) * 100%), var(--accent));
  box-shadow: 0 0 0 4px
    color-mix(in srgb, rgba(212, 162, 23, 0.25) calc(var(--exp-progress, 0) * 100%), rgba(251, 191, 36, 0.2));
}

.experience .timeline-card {
  /* Apple 2026 Liquid Glass — frosted translucent panel */
  background: color-mix(
    in srgb,
    rgba(255, 255, 255, 0.82) calc(var(--exp-progress, 0) * 100%),
    rgba(255, 255, 255, 0.08)
  );
  backdrop-filter: blur(25px) saturate(140%);
  -webkit-backdrop-filter: blur(25px) saturate(140%);
  border: 1px solid
    color-mix(in srgb, rgba(255, 255, 255, 0.7) calc(var(--exp-progress, 0) * 100%), rgba(255, 255, 255, 0.15));
  border-radius: 28px;
  box-shadow:
    0 16px 40px
      color-mix(
        in srgb,
        rgba(0, 0, 0, 0.07) calc(var(--exp-progress, 0) * 100%),
        rgba(0, 0, 0, 0.18)
      ),
    inset 0 1px 0
      color-mix(
        in srgb,
        rgba(255, 255, 255, 0.9) calc(var(--exp-progress, 0) * 100%),
        rgba(255, 255, 255, 0.35)
      ),
    inset 0 0 0 0.5px
      color-mix(in srgb, rgba(255, 255, 255, 0.35) calc(var(--exp-progress, 0) * 100%), rgba(255, 255, 255, 0.12));
}

.experience .timeline-card:hover {
  background: color-mix(
    in srgb,
    rgba(255, 255, 255, 0.95) calc(var(--exp-progress, 0) * 100%),
    rgba(255, 255, 255, 0.04)
  );
  border-color: color-mix(in srgb, rgba(212, 162, 23, 0.55) calc(var(--exp-progress, 0) * 100%), rgba(251, 191, 36, 0.3));
}

.experience .timeline-header h3 {
  color: color-mix(in srgb, #151515 calc(var(--exp-progress, 0) * 100%), var(--text));
}

.experience .timeline-org {
  color: color-mix(in srgb, #4b5563 calc(var(--exp-progress, 0) * 100%), var(--muted));
}

.experience .timeline-date {
  background: color-mix(
    in srgb,
    rgba(212, 162, 23, 0.15) calc(var(--exp-progress, 0) * 100%),
    rgba(251, 191, 36, 0.1)
  );
  color: color-mix(in srgb, #926c06 calc(var(--exp-progress, 0) * 100%), var(--accent));
}

.experience .timeline-list li {
  color: color-mix(in srgb, #374151 calc(var(--exp-progress, 0) * 100%), var(--muted));
}

.experience .timeline-list li::before {
  color: color-mix(in srgb, #d4a217 calc(var(--exp-progress, 0) * 100%), var(--accent));
}

.timeline {
  position: relative;
  padding-left: var(--space-5);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-5);
  /* Zoom/Scale parallax — cards glide up from the background,
     scaling from 82% to 100% as the Experience section scrolls
     over the pinned Selected Work. Driven by --exp-progress.
     Uses the independent `scale`/`translate` properties so it
     doesn't clash with the `.reveal` transform animations. */
  scale: calc(0.82 + var(--exp-progress, 0) * 0.18);
  translate: 0 calc((1 - var(--exp-progress, 0)) * 70px);
  transform-origin: center center;
  will-change: scale, translate;
}

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

.timeline-marker {
  position: absolute;
  left: calc(-1 * var(--space-5) + 3px);
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2);
}

.timeline-card {
  /* Apple 2026 Liquid Glass — frosted translucent panel */
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(25px) saturate(140%);
  -webkit-backdrop-filter: blur(25px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: var(--space-4) var(--space-5);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  transition:
    background 0.4s ease,
    border-color 0.4s ease,
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
}

.timeline-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(251, 191, 36, 0.45);
  transform: translateY(-3px);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.22),
    0 4px 12px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.18);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.timeline-header h3 {
  font-size: var(--font-lg);
  font-weight: var(--font-bold);
  color: var(--text);
}

.timeline-org {
  color: var(--muted);
  font-size: var(--font-sm);
  margin-top: var(--space-1);
}

.timeline-date {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent);
  padding: var(--space-1) var(--space-3);
  border-radius: 99px;
  font-size: var(--font-xs);
  font-weight: var(--font-semibold);
  white-space: nowrap;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline-list li {
  position: relative;
  padding-left: var(--space-4);
  margin-bottom: var(--space-2);
  color: var(--muted);
  font-size: var(--font-sm);
  line-height: 1.6;
}

.timeline-list li:last-child {
  margin-bottom: 0;
}

.timeline-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   Smooth blur-to-sharp pop-in with staggered delays.
   The --reveal-delay custom property is set by main.js
   so items inside the same group appear one after another.
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  filter: blur(12px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0s),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0s),
    filter 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0s);
  will-change: opacity, transform, filter;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
  padding: var(--space-8) 0;
}

/* Contact section - comfortable content width, not edge-to-edge */
.contact .container {
  max-width: 1000px;
  margin: 0 auto;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

.contact-layout {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-7);
    align-items: start;
  }
}

.contact-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: var(--font-bold);
  color: var(--text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.03em;
}

.contact-sub {
  color: var(--muted);
  font-size: var(--font-base);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.contact-socials {
  display: flex;
  gap: var(--space-4);
}

.contact-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--muted);
  font-size: var(--font-base);
  transition: all 0.25s ease;
}

.contact-socials a:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  transform: translateY(-2px);
}

/* Keep form fields a regular, web-standard size */
.contact-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: var(--font-sm);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: var(--font-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all 0.25s ease;
  align-self: flex-start;
}

.contact-send-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.contact-send-btn i {
  font-size: var(--font-xs);
  transition: transform 0.2s ease;
}

.contact-send-btn:hover i {
  transform: translateX(3px);
}

/* ============================================
   FOOTER — Compact Glassmorphism Bar
   ============================================ */
.site-footer {
  position: relative;
  z-index: 10;
  margin: 0 0 var(--dock-height) 0;
  padding: 0 var(--mobile-container-padding);
  border-top: none;
  background: transparent;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.footer-left {
  flex-shrink: 0;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--font-xs);
  font-weight: var(--font-medium);
  letter-spacing: 0.01em;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--font-sm);
  transition: all 0.25s ease;
}

.footer-socials a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* ============================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Mobile-first adjustments for phones (max 480px) */
@media (max-width: 480px) {
  /* Reduce container padding on mobile */
  .container {
    padding-left: var(--mobile-container-padding);
    padding-right: var(--mobile-container-padding);
  }

  /* Header adjustments */
  .site-header {
    top: 0;
    --header-height: 56px;
  }

  .brand {
    font-size: var(--font-base);
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .hamburger-icon {
    width: 20px;
    height: 16px;
  }

  /* Hero section */
  .hero {
    padding-top: 80px;
    padding-bottom: var(--space-5);
    min-height: auto;
  }

  .greeting {
    font-size: 1.75rem;
  }

  .name {
    font-size: 1.5rem;
    margin: var(--space-1) 0 var(--space-2);
  }

  .subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Portrait - smaller on mobile */
  .portrait-container {
    width: min(85%, 240px);
  }

  /* Code line */
  .code-line {
    font-size: 0.85rem;
    margin: var(--space-3) 0;
  }

  .typing {
    min-width: 120px;
  }

  .typing::after {
    width: 6px;
    height: 14px;
  }

  /* CTA buttons - full width on mobile */
  .cta-row {
    margin-top: var(--space-4);
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    padding: var(--space-3);
    font-size: var(--font-base);
  }

  /* Sections */
  section {
    padding: var(--space-5) 0;
  }

  .section-title {
    font-size: var(--font-xl);
    margin-bottom: var(--space-3);
  }

  /* About section */
  .about-bio {
    font-size: var(--font-sm);
  }

  /* Timeline */
  .timeline {
    padding-left: var(--space-4);
  }

  .timeline::before {
    left: 5px;
  }

  .timeline-marker {
    left: calc(-1 * var(--space-4) + 2px);
    width: 8px;
    height: 8px;
  }

  .timeline-card {
    padding: var(--space-3);
  }

  .timeline-header {
    flex-direction: column;
    gap: var(--space-2);
  }

  .timeline-header h3 {
    font-size: var(--font-base);
  }

  .timeline-org {
    font-size: var(--font-xs);
  }

  .timeline-date {
    font-size: 0.65rem;
    padding: 2px var(--space-2);
    align-self: flex-start;
  }

  .timeline-list li {
    font-size: var(--font-xs);
    padding-left: var(--space-3);
    line-height: 1.5;
  }

  /* Contact */
  .contact {
    padding: var(--space-3) 0 0 0;
  }

  .contact-heading {
    font-size: 1.25rem;
  }

  .contact-sub {
    font-size: var(--font-sm);
  }

  .contact-socials {
    gap: var(--space-3);
  }

  .contact-socials a {
    width: 40px;
    height: 40px;
    font-size: var(--font-base);
  }

  .contact-form input,
  .contact-form textarea {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-xs);
  }

  .contact-send-btn {
    font-size: var(--font-xs);
    padding: var(--space-2) var(--space-3);
  }

  /* Footer */
  .site-footer {
    margin-bottom: 70px;
    margin-top: var(--space-6);
    padding: 0 12px;
  }

  .footer-inner {
    padding: var(--space-4) var(--mobile-container-padding);
    border-radius: 999px;
  }

  .footer-copy {
    font-size: var(--font-xs);
  }

  .footer-socials {
    gap: var(--space-3);
  }

  .footer-socials a {
    width: 28px;
    height: 28px;
    font-size: var(--font-xs);
  }

  /* Dock - smaller on mobile */
  .dock {
    gap: var(--space-2);
    padding: 6px var(--space-2);
  }

  .dock-icon {
    width: 38px;
    height: 38px;
  }

  .dock-icon svg {
    width: 18px;
    height: 18px;
  }

  .tooltip {
    font-size: 0.65rem;
    padding: 4px var(--space-2);
  }
}

/* Small phones (max 360px) */
@media (max-width: 360px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .greeting {
    font-size: 1.5rem;
  }

  .name {
    font-size: 1.35rem;
  }

  .subtitle {
    font-size: 0.85rem;
  }

  .portrait-container {
    width: min(80%, 200px);
  }

  .btn-primary,
  .btn-ghost {
    font-size: var(--font-sm);
  }
}

/* Tablet adjustments (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
  .hero {
    min-height: auto;
    padding-bottom: var(--space-6);
  }

  .greeting {
    font-size: 2rem;
  }

  .name {
    font-size: 1.85rem;
  }

  .portrait-container {
    width: min(80%, 280px);
  }
}

/* Reduce motion for better mobile performance */
@media (max-width: 768px) {
  /* Simplify animations on mobile */
  body::after {
    animation: none;
  }

  /* Reduce hover effects on touch devices */
  .timeline-card:hover {
    transform: none;
  }

  /* Smaller dock on tablets */
  .dock {
    transform: scale(0.9);
    transform-origin: bottom center;
  }
}

/* ============================================
   HERO PARALLAX BACKGROUND (0.3x scroll speed)
   ============================================ */
.hero-parallax-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(
      circle at 30% 40%,
      rgba(251, 191, 36, 0.22),
      transparent 0 50%
    ),
    radial-gradient(
      circle at 70% 60%,
      rgba(59, 226, 122, 0.16),
      transparent 0 45%
    ),
    radial-gradient(
      circle at 50% 80%,
      rgba(255, 255, 255, 0.12),
      transparent 0 40%
    ),
    radial-gradient(circle, rgba(255, 255, 255, 0.2) 1px, transparent 1.5px);
  background-size: auto, auto, auto, 28px 28px;
  will-change: transform;
  transform: translateZ(0);
  pointer-events: none;
}

/* ============================================
   HERO NEON SPHERES (mouse-based parallax)
   ============================================ */
.hero-sphere {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  transform: translateZ(0);
  filter: blur(60px);
  opacity: 0.7;
  z-index: 0;
}

.hero-sphere--1 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.35), transparent 70%);
  top: 10%;
  left: 8%;
}

.hero-sphere--2 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(59, 226, 122, 0.3), transparent 70%);
  top: 55%;
  right: 12%;
}

.hero-sphere--3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.25), transparent 70%);
  bottom: 15%;
  left: 35%;
}

/* ============================================
   LAYERED PARALLAX CARDS
   Stacked visual cards with differing
   data-speed attributes (0.1, 0.25, 0.45).
   ============================================ */
.parallax-cards {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.parallax-card {
  position: absolute;
  border-radius: 16px;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 0.05s linear;
}

.parallax-card:nth-child(1) {
  width: 200px;
  height: 260px;
  top: 15%;
  right: 5%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(251, 191, 36, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.06);
  transform: translateY(0) rotate(-4deg);
}

.parallax-card:nth-child(2) {
  width: 170px;
  height: 220px;
  top: 30%;
  right: 15%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(59, 226, 122, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.05);
  transform: translateY(0) rotate(3deg);
}

.parallax-card:nth-child(3) {
  width: 140px;
  height: 190px;
  top: 45%;
  right: 25%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(88, 166, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.04);
  transform: translateY(0) rotate(-2deg);
}

.parallax-card-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.005)
  );
}

/* ============================================
   LIQUID GLASS ORGANIC BLOBS
   Soft, vibrant, slowly drifting color gradients that
   sit behind the glass panels so the frosted cards
   dynamically absorb and blend with the glowing shapes.
   ============================================ */
.lg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px) saturate(130%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  opacity: 0.75;
  animation: lg-blob-float 22s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

.lg-blob--1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(212, 162, 23, 0.4) 0%, transparent 70%);
  top: 2%;
  left: -6%;
}

.lg-blob--2 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(59, 226, 122, 0.32) 0%, transparent 70%);
  bottom: 8%;
  right: -8%;
  animation-delay: -5s;
}

.lg-blob--4 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.26) 0%, transparent 70%);
  bottom: 26%;
  left: 22%;
  animation-delay: -15s;
}

.lg-blob--5 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(212, 162, 23, 0.26) 0%, transparent 70%);
  top: 12%;
  left: -7%;
}

.lg-blob--6 {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(59, 226, 122, 0.2) 0%, transparent 70%);
  bottom: 4%;
  right: -5%;
  animation-delay: -7s;
}

@keyframes lg-blob-float {
  from {
    transform: translate3d(-3%, -2%, 0) scale(1);
  }

  to {
    transform: translate3d(3%, 3%, 0) scale(1.08);
  }
}

/* Projects section mobile */
@media (max-width: 767px) {
  .projects-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-filters {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .project-filter-btn {
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-xs);
  }

  .view-all-link {
    font-size: var(--font-xs);
    padding: var(--space-1) var(--space-3);
  }

  .parallax-cards {
    display: none;
  }
}

/* ============================================
   Fix for landscape phones
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: 80px;
    padding-bottom: var(--space-4);
  }

  .hero-portrait {
    display: none;
  }

  .hero-content {
    flex-direction: column;
  }

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

  .greeting {
    font-size: 1.5rem;
  }

  .name {
    font-size: 1.35rem;
  }
}