/* =========================================================
   Abigail Peterson · personal site
   ONE dark theme. Palette: Crimson Ink · Dusty Rose · Cosmic Latte
                            Neon Pear · Burnt Sienna · Arctic Blue

   Each section is a deep tint of one palette color and sets its own
   --tone (background) and --surface (raised panels inside it).
   Text: Cosmic Latte body, Dusty Rose headings, Burnt Sienna accent.
   Burnt Sienna is never used on the crimson block (too low contrast).
   Shapes: tiles & images 16px · big blocks 28px · buttons pill.
   ========================================================= */

:root {
  /* palette */
  --crimson: #8B162B;
  --rose: #F9B6B8;
  --latte: #F6F3CF;
  --pear: #C6B63B;
  --sienna: #E8691E;
  --arctic: #BAD2E8;

  /* text */
  --ink: #F6F3CF;
  --ink-2: #E7DCC5;
  --muted: #CDB7B7;
  --heading: #F9B6B8;
  --line: rgba(246, 243, 207, .15);

  /* default tone (page background) */
  --tone: #1A0B10;
  --surface: #241318;
  --chart-surface: #241318;

  /* charts (checked against every section surface) */
  --series-a: #E8691E; --series-a-soft: #9E4516;
  --series-b: #5B8FD6; --series-muted: #6E5C50;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-md: 0 12px 30px -14px rgba(0, 0, 0, .75);
  --shadow-lg: 0 34px 70px -30px rgba(0, 0, 0, .85);

  --r-sm: 8px; --r: 16px; --r-lg: 28px;
  --display: "Outfit", system-ui, sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

/* ---------- section tones ---------- */
/* Section colors, in the order they run down the page.
   Neighbors never share a hue. */
.tone-navy     { --tone: #142230; --surface: #1D2E3D; }  /* Where I've worked */
.tone-olive    { --tone: #21200E; --surface: #2A2914; }  /* Numbers */
.tone-plum     { --tone: #2B151C; --surface: #37202A; }  /* Projects */
.tone-navy-2   { --tone: #1A2A38; --surface: #22303C; }  /* Campaign & brand work */
.tone-olive-2  { --tone: #23220F; --surface: #2C2A16; }  /* Software and skills */
.tone-plum-2   { --tone: #2E1720; --surface: #3A2029; }  /* About */
.tone-crimson  { --tone: #8B162B; --surface: #7C1224; --muted: #F2D9DA; --heading: #F6F3CF; --line: rgba(255, 255, 255, .3); }
[class*="tone-"] { background: var(--tone); --chart-surface: var(--surface); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--tone); color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--heading); }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.05; letter-spacing: -.03em; color: var(--heading); }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); font-weight: 700; }
h1 em { font-style: italic; font-weight: 800; color: var(--sienna); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 700; max-width: 20ch; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0; }
abbr { text-decoration: underline dotted; cursor: help; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(72px, 9vw, 128px) 0; }
.section-title { margin-bottom: clamp(32px, 4vw, 56px); }
.eyebrow {
  font: 600 .74rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); max-width: 46ch; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--latte); color: #1A0B10; padding: 10px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 600 1rem/1 var(--sans); padding: 15px 26px; border-radius: 999px;
  border: 1px solid transparent; background: var(--rose); color: #2A0A12;
  text-decoration: none; cursor: pointer; box-shadow: var(--shadow-md);
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease);
}
/* hover inverts the colors: background and text trade places */
.btn:active { transform: scale(.985); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-light { background: var(--latte); color: var(--crimson); }
.btn-outline { background: transparent; color: #FFF; border-color: rgba(255, 255, 255, .55); box-shadow: none; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; padding: 10px 0; }
.nav-inner {
  width: min(1180px, 100% - 24px); margin-inline: auto; height: 64px;
  display: flex; align-items: center; gap: 20px; padding: 0 12px 0 14px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(26, 11, 16, .82); backdrop-filter: blur(16px) saturate(140%);
  transition: box-shadow .2s var(--ease);
}
.nav.scrolled .nav-inner { box-shadow: var(--shadow-md); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--crimson); color: var(--latte); font: 700 .85rem/1 var(--display);
}
.status { display: flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--muted); padding-left: 16px; border-left: 1px solid var(--line); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: #5ED08C; }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .93rem; transition: background .15s, color .15s; }
.nav-links a.active { background: rgba(246, 243, 207, .1); color: var(--rose); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- hero ---------- */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(64px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .lede { margin-top: 22px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-photo { margin: 0; justify-self: end; width: 100%; }
.hero-photo img { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.hero-photo figcaption { margin-top: 12px; font-size: .84rem; color: var(--muted); }

/* ---------- work gallery ---------- */
.work-head { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: end; justify-content: space-between; margin-bottom: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  font: 500 .9rem/1 var(--sans); padding: 10px 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.filter[aria-pressed="true"] { background: var(--rose); border-color: var(--rose); color: #2A0A12; }
/* season timeline, shown only under Creative direction.
   Reads left to right as a year; empty seasons are disabled. */
.seasons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: -14px 0 30px; }
.seasons[hidden] { display: none; }
.seasons-label {
  font: 600 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.season-track {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px;
  list-style: none; margin: 0; padding: 0;
}
/* the line that makes it read as a timeline */
.season-track::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: 50%; height: 1px;
  background: var(--line); z-index: 0;
}
.season-track li { position: relative; z-index: 1; }
.season {
  position: relative; font: 500 .85rem/1 var(--sans); padding: 9px 16px; border-radius: 999px;
  cursor: pointer; border: 1px solid var(--line); background: var(--tone); color: var(--ink-2);
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.season[aria-pressed="true"] { background: var(--rose); border-color: var(--rose); color: #2A0A12; }
.season:disabled { opacity: .42; cursor: not-allowed; border-style: dashed; }

.work-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 16px; grid-auto-flow: dense;
}
.work-grid li.tall { grid-row: span 2; }
.work-grid li.wide { grid-column: span 2; }
.work-card {
  position: relative; display: block; width: 100%; height: 100%; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-sm); transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.work-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
/* flat artwork (labels, menu boards, posters) is shown whole, never cropped.
   The card stays the section's own color so artwork floats on the background
   instead of sitting in a white box. */
.work-card.fit-whole { background: transparent; }
.work-card.fit-whole img { object-fit: contain; padding: 10px; }
.work-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(12, 4, 8, .82) 0%, rgba(12, 4, 8, .22) 38%, transparent 62%);
  opacity: 0; transition: opacity .25s var(--ease);
}
.work-cap {
  position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; text-align: left;
  color: #FFF; opacity: 0; transform: translateY(6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.work-cap strong { display: block; font: 600 1rem/1.25 var(--display); }
.work-cap span { font-size: .8rem; opacity: .88; }
.work-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.work-card:focus-visible img { transform: scale(1.04); }
.work-card:focus-visible::after,
.work-card:focus-visible .work-cap { opacity: 1; transform: none; }
.work-empty { color: var(--muted); margin-top: 24px; }
.work-empty code { background: var(--surface); padding: 2px 6px; border-radius: 6px; }

/* ---------- lightbox ---------- */
.lightbox {
  width: min(1100px, 94vw); max-width: none; max-height: 92vh; max-height: 92dvh; padding: 0; border: 1px solid var(--line);
  border-radius: var(--r-lg); background: #241318; color: var(--ink);
  box-shadow: var(--shadow-lg); overflow: visible;
}
.lightbox::backdrop { background: rgba(10, 3, 6, .82); backdrop-filter: blur(3px); }
.lightbox[open] { animation: lbIn .24s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.lb-figure { margin: 0; display: grid; grid-template-columns: 1.6fr .8fr; }
.lb-img { width: 100%; max-height: 82vh; max-height: 82dvh; object-fit: contain; background: #12070B; border-radius: var(--r-lg) 0 0 var(--r-lg); }
.lb-figure figcaption { padding: 32px 30px; align-self: center; }
.lb-count { font: 500 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.lb-title { font-size: 1.5rem; margin-bottom: 8px; }
.lb-meta { color: var(--sienna); font-weight: 600; font-size: .95rem; margin-bottom: 10px; }
.lb-note { color: var(--ink-2); font-size: .95rem; }
.lb-close, .lb-nav {
  position: absolute; z-index: 3; display: grid; place-items: center; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: #2E1B21; color: var(--ink); font-size: 1.3rem; line-height: 1;
  box-shadow: var(--shadow-md); transition: transform .15s var(--ease);
}
.lb-close { top: -16px; right: -16px; font-size: 1rem; }
.lb-prev { left: -20px; top: 50%; margin-top: -22px; }
.lb-next { right: -20px; top: 50%; margin-top: -22px; }

/* ---------- projects (case studies) ---------- */
.project { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project + .project { border-top: 0; }
.project h3 { margin: 0; font-size: 1rem; }
.project-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: none; border: 0; padding: 28px 4px; cursor: pointer; text-align: left; color: inherit;
  transition: transform .2s var(--ease);
}
.project-head { display: flex; flex-direction: column; gap: 6px; }
.project-title { font: 600 clamp(1.25rem, 2.4vw, 1.75rem) var(--display); color: var(--heading); letter-spacing: -.02em; }
.project-sub { font: 400 .92rem var(--sans); color: var(--muted); }
.project-chevron {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  position: relative; transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.project-chevron::before, .project-chevron::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 13px; height: 2px; border-radius: 2px;
  background: var(--rose); transform: translate(-50%, -50%);
}
.project-chevron::after { transform: translate(-50%, -50%) rotate(90deg); transition: opacity .2s var(--ease); }
.project-toggle[aria-expanded="true"] .project-chevron::after { opacity: 0; }
.project-body { padding: 0 4px 36px; animation: projectIn .3s var(--ease); }
.project-body[hidden] { display: none; }
@keyframes projectIn { from { opacity: 0; transform: translateY(-6px); } }
.project-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); }
.project-cols h4 {
  margin: 0 0 12px; font: 600 .76rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.project-cols ul { margin: 0; padding-left: 1.1em; display: grid; gap: 9px; color: var(--ink-2); font-size: .96rem; }
.project-cols li::marker { color: var(--sienna); }
.project-media { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 28px; }
.project-media[hidden] { display: none; }
.project-media button {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
}
.project-media button { position: relative; }
.project-media img {
  width: 100%; border-radius: var(--r); border: 1px solid var(--line); background: transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.project-media button:focus-visible img {
  transform: translateY(-4px); box-shadow: var(--shadow-lg);
}
.media-badge {
  position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px;
  background: rgba(20, 8, 12, .82); color: var(--latte); font-size: .78rem; font-weight: 500;
  backdrop-filter: blur(6px);
}
.media-cap { display: block; margin-top: 12px; font-size: .86rem; line-height: 1.45; color: var(--muted); }
.media-cap strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

/* a project with no images gets numbers instead */
.project-stats { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; }
.project-stats li {
  flex: 1 1 180px; padding: 22px 24px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
}
.project-stats strong { display: block; font: 600 clamp(1.8rem, 3vw, 2.4rem)/1 var(--sans); letter-spacing: -.03em; color: var(--rose); }
.project-stats span { display: block; margin-top: 6px; font-size: .9rem; color: var(--muted); }

/* ---------- bento numbers ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile {
  border: 1px solid var(--line); border-radius: var(--r); padding: 26px;
  background: var(--surface); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
}
.tile-lead { grid-column: span 2; grid-row: span 2; justify-content: center; }
.tile-lead .tile-value { font-size: clamp(3.4rem, 7vw, 5.4rem); color: var(--pear); }
.tile-rose .tile-value { color: var(--rose); }
.tile-arctic .tile-value { color: var(--arctic); }
.tile-value { font: 600 clamp(2.2rem, 3.4vw, 3rem)/1 var(--sans); letter-spacing: -.04em; color: var(--ink); }
.tile-label { color: var(--muted); font-size: .92rem; line-height: 1.4; }
.tile-chart { grid-column: span 4; justify-content: flex-start; }

/* ---------- charts ---------- */
.chart { margin: 0; }
.chart figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.chart-title { font: 600 1.05rem var(--display); color: var(--heading); letter-spacing: -.02em; }
.chart-sub { color: var(--muted); font-size: .88rem; }
.chart-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; }
.chart-canvas { width: 100%; min-height: 40px; }
.chart-canvas svg { display: block; width: 100%; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0 0 12px; font-size: .86rem; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.sw { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.sw-a { background: var(--series-a); } .sw-a-soft { background: var(--series-a-soft); }
.sw-b { background: var(--series-b); }
.sw-mark { width: 9px; height: 9px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; }
.mark-a { fill: var(--series-a); } .mark-a-soft { fill: var(--series-a-soft); }
.mark-b { fill: var(--series-b); } .mark-muted { fill: var(--series-muted); }
.mark-ink { fill: var(--ink); stroke: var(--chart-surface); stroke-width: 2; }
.rule-ink { stroke: var(--ink); stroke-width: 1.5; }
.gridline { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.axis { stroke: var(--muted); stroke-width: 1; shape-rendering: crispEdges; }
.t-label, .t-value { paint-order: stroke; stroke: var(--chart-surface); stroke-width: 4px; stroke-linejoin: round; }
.t-label { fill: var(--ink); font: 500 13px var(--sans); }
.t-value { fill: var(--ink); font: 600 13px var(--sans); }
.t-tick { fill: var(--muted); font: 400 12px var(--sans); font-variant-numeric: tabular-nums; }
.hit { fill: transparent; cursor: pointer; outline: none; }
.js .grow { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); transition: transform .8s var(--ease); }
.js .chart.seen .grow { transform: scaleX(1); }
.table-toggle {
  margin-top: 14px; background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--heading); font: 500 .85rem var(--sans); text-decoration: underline; text-underline-offset: 3px;
}
.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font-weight: 500; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tip {
  position: fixed; z-index: 90; pointer-events: none; max-width: 260px; padding: 10px 12px;
  border-radius: var(--r-sm); background: var(--latte); color: #1A0B10; font-size: .85rem; line-height: 1.4;
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.tip.on { opacity: 1; transform: none; }
.tip strong { display: block; font-size: .95rem; }

/* ---------- about ---------- */
.about-list {
  list-style: none; margin: 40px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(32px, 5vw, 72px);
}
.about-list li { padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.about-list strong { color: var(--rose); }

/* ---------- experience ---------- */
.job { padding-top: 36px; margin-top: 36px; border-top: 1px solid var(--line); }
.job:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.job-head h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; }
.job-meta { color: var(--muted); margin-top: 4px; font-size: .95rem; }
.job-dates { font-size: .9rem; color: var(--ink-2); padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: fit-content; }
.tabs [role="tab"] {
  font: 500 .9rem var(--sans); color: var(--ink-2); cursor: pointer;
  padding: 9px 16px; border-radius: 999px; border: 0; background: transparent;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.tabs [role="tab"][aria-selected="true"] { background: var(--rose); color: #2A0A12; }
.panel-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.bullets { margin: 0; padding-left: 1.1em; display: grid; gap: 10px; color: var(--ink-2); }
.bullets li::marker { color: var(--sienna); }
.bullets strong { color: var(--ink); }
.panel[hidden] { display: none; }
.mini-stats { display: grid; gap: 10px; }
.mini { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.mini-value { font: 600 1.9rem/1 var(--sans); letter-spacing: -.03em; color: var(--rose); min-width: 3ch; }
.mini-label { color: var(--muted); font-size: .9rem; line-height: 1.35; }

/* ---------- skills ---------- */
.skill-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(22px, 3vw, 40px); }
.skill-group h3 { font-size: 1rem; margin-bottom: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.skill-group ul { list-style: none; margin: 0; padding: 0; }
.skill-group li { padding: 11px 0; border-top: 1px solid var(--line); font-size: .98rem; color: var(--ink-2); }

/* ---------- education line ---------- */
.edu { margin-top: 56px; padding: 22px 26px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.edu strong { color: var(--heading); font-family: var(--display); font-size: 1.05rem; }

/* ---------- contact (crimson block, headshot beside the text) ---------- */
.contact-grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.contact-photo { margin: 0; justify-self: center; }
.contact-photo img {
  width: min(280px, 60vw); aspect-ratio: 1; object-fit: cover; object-position: 50% 22%;
  border-radius: 50%; border: 4px solid rgba(246, 243, 207, .85); box-shadow: var(--shadow-lg);
}
.contact-copy h2 { max-width: 18ch; }
.contact-copy .lede { color: rgba(255, 255, 255, .9); margin-top: 16px; }
.contact-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.email-text { margin-top: 18px; color: var(--muted); font-size: .95rem; word-break: break-all; }

/* ---------- footer ---------- */
.footer { padding: 28px 0 40px; font-size: .88rem; color: var(--muted); background: #140810; }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer a { color: var(--ink-2); }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translate(-50%, 16px);
  background: var(--latte); color: #1A0B10; padding: 12px 20px; border-radius: 999px; font-weight: 500;
  opacity: 0; transition: opacity .2s, transform .2s var(--ease); pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- entrances ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .status { display: none; }
  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .skill-groups { grid-template-columns: repeat(2, 1fr); }
  .tile-chart { grid-column: span 2; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero-grid, .panel-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .skill-groups { grid-template-columns: 1fr; }
  .contact-grid { text-align: center; justify-items: center; }
  .contact-copy h2, .contact-copy .lede { margin-inline: auto; }
  .contact-ctas { justify-content: center; }
  .lb-figure { grid-template-columns: 1fr; }
  .lb-img { border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 52vh; max-height: 52dvh; }
  .lb-figure figcaption { padding: 20px 22px 26px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-close { top: -14px; right: 6px; }
}
@media (max-width: 1020px) { .project-cols { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .about-list { grid-template-columns: 1fr; }
  .project-cols { grid-template-columns: 1fr; gap: 26px; }
  .project-media { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .work-grid li.wide { grid-column: span 2; }
  .bento { grid-template-columns: 1fr; }
  .tile-lead, .tile-chart { grid-column: span 1; grid-row: span 1; }
  .logo-name { display: none; }
  .ai-list li { grid-template-columns: 1fr; gap: 6px; }
  .hero-ctas .btn, .contact-ctas .btn { flex: 1 1 100%; justify-content: center; }
  .tabs { width: 100%; }
  .tabs [role="tab"] { flex: 1 1 auto; text-align: center; }
}

/* =========================================================
   TOUCH & MOBILE
   On a touchscreen the browser fakes a hover on tap and leaves it
   stuck, so every hover style lives behind a real-hover check.
   ========================================================= */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--tone); color: var(--rose); border-color: var(--rose); }
  .btn-quiet:hover { background: var(--ink); color: var(--tone); border-color: var(--ink); }
  .btn-light:hover { background: var(--crimson); color: var(--latte); border-color: var(--latte); }
  .btn-outline:hover { background: #FFF; color: var(--crimson); border-color: #FFF; }
  .nav-links a:hover { background: rgba(246, 243, 207, .1); color: var(--rose); }
  .logo:hover .logo-mark { transform: rotate(-12deg) scale(1.05); }

  .filter:hover { background: var(--ink); color: var(--tone); border-color: var(--ink); }
  .filter[aria-pressed="true"]:hover { background: var(--tone); color: var(--rose); border-color: var(--rose); }
  .season:hover:not(:disabled) { background: var(--ink); color: var(--tone); border-color: var(--ink); }
  .season[aria-pressed="true"]:hover:not(:disabled) { background: var(--tone); color: var(--rose); border-color: var(--rose); }

  .work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
  .work-card:hover img { transform: scale(1.04); }
  .work-card:hover::after, .work-card:hover .work-cap { opacity: 1; transform: none; }
  .project-media button:hover img { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

  .tabs [role="tab"]:hover { color: var(--rose); }
  /* transform, not padding — animating padding re-lays out the page */
  .project-toggle:hover { transform: translateX(10px); }
  .project-toggle:hover .project-chevron { border-color: var(--rose); }
  .lb-close:hover, .lb-nav:hover { transform: scale(1.08); }
}

/* no grey flash on tap, no font inflation in landscape */
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; }

/* controls respond instantly and don't get text-selected by a long press */
button, a, [role="button"], [role="tab"] {
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
/* ...but captions, bullets and body copy stay selectable */
p, li, h1, h2, h3, h4, td, th, .lb-caption, .media-cap { user-select: text; -webkit-user-select: text; }

/* press feedback, since touch never gets hover */
.btn:active, .filter:active, .season:active:not(:disabled),
.tabs [role="tab"]:active, .work-card:active, .project-toggle:active { transform: scale(.97); }

/* the lightbox owns horizontal swipes; the browser keeps vertical scrolling */
.lightbox { touch-action: pan-y; }

/* finger-sized targets wherever the pointer is coarse */
@media (pointer: coarse) {
  .filter, .season, .tabs [role="tab"] { min-height: 44px; padding-top: 11px; padding-bottom: 11px; }
  .table-toggle { min-height: 44px; padding: 10px 0; }
  .btn-sm { min-height: 44px; }
  .logo-mark { width: 44px; height: 44px; }
  .footer a { display: inline-block; min-height: 44px; line-height: 44px; }
  .lb-close, .lb-nav { width: 48px; height: 48px; }
  .theme-toggle { width: 44px; height: 44px; }
}

/* ---------- reduced motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .js .grow { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav-inner { background: #1A0B10; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .mark-a, .mark-a-soft, .mark-b, .mark-muted { fill: CanvasText; }
}
@media print {
  .nav, .table-toggle, .tip, .toast, .filters, .lightbox { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .panel[hidden] { display: block; }
  .data-table[hidden] { display: table; }
}
