/*--------------------------------------------------------------
# Printstream theme — white, technical, print-production motifs
# Standalone stylesheet (no Bootstrap / main.css)
--------------------------------------------------------------*/

:root {
  --paper: #ffffff;
  --panel: #f4f4f2;
  --ink: #0a0a0a;
  --muted: #5d6066;
  --hair: rgba(10, 10, 10, 0.12);
  --line: rgba(10, 10, 10, 0.9);
  --cyan: #00aeef;
  --magenta: #ec008c;
  --yellow: #fff200;
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; position: relative;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, dl, dd { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: var(--magenta); color: #fff; }

a:focus-visible, button:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); position: relative; z-index: 1; }
.mono { font-family: var(--mono); }
.label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip {
  position: absolute; left: 12px; top: -64px; z-index: 100; background: var(--ink); color: #fff;
  font-family: var(--mono); font-size: 0.85rem; padding: 10px 16px; transition: top 0.2s;
}
.skip:focus { top: 12px; }

.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 99; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan) 0 25%, var(--magenta) 25% 50%, var(--yellow) 50% 75%, var(--ink) 75%);
  pointer-events: none;
}

/* Background pinstripe grid: 12 hairline columns */
.lines { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.lines > div { max-width: var(--max); height: 100%; margin-inline: auto; padding-inline: var(--gutter); }
.lines i {
  display: block; height: 100%;
  background: repeating-linear-gradient(to right, var(--hair) 0 1px, transparent 1px calc(100% / 12));
  border-right: 1px solid var(--hair);
}

/* CMYK chips */
.cmyk { display: inline-flex; gap: 3px; vertical-align: middle; }
.cmyk i { width: 10px; height: 10px; display: block; border: 1px solid var(--ink); }
.cmyk i:nth-child(1) { background: var(--cyan); }
.cmyk i:nth-child(2) { background: var(--magenta); }
.cmyk i:nth-child(3) { background: var(--yellow); }
.cmyk i:nth-child(4) { background: var(--ink); }

/* Crop marks */
.crop { position: relative; }
.crop::before {
  content: ""; position: absolute; inset: -9px; pointer-events: none;
  --c: var(--ink);
  background:
    linear-gradient(var(--c), var(--c)) top left / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 14px no-repeat;
}

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.mark { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; text-transform: uppercase; }
.nav { display: flex; gap: clamp(12px, 2vw, 28px); }
.nav a {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
}
.nav a span { color: var(--muted); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.3s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
.menu-btn {
  display: none; font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em;
  background: none; border: 1px solid var(--ink); padding: 0 14px; min-height: 44px; cursor: pointer; color: inherit;
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(32px, 6vw, 80px) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: stretch; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: clamp(18px, 3vw, 32px); }
.display {
  font-weight: 700; text-transform: uppercase;
  font-size: clamp(3rem, 10.4vw, 8.6rem); line-height: 0.88; letter-spacing: -0.05em;
}
.display .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.display .line > span { display: block; }
.display .outline { color: transparent; -webkit-text-stroke: 2px var(--ink); }
html.m-on .display .line > span { transform: translateY(108%); }
.lede { max-width: 40ch; margin-top: clamp(20px, 3vw, 32px); font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.4; }
.roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.roles li { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 10px; border: 1px solid var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; cursor: pointer;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  transition: background 0.2s, color 0.2s, transform 0.25s var(--ease);
}
.btn:hover { background: var(--paper); color: var(--ink); transform: translateY(-2px); }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn svg { width: 16px; height: 16px; }

/* Spec sheet */
.spec { background: var(--paper); border: 1px solid var(--ink); display: flex; flex-direction: column; }
.spec-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--ink); }
.spec img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 18%; filter: grayscale(1) contrast(1.08); border-bottom: 1px solid var(--ink); }
.spec dl { display: grid; }
.spec dl > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--hair); font-size: 0.92rem; }
.spec dl > div:last-child { border-bottom: 0; }
.spec dt { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding-top: 3px; }
.spec .cert { display: flex; align-items: center; gap: 10px; }
.spec .cert img { width: 34px; height: 34px; aspect-ratio: auto; border: 0; filter: none; }
.reg { position: absolute; right: -14px; top: -14px; width: 28px; height: 28px; background: var(--paper); border-radius: 50%; display: grid; place-items: center; z-index: 2; }
.reg svg { width: 24px; height: 24px; }

