/* Irene Martin — personal site. Black/white editorial, system fonts only. */

:root {
  --paper: #fbfbfa;
  --ink: #111312;
  --ink-2: #3a3d3b;
  --muted: #646866;
  --line: #e3e3df;
  --line-2: #c9cac5;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Charter, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 980px;
  --gutter: clamp(20px, 5vw, 40px);
  --label: 210px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 400; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--line-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--paper); padding: 10px 14px; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(251, 251, 250, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 52px; }
.brand { font: 400 17px/1 var(--serif); text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: clamp(14px, 3vw, 26px); }
.nav a { font: 400 13px/1 var(--mono); letter-spacing: .02em; color: var(--muted); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); }
.nav a[aria-current="true"] { box-shadow: inset 0 -1px 0 var(--ink); }
@media (max-width: 480px) {
  .brand { display: none; }
  .topbar__inner { justify-content: center; }
}

/* 1. Introduction — portrait is a supporting element, capped at 200px */
.intro { padding: clamp(40px, 6vw, 72px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--ink); }
.intro__grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(28px, 5vw, 48px); align-items: start; }
.portrait { width: 100%; max-width: 200px; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; background: #1a1a1a; filter: grayscale(.15); }
.intro h1 { font: 400 clamp(38px, 5vw, 52px)/1.05 var(--serif); letter-spacing: -.015em; }
.intro__role { margin-top: 10px; font: 400 13px/1.5 var(--mono); color: var(--muted); letter-spacing: .02em; }
.intro__summary { margin-top: 18px; max-width: 60ch; color: var(--ink-2); font-size: 17px; }
.contact-line { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; }
.contact-line li { color: var(--muted); }
.contact-line a { color: var(--ink); }
@media (max-width: 640px) {
  .intro__grid { grid-template-columns: 112px minmax(0, 1fr); gap: 12px 20px; }
  .contact-line { margin-top: 6px; }
  .portrait { max-width: 112px; grid-row: span 2; }
  .intro h1 { font-size: 34px; }
  .intro__summary, .contact-line { grid-column: 1 / -1; }
  .intro__text { display: contents; }
  .intro__text > h1, .intro__text > .intro__role { grid-column: 2; }
  .intro__text > h1 { align-self: end; }
  .intro__text > .intro__summary { margin-top: 4px; }
}

/* Sections */
.section { padding: clamp(40px, 6vw, 64px) 0; border-bottom: 1px solid var(--line); }
.section--last { border-bottom: 0; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-bottom: 22px; }
.section__head h2 { font: 400 26px/1.2 var(--serif); }
.section__hint { font: 400 12px/1.4 var(--mono); color: var(--muted); letter-spacing: .02em; }
.section__note { margin-top: 14px; font-size: 14px; color: var(--muted); max-width: 80ch; }

/* 2. Skills */
.skills { border-top: 1px solid var(--ink); }
.skills > div { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); gap: 4px 24px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.skills dt { font: 500 12px/1.5 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding-top: 2px; }
.skills dd { font-size: 15.5px; color: var(--ink-2); }
.skills--used dt { color: var(--muted); }
.skills--used dd { color: var(--muted); }
.tag { display: block; margin-top: 3px; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 11.5px; color: var(--muted); }
@media (max-width: 640px) { .skills > div { grid-template-columns: 1fr; } }

/* 3. Projects */
.project + .project { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.project__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 20px; align-items: baseline; }
.project__head h3 { font: 400 28px/1.15 var(--serif); }
.project__type { grid-column: 1; font-size: 15px; color: var(--muted); }
.project__link { grid-column: 2; grid-row: 1; font: 400 13px/1 var(--mono); }
.stack { margin-top: 12px; font: 400 12.5px/1.6 var(--mono); color: var(--ink-2); }
.project__body { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 32px; }
.points li { position: relative; padding-left: 18px; margin-bottom: 8px; font-size: 15.5px; color: var(--ink-2); }
.points li::before { content: ""; position: absolute; left: 0; top: .8em; width: 9px; border-top: 1px solid var(--ink); }
.points b { color: var(--ink); font-weight: 600; }
.status { border-top: 1px solid var(--ink); align-self: start; }
.status div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.status dt { font: 500 11.5px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.status dd { margin-top: 3px; font-size: 14px; color: var(--ink-2); }
.status div + div dt { color: var(--muted); }
@media (max-width: 760px) {
  .project__body { grid-template-columns: 1fr; gap: 16px; }
  .project__head { grid-template-columns: 1fr; }
  .project__link { grid-column: 1; grid-row: auto; margin-top: 6px; }
}

/* 4. Experience */
.job { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); gap: 8px 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.job:first-of-type { border-top-color: var(--ink); }
.job__head h3 { font: 400 21px/1.25 var(--serif); }
.job__head p { margin-top: 4px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.arrow { padding: 0 4px; }
@media (max-width: 640px) { .job { grid-template-columns: 1fr; } }

/* 5. Troubleshooting */
.approach { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.approach div { padding: 12px 16px 12px 0; }
.approach div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.approach dt { font: 500 12px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.approach dd { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 760px) {
  .approach { grid-template-columns: 1fr 1fr; }
  .approach div:nth-child(3) { padding-left: 0; border-left: 0; }
  .approach div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 420px) {
  .approach { grid-template-columns: 1fr; }
  .approach div, .approach div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .approach div:first-child { border-top: 0; }
}

/* 6. About */
.about p { max-width: 64ch; color: var(--ink-2); }

/* Footer */
.footer { padding: 20px 0 36px; font: 400 12.5px/1.5 var(--mono); color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .topbar { display: none; } }
