/* ==========================================================================
   Kellen Snider — personal site
   Visual language: airport signage, painted in University of Oregon green.
   Location signs (black, lit-green legend and border) say where you are.
   Direction signs (green, white legend, arrow) point to where you can go.
   Archivo's width axis: condensed for signs and display, normal for reading.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #efefec;          /* concrete */
  --bg-2: #e4e4e0;
  --text: #121212;
  --muted: #55575b;
  --line: #c9c9c4;
  --green: #154733;       /* University of Oregon green: sign paint */
  --on-green: #ffffff;    /* legend on green paint */
  --green-lit: #5cc98f;   /* the same green, lit, for legends and lines on black */
  --black: #000000;
  --board: #17191c;       /* "Now" board and contact band */
  --board-text: #f3f3f0;
  --board-muted: #b3b6bb;
  --board-line: #34373c;
  --board-field: #24272b;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1360px;
  --gutter: clamp(20px, 4vw, 56px);
  --col-gap: clamp(20px, 2.5vw, 40px);
  --bar-h: 3.5rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1d20;        /* tarmac at night */
    --bg-2: #232529;
    --text: #ededea;
    --muted: #a9acb1;
    --line: #34373c;
    --board: #0f1012;
    --board-text: #f3f3f0;
    --board-muted: #a9acb1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1b1d20;
  --bg-2: #232529;
  --text: #ededea;
  --muted: #a9acb1;
  --line: #34373c;
  --board: #0f1012;
  --board-text: #f3f3f0;
  --board-muted: #a9acb1;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bar-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 900px) {
  body { font-size: 1.125rem; }
}

::selection { background: var(--green); color: var(--on-green); }

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 700; }
p { margin: 0 0 0.9em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
a:hover {
  background: var(--green);
  color: var(--on-green);
  text-decoration-color: var(--on-green);
}

:focus-visible { outline: 3px solid var(--green-lit); outline-offset: 2px; box-shadow: 0 0 0 5px var(--black); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.5rem 0.875rem;
  background: var(--green);
  color: var(--on-green);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 0.5rem; }

.container {
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem var(--col-gap);
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .span-4 { grid-column: span 4; }
  .span-5 { grid-column: span 5; }
  .span-7 { grid-column: span 7; }
  .span-8 { grid-column: span 8; }
  .col-6-end { grid-column: 6 / -1; }
}

/* ---------- Signs ---------- */
.sign {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  height: 2.25rem;
  padding: 0 0.7rem;
  font-stretch: 70%;
  font-weight: 760;
  font-size: 1.0625rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  /* direction sign */
  background: var(--green);
  color: var(--on-green);
}
.sign svg { width: 0.95em; height: 0.95em; flex: none; transition: transform 160ms ease; }
.sign[data-dir="up"] svg { transform: rotate(180deg); }
.sign.ext svg { transform: rotate(225deg); }
a.sign:hover { background: var(--black); color: var(--green-lit); }

/* location sign: you are here */
.sign.here,
.loc {
  background: var(--black);
  color: var(--green-lit);
  outline: 2px solid var(--green-lit);
  outline-offset: -5px;
}
.sign.here svg { display: none; }

/* ---------- Sign bar ---------- */
.signbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--bar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.signbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.signbar ul {
  display: flex;
  align-items: center;
  gap: 4px;              /* signs in an array butt up against each other */
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  padding: 2px 0;
}
.signbar ul::-webkit-scrollbar { display: none; }
.signbar li { flex: none; }
.signbar li.gap { margin-left: auto; padding-left: 1rem; }
.theme-toggle {
  appearance: none;
  flex: none;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0.25rem 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}
.theme-toggle:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6rem); }
.hero .grid { align-items: end; }

.name {
  font-stretch: 64%;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.9;
  font-size: clamp(3.25rem, 13.5vw, 8.25rem);
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}
.pitch {
  font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  font-weight: 560;
  line-height: 1.22;
  letter-spacing: -0.012em;
  max-width: 22em;
  margin-bottom: 1rem;
}
.status { color: var(--muted); max-width: 34em; margin-bottom: 1.75rem; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { background: var(--black); color: var(--green-lit); }
:root[data-theme="dark"] .btn-primary:hover { outline: 2px solid var(--green-lit); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary:hover { outline: 2px solid var(--green-lit); }
}
.btn-ghost { border: 2px solid currentColor; padding: calc(0.75rem - 2px) calc(1.25rem - 2px); }
.btn-ghost:hover { background: var(--green); color: var(--on-green); border-color: var(--green); }
.text-links { display: flex; gap: 1.25rem; font-weight: 650; }

/* "Now" board: proof on the first screen */
.board {
  background: var(--board);
  color: var(--board-text);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.board-title { margin-bottom: 1.25rem; }
.board li {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--board-line);
}
.board li:first-child { border-top: 0; padding-top: 0; }
.board .what {
  font-stretch: 70%;
  font-weight: 760;
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--green-lit);
}
.board .detail { color: var(--board-text); font-size: 1rem; line-height: 1.45; }
.board a { color: var(--board-text); }
.board a:hover { color: var(--on-green); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; border-top: 1px solid var(--line); }

