/* =====================================================================
   MOTIF: luxury automotive (BMW · Porsche · Mercedes)
   Noir base, graphite layers, silver highlights, glass surfaces.
   Motion uses transform + opacity for 60fps-friendly animation.
   ===================================================================== */

:root {
  --black: #050505;
  --charcoal: #0e0e0f;
  --graphite: #161618;
  --gunmetal: #1f2124;
  --silver: #c8cdd4;
  --silver-bright: #e8ecf0;
  --muted: #8e939c;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-edge: rgba(255, 255, 255, 0.12);
  --glow: rgba(232, 236, 240, 0.14);
  --font-sans: "Manrope", system-ui, sans-serif;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 20px;
  --nav-h: 4.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--silver-bright);
  background: var(--black);
  min-height: 100vh;
  overflow-x: clip;
}

/* Hide main UI until loader finishes */
body.loading {
  overflow: hidden;
}

body.loading main,
body.loading .nav-shell,
body.loading .site-footer,
body.loading .parallax-bg,
body.loading .cursor-glow {
  opacity: 0;
  visibility: hidden;
}

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

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  padding: 0.6rem 1rem;
  background: var(--silver-bright);
  color: var(--black);
  font-weight: 700;
  border-radius: 8px;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ----------------------------
   Loader
   ---------------------------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: radial-gradient(
    ellipse at 50% 0%,
    #1a1a1f 0%,
    var(--black) 55%
  );
  transition: opacity 0.7s var(--ease-out), visibility 0.7s;
}

.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
  padding: 2rem;
}

.loader-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 8vw, 4rem);
  letter-spacing: 0.25em;
  color: var(--silver-bright);
  animation: pulse-brand 1.8s ease-in-out infinite;
}

.loader-ring {
  width: 120px;
  height: 120px;
  margin: -2.5rem auto 1rem;
  border-radius: 50%;
  border: 1px solid var(--glass-edge);
  border-top-color: var(--silver-bright);
  animation: spin-slow 1.2s linear infinite;
}

.loader-tagline {
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.loader-progress {
  width: min(260px, 70vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-inline: auto;
}

.loader-progress-bar {
  display: block;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--silver), transparent);
  animation: sweep-bar 1.1s ease-in-out infinite;
}

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

@keyframes sweep-bar {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

@keyframes pulse-brand {
  0%,
  100% {
    opacity: 0.82;
    letter-spacing: 0.22em;
  }
  50% {
    opacity: 1;
    letter-spacing: 0.28em;
  }
}

/* ----------------------------
   Cursor glow (desktop hover-capable devices)
   ---------------------------- */
.cursor-glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9000;
  background: radial-gradient(
    circle,
    rgba(232, 236, 240, 0.07) 0%,
    transparent 70%
  );
  transform: translate3d(-50%, -50%, 0);
  opacity: 0;
  transition: opacity 0.35s ease;
  mix-blend-mode: screen;
}

body.has-pointer-glow.cursor-active .cursor-glow {
  opacity: 1;
}

/* ----------------------------
   Parallax background layers
   ---------------------------- */
.parallax-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.parallax-plane {
  position: absolute;
  inset: -20%;
  opacity: 0.45;
  will-change: transform;
}

.plane-a {
  background: radial-gradient(
      circle at 20% 20%,
      rgba(200, 205, 212, 0.09),
      transparent 45%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(140, 145, 152, 0.05),
      transparent 40%
    );
}

.plane-b {
  background: linear-gradient(
    155deg,
    transparent 35%,
    rgba(255, 255, 255, 0.02) 50%,
    transparent 65%
  );
}

.plane-c {
  background: repeating-linear-gradient(
    -18deg,
    transparent,
    transparent 80px,
    rgba(255, 255, 255, 0.015) 80px,
    rgba(255, 255, 255, 0.015) 81px
  );
}

.particles-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.grid-scan {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(
    ellipse at 50% 30%,
    black 30%,
    transparent 72%
  );
  animation: grid-drift 40s linear infinite;
}

@keyframes grid-drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-48px, -48px, 0);
  }
}

/* ----------------------------
   Navigation — glass capsule
   ---------------------------- */
