/* ==========================================================================
   Taliaferro Development — design tokens
   ========================================================================== */

:root {
  /* base */
  --bg:        #0B0716;
  --bg-2:      #120B24;
  --panel:     rgba(255, 255, 255, 0.035);
  --panel-2:   rgba(255, 255, 255, 0.06);
  --line:      rgba(255, 255, 255, 0.10);

  /* ink */
  --ink:       #F3EFFF;
  --ink-2:     #BDB4DA;
  --ink-3:     #877DAB;

  /* spectral accents */
  --mag:       #FF4D9D;
  --vio:       #9A5CFF;
  --cya:       #38E1FF;
  --amb:       #FFC24D;

  --spectral:  linear-gradient(100deg, var(--mag) 0%, var(--vio) 46%, var(--cya) 100%);
  --spectral-h: linear-gradient(90deg, var(--mag) 0%, var(--vio) 50%, var(--cya) 100%);
  --spectral-soft: linear-gradient(100deg,
                    rgba(255, 77, 157, 0.16) 0%,
                    rgba(154, 92, 255, 0.16) 46%,
                    rgba(56, 225, 255, 0.16) 100%);

  /* type */
  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* rhythm */
  --wrap: 1140px;
  --gut: clamp(1.25rem, 4vw, 3rem);
  --sec-space: clamp(5.5rem, 12vw, 10rem);

  /* pointer light position, updated by JS */
  --mx: 50%;
  --my: 18%;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  letter-spacing: -0.005em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--vio); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cya);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--bg-2);
  color: var(--ink);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* ==========================================================================
   Background field — drifting aurora, pointer spotlight, grain
   ========================================================================== */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, #1A1035 0%, var(--bg) 60%),
    var(--bg);
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.62;
  will-change: transform;
}

.blob-1 {
  width: 60vmax; height: 60vmax;
  top: -22vmax; left: -14vmax;
  background: radial-gradient(circle, rgba(154, 92, 255, 0.55), transparent 68%);
  animation: drift-a 34s ease-in-out infinite alternate;
}
.blob-2 {
  width: 48vmax; height: 48vmax;
  top: 8vmax; right: -16vmax;
  background: radial-gradient(circle, rgba(255, 77, 157, 0.42), transparent 68%);
  animation: drift-b 41s ease-in-out infinite alternate;
}
.blob-3 {
  width: 54vmax; height: 54vmax;
  top: 46vmax; left: 22vmax;
  background: radial-gradient(circle, rgba(56, 225, 255, 0.30), transparent 68%);
  animation: drift-c 47s ease-in-out infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(14vmax, 9vmax, 0) scale(1.18); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-12vmax, 14vmax, 0) scale(0.92); }
}
@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(0.95); }
  to   { transform: translate3d(10vmax, -12vmax, 0) scale(1.15); }
}

/* light that follows the pointer */
.spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    38rem 38rem at var(--mx) var(--my),
    rgba(255, 255, 255, 0.075),
    transparent 62%);
  transition: background 220ms linear;
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.30;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.5'/></svg>");
}