/* Section headings are location signs: they tell you where you are */
.h-section {
  display: inline-flex;
  align-items: center;
  font-stretch: 66%;
  font-weight: 800;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 1;
  padding: 0.24em 0.42em 0.2em;
  outline-width: 3px;
  outline-offset: -8px;
}
.section-head { margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.section-head .sub { color: var(--muted); margin-top: 1rem; max-width: 36em; }

.h-sub {
  font-stretch: 85%;
  font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.5rem);
  letter-spacing: -0.005em;
  margin-bottom: 0.875rem;
}
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }

/* ---------- Atlas ---------- */
.atlas-aside { align-self: start; }
@media (min-width: 900px) {
  .atlas-aside { position: sticky; top: calc(var(--bar-h) + 2rem); }
}
.atlas-role { font-weight: 700; margin: 0 0 0.25rem; }
.atlas-when { color: var(--muted); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.atlas-summary { font-size: 1.1875rem; line-height: 1.5; margin-bottom: 1.75rem; }

.facts > div { padding: 0.75rem 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 2px solid var(--text); }
.facts dt { font-weight: 700; font-size: 0.9375rem; margin-bottom: 0.125rem; }
.facts dd { color: var(--muted); font-size: 1rem; }
.facts dd a { color: var(--text); font-weight: 650; }

.chapters > * + * { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.chapter > p, .chapter > ul { max-width: 40em; }
.marks li { position: relative; padding-left: 1.5rem; }
.marks li + li { margin-top: 0.625rem; }
.marks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--green);
}

/* Flight 2 encounter: a 17-second time tape */
.tape { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1rem; margin: 1.75rem 0 0; }
.tape-pin { grid-row: 1; align-self: end; font-size: 0.9375rem; font-weight: 700; line-height: 1.25; margin-bottom: 0.5rem; }
.tape-pin.start { grid-column: 1; }
.tape-pin.end { grid-column: 2; text-align: right; }
.tape-bar {
  grid-column: 1 / -1;
  height: 1rem;
  background: var(--green);
}
.tape-ticks {
  grid-column: 1 / -1;
  height: 0.625rem;
  background-image: linear-gradient(to right, var(--text) 2px, transparent 2px);
  background-size: calc(100% / 17) 100%;
  background-repeat: repeat-x;
  border-right: 2px solid var(--text);
}
.tape-scale {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--muted);
}

.recognition { display: grid; gap: 1rem var(--col-gap); }
@media (min-width: 640px) {
  .recognition { grid-template-columns: 1fr 1fr; }
}
.recognition li { border-top: 2px solid var(--text); padding-top: 0.75rem; font-weight: 650; }

/* ---------- Projects ---------- */
.projects { display: grid; gap: clamp(2.5rem, 4.5vw, 3.5rem) var(--col-gap); }
@media (min-width: 760px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project.full { grid-column: 1 / -1; }
}
@media (min-width: 1200px) {
  .projects { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .project { grid-column: span 4; }
  .project.full { grid-column: 1 / -1; }
  .project.half { grid-column: span 6; }
}
.project { display: flex; flex-direction: column; }
.project.text, .project.full { border-top: 2px solid var(--text); padding-top: 1.125rem; }
.project.full { display: grid; gap: 0.5rem var(--col-gap); }
@media (min-width: 1200px) {
  .project.full { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .project.full > .full-head { grid-column: span 5; }
  .project.full > .full-body { grid-column: 6 / -1; }
}

.shot {
  display: block;
  margin-bottom: 1.125rem;
  border: 2px solid var(--text);
  background: var(--bg-2);
}
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.shot:hover { background: none; outline: 4px solid var(--green); }

.project .award {
  display: inline-block;
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.1rem 0.45rem;
  background: var(--green);
  color: var(--on-green);
  margin-bottom: 0.625rem;
}
.project .kicker { font-weight: 650; color: var(--muted); font-size: 0.9375rem; margin-bottom: 0.5rem; }
.project h3 {
  font-stretch: 85%;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  letter-spacing: -0.012em;
  margin-bottom: 0.625rem;
}
.project .role { font-weight: 650; margin-bottom: 0.625rem; }
.project .desc { max-width: 40em; }
.project .stack { color: var(--muted); font-size: 0.9375rem; margin-top: auto; padding-top: 0.75rem; }
.project .links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-weight: 650; margin-top: 0.5rem; }
.status-note { display: inline-block; margin-top: 0.75rem; font-weight: 650; }
.status-note::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; background: var(--green); margin-right: 0.55rem; vertical-align: 0.05em; }