.nav-shell {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(920px, calc(100% - 2rem));
  z-index: 800;
  border-radius: 999px;
  background: rgba(14, 14, 15, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: visible;
  transition: opacity 0.85s var(--ease-out),
    transform 0.55s var(--ease-out),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.nav-shell.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.nav-shell.scrolled {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
  border-color: rgba(255, 255, 255, 0.16);
}

.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  padding-bottom: calc(0.55rem + 2px);
  min-height: var(--nav-h);
  position: relative;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  background: linear-gradient(145deg, var(--glass), transparent);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav-logo:hover {
  box-shadow: 0 0 24px rgba(232, 236, 240, 0.12);
}

.nav-progress {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.nav-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--silver),
    transparent
  );
  transition: width 0.1s linear;
}

.nav-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem;
}

.nav-item {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  color: var(--muted);
  position: relative;
  overflow: hidden;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 0.72rem;
  right: 0.72rem;
  bottom: 0.38rem;
  height: 1px;
  background: var(--silver-bright);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease-out);
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--silver-bright);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item:focus-visible::after {
  transform: scaleX(1);
}

.nav-item.active {
  color: var(--silver-bright);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active::after {
  transform: scaleX(1);
}

.nav-burger {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--glass-edge);
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 0.5rem;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  height: 2px;
  background: var(--silver-bright);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 840px) {
  .nav-burger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: 0;
    flex-direction: column;
    padding: 0.75rem;
    border-radius: var(--radius);
    background: rgba(10, 10, 11, 0.96);
    border: 1px solid var(--glass-edge);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.45s var(--ease-out), opacity 0.3s ease;
  }

  .nav-menu.open {
    max-height: 420px;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-item {
    width: 100%;
    border-radius: 12px;
  }
}

main {
  position: relative;
  z-index: 1;
  transition: opacity 0.6s var(--ease-out);
}

/* ----------------------------
   Sections
   ---------------------------- */
.section {
  padding: clamp(5rem, 14vw, 8.5rem) 0;
  position: relative;
}

.section-shell {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.section-eyebrow {
  font-family: var(--font-display);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.8vw, 2.85rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.08;
  max-width: 18ch;
  margin-bottom: 1rem;
}

.section-head {
  margin-bottom: 2.75rem;
}

.section-lead,
.section-body {
  color: var(--muted);
  max-width: 62ch;
}

.section-body {
  margin-top: 0.85rem;
}

/* ----------------------------
   Scroll reveal helper
   ---------------------------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 36px, 0);
  transition: opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-out),
    filter 0.85s ease;
  transition-delay: var(--delay, 0ms);
}

.reveal.in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ----------------------------
   Hero — split runway layout
   ---------------------------- */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-h) + 3rem);
  padding-bottom: 4rem;
  position: relative;
}

