/* max gerlach — internship portfolio. paper, ink, one accent. */
:root {
  --paper: #F4F1EA;
  --ink: #131311;
  --muted: #6E6A5E;
  --line: #131311;
  --accent: #FF8A5B;
  --card: #EAE6D9;
}
body.dark {
  --paper: #0E0E0C;
  --ink: #F2F0E6;
  --muted: #8F8B7D;
  --line: #F2F0E6;
  --accent: #FF8A5B;
  --card: #171713;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: #000; }
img { max-width: 100%; height: auto; }
section { scroll-margin-top: 3rem; padding-top: 3rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { letter-spacing: -0.02em; }
p { max-width: 64ch; }
.dim { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; }

/* progress bar */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 90; }

/* hiring banner */
.hiring {
  background: var(--ink); color: var(--paper);
  padding: 0.55rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem; letter-spacing: 0.04em;
}
.hiring strong { color: var(--accent); font-weight: 700; }
.hiring a { margin-left: auto; color: var(--paper); text-decoration: none; border-bottom: 1px solid var(--accent); }
.hiring a:hover { color: var(--accent); }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.25rem;
  padding: 0.7rem 1.25rem;
  background: var(--paper); border-bottom: 2px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem;
}
.wordmark { font-weight: 700; text-decoration: none; color: var(--ink); background: var(--accent); padding: 0.05rem 0.45rem; }
.where { margin: 0; color: var(--muted); }
.topbar nav { margin-left: auto; display: flex; gap: 1.1rem; }
.topbar nav a { color: var(--ink); text-decoration: none; }
.topbar nav a:hover { background: var(--accent); color: #000; }
#themeBtn { border: 2px solid var(--line); background: transparent; color: var(--ink); border-radius: 4px; width: 1.7rem; height: 1.7rem; cursor: pointer; line-height: 1; }
#themeBtn:hover { background: var(--accent); color: #000; }

/* layout */
main, footer { max-width: 1000px; margin: 0 auto; }
main { padding: 0 clamp(1rem, 4vw, 2rem) 3rem; }
footer { padding: 0 1.25rem 2rem; border-top: 2px solid var(--line); }

/* hero */
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.5rem; border-bottom: 2px solid var(--line); }
.kicker { font-family: ui-monospace, monospace; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 1rem; }
.hero h1 { margin: 0 0 1rem; font-weight: 800; font-size: clamp(2rem, 5.4vw, 3.6rem); line-height: 1.05; max-width: 20ch; }
.standfirst { font-size: 1.1rem; max-width: 56ch; }
.standfirst strong { background: var(--accent); color: #000; padding: 0 0.25em; }
.cta { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.5rem 0 0; }
.btn { display: inline-block; border: 2px solid var(--line); background: var(--accent); color: #000; padding: 0.6rem 1.1rem; text-decoration: none; font-family: ui-monospace, monospace; font-size: 0.85rem; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }

/* section heads */
h2 { font-family: ui-monospace, monospace; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.16em; margin: 0 0 1.2rem; }
h2 .dim { text-transform: none; letter-spacing: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-bottom: 2px solid var(--line); padding-bottom: 0.6rem; margin-bottom: 1.5rem; }
.sec-head h2 { margin: 0; }
.alllink { font-family: ui-monospace, monospace; font-size: 0.8rem; color: var(--ink); }
menu.filters { list-style: none; display: flex; gap: 0.4rem; margin: 0; padding: 0; font-family: ui-monospace, monospace; font-size: 0.78rem; }
menu.filters button { border: 2px solid var(--line); background: transparent; color: var(--ink); padding: 0.2rem 0.7rem; cursor: pointer; }
menu.filters button.active, menu.filters button:hover { background: var(--ink); color: var(--paper); }
body.dark menu.filters button.active, body.dark menu.filters button:hover { background: var(--accent); border-color: var(--accent); color: #000; }

/* process loop */
.lede { font-size: 1.05rem; color: var(--muted); max-width: 58ch; margin: 0 0 1.5rem; }
.loop { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 2px solid var(--line); }
@media (min-width: 700px) { .loop { grid-template-columns: repeat(5, 1fr); } }
.loop li { background: var(--paper); padding: 1.1rem 1rem 1.2rem; display: flex; flex-direction: column; }
.loop .step { font-family: ui-monospace, monospace; font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; }
.loop h3 { margin: 0.4rem 0 0.4rem; font-size: 1.05rem; }
.loop p { margin: 0; font-size: 0.86rem; color: var(--muted); }
.loop li:hover { background: var(--card); }
.loop li:hover .step { color: var(--ink); }

/* case studies */
ol.cases { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.case { border: 2px solid var(--line); background: var(--card); padding: 1.3rem 1.3rem 1.4rem; }
.case:hover { border-color: var(--ink); }
.case-meta { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; margin: 0 0 0.6rem; font-family: ui-monospace, monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.case-meta .tag { background: var(--accent); color: #000; padding: 0.15rem 0.5rem; }
.case-meta .role { color: var(--muted); }
.case h3 { margin: 0 0 0.5rem; font-size: clamp(1.25rem, 3vw, 1.7rem); }
.case-req { margin: 0 0 1.1rem; font-size: 0.95rem; }
.case-body { display: grid; gap: 0.9rem; margin: 0; }
@media (min-width: 760px) { .case-body { grid-template-columns: 1fr 1fr; gap: 1rem 1.6rem; } }
.case-body dt { font-family: ui-monospace, monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.case-body dd { margin: 0.25rem 0 0; font-size: 0.94rem; }

/* pilot + two column sections */
.pilot .cols { display: grid; gap: 1.6rem; }
@media (min-width: 820px) { .pilot .cols { grid-template-columns: 1.25fr 1fr; } }
.pilot p { margin: 0 0 1rem; }
.facts { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--line); font-size: 0.92rem; align-self: start; }
.facts li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--muted); }
.facts li span:first-child { font-family: ui-monospace, monospace; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.1em; color: var(--muted); }

/* repos */
.repos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
@media (min-width: 760px) { .repos { grid-template-columns: 1fr 1fr; } }
.repos a { display: block; border: 2px solid var(--line); padding: 0.9rem 1rem; text-decoration: none; color: var(--ink); background: var(--card); }
.repos a:hover { background: var(--accent); color: #000; }
.repos h3 { margin: 0 0 0.3rem; font-size: 0.95rem; font-family: ui-monospace, monospace; }
.repos p { margin: 0 0 0.5rem; font-size: 0.85rem; color: var(--muted); }
.repos a:hover p { color: #000; }
.repos small { font-family: ui-monospace, monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* stack */
.stackgrid { display: grid; gap: 0.9rem; }
@media (min-width: 760px) { .stackgrid { grid-template-columns: 1fr 1fr; } }
.stackcard { border: 2px solid var(--line); background: var(--card); padding: 1rem 1.1rem; }
.stackcard img { border: none; background: none; display: block; }
.stacklabel { font-family: ui-monospace, monospace; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 0 0 0.8rem; }

/* contact */
.contact { border-top: 2px solid var(--line); margin-top: 3rem; }
.contact-lead { font-size: 1.05rem; margin: 0 0 1.2rem; }
.bigmail { display: inline-block; color: var(--ink); text-decoration: none; font-weight: 800; font-size: clamp(1.6rem, 5.6vw, 3.4rem); line-height: 1; letter-spacing: -0.02em; word-break: break-word; }
.bigmail:hover { background: var(--accent); color: #000; }
.links { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: 1.2rem 0 0; }
.links a { font-family: ui-monospace, monospace; font-size: 0.88rem; color: var(--ink); }

/* footer */
.giant { margin: 0; font-weight: 800; text-transform: lowercase; line-height: 0.85; font-size: clamp(3.5rem, 16vw, 11rem); letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 2px var(--ink); user-select: none; }
.fine { font-family: ui-monospace, monospace; font-size: 0.74rem; color: var(--muted); margin: 0.6rem 0 0; }
.fine a { color: inherit; }

/* reveal */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.45s ease, transform 0.45s ease; }
.reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 620px) {
  .topbar nav a:not(:last-child) { display: none; }
  .hiring { font-size: 0.72rem; }
}
@media (max-width: 560px) {
  .where { display: none; }
  .topbar { gap: 0.8rem; padding: 0.6rem 0.85rem; }
  .loop { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}

@media print {
  .topbar, .hiring, #progress, .cta, .filters, .links { display: none; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
}