/* ==========================================================================
   Scroll progress
   ========================================================================== */

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 120;
  background: rgba(255, 255, 255, 0.05);
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--spectral);
  box-shadow: 0 0 14px rgba(154, 92, 255, 0.8);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 110;
  transition: background 300ms ease, backdrop-filter 300ms ease, border-color 300ms ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(11, 7, 22, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.nav-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 1.05rem var(--gut);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: padding 300ms ease;
}
.nav.is-stuck .nav-inner { padding-block: 0.7rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.brand-mark {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 7px;
  background: var(--spectral);
  background-size: 200% 200%;
  animation: shift 9s ease infinite;
  box-shadow: 0 0 20px rgba(154, 92, 255, 0.55);
  flex: none;
}
@keyframes shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.nav-links { display: flex; gap: 0.35rem; }
.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: color 200ms ease, background 200ms ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0.8rem; right: 0.8rem; bottom: 0.2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--spectral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms cubic-bezier(.22,.8,.3,1);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-links a.is-active { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 2.5rem; height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
  padding: 0;
  place-content: center;
  justify-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 17px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 260ms ease, opacity 200ms ease;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 9rem 5rem;
}

.hero-kicker {
  color: var(--ink-2);
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  max-width: 34ch;
}

.hero-name {
  font-size: clamp(2.75rem, 10.4vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.88;
  margin: 0 0 clamp(2rem, 5vw, 3.25rem);
}
.hero-name .line {
  display: block;
  position: relative;
  color: transparent;
  background-image: linear-gradient(
      100deg,
      var(--ink) 0%,
      var(--ink) 34%,
      var(--mag) 46%,
      var(--vio) 56%,
      var(--cya) 66%,
      var(--ink) 78%,
      var(--ink) 100%);
  background-size: 260% 100%;
  background-position: 120% 0;
  -webkit-background-clip: text;
  background-clip: text;
  animation: sweep 9s cubic-bezier(.5,0,.5,1) infinite;
}
.hero-name .line:nth-child(2) { animation-delay: 0.45s; }

@keyframes sweep {
  0%   { background-position: 130% 0; }
  55%  { background-position: -30% 0; }
  100% { background-position: -30% 0; }
}

/* page-load reveal (only when JS is running) */
.js .hero-name .line {
  opacity: 0;
  transform: translateY(0.34em);
  clip-path: inset(0 0 -0.2em 0);
}
.is-ready .hero-name .line {
  animation: sweep 9s cubic-bezier(.5,0,.5,1) 1.1s infinite,
             rise 1s cubic-bezier(.16,.9,.28,1) forwards;
}
.is-ready .hero-name .line:nth-child(2) {
  animation: sweep 9s cubic-bezier(.5,0,.5,1) 1.55s infinite,
             rise 1s cubic-bezier(.16,.9,.28,1) 0.14s forwards;
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.js .js-hero-fade { opacity: 0; transform: translateY(14px); }
.is-ready .js-hero-fade {
  animation: rise 0.9s cubic-bezier(.16,.9,.28,1) forwards;
}
.is-ready .hero-kicker  { animation-delay: 0.15s; }
.is-ready .hero-foot    { animation-delay: 0.55s; }
.is-ready .hero-stats   { animation-delay: 0.70s; }

.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-top: clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
}
.hero-blurb {
  flex: 1 1 26rem;
  max-width: 48ch;
  color: var(--ink-2);
  margin: 0;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9688rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 220ms cubic-bezier(.22,.8,.3,1), box-shadow 260ms ease, color 200ms ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  color: #12081E;
  background: var(--spectral);
  background-size: 200% 200%;
  animation: shift 8s ease infinite;
  box-shadow: 0 8px 30px -8px rgba(154, 92, 255, 0.85);
}
.btn-primary:hover { box-shadow: 0 14px 44px -10px rgba(255, 77, 157, 0.9); }

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: rgba(154, 92, 255, 0.6); background: var(--panel-2); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.75rem, 5vw, 4.5rem);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
.hero-stats > div { display: flex; flex-direction: column; gap: 0.15rem; }
.stat-n {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--mag);
}
.hero-stats > div:nth-child(2) .stat-n { color: var(--vio); }
.hero-stats > div:nth-child(3) .stat-n { color: var(--cya); }
.stat-l {
  font-size: 0.875rem;
  color: var(--ink-3);
  max-width: 22ch;
  line-height: 1.45;
}


/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding-block: var(--sec-space); position: relative; }