.hero-layout {
  width: min(1120px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}

.hero-kicker {
  font-size: 0.74rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero-title {
  margin: 0 0 0.85rem;
  line-height: 0.94;
}

.hero-title-stack {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9.5vw, 6rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero-title-stack.accent {
  color: transparent;
  background: linear-gradient(110deg, #fff 14%, var(--silver) 45%, var(--muted) 90%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-role {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 600;
  color: var(--silver);
  margin-bottom: 0.95rem;
}

.hero-drive-line {
  font-size: clamp(0.92rem, 1.85vw, 1.06rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.95rem;
  background: linear-gradient(
    90deg,
    #6c6f75,
    #f2f3f6,
    #6c6f75,
    #eef0f4
  );
  background-size: 280% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: metallic-shimmer 5s linear infinite;
}

.hero-typing {
  min-height: 1.6em;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.typing-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: var(--silver-bright);
  animation: caret-blink 0.95s steps(2) infinite;
  vertical-align: text-bottom;
}

@keyframes caret-blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

@keyframes metallic-shimmer {
  from {
    background-position: 0% center;
  }
  to {
    background-position: 120% center;
  }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero intro keyframes stagger */
.animate-hero {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
}

body.intro-done .animate-hero {
  animation: hero-rise 1s var(--ease-out) forwards;
}

body.intro-done .animate-hero.i1 {
  animation-delay: 0.05s;
}
body.intro-done .animate-hero.i2 {
  animation-delay: 0.14s;
}
body.intro-done .animate-hero.i3 {
  animation-delay: 0.24s;
}
body.intro-done .animate-hero.i4 {
  animation-delay: 0.32s;
}
body.intro-done .animate-hero.i5 {
  animation-delay: 0.42s;
}
body.intro-done .animate-hero.i6 {
  animation-delay: 0.52s;
}
body.intro-done .animate-hero.i7 {
  animation-delay: 0.62s;
}

@keyframes hero-rise {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.hero-media {
  justify-self: end;
}

.hero-frame {
  position: relative;
  width: min(320px, 78vw);
  aspect-ratio: 1;
}

.hero-ring {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  border: 1px solid rgba(232, 236, 240, 0.18);
  box-shadow: 0 0 60px rgba(232, 236, 240, 0.08),
    inset 0 0 40px rgba(255, 255, 255, 0.02);
  animation: orbit-pulse 5s ease-in-out infinite;
}

.hero-photo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--glass-edge);
  transform: translateZ(0);
  transition: transform 0.5s var(--ease-out), box-shadow 0.45s ease;
  animation: float-photo 7s ease-in-out infinite;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
}

.hero-frame:hover .hero-photo {
  transform: scale(1.04);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.62),
    0 0 40px rgba(232, 236, 240, 0.12);
}

@keyframes float-photo {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

@keyframes orbit-pulse {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.03) rotate(4deg);
  }
}

.hero-caption {
  margin-top: 1.1rem;
  font-size: 0.7rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.hero-scroll-hint {
  width: min(1120px, 92%);
  margin: auto auto 0;
  padding-top: 3rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-scroll-line {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, var(--silver), transparent);
}

/* Buttons — luminous */
.btn-glow {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s ease, box-shadow 0.35s ease,
    border-color 0.3s ease;
}

.btn-primary {
  color: var(--black);
  background: linear-gradient(145deg, #f2f5f9, var(--silver));
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 32px rgba(232, 236, 240, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(232, 236, 240, 0.28),
    0 0 32px rgba(232, 236, 240, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--silver-bright);
  border-color: var(--glass-edge);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(232, 236, 240, 0.35);
  box-shadow: 0 0 24px rgba(232, 236, 240, 0.1);
}

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

.btn-glow::before {
  content: "";
  position: absolute;
  inset: auto -40% 0 auto;
  width: 50%;
  height: 320%;
  background: linear-gradient(
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  transform: rotate(25deg);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.55s var(--ease-out);
  pointer-events: none;
  z-index: -1;
}

.btn-glow:hover::before,
.btn-glow:focus-visible::before {
  opacity: 1;
  transform: rotate(25deg) translateY(-46%);
}

/* ----------------------------
   About
   ---------------------------- */
.about {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.02) 42%,
    transparent 88%
  );
}

.about-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-visual img {
  width: clamp(140px, 22vw, 220px);
  border-radius: 50%;
  border: 1px solid var(--glass-edge);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
  transition: transform 0.45s var(--ease-out);
}

.about-visual:hover img {
  transform: scale(1.05);
}

/* ----------------------------
   Skills
   ---------------------------- */
.skills-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.skill-glass {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(155deg, var(--glass), rgba(8, 8, 9, 0.55));
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.skill-glass:hover {
  transform: translateY(-6px);
  border-color: rgba(232, 236, 240, 0.25);
  box-shadow: 0 28px 55px rgba(0, 0, 0, 0.5),
    0 0 28px rgba(232, 236, 240, 0.06);
}

.skill-glass h3 {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}

.skill-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.skill-track {
  --level: 0;
}

.skill-track[data-level="92"] {
  --level: 92;
}
.skill-track[data-level="90"] {
  --level: 90;
}
.skill-track[data-level="88"] {
  --level: 88;
}
.skill-track[data-level="86"] {
  --level: 86;
}
.skill-track[data-level="85"] {
  --level: 85;
}
.skill-track[data-level="84"] {
  --level: 84;
}
.skill-track[data-level="82"] {
  --level: 82;
}

.skill-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #6f737a, #e7eaef);
  box-shadow: 0 0 18px rgba(232, 236, 240, 0.25);
  transition: width 1.05s var(--ease-out);
}

.skill-glass.fill-active .skill-fill {
  width: calc(var(--level) * 1%);
}

/* ----------------------------
   Projects — tilt-ready deck
   ---------------------------- */
.projects {
  background: radial-gradient(
    ellipse at 75% 0%,
    rgba(255, 255, 255, 0.04),
    transparent 55%
  );
}

.project-deck {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.project-tile {
  padding: 1.65rem 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--glass), rgba(22, 22, 24, 0.8));
  border: 1px solid var(--glass-edge);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: transform 0.08s linear, border-color 0.35s ease,
    box-shadow 0.35s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.project-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    transparent 40%,
    rgba(255, 255, 255, 0.07) 50%,
    transparent 62%
  );
  transform: translateX(-140%);
  transition: transform 0.85s var(--ease-out);
  pointer-events: none;
}

.project-tile:hover::after {
  transform: translateX(140%);
}

.project-tile:hover {
  border-color: rgba(232, 236, 240, 0.28);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55),
    0 0 30px rgba(232, 236, 240, 0.08);
}

.project-index {
  font-family: var(--font-display);
  font-size: 2rem;
  color: rgba(232, 236, 240, 0.12);
  display: block;
  margin-bottom: 0.6rem;
}

.project-tile h3 {
  font-size: 1.05rem;
  margin: 0 0 0.55rem;
  font-weight: 700;
}

.project-tile p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1.1rem;
}

.project-links {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.project-link {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  transition: background 0.25s ease, border-color 0.25s ease,
    transform 0.25s ease;
}

.project-link:hover,
.project-link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(232, 236, 240, 0.28);
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .project-deck {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------
   Timeline
   ---------------------------- */
.timeline-section {
  background: linear-gradient(180deg, var(--charcoal), var(--black));
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  max-width: 640px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    rgba(232, 236, 240, 0.35),
    rgba(232, 236, 240, 0.08)
  );
  transform-origin: top center;
  transform: scaleY(var(--line-scale, 0));
  transition: transform 0.12s linear;
}

.timeline-node {
  position: relative;
  padding: 0 0 2.25rem 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--silver-bright);
  box-shadow: 0 0 20px rgba(232, 236, 240, 0.35);
  transform: scale(0);
  transition: transform 0.55s var(--ease-out);
}

.timeline-node.in-view .timeline-dot {
  transform: scale(1);
}

.timeline-label {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--silver);
  display: block;
  margin-bottom: 0.35rem;
}

