/* ============================================================
   THEME — edit these and the whole site follows.
   ============================================================ */
:root {
  /* colors */
  --paper:      #100e0d;   /* page background      */
  --paper-2:    #171514;   /* cards, raised areas  */
  --ink:        #ffffff;   /* primary text         */
  --ink-soft:   #a99fb5;   /* secondary text       */
  --line:       #2e2a28;   /* hairlines, borders   */
  --accent:     #6f21dd;   /* deep blue-violet     */
  --accent-2:   #a479df;   /* lighter blue-violet  */
  --accent-rgb: 111 33 221;               /* --accent as channels, for alpha blends */
  --glow:       rgb(var(--accent-rgb) / .55);  /* text glow */
  --slab:       #171514;   /* footer block bg      */
  --slab-ink:   #ffffff;   /* footer block text    */

  /* type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body:    "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* fluid type scale */
  --step-hero: clamp(2.4rem, 8.5vw, 7.5rem);
  --step-xl:   clamp(1.75rem, 3.4vw, 2.9rem);
  --step-lg:   clamp(1.15rem, 1.6vw, 1.45rem);
  --step-md:   1.0625rem;
  --step-sm:   0.8125rem;

  /* layout, spacing, shape */
  --maxw:       1240px;                     /* content width  */
  --gap:        1.25rem;
  --pad:        clamp(1.25rem, 4vw, 3.5rem);/* page gutter    */
  --section:    clamp(3rem, 7vw, 6rem);     /* section rhythm */
  --measure:    62ch;
  --radius:     14px;
  --border:     1px solid var(--line);
  --ease:       cubic-bezier(.2, .8, .2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1; margin: 0; }
p  { margin: 0 0 1em; max-width: var(--measure); }
em { font-style: italic; }
ul { list-style: none; margin: 0; padding: 0; }

a { color: var(--accent-2); text-decoration: none; }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  background: var(--ink); color: var(--paper);
  padding: .6rem 1rem; z-index: 99;
}
.skip:focus {
  width: auto; height: auto; clip-path: none;
  left: 1rem; top: 1rem;
}

/* Faint texture + a purple bloom so the dark field isn't flat. */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .14; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

main, footer { position: relative; z-index: 1; }

/* every band shares one centered measure — this is what makes it read landscape */
.hero, .about, .work, .footer__inner, .footer__fine {
  max-width: var(--maxw);
  margin-inline: auto;
}

/* shared label style */
.card__num, .tags li, .facts span, .footer__fine {
  font-family: var(--font-mono);
  font-size: var(--step-sm);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============================================================
   HERO TOP ROW — name on the left, nav on the right
   ============================================================ */
.hero__top {
  display: flex; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between;
  gap: .5rem clamp(1.5rem, 4vw, 3rem);
}
.hero__top nav {
  display: flex; gap: clamp(1rem, 2.5vw, 2.25rem);
  padding-bottom: .6rem;          /* sits on the name's baseline */
}
.hero__top nav a {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--step-sm);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.hero__top nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ============================================================
   HERO — three stacked bands, each running the full width
   ============================================================ */
.hero { padding: clamp(2rem, 4.5vw, 3.5rem) var(--pad) var(--section); }

.hero h1 {
  font-size: var(--step-hero);
  font-weight: 700;
  letter-spacing: -.035em;
  font-variation-settings: "SOFT" 0, "WONK" 1;
  white-space: nowrap;            /* full name stays on one line */
  margin: 0 0 0 -.045em;
}
/* same typeface and weight as the first name — colour only */
.hero h1 .last { color: var(--accent); text-shadow: 0 0 38px var(--glow); }

/* lede left, buttons right — a wide row instead of a tall stack */
.hero__row {
  margin-top: clamp(1.5rem, 3.5vw, 2.75rem);
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  border-top: var(--border);
  padding-top: clamp(1.25rem, 2.5vw, 2rem);
}
.lede {
  font-size: var(--step-lg);
  line-height: 1.45;
  flex: 1 1 22ch;          /* takes the free width, so it stays on one line when there's room */
  min-width: 0;
  max-width: 68ch;
  color: var(--ink-soft);
  margin: 0;
}

/* no flex-shrink:0 here — it would force both buttons to stay on one row
   and overflow the gutter on narrow screens */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.35rem;
  border-radius: 999px;
  font-size: var(--step-md); font-weight: 500;
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease),
              color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover {
  background: var(--accent); color: var(--ink);
  transform: translateY(-2px); box-shadow: 0 8px 30px var(--glow);
}
.btn--ghost { border: var(--border); color: var(--ink); }
.btn--ghost:hover {
  border-color: var(--accent); color: var(--accent-2);
  transform: translateY(-2px); box-shadow: 0 8px 30px rgb(var(--accent-rgb) / .22);
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-title {
  display: flex; align-items: baseline; gap: .9rem;
  font-size: var(--step-sm);
  font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: .14em;
  font-weight: 500;
  padding-bottom: 1rem;
  border-bottom: var(--border);
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}
.section-title span { color: var(--accent); text-shadow: 0 0 18px var(--glow); }
.section-title::after { content: ""; flex: 1; }

/* ============================================================
   ABOUT — pull-quote and body side by side
   ============================================================ */
.about, .work { padding: 0 var(--pad) var(--section); }

.about__body { display: grid; gap: clamp(1.5rem, 3vw, 3rem); grid-template-columns: 1fr; }
.about .big {
  font-family: var(--font-display);
  font-size: var(--step-xl);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0;
}
.about p:not(.big) { color: var(--ink-soft); margin: 0; }
/* the paragraphs live in one wrapper so grid keeps them together in the left
   column — as bare grid items they get scattered across both columns. */
.about__prose { display: grid; gap: 1.75em; align-content: start; }   /* space between paragraphs */

.facts { display: grid; gap: .75rem; align-content: start; }
.facts li { border-top: var(--border); padding-top: .6rem; }
.facts span { display: block; color: var(--accent-2); margin-bottom: .1rem; }

@media (min-width: 56rem) {
  .about__body {
    grid-template-columns: 1.55fr 1fr;
    align-items: start;
    column-gap: clamp(2rem, 5vw, 5rem);
  }
  .about .big { grid-column: 1 / -1; max-width: 42ch; }
}

/* ============================================================
   PROJECT GRID + CARDS
   ============================================================ */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;     /* cards stack, each spanning the full measure */
}

