/* =========================================================
   Amanda Loftis — shared stylesheet
   Dark "product studio" design (Nov 2026): near-black canvas,
   orange actions + blue/sky accents, light serif display type,
   wide grotesk statements, monospace labels, floating pill nav.
   ========================================================= */

:root {
  /* ---- Color ---- */
  --black: #000000;          /* page background */
  --surface: #111111;        /* panels, cards, footer */
  --surface-2: #1A1A1A;      /* raised surfaces, inputs, placeholder base */
  --line: #2F2F2F;           /* hairlines, outlines, nav pill */
  --gray: #6D6D6D;           /* secondary text, "continuation" copy */
  --gray-light: #CACACA;     /* body copy on black */
  --white: #FFFFFF;          /* primary text */
  --daredevil: #FF5B22;      /* action color: buttons, nav dot, focus ring */
  --daredevil-dim: #7C2A0C;  /* deep orange for glows */
  --blue: #256AEC;           /* active states, feature panel, glows */
  --sky: #A8EBFF;            /* labels/eyebrows, highlights, link hover, quotes */
  --nav-glass: rgba(47, 47, 47, 0.7);

  /* ---- Type ---- */
  --serif: 'Inria Serif', Georgia, serif;              /* display headlines */
  --sans: 'Archivo', system-ui, sans-serif;             /* statements, body, UI */
  --mono: 'Space Mono', ui-monospace, 'SF Mono', monospace; /* eyebrows, tags, labels */

  /* ---- Space & shape ---- */
  --gutter: clamp(16px, 1.8vw, 24px);
  /* Page width: content spans at most 80% of the viewport. Below ~900px
     the 720px floor wins, so phones and tablets keep using the full
     width minus --gutter. --inline is the resulting side space; the %
     resolves against the full-width element it's used on. */
  --page: max(80vw, 720px);
  --inline: max(var(--gutter), calc((100% - var(--page)) / 2));
  --gap: clamp(12px, 1.6vw, 24px);
  --section: clamp(72px, 10vw, 150px);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;

  --dots: radial-gradient(circle, rgba(255, 255, 255, 0.09) 1px, transparent 1.2px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--daredevil); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--daredevil); color: var(--white); }

main { padding-top: 64px; } /* clears the floating nav */

/* ---------- Type ---------- */
.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 12vw, 200px);
  line-height: .92;
  letter-spacing: -.025em;
}
.display--md { font-size: clamp(52px, 8.4vw, 136px); }
.display--sm { font-size: clamp(40px, 5.2vw, 84px); line-height: .98; } /* project page titles */
.display em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; }

.statement {
  margin: 0;
  font-family: var(--sans);
  font-stretch: 118%;
  font-variation-settings: "wdth" 118;
  font-weight: 500;
  font-size: clamp(26px, 3.3vw, 50px);
  line-height: 1.04;
  letter-spacing: -.03em;
  color: var(--sky);
  max-width: 24ch;
}
.statement b, .statement strong { color: var(--white); font-weight: 500; }
.statement--sm { font-size: clamp(20px, 2.2vw, 32px); max-width: 30ch; }
.statement--xs { font-size: clamp(17px, 1.6vw, 22px); line-height: 1.22; max-width: 36ch; }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--sky);
}
.eyebrow--gray { color: var(--gray); }

.h3 {
  margin: 0;
  font-family: var(--sans);
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  font-weight: 600;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.1;
  letter-spacing: -.025em;
}

.body { margin: 0; color: var(--gray-light); max-width: 52ch; font-size: 15px; line-height: 1.6; }

/* Caption pattern: "<b>Lead.</b> gray continuation" */
.caption { margin: 0; font-size: 13px; line-height: 1.4; color: var(--gray); max-width: 52ch; }
.caption b, .caption strong { color: var(--white); font-weight: 600; }

.text-link {
  display: inline-block;
  font-family: var(--sans);
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  font-size: 15px;
  color: var(--gray-light);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color .2s ease;
}
.text-link:hover { color: var(--sky); }

/* ---------- Buttons & tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--daredevil);
  color: var(--white);
  font-family: var(--sans);
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
  box-shadow: 0 0 0 0 rgba(255, 91, 34, 0);
}
.btn::after { content: "\2197"; font-size: .85em; }
.btn:hover { box-shadow: 0 0 28px 2px rgba(255, 91, 34, .45); }
.btn--sm { padding: 6px 10px; font-size: 13px; border-radius: 6px; }
.btn--ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--daredevil); color: var(--daredevil); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block;
  padding: 4px 7px 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-light);
}

/* ---------- Floating pill nav ---------- */
.nav {
  position: fixed;
  top: 8px;
  left: var(--inline);
  right: var(--inline);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 44px;
  padding: 0 6px 0 14px;
  border-radius: 12px;
  background: var(--nav-glass);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.nav__brand::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--daredevil);
  box-shadow: 0 0 10px var(--daredevil);
}
.nav__brand sup { font-family: var(--sans); font-size: 9px; margin-left: -4px; }
.nav__right { display: flex; align-items: center; gap: clamp(14px, 2vw, 24px); }
.nav__links { display: flex; gap: clamp(12px, 1.8vw, 22px); }
.nav__links a { font-size: 13.5px; color: var(--gray-light); transition: color .2s ease; }
.nav__links a:hover { color: var(--white); }
.nav__links a[aria-current="page"] { color: var(--white); }
.nav__links a[aria-current="page"]::before { content: "\25CF"; color: var(--daredevil); font-size: 8px; margin-right: 5px; vertical-align: 2px; }
.nav__social { display: inline-flex; color: var(--gray-light); }
.nav__social:hover { color: var(--white); }