.timeline-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ----------------------------
   Contact
   ---------------------------- */
.contact-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(2rem, 5vw, 2.75rem);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--glass-edge);
  background: linear-gradient(150deg, var(--glass), rgba(10, 10, 11, 0.88));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font: inherit;
  color: var(--silver-bright);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(142, 147, 156, 0.75);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(232, 236, 240, 0.45);
  box-shadow: 0 0 0 1px rgba(232, 236, 240, 0.15),
    0 0 28px rgba(232, 236, 240, 0.12);
}

.contact-form .input-error {
  border-color: #c95a5a;
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.25rem;
  margin: 0;
}

.btn-send {
  justify-self: start;
}

@media (max-width: 820px) {
  .contact-shell {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------
   Footer
   ---------------------------- */
.site-footer {
  position: relative;
  z-index: 2;
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--glass-edge);
  background: linear-gradient(0deg, var(--black), transparent);
}

.footer-inner {
  width: min(1120px, 92%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.footer-brand {
  font-family: var(--font-display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}

.footer-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.to-top {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 50%;
  border: 1px solid var(--glass-edge);
  background: rgba(255, 255, 255, 0.04);
  color: var(--silver-bright);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out),
    visibility 0.35s, box-shadow 0.35s ease, border-color 0.35s ease;
}

.to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover,
.to-top:focus-visible {
  box-shadow: 0 0 28px rgba(232, 236, 240, 0.15);
  border-color: rgba(232, 236, 240, 0.35);
}

/* ----------------------------
   Responsive — hero stack
   ---------------------------- */
@media (max-width: 880px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-media {
    justify-self: center;
    order: -1;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-visual {
    justify-self: center;
  }

  .section-title {
    margin-inline: auto;
  }

  .section-lead,
  .section-body {
    margin-inline: auto;
  }
}

/* ----------------------------
   Reduced motion
   ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .loader-progress-bar,
  .hero-photo,
  .hero-ring,
  .grid-scan {
    animation: none !important;
  }

  body.intro-done .animate-hero {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
