/* ============================================================
   Arunachalam Kasi — Personal Site
   Aesthetic: warm editorial / beige magazine
   Type: Fraunces (display) · Hanken Grotesk (body) · JetBrains Mono (labels)
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

/* ---------- Tokens ---------- */
:root {
  --bg:        #ECE1CF;   /* warm sand base            */
  --bg-2:      #F2E9DA;   /* lighter cream             */
  --paper:     #FAF5EB;   /* card / panel              */
  --paper-2:   #F6EEE0;   /* alt card                  */
  --ink:       #221D16;   /* espresso text             */
  --ink-2:     #4B4338;   /* secondary text            */
  --muted:     #6B5F49;   /* taupe muted (AA 4.5:1+ on cream surfaces) */
  --line:      #D9CBB2;   /* hairline                  */
  --line-2:    #E5D9C4;
  --accent:    #B8492A;   /* terracotta / burnt sienna */
  --accent-d:  #9A3A1F;   /* deep clay (hover)         */
  --olive:     #6F6A41;   /* secondary accent          */
  --accent-soft:#EAD2BE;

  --serif: "Fraunces", "Times New Roman", serif;
  --sans:  "Hanken Grotesk", -apple-system, system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --r: 16px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: .005em;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* film-grain overlay for warmth + texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .42;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--bg-2); }

/* ---------- Accessibility: skip link + focus ---------- */
.skip {
  position: fixed; top: 10px; left: 10px; z-index: 1000;
  background: var(--ink); color: var(--bg-2);
  font-family: var(--mono); font-size: .8rem; letter-spacing: .06em;
  padding: .7em 1.1em; border-radius: 8px;
  transform: translateY(-160%);
  transition: transform .3s var(--ease);
}
.skip:focus { transform: translateY(0); outline: 2px solid var(--accent); outline-offset: 2px; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible, .nav-cta:focus-visible { outline-offset: 4px; }
.card:focus-visible { outline-offset: 5px; box-shadow: 0 30px 50px -30px rgba(34,29,22,.45); }
/* keep keyboard underline affordance in sync with hover */
.nav-links a:focus-visible::after { width: 100%; }
.contact-links a:focus-visible .v::after { width: 100%; }
main:focus { outline: none; }

/* fork / contributor tag on project cards */
.fork-tag {
  font-family: var(--mono); font-size: .58rem; letter-spacing: .12em;
  color: var(--ink-2); background: var(--accent-soft);
  padding: .15em .55em; border-radius: 100px; margin-left: .3em;
  vertical-align: middle;
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .7em;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

.section { padding-block: clamp(72px, 11vw, 160px); position: relative; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.4rem;
  margin-bottom: 3.4rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.section-head .idx {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .2em;
  color: var(--muted);
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 0, "WONK" 1;
  font-size: clamp(2.2rem, 5.4vw, 4.1rem);
  line-height: .98;
  letter-spacing: -.02em;
  color: var(--ink);
}
.section-title em { font-style: italic; color: var(--accent); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line), 0 14px 40px -28px rgba(34,29,22,.5);
  padding-block: 12px;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.brand .mono-badge {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  font-family: var(--serif);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -.02em;
  transition: transform .5s var(--ease), background .3s, color .3s;
}
.brand:hover .mono-badge { background: var(--ink); color: var(--bg); transform: rotate(-8deg); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); }
.nav-links a {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  position: relative;
  transition: color .3s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -5px;
  width: 0; height: 1.5px; background: var(--accent);
  transition: width .35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-links .num { color: var(--accent); margin-right: .35em; }
.nav-cta {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 1.5px solid var(--ink);
  padding: .58em 1.1em;
  border-radius: 100px;
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.nav-cta:hover { background: var(--accent); border-color: var(--accent); color: var(--bg-2); transform: translateY(-2px); }
.nav-toggle { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 120px;
  padding-bottom: 60px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  right: -12vw; top: 4vh;
  background: radial-gradient(circle at center, rgba(184,73,42,.18), rgba(184,73,42,0) 62%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
  animation: float 14s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-26px) scale(1.05); } }

.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero-top { display: flex; gap: .9rem; align-items: center; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); flex-wrap: wrap; }
.status-dot {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 100px; padding: .42em .9em;
  background: color-mix(in srgb, var(--paper) 60%, transparent);
}
.status-dot i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--olive); display: inline-block;
  box-shadow: 0 0 0 0 rgba(111,106,65,.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(111,106,65,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(111,106,65,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,106,65,0); }
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: clamp(2.55rem, 13vw, 11.5rem);
  line-height: .86;
  letter-spacing: -.035em;
  color: var(--ink);
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: block; }
.hero h1 em {
  font-style: italic;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  color: var(--accent);
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-top: clamp(2rem, 5vw, 3.4rem);
  flex-wrap: wrap;
}
.hero-lede {
  max-width: 46ch;
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  color: var(--ink-2);
  line-height: 1.55;
}
.hero-lede b { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; }

.btn {
  font-family: var(--mono);
  font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  display: inline-flex; align-items: center; gap: .6em;
  padding: .95em 1.5em;
  border-radius: 100px;
  transition: transform .4s var(--ease), background .35s, color .35s, box-shadow .35s;
  white-space: nowrap;
}
.btn .ar { transition: transform .4s var(--ease); }
.btn:hover .ar { transform: translateX(4px); }
.btn-primary { background: var(--ink); color: var(--bg-2); box-shadow: 0 14px 30px -16px rgba(34,29,22,.7); }
.btn-primary:hover { background: var(--accent); transform: translateY(-3px); box-shadow: 0 20px 38px -16px rgba(184,73,42,.6); }
.btn-ghost { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg-2); transform: translateY(-3px); }