/* Ledger */
.ledger { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(40px, 7vw, 88px); border: 1px solid var(--ink); background: var(--paper); }
.ledger > div { padding: 20px 20px 22px; border-right: 1px solid var(--ink); }
.ledger > div:last-child { border-right: 0; }
.ledger .n { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.05em; font-weight: 700; }
.ledger .n small { font-size: 0.45em; font-weight: 500; margin-left: 3px; }

/* Figures live inside the spec sheet (no portrait) */
.spec { justify-content: space-between; }
.spec .ledger { margin: 0; border: 0; border-top: 1px solid var(--ink); grid-template-columns: repeat(2, 1fr); }
.spec .ledger > div { padding: 16px 14px 18px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.spec .ledger > div:nth-child(2n) { border-right: 0; }
.spec .ledger > div:nth-last-child(-n+2) { border-bottom: 0; }
.spec .ledger .n { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.spec dl > div { padding-block: 14px; }
@media (max-width: 960px) {
  .spec { max-width: 520px; }
  .spec .ledger > div:nth-child(n+3) { border-top: 0; }
  .spec .ledger > div:nth-child(2) { border-right: 0; }
}

/* Ticker */
.ticker { margin-top: clamp(36px, 5vw, 64px); border-block: 1px solid var(--ink); overflow: hidden; background: var(--paper); position: relative; z-index: 1; }
.ticker-track { display: flex; width: max-content; animation: slide 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker ul { display: flex; flex: none; }
.ticker li { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 13px 26px; white-space: nowrap; }
.ticker li::after { content: "+"; margin-left: 52px; color: var(--magenta); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.sec { padding-block: clamp(64px, 10vw, 136px) 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(20px, 4vw, 56px); border-top: 1px solid var(--ink); padding-top: 16px; background: var(--paper); }
.sec-head h2 { font-size: clamp(2rem, 5.2vw, 4.2rem); line-height: 0.98; letter-spacing: -0.045em; font-weight: 700; text-transform: uppercase; max-width: 18ch; }
.sec-head h2 .outline { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.sec-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(20px, 4vw, 56px); margin-top: clamp(28px, 4vw, 56px); }
.sec-body.full { grid-template-columns: 1fr; }
.side { position: sticky; top: 92px; align-self: start; }
.side p { font-size: 0.95rem; color: var(--muted); max-width: 26ch; }
.sheet { background: var(--paper); }

/* About */
.prose p { max-width: 62ch; }
.prose p + p { margin-top: 1.1em; }
.prose p:first-child { font-size: clamp(1.3rem, 2.3vw, 1.8rem); line-height: 1.32; letter-spacing: -0.015em; max-width: 42ch; }
.caps { margin-top: clamp(32px, 5vw, 64px); border-top: 1px solid var(--ink); }
.cap { display: grid; grid-template-columns: 4rem minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--hair); background: var(--paper); }
.cap .no { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.cap h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.cap ul { display: flex; flex-wrap: wrap; gap: 6px; }
.cap li { font-family: var(--mono); font-size: 0.72rem; padding: 3px 9px; border: 1px solid var(--ink); }
.facts { display: grid; gap: 14px; }
.facts a { border-bottom: 1px solid var(--magenta); }
.facts dd { font-size: 0.95rem; overflow-wrap: anywhere; }

/* Resume timeline */
.sub { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 0 0 14px; background: var(--paper); }
.sub + .timeline { margin-bottom: 44px; }
.timeline { position: relative; border-left: 1px solid var(--ink); margin-left: 6px; }
.tl { position: relative; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 7fr); gap: clamp(16px, 3vw, 40px); padding: 0 0 36px 28px; }
.tl::before { content: ""; position: absolute; left: -6px; top: 8px; width: 11px; height: 11px; background: var(--paper); border: 2px solid var(--ink); }
.tl.now::before { background: var(--magenta); border-color: var(--ink); }
.tl .when { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); padding-top: 4px; }
.tl h3 { font-size: clamp(1.25rem, 2.1vw, 1.65rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.tl .where { color: var(--muted); margin-top: 2px; }
.tl ul { margin-top: 16px; display: grid; gap: 8px; }
.tl li { position: relative; padding-left: 20px; font-size: 1rem; line-height: 1.5; }
.tl li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 9px; height: 1px; background: var(--ink); }
.tl-wrap { background: var(--paper); }

/* Projects */
.figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.fig { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: 22px; min-height: 340px; background: var(--paper); border: 1px solid var(--ink); transition: background 0.25s, color 0.25s, transform 0.3s var(--ease); }
.fig:hover, .fig:focus-within { background: var(--ink); color: #fff; transform: translateY(-4px); }
.fig .top-row { display: flex; justify-content: space-between; gap: 12px; }
.fig:hover .label, .fig:focus-within .label { color: rgba(255, 255, 255, 0.65); }
.fig h3 { margin-top: 18px; font-size: clamp(1.35rem, 2.1vw, 1.8rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.fig p { margin-top: 12px; font-size: 0.98rem; line-height: 1.5; }
.fig .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.fig .tags li { font-family: var(--mono); font-size: 0.68rem; padding: 3px 9px; border: 1px solid currentColor; }
.fig .go { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.fig .go svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.fig:hover .go svg { transform: translate(3px, -3px); }
.fig a.cover::after { content: ""; position: absolute; inset: 0; }
.redact { display: inline-block; background: currentColor; height: 0.9em; width: 7em; vertical-align: -0.1em; }

/* Writing table */
.posts { border-top: 1px solid var(--ink); background: var(--paper); }
.post { position: relative; display: grid; grid-template-columns: 4rem minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 24px 12px; border-bottom: 1px solid var(--ink); transition: background 0.25s, color 0.25s; }
.post:hover, .post:focus-within { background: var(--ink); color: #fff; }
.post .no { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.post:hover .no, .post:focus-within .no, .post:hover .label, .post:focus-within .label { color: rgba(255, 255, 255, 0.65); }
.post h3 { font-size: clamp(1.25rem, 2.6vw, 2rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
.post p.desc { margin-top: 8px; color: var(--muted); max-width: 64ch; font-size: 0.98rem; }
.post:hover p.desc, .post:focus-within p.desc { color: rgba(255, 255, 255, 0.72); }
.post .arrow { width: 44px; height: 44px; border: 1px solid currentColor; display: grid; place-items: center; }
.post .arrow svg { width: 18px; height: 18px; }
.post a::after { content: ""; position: absolute; inset: 0; }

/* Contact */
.contact { margin-top: clamp(64px, 10vw, 136px); background: var(--ink); color: #fff; padding-block: clamp(52px, 8vw, 110px) 26px; position: relative; z-index: 1; }
.contact .label { color: rgba(255, 255, 255, 0.6); }
.contact h2 { margin-top: 14px; font-size: clamp(3rem, 10.4vw, 9rem); line-height: 0.88; letter-spacing: -0.05em; font-weight: 700; text-transform: uppercase; }
.contact h2 .outline { color: transparent; -webkit-text-stroke: 2px #fff; }
.mail { display: inline-block; margin-top: clamp(24px, 4vw, 44px); font-family: var(--mono); font-size: clamp(1rem, 2.8vw, 2rem); border-bottom: 2px solid var(--magenta); overflow-wrap: anywhere; transition: color 0.2s; }
.mail:hover { color: var(--magenta); }
.contact-grid { display: flex; flex-wrap: wrap; gap: 28px 64px; margin-top: clamp(36px, 6vw, 68px); padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.28); }
.contact-grid ul { display: grid; gap: 6px; margin-top: 8px; }
.contact-grid a { font-family: var(--mono); font-size: 0.88rem; border-bottom: 1px solid transparent; }
.contact-grid a:hover { border-color: var(--magenta); color: var(--magenta); }
.contact a:focus-visible { outline-color: var(--magenta); }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 52px; font-family: var(--mono); font-size: 0.72rem; color: rgba(255, 255, 255, 0.6); }
.contact .cmyk i { border-color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .spec { max-width: 420px; }
  .ledger { grid-template-columns: repeat(2, 1fr); }
  .ledger > div:nth-child(2) { border-right: 0; }
  .ledger > div:nth-child(n+3) { border-top: 1px solid var(--ink); }
  .sec-head, .sec-body { grid-template-columns: 1fr; }
  .side { position: static; }
  .figs { grid-template-columns: 1fr; }
  .tl { grid-template-columns: 1fr; gap: 4px; }
  .cap { grid-template-columns: 3rem 1fr; }
  .cap ul { grid-column: 2; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; align-items: center; }
  .nav {
    position: fixed; inset: 60px 0 auto 0; flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--ink); padding: 8px var(--gutter) 20px;
    transform: translateY(-120%); visibility: hidden; transition: transform 0.35s var(--ease), visibility 0.35s;
  }
  .nav.open { transform: none; visibility: visible; }
  .nav a { font-size: 0.9rem; padding: 10px 0; border-bottom: 1px solid var(--hair); }
  .post { grid-template-columns: 1fr; gap: 6px; }
  .post .arrow, .post .no { display: none; }
  .mark .cmyk { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .ticker { overflow-x: auto; }
  .ticker-track { animation: none; }
  html.m-on .display .line > span { transform: none; }
}