.sec-title {
  font-size: clamp(2.1rem, 5.4vw, 3.75rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: 0.55rem;
  position: relative;
  width: fit-content;
}
.sec-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 100%;
  border-radius: 3px;
  background: var(--spectral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 900ms cubic-bezier(.19,1,.22,1) 120ms;
}
.sec-title.is-in::after { transform: scaleX(1); }

.sec-title-sub {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  margin-top: clamp(4rem, 9vw, 7rem);
}

/* Mission */
.mission-body { max-width: 62ch; }
.mission-body .lead {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.mission-body p:not(.lead) { color: var(--ink-2); }

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline {
  position: relative;
  padding-left: clamp(1.75rem, 4vw, 2.75rem);
}

.spine {
  position: absolute;
  left: 0;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.spine i {
  position: absolute;
  inset: 0 0 auto 0;
  height: 0;
  background: linear-gradient(to bottom, var(--cya), var(--vio) 55%, var(--mag));
  box-shadow: 0 0 16px rgba(154, 92, 255, 0.75);
  will-change: height;
}

.tl-item {
  position: relative;
  padding-bottom: clamp(2.75rem, 6vw, 4rem);
  max-width: 64ch;
}

@media (min-width: 60rem) {
  .tl-item {
    max-width: none;
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    column-gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
  }
  .tl-date { grid-column: 1; margin-bottom: 0.35rem; }
  .tl-org  { grid-column: 1; margin-bottom: 0; }
  .tl-role { grid-column: 2; grid-row: 1; }
  .tl-copy { grid-column: 2; margin-top: 0.9rem; max-width: 58ch; }
}
.tl-item:last-child { padding-bottom: 0; }

.tl-dot {
  position: absolute;
  left: calc(-1 * clamp(1.75rem, 4vw, 2.75rem) - 5px);
  top: 0.55rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid rgba(255, 255, 255, 0.22);
  transition: border-color 400ms ease, box-shadow 400ms ease, background 400ms ease;
}
.tl-item.is-in .tl-dot {
  background: var(--vio);
  border-color: var(--cya);
  box-shadow: 0 0 0 5px rgba(154, 92, 255, 0.16), 0 0 18px rgba(56, 225, 255, 0.55);
}

.tl-date {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cya);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.4rem;
}
.tl-role {
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  margin-bottom: 0.2rem;
}
.tl-org {
  color: var(--ink-3);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
}
.tl-copy { color: var(--ink-2); margin: 0; }

/* Education */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.25rem;
}
.edu {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  overflow: hidden;
  transition: border-color 320ms ease, transform 320ms cubic-bezier(.22,.8,.3,1);
}
.edu::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--spectral);
  opacity: 0.85;
}
.edu:hover { transform: translateY(-3px); border-color: rgba(154, 92, 255, 0.45); }
.edu-date {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--amb);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.5rem;
}
.edu h3 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.edu-degree { color: var(--ink-3); font-size: 0.9375rem; margin-bottom: 0.9rem; }
.edu p:last-child { color: var(--ink-2); font-size: 0.9688rem; }

/* Skills */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(1.75rem, 4vw, 2.75rem);
}
.skill-group h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-3);
  margin-bottom: 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}
.skill-group ul { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.skill-group li {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  color: var(--ink-2);
  border: 1px solid var(--line);
  background: var(--panel);
  transition: color 220ms ease, border-color 220ms ease, background 220ms ease, transform 220ms ease;
}
.skill-group li:hover {
  color: var(--ink);
  transform: translateY(-2px);
  border-color: transparent;
  background: var(--spectral-soft), var(--panel-2);
  box-shadow: inset 0 0 0 1px rgba(154, 92, 255, 0.45);
}

/* ==========================================================================
   Projects
   ========================================================================== */

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 1.25rem;
}

.proj {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012));
  transition: transform 380ms cubic-bezier(.22,.8,.3,1), border-color 380ms ease, box-shadow 380ms ease;
}
.proj::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--spectral);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 380ms ease;
  pointer-events: none;
}
.proj:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px -28px rgba(154, 92, 255, 0.85);
}
.proj:hover::after { opacity: 1; }

.proj-art {
  margin: 0;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0E0A1C;
}
.proj-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(.22,.8,.3,1), filter 500ms ease;
  filter: saturate(0.9);
}
.proj:hover .proj-art img { transform: scale(1.055); filter: saturate(1.1); }
.proj-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 7, 22, 0) 35%, rgba(11, 7, 22, 0.85) 100%);
}

.proj-body {
  padding: clamp(1.25rem, 2.4vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}
.proj-body h3 { font-size: 1.375rem; }
.proj-body p { color: var(--ink-2); font-size: 0.9688rem; margin: 0; }
.proj-meta { color: var(--ink-3) !important; font-size: 0.8125rem !important; }

.proj-link {
  margin-top: auto;
  padding-top: 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  width: fit-content;
  background: var(--spectral-h);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color 260ms ease;
}
.proj:hover .proj-link { border-bottom-color: rgba(154, 92, 255, 0.7); }

@media (min-width: 62rem) {
  .proj-grid { grid-template-columns: repeat(4, 1fr); }
  .proj { grid-column: span 2; }
  .proj-feature { grid-column: span 4; flex-direction: row; }
  .proj-feature .proj-art { flex: 0 0 46%; aspect-ratio: auto; }
  .proj-feature .proj-art::after {
    background: linear-gradient(to right, rgba(11, 7, 22, 0) 55%, rgba(11, 7, 22, 0.9) 100%);
  }
  .proj-feature .proj-body { justify-content: center; padding: clamp(2rem, 4vw, 3.25rem); }
  .proj-feature h3 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
  .proj-feature .proj-body > p:first-of-type { font-size: 1.0625rem; max-width: 46ch; }
  .proj-feature .proj-link { margin-top: 1rem; }
}

/* ==========================================================================
   Testimonies
   ========================================================================== */

.quotes { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }

.quote {
  margin: 0;
  position: relative;
  padding-left: clamp(1.25rem, 3vw, 2rem);
  max-width: 68ch;
}
.quote::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--cya), var(--vio) 50%, var(--mag));
}
.quote blockquote {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.125rem, 2.3vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.quote figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.65rem; }
.q-name { font-weight: 600; font-size: 0.9375rem; }
.q-role { color: var(--ink-3); font-size: 0.875rem; }