/* ---------- Mobile nav: hamburger + right-side drawer ---------- */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.nav__toggle span { display: block; width: 100%; height: 1.5px; background: var(--white); border-radius: 2px; }
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 36px;
  width: min(84vw, 340px);
  padding: 22px 24px 28px;
  background: var(--surface);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform .3s ease;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer__close {
  align-self: flex-end;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.nav-drawer__links { display: flex; flex-direction: column; gap: 14px; }
.nav-drawer__links a { font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -.02em; color: var(--gray-light); }
.nav-drawer__links a:hover, .nav-drawer__links a[aria-current="page"] { color: var(--sky); }
.nav-drawer__social { display: inline-flex; color: var(--gray-light); margin-top: auto; }
.nav-drawer__social:hover { color: var(--white); }
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.nav-scrim.open { opacity: 1; pointer-events: auto; }

/* The one fixed breakpoint on the site: nav links <-> hamburger drawer */
@media (max-width: 680px) {
  .nav__right { display: none; }
  .nav__toggle { display: flex; }
}

/* ---------- Layout ---------- */
.section { padding: var(--section) var(--inline) 0; }
.section--tight { padding-top: clamp(40px, 5vw, 72px); }
.section--last { padding-bottom: var(--section); }
.stack { display: flex; flex-direction: column; gap: clamp(14px, 1.6vw, 22px); align-items: flex-start; }
.stack--center { align-items: center; text-align: center; }
.stack--center .statement, .stack--center .body { margin-left: auto; margin-right: auto; }
.row-between { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; }

/* Two columns that wrap: label/heading on the left, content on the right */
.split { display: flex; flex-wrap: wrap; gap: clamp(24px, 3vw, 48px); align-items: flex-start; }
.split > * { flex: 1 1 360px; min-width: 0; }
.split__aside { flex: 0 1 calc(33% - 24px); min-width: min(100%, 220px); }

.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
/* Three columns at most; wraps to fewer when columns would drop below 340px */
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(340px, calc((100% - 2 * var(--gap)) / 3))), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* ---------- Panels (dark rounded cards) ---------- */
.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.2vw, 30px);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.panel--line { background: transparent; border: 1px solid var(--line); }
.panel--dots { background-color: var(--surface); background-image: var(--dots); background-size: 12px 12px; }
.panel__num { font-family: var(--mono); font-size: 11px; color: var(--sky); letter-spacing: .04em; }
.panel p { margin: 0; }

/* Spec cards: mono label, big number, outlined tag (used for facts/meta) */
.spec { display: flex; flex-direction: column; gap: 10px; }
.spec__k {
  font-family: var(--sans);
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-weight: 700;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -.04em;
}
.spec__v { font-size: 15px; color: var(--gray-light); }

/* ---------- Images ----------
   Real images sit in a dark frame with a hairline border so light
   screenshots don't glare against the black page. */
.img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.img--cover { height: 100%; object-fit: cover; }
.thumb { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
a:hover > .thumb img { transform: scale(1.035); }

/* Stage: a glowing panel that presents one image like a product shot */
.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vw, 96px) clamp(16px, 5vw, 80px);
  border-radius: var(--r-lg);
  background:
    radial-gradient(60% 70% at 80% 10%, rgba(37, 106, 236, .75) 0%, rgba(37, 106, 236, .2) 40%, transparent 72%),
    radial-gradient(50% 60% at 8% 100%, rgba(255, 91, 34, .55) 0%, transparent 70%),
    var(--surface);
  overflow: hidden;
}
.stage--orange {
  background:
    radial-gradient(60% 70% at 80% 10%, rgba(255, 91, 34, .8) 0%, rgba(255, 91, 34, .22) 40%, transparent 72%),
    radial-gradient(50% 60% at 8% 100%, rgba(37, 106, 236, .5) 0%, transparent 70%),
    var(--surface);
}
.stage .img { max-width: 1100px; border: 0; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }

/* Media + caption figure */
.figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.figure > a { display: block; border-radius: var(--r-lg); }
.figure figcaption { margin: 0; font-size: 13px; line-height: 1.45; color: var(--gray); max-width: 70ch; }