.scroll-cue {
  position: absolute;
  left: var(--gutter); bottom: 30px;
  display: flex; align-items: center; gap: .7rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  z-index: 2;
}
.scroll-cue .bar { width: 1px; height: 46px; background: linear-gradient(var(--muted), transparent); position: relative; overflow: hidden; }
.scroll-cue .bar::after { content:""; position:absolute; top:-50%; left:0; width:100%; height:50%; background: var(--accent); animation: drop 2.2s var(--ease) infinite; }
@keyframes drop { 0% { top: -50%; } 60%,100% { top: 100%; } }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  padding-block: 1.05rem;
  position: relative;
  z-index: 2;
}
.marquee-track { display: flex; width: max-content; animation: scroll-x 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  color: var(--ink-2);
  padding-inline: 1.6rem;
  display: inline-flex; align-items: center; gap: 1.6rem;
  white-space: nowrap;
}
.marquee-track span::after { content: "✦"; color: var(--accent); font-style: normal; font-size: .7em; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.about-body p { font-size: clamp(1.05rem, 1.7vw, 1.32rem); color: var(--ink-2); line-height: 1.62; margin-bottom: 1.4rem; max-width: 40ch; }
.about-body p:first-of-type { color: var(--ink); }
.about-body .dropcap::first-letter {
  font-family: var(--serif);
  font-size: 4.4em;
  font-weight: 500;
  float: left;
  line-height: .78;
  padding: .06em .12em .02em 0;
  color: var(--accent);
  font-variation-settings: "SOFT" 30, "WONK" 1;
}
.about-aside { display: flex; flex-direction: column; gap: 1.5rem; }
.monogram {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background:
    radial-gradient(circle at 30% 20%, rgba(184,73,42,.10), transparent 55%),
    var(--paper);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.monogram::after {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid var(--line-2); border-radius: calc(var(--r) - 6px);
  pointer-events: none;
}
.monogram .mg {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(5rem, 16vw, 9rem);
  letter-spacing: -.04em;
  line-height: 1;
  color: var(--ink);
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
.monogram .mg em { font-style: italic; color: var(--accent); }
.monogram .tag {
  position: absolute; bottom: 16px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}

/* stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { background: var(--paper); padding: 1.4rem 1.3rem; }
.stat .n { font-family: var(--serif); font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1; color: var(--ink); font-variation-settings: "WONK" 1; }
.stat .n sup { color: var(--accent); font-size: .5em; vertical-align: super; }
.stat .l { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .6rem; }

/* ============================================================
   EXPERIENCE
   ============================================================ */
.xp-list { border-top: 1px solid var(--line); }
.xp {
  display: grid;
  grid-template-columns: .8fr 2.2fr auto;
  gap: 2rem;
  align-items: baseline;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding .45s var(--ease);
}
.xp::before {
  content: ""; position: absolute; left: -100vw; right: -100vw; top: 0; bottom: 0;
  background: var(--paper); opacity: 0; transition: opacity .4s var(--ease); z-index: -1;
}
.xp:hover { padding-inline: 1.6rem; }
.xp:hover::before { opacity: 1; }
.xp-when { font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; color: var(--muted); padding-top: .35rem; }
.xp-main h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.01em; line-height: 1.05; }
.xp-main .org { color: var(--accent); }
.xp-main p { color: var(--ink-2); font-size: .98rem; margin-top: .6rem; max-width: 60ch; }
.xp-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .9rem; }
.xp-tags span { font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: .25em .8em; }
.xp-where { font-family: var(--mono); font-size: .72rem; color: var(--muted); text-align: right; white-space: nowrap; padding-top: .35rem; }

/* ============================================================
   PROJECTS
   ============================================================ */
.proj-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(1.5rem, 2.6vw, 2.2rem);
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s;
  min-height: 248px;
}
.card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), rgba(184,73,42,.09), transparent 60%);
  opacity: 0; transition: opacity .4s; pointer-events: none;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 30px 50px -30px rgba(34,29,22,.45); border-color: var(--accent-soft); }