.quote:nth-child(2) { margin-left: auto; }

/* ==========================================================================
   Contact + footer
   ========================================================================== */

.section-contact { padding-bottom: clamp(4rem, 8vw, 6rem); }
.contact-lead { color: var(--ink-2); max-width: 46ch; margin-bottom: 2.25rem; }

.contact-links { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; }
.contact-big {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 5.4vw, 3.25rem);
  letter-spacing: -0.04em;
  text-decoration: none;
  line-height: 1.25;
  background-image: linear-gradient(100deg, var(--ink), var(--ink));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background-image 400ms ease;
  word-break: break-word;
}
.contact-big:hover { background-image: var(--spectral); }

.footer {
  border-top: 1px solid var(--line);
  padding-block: 2.25rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.footer-name { font-weight: 600; font-size: 0.9375rem; margin: 0; }
.footer-note { color: var(--ink-3); font-size: 0.875rem; margin: 0; }

.social { display: flex; gap: 0.35rem; }
.social a {
  display: grid;
  place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform 260ms cubic-bezier(.22,.8,.3,1), border-color 260ms ease, background 260ms ease;
}
.social svg { width: 1.125rem; height: 1.125rem; fill: var(--ink-2); transition: fill 260ms ease; }
.social a:hover {
  transform: translateY(-3px);
  border-color: transparent;
  background: var(--spectral-soft), var(--panel-2);
  box-shadow: inset 0 0 0 1px rgba(154, 92, 255, 0.5);
}
.social a:hover svg { fill: var(--ink); }

/* ==========================================================================
   Scroll reveals
   ========================================================================== */

.js [data-reveal] {
  opacity: 0;
  transition:
    opacity 760ms cubic-bezier(.16,.9,.28,1),
    transform 760ms cubic-bezier(.16,.9,.28,1);
  will-change: opacity, transform;
}
.js [data-reveal="up"]    { transform: translateY(24px); }
.js [data-reveal="right"] { transform: translateX(-22px); }
.js [data-reveal="scale"] { transform: translateY(20px) scale(0.975); }

.js [data-reveal].is-in { opacity: 1; transform: none; }

.proj[data-reveal]:nth-child(2) { transition-delay: 60ms; }
.proj[data-reveal]:nth-child(3) { transition-delay: 120ms; }
.proj[data-reveal]:nth-child(4) { transition-delay: 180ms; }
.proj[data-reveal]:nth-child(5) { transition-delay: 240ms; }
.edu[data-reveal]:nth-child(2)  { transition-delay: 90ms; }
.skill-group[data-reveal]:nth-child(2) { transition-delay: 70ms; }
.skill-group[data-reveal]:nth-child(3) { transition-delay: 140ms; }
.skill-group[data-reveal]:nth-child(4) { transition-delay: 210ms; }
.skill-group[data-reveal]:nth-child(5) { transition-delay: 280ms; }
.quote[data-reveal]:nth-child(2) { transition-delay: 80ms; }
.quote[data-reveal]:nth-child(3) { transition-delay: 160ms; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 52rem) {
  .nav-toggle { display: grid; }

  .nav-links {
    position: absolute;
    top: 100%; left: var(--gut); right: var(--gut);
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(16, 10, 32, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 240ms ease, transform 240ms ease, visibility 240ms;
  }
  .nav.is-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 0.7rem 0.9rem; font-size: 1rem; }
  .nav-links a::after { left: 0.9rem; right: auto; width: 1.5rem; }

  .nav.is-open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.is-open .nav-toggle span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

  .brand-text { font-size: 0.9375rem; }

  .quote:nth-child(2) { margin-left: 0; }
}

@media (max-width: 30rem) {
  .brand-rest { display: none; }
  .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

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

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

  .hero-name .line,
  .js-hero-fade,
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-name .line {
    color: var(--ink);
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
  }
  .sec-title::after { transform: scaleX(1); }
  .blob { animation: none; }
  .spotlight { display: none; }
}