.card {
  position: relative;
  display: flex; flex-wrap: wrap;          /* side wraps under the prose when narrow */
  align-items: flex-start;
  gap: .7rem clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.35rem, 2.2vw, 1.9rem);
  background: var(--paper-2);
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease),
              box-shadow .35s var(--ease);
}
/* neon bar that wipes in on hover */
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.card:hover, .card:focus-within {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 14px 44px rgb(var(--accent-rgb) / .20);
}
.card:hover::before, .card:focus-within::before { transform: scaleX(1); }

/* left half: number, title, blurb — never overlaps the side column */
.card__main {
  flex: 1 1 24ch; min-width: 0;
  display: flex; flex-direction: column; gap: .7rem;
}
/* right half: tags, with the link stacked underneath them */
.card__side {
  flex: 0 0 auto; margin-left: auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: .9rem;
}

.card__num { margin: 0; }
.card__title {
  font-size: var(--step-lg);
  letter-spacing: -.01em;
  font-variation-settings: "SOFT" 20, "WONK" 1;
}
.card__blurb { color: var(--ink-soft); margin: 0; flex: 1; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.tags li {
  border: var(--border); border-radius: 999px;
  padding: .2rem .65rem;
  letter-spacing: .06em;
}

.card__link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 500;
  align-self: flex-end;
}
.card__link span { transition: transform .25s var(--ease); }
.card:hover .card__link span { transform: translateX(5px); }

/* ============================================================
   FOOTER — links in one horizontal row
   ============================================================ */
footer {
  background: var(--slab);
  color: var(--slab-ink);
  padding: var(--section) var(--pad) 1.75rem;
  border-radius: clamp(20px, 3vw, 34px) clamp(20px, 3vw, 34px) 0 0;
  border-top: 1px solid var(--line);
}
.footer__inner {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: clamp(1.25rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}
.links {
  display: flex; flex-wrap: wrap;
  gap: clamp(1.25rem, 4vw, 3rem);
}
.links a {
  color: var(--slab-ink);
  font-size: var(--step-lg);
  font-family: var(--font-display);
  border-bottom: 1px solid rgba(255,255,255,.25);
  transition: color .25s var(--ease), border-color .25s var(--ease),
              text-shadow .25s var(--ease);
}
.links a:hover {
  color: var(--accent-2);
  border-color: var(--accent);
  text-shadow: 0 0 22px var(--glow);
}

.footer__fine {
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: 1.5rem;
  margin: 0;
  color: rgba(255,255,255,.55);
  max-width: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