.card:hover::after { opacity: 1; }
.card.feat { grid-column: span 6; }
.card.half { grid-column: span 6; }
.card.third { grid-column: span 4; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.card-kind { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.card-arrow {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink);
  transition: transform .45s var(--ease), background .35s, color .35s, border-color .35s;
}
.card:hover .card-arrow { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: rotate(-45deg); }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 1.95rem); letter-spacing: -.01em; line-height: 1.04; margin-bottom: .6rem; }
.card p { color: var(--ink-2); font-size: .96rem; line-height: 1.55; }
.card .meta { margin-top: auto; padding-top: 1.3rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.langs { display: flex; gap: .9rem; flex-wrap: wrap; }
.lang { display: inline-flex; align-items: center; gap: .45em; font-family: var(--mono); font-size: .68rem; letter-spacing: .04em; color: var(--ink-2); }
.lang i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-py { background: #6E8B5B; }   /* python — sage */
.dot-js { background: #C9A227; }   /* javascript — ochre */
.dot-ts { background: #4f7aa3; }
.dot-html{ background: var(--accent); }
.dot-css { background: #8a6fb0; }
.dot-sql { background: #3f7d7a; }
.dot-flask{ background: #4a4339; }
.dot-docker{ background: #3f7d9a; }

.card-all {
  grid-column: span 12;
  background: var(--ink);
  color: var(--bg-2);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  min-height: 0;
}
.card-all::after { display: none; }
.card-all:hover { background: var(--accent); border-color: var(--accent); }
.card-all h3 { color: var(--bg-2); font-size: clamp(1.5rem, 3.4vw, 2.4rem); margin: 0; }
.card-all p { color: color-mix(in srgb, var(--bg-2) 75%, transparent); margin: 0; }
.card-all .card-arrow { border-color: color-mix(in srgb, var(--bg-2) 40%, transparent); color: var(--bg-2); }
.card-all:hover .card-arrow { background: var(--bg-2); color: var(--ink); }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(1.2rem, 3vw, 2.4rem); }
.skill-col h3 { font-family: var(--mono); font-weight: 600; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.skill-col ul { display: flex; flex-direction: column; gap: .15rem; }
.skill-col li {
  font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--ink-2);
  padding: .28rem 0; transition: color .3s var(--ease), transform .35s var(--ease), padding .35s var(--ease);
  display: flex; align-items: baseline; gap: .6rem;
}
.skill-col li::before { content: ""; width: 0; height: 1px; background: var(--accent); transition: width .35s var(--ease); flex: none; }
.skill-col li:hover { color: var(--ink); transform: translateX(2px); }
.skill-col li:hover::before { width: 18px; }

/* ============================================================
   CREDENTIALS (education + certs)
   ============================================================ */
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.cred-block > h3 { font-family: var(--mono); font-weight: 600; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.6rem; }
.edu-item { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.edu-item:last-child { border-bottom: 1px solid var(--line); }
.edu-item .deg { font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 1.7rem); line-height: 1.1; }
.edu-item .meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: .5rem; flex-wrap: wrap; }
.edu-item .school { color: var(--ink-2); }
.edu-item .gpa { font-family: var(--mono); font-size: .82rem; color: var(--accent); white-space: nowrap; }
.edu-item .when { font-family: var(--mono); font-size: .74rem; color: var(--muted); }

.cert-list { display: flex; flex-direction: column; }
.cert {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 1rem 0; border-top: 1px solid var(--line);
  transition: padding .35s var(--ease), background .35s;
}
.cert:last-child { border-bottom: 1px solid var(--line); }
.cert:hover { padding-left: .8rem; }
.cert .c-name { font-weight: 600; color: var(--ink); flex: 1; }
.cert .c-by { font-family: var(--mono); font-size: .72rem; color: var(--muted); text-align: right; white-space: nowrap; }
.cert .c-yr { font-family: var(--mono); font-size: .72rem; color: var(--accent); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { background: var(--ink); color: var(--bg-2); border-radius: clamp(20px, 3vw, 34px) clamp(20px,3vw,34px) 0 0; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; top: -30%; right: -10%;
  width: 50vw; height: 50vw; max-width: 620px; max-height: 620px;
  background: radial-gradient(circle, rgba(184,73,42,.35), transparent 62%);
  filter: blur(10px); pointer-events: none;
}
.contact .wrap { position: relative; z-index: 2; }
.contact .eyebrow { color: var(--accent-soft); }
.contact .eyebrow::before { background: var(--accent-soft); }
.contact h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 7rem); line-height: .92; letter-spacing: -.03em;
  margin: 1.6rem 0 2.4rem; color: var(--bg-2);
}
.contact h2 a { color: var(--accent-soft); text-decoration: none; position: relative; white-space: nowrap; font-style: italic; }
.contact h2 a::after { content:""; position:absolute; left:0; bottom:.08em; width:100%; height:2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.contact h2 a:hover::after { transform: scaleX(1); }
.contact-row { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; border-top: 1px solid color-mix(in srgb, var(--bg-2) 22%, transparent); padding-top: 2.4rem; }
.contact-links { display: flex; gap: 2.4rem; flex-wrap: wrap; }
.contact-links a { display: flex; flex-direction: column; gap: .3rem; }
.contact-links .k { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, var(--bg-2) 55%, transparent); }
.contact-links .v { font-size: 1.05rem; color: var(--bg-2); position: relative; width: fit-content; }
.contact-links .v::after { content:""; position:absolute; left:0; bottom:-3px; width:0; height:1.5px; background: var(--accent-soft); transition: width .35s var(--ease); }
.contact-links a:hover .v::after { width: 100%; }

footer { background: var(--ink); color: color-mix(in srgb, var(--bg-2) 55%, transparent); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 2rem; flex-wrap: wrap; border-top: 1px solid color-mix(in srgb, var(--bg-2) 14%, transparent); }
footer .mono { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
footer a:hover { color: var(--accent-soft); }
#totop { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; display:inline-flex; align-items:center; gap:.5em; transition: color .3s; }
#totop:hover { color: var(--bg-2); }

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal[data-d="1"] { transition-delay: .08s; }
.js .reveal[data-d="2"] { transition-delay: .16s; }
.js .reveal[data-d="3"] { transition-delay: .24s; }
.js .reveal[data-d="4"] { transition-delay: .32s; }
.js .reveal[data-d="5"] { transition-delay: .40s; }

/* hero load reveal (gated behind .js so text is visible if JS is off) */
.js .hero h1 .line > span { transform: translateY(110%); animation: rise .95s var(--ease) forwards; }
.js .hero h1 .line:nth-child(1) > span { animation-delay: .15s; }
.js .hero h1 .line:nth-child(2) > span { animation-delay: .30s; }
.js .hero h1 .line:nth-child(3) > span { animation-delay: .45s; }
@keyframes rise { to { transform: translateY(0); } }
.js .hero .hero-top, .js .hero .hero-meta { opacity: 0; animation: fade-up 1s var(--ease) forwards; }
.js .hero .hero-top { animation-delay: .1s; }
.js .hero .hero-meta { animation-delay: .7s; }
.js .scroll-cue { opacity: 0; animation: fade-up 1s var(--ease) .95s forwards; }
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-aside { order: -1; }
  .monogram { aspect-ratio: 16/9; }
  .cred-grid { grid-template-columns: 1fr; }
  .xp { grid-template-columns: 1fr; gap: .5rem; }
  .xp-where { text-align: left; }
  .card.feat, .card.half { grid-column: span 6; }
  .card.third { grid-column: span 4; } /* 3-up so the trio fills its row — no orphan */
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-cta { display: none; } /* Résumé moves into the mobile menu to de-crowd the bar */
  .nav-toggle { display: grid; gap: 5px; width: 30px; }
  .nav-toggle span { height: 2px; background: var(--ink); display: block; transition: transform .3s, opacity .3s; }
  .nav.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .mobile-menu {
    position: fixed; inset: 0; z-index: 99;
    background: var(--bg-2);
    display: flex; flex-direction: column; justify-content: center; gap: 1.2rem;
    padding: var(--gutter);
    transform: translateY(-100%); transition: transform .55s var(--ease);
  }
  .nav.open ~ .mobile-menu { transform: translateY(0); }
  .mobile-menu a { font-family: var(--serif); font-size: 2.4rem; color: var(--ink); }
  .mobile-menu a .num { font-family: var(--mono); font-size: 1rem; color: var(--accent); margin-right: .6rem; }
  .card.feat, .card.half, .card.third { grid-column: span 12; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero-meta { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 761px) { .mobile-menu { display: none; } }

/* ---------- Drive Mode floating link ---------- */
.drive-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: flex; align-items: center; gap: .7rem;
  background: var(--ink); color: var(--bg-2);
  padding: .7rem .95rem .7rem .8rem; border-radius: 100px;
  box-shadow: 0 18px 40px -18px rgba(34,29,22,.8);
  transition: transform .4s var(--ease), background .4s var(--ease);
}
.drive-fab .df-icon { font-size: 1.4rem; line-height: 1; transition: transform .5s var(--ease); }
.drive-fab .df-text { display: flex; flex-direction: column; line-height: 1.1; }
.drive-fab .df-text b { font-family: var(--serif); font-weight: 600; font-size: .95rem; }
.drive-fab .df-text span { font-family: var(--mono); font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--bg-2) 65%, transparent); }
.drive-fab:hover { transform: translateY(-3px); background: var(--accent); }
.drive-fab:hover .df-icon { transform: translateX(4px) rotate(-6deg); }
.drive-fab:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
@media (max-width: 600px) { .drive-fab .df-text span { display: none; } .drive-fab { bottom: 16px; right: 16px; } }

/* ---------- Print / PDF capture ---------- */
@media print {
  body::before, .hero-glow, .scroll-cue, .nav, .nav-toggle, .mobile-menu { display: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero { min-height: auto !important; padding-top: 48px; }
  .hero h1 .line > span, .hero .hero-top, .hero .hero-meta { transform: none !important; opacity: 1 !important; }
  body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