/* ---------- Experience: taxiway centerline ---------- */
.route { position: relative; }
.leg { position: relative; padding: 0 0 2.25rem 2.5rem; }
.leg:last-child { padding-bottom: 0; }
.leg::before {
  content: "";
  position: absolute;
  left: calc(0.5rem - 2px);
  top: 1.1rem;
  bottom: -0.3rem;
  width: 4px;
  background: var(--line);
}
.leg.active::before { background: var(--green); }
.leg:last-child::before { display: none; }
.wpt {
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 1rem;
  height: 1rem;
  background: var(--bg);
  border: 3px solid var(--muted);
}
.leg.active .wpt { background: var(--green); border-color: var(--green); }
.leg .when { font-weight: 700; color: var(--muted); font-size: 0.9375rem; margin-bottom: 0.25rem; }
.leg.active .when { color: var(--text); }
.leg h3 { font-stretch: 85%; font-size: 1.5rem; letter-spacing: -0.01em; }
.leg .org { font-weight: 600; margin: 0.125rem 0 0.5rem; }
.leg p:not(.when):not(.org) { max-width: 40em; }
.route-key { display: flex; align-items: center; gap: 0.625rem; color: var(--muted); font-size: 0.9375rem; margin-top: 1rem; }
.route-key::before { content: ""; width: 2rem; height: 4px; background: var(--green); }

.edu { border-top: 2px solid var(--text); padding-top: 1.125rem; }
.edu + .edu { margin-top: 2.5rem; }
.edu h3 { font-stretch: 85%; font-size: 1.5rem; letter-spacing: -0.01em; margin-bottom: 0.25rem; }
.edu .org { font-weight: 600; margin-bottom: 0.75rem; }
.edu .figure { font-weight: 700; margin-bottom: 0.5rem; }

/* ---------- About ---------- */
.about { align-items: start; }
.portrait { margin: 0; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--bg-2); }
@media (max-width: 899px) {
  .portrait { max-width: 20rem; }
}
.about .lead { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem); line-height: 1.4; max-width: 30em; }
.skills { display: grid; gap: 1.25rem var(--col-gap); margin-top: clamp(2.5rem, 4vw, 3.5rem); }
@media (min-width: 640px) {
  .skills { grid-template-columns: 1fr 1fr; }
}
.skills > div { border-top: 2px solid var(--text); padding-top: 0.75rem; }
.skills dt { font-weight: 700; margin-bottom: 0.25rem; }
.skills dd { color: var(--muted); font-size: 1rem; }

/* ---------- Contact band ---------- */
.contact { background: var(--board); color: var(--board-text); padding: clamp(4rem, 9vw, 7rem) 0 2.5rem; }
.contact .sub { color: var(--board-muted); }
.contact a:hover { color: var(--on-green); }
.email-big {
  display: inline-block;
  font-stretch: 70%;
  font-weight: 800;
  font-size: clamp(2rem, 1rem + 4.5vw, 4.5rem);
  letter-spacing: -0.005em;
  line-height: 1.05;
  color: var(--green-lit);
  text-decoration-thickness: 3px;
  overflow-wrap: anywhere;
  margin: 0.5rem 0 1.25rem;
}
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; font-weight: 650; }
.copy-btn {
  appearance: none;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--board-text);
  background: transparent;
  border: 2px solid var(--board-text);
  padding: 0.3rem 0.9rem;
  cursor: pointer;
}
.copy-btn:hover { background: var(--green); color: var(--on-green); border-color: var(--green); }

.contact-form { display: grid; gap: 1rem; }
.contact-form .h-sub { margin-bottom: 0.25rem; }
.field-row { display: grid; gap: 1rem; }
@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}
.field { display: grid; gap: 0.375rem; }
.field label { font-size: 0.9375rem; font-weight: 650; color: var(--board-muted); }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--board-text);
  background: var(--board-field);
  border: 2px solid var(--board-line);
  padding: 0.625rem 0.75rem;
}
.field textarea { resize: vertical; min-height: 8.5rem; }
.field input:focus-visible,
.field textarea:focus-visible { border-color: var(--green-lit); outline: none; box-shadow: none; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.submit-btn {
  appearance: none;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  background: var(--green-lit);
  border: 0;
  padding: 0.75rem 1.4rem;
  cursor: pointer;
}
.submit-btn:hover { background: var(--board-text); }
.submit-btn[disabled] { opacity: 0.65; cursor: progress; }
.form-status { color: var(--board-muted); font-size: 0.9375rem; margin: 0; }
.form-status:empty { display: none; }

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: clamp(4rem, 8vw, 6rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--board-line);
  color: var(--board-muted);
  font-size: 0.9375rem;
}
.site-foot p { margin: 0; }

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .signbar, .skip-link, .theme-toggle, .copy-btn, .contact-form { display: none !important; }
  .contact, .board { background: none; color: #000; }
}

@media (min-width: 900px) {
  .edu-col { grid-column: 9 / -1; padding-top: 0.5rem; }
}
.signbar nav { flex: 1; min-width: 0; }