/* ---------- Category chips (link pills) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  padding: 8px 12px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-light);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.chips a:hover { border-color: var(--sky); color: var(--sky); }

/* ---------- Projects index ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(24px, 3vw, 40px); }
.filters button {
  padding: 8px 12px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--gray-light);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.filters button:hover { border-color: var(--gray); color: var(--white); }
.filters button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.work-grid { display: grid; gap: clamp(32px, 4vw, 56px) var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.work-card[hidden] { display: none; }
/* Home featured grid: at most four columns. Cards 7-8 only show once
   four columns fit (container >= 4 x 340px + 3 x 24px gap, i.e. viewports
   around 1790px+), so XL screens get two full rows of four and smaller
   screens keep six. A container query, not a viewport breakpoint, so it
   tracks the grid's real width. */
.work-grid--home { container-type: inline-size; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(340px, calc((100% - 3 * var(--gap)) / 4))), 1fr)); }
.work-grid--home > .work-card:nth-child(n+7) { display: none; }
@container (min-width: 1432px) {
  .work-grid--home > .work-card:nth-child(n+7) { display: flex; }
}
.work-card .caption b { font-size: 15px; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.quote { justify-content: space-between; gap: 28px; }
.quote blockquote {
  margin: 0;
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.4;
  letter-spacing: -.015em;
  color: var(--white);
}
.quote blockquote::before { content: "\201C"; display: block; font-family: var(--serif); font-size: 64px; line-height: .6; color: var(--sky); margin-bottom: 8px; }
.quote__who { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.quote__who img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.quote__who span { display: block; color: var(--gray); font-size: 12.5px; }
.panel--blue { background: var(--blue); }
.panel--blue .quote__who span { color: var(--sky); }
.panel--blue blockquote::before { color: var(--white); }
/* Sky and gray are both too low-contrast on blue: statements go all-white */
.panel--blue .statement { color: var(--white); }

/* ---------- Experience rows ---------- */
.roles { border-top: 1px solid var(--line); }
.role {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 6px 24px;
  align-items: baseline;
  padding: clamp(16px, 2vw, 24px) 0;
  border-bottom: 1px solid var(--line);
}
.role__title { font-stretch: 112%; font-variation-settings: "wdth" 112; font-size: clamp(18px, 1.8vw, 26px); letter-spacing: -.025em; }
.role__org { color: var(--gray-light); }
.role__years { font-family: var(--mono); font-size: 12px; color: var(--sky); }

/* ---------- Long-form project write-ups ---------- */
.prose { max-width: 760px; margin-left: auto; margin-right: auto; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 18px; }
.prose p, .prose li { color: var(--gray-light); font-size: 16px; line-height: 1.7; }
.prose p { margin-bottom: 0; }
.prose strong { color: var(--white); font-weight: 600; }
.prose a { color: var(--white); border-bottom: 1px solid var(--sky); transition: color .2s ease; }
.prose a:hover { color: var(--sky); }
.prose h2, .prose h3 {
  margin: clamp(40px, 5vw, 64px) 0 0;
  font-stretch: 115%;
  font-variation-settings: "wdth" 115;
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.prose h2 { font-size: clamp(24px, 2.6vw, 36px); }
.prose h3 { font-size: clamp(19px, 1.8vw, 24px); }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.prose ul, .prose ol { margin-bottom: 0; padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--sky); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: clamp(32px, 4vw, 56px) 0; }
/* Images inside a write-up break out wider than the text column */
.prose-media { max-width: 1200px; margin: clamp(28px, 4vw, 56px) auto; }
.prose-media + .prose-media { margin-top: var(--gap); }
.media-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
/* Two columns at most, every image cropped to the same 3:2 frame */
.media-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(380px, calc((100% - var(--gap)) / 2))), 1fr)); }
.media-grid--2 .img { aspect-ratio: 3 / 2; object-fit: cover; }

.project-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--gap); }
.project-nav a { display: flex; flex-direction: column; gap: 10px; padding: clamp(18px, 2vw, 28px); border-radius: var(--r-lg); background: var(--surface); transition: background .2s ease; }
.project-nav a:hover { background: var(--surface-2); }
.project-nav a:last-child { text-align: right; align-items: flex-end; }
.project-nav .h3 { max-width: 22ch; }

.back-link { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--gray); }
.back-link:hover { color: var(--sky); }

/* Simple bulleted pill list (skills/tools) */
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pill-list li { padding: 7px 12px; border-radius: 999px; background: var(--surface-2); font-size: 14px; color: var(--gray-light); }

/* ---------- Footer ---------- */
.footer {
  margin: var(--section) var(--inline) var(--gutter);
  padding: clamp(28px, 3vw, 44px) clamp(20px, 2.2vw, 32px) clamp(20px, 2vw, 28px);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer__word { font-family: var(--serif); font-size: clamp(40px, 6vw, 88px); line-height: .9; letter-spacing: -.03em; max-width: 12ch; }
.footer__cols { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 80px); }
.footer__col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--gray-light); }
.footer__col a:hover { color: var(--sky); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(36px, 5vw, 72px);
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ---------- Scroll reveal ----------
   Only hides content once the inline script has added .js to <html>
   and the user hasn't asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

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