/* Richard Olanite — portfolio
   Palette: steel paper, slate ink, signal amber (used only for the vibrating beam and focus). */
:root {
  --paper: #eef1f3;
  --sheet: #ffffff;
  --ink: #18232c;
  --ink-2: #4c5c69;
  --rule: #cfd6dc;
  --amber: #d99a00;
  --amber-ink: #8a5f00;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 68ch;
  --wide: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--amber-ink); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.prose { max-width: var(--measure); }

/* Header */
.site-head { padding: 22px 0; }
.site-head .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.wordmark { font: 700 1.2rem/1 var(--display); font-stretch: 112%; text-decoration: none; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--ink-2); font-size: 0.95rem; }
.site-nav a:hover { color: var(--ink); }

/* Type scale (1.25) */
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); font-weight: 800; font-stretch: 108%; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); font-weight: 700; font-stretch: 108%; margin-bottom: 0.6em; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }

/* Hero */
.hero { padding-top: 48px; padding-bottom: 24px; }
.hero-name { font: 700 clamp(1.5rem, 2.8vw, 2rem)/1.2 var(--display); font-stretch: 110%; margin: 0 0 18px; color: var(--ink); }
.hero h1 { max-width: none; }
.hero-top { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: end; }
.portrait { width: 100%; height: auto; border: 1px solid var(--rule); }
@media (max-width: 860px) { .hero-top { grid-template-columns: 1fr; } .portrait { max-width: 280px; order: -1; } }
.hero .lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--ink-2); max-width: 46ch; margin-top: 22px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-block; padding: 11px 18px; border: 2px solid var(--ink); text-decoration: none; font-weight: 600; font-size: 0.97rem; border-radius: 3px; }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: #2a3a47; color: var(--paper); }
.btn:hover { color: var(--ink); background: var(--sheet); }

/* The beam: the one memorable element */
.beam-figure { margin: 36px 0 0; }
.beam-figure svg { width: 100%; height: auto; display: block; overflow: visible; }
.beam-figure .wall { fill: none; stroke: var(--ink); stroke-width: 2; }
.beam-figure .rest { stroke: var(--rule); stroke-width: 2; stroke-dasharray: 6 6; }
.beam-figure .shape { fill: none; stroke: var(--amber); stroke-width: 6; stroke-linecap: round; }
.beam-figure .sensor { fill: var(--sheet); stroke: var(--ink); stroke-width: 2; }
.beam-caption { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 10px; color: var(--ink-2); font-size: 0.93rem; }
.mode-picker { display: inline-flex; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.mode-picker button { font: inherit; font-size: 0.9rem; border: 0; background: transparent; color: var(--ink-2); padding: 6px 12px; cursor: pointer; }
.mode-picker button + button { border-left: 1px solid var(--rule); }
.mode-picker button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Sections */
section { padding: 72px 0 0; }
.section-intro { color: var(--ink-2); max-width: 60ch; margin-bottom: 28px; }

/* Project index: rows, not cards */
.work { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.work li { border-bottom: 1px solid var(--rule); }
.work a.row { display: grid; grid-template-columns: 220px 1fr 190px; gap: 28px; padding: 26px 0; text-decoration: none; align-items: start; }
.work a.row:hover h3 { text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.work .thumb { background: var(--sheet); border: 1px solid var(--rule); aspect-ratio: 16 / 10; overflow: hidden; }
.work .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.work p { color: var(--ink-2); margin: 8px 0 0; max-width: 56ch; }
.work .stack { font-size: 0.88rem; color: var(--ink-2); margin-top: 10px; }
.result { text-align: right; }
.result strong { display: block; font: 800 2.3rem/1 var(--display); font-stretch: 112%; letter-spacing: -0.02em; }
.result span { font-size: 0.88rem; color: var(--ink-2); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: start; }
.about-grid .photo { display: none; }
.about-grid.has-photo { grid-template-columns: 1fr 300px; }
.about-grid.has-photo .photo { display: block; }
.about-grid img { border: 1px solid var(--rule); background: var(--sheet); }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 32px; margin-top: 24px; }
.skills h3 { font-size: 1rem; margin-bottom: 6px; }
.skills p { color: var(--ink-2); font-size: 0.97rem; margin: 0; }

/* Experience: a real timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--ink); }
.timeline li { position: relative; padding: 0 0 30px 26px; max-width: 70ch; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 7px; width: 12px; height: 12px; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; }
.timeline li.now::before { background: var(--amber); border-color: var(--amber); }
.timeline .when { color: var(--ink-2); font-size: 0.93rem; }
.timeline h3 { font-size: 1.12rem; margin: 2px 0 6px; }
.timeline p { color: var(--ink-2); margin: 0; }

/* Writing */
.posts { list-style: none; padding: 0; margin: 0; max-width: 70ch; }
.posts li { padding: 16px 0; border-bottom: 1px solid var(--rule); }
.posts li:first-child { border-top: 1px solid var(--rule); }
.posts p { color: var(--ink-2); margin: 4px 0 0; }

/* Contact + footer */
.contact { padding-bottom: 72px; }
.contact .big { font: 700 clamp(1.4rem, 3.2vw, 2.1rem)/1.2 var(--display); font-stretch: 108%; word-break: break-word; }
.site-foot { border-top: 1px solid var(--rule); padding: 22px 0 40px; color: var(--ink-2); font-size: 0.9rem; }

/* Case-study pages */
.case-head { padding: 36px 0 8px; }
.case-head h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 20ch; }
.case-head .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 58ch; margin-top: 18px; }
.back { display: inline-block; margin-bottom: 22px; color: var(--ink-2); font-size: 0.95rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); margin: 32px 0 0; }
.facts div { padding: 18px 20px 18px 0; }
.facts strong { display: block; font: 800 1.9rem/1.05 var(--display); font-stretch: 110%; letter-spacing: -0.02em; }
.facts span { font-size: 0.9rem; color: var(--ink-2); }
.case section { padding-top: 52px; }
.case section h2 { font-size: 1.5rem; }
.case ol, .case ul { padding-left: 1.2em; max-width: var(--measure); }
.case li { margin-bottom: 0.5em; }
figure.plot { margin: 28px 0 0; background: var(--sheet); border: 1px solid var(--rule); padding: 14px; }
figure.plot figcaption { font-size: 0.92rem; color: var(--ink-2); margin-top: 10px; max-width: var(--measure); }
figure.plot.narrow { max-width: 620px; }
.table-scroll { overflow-x: auto; margin-top: 20px; }
table { border-collapse: collapse; font-size: 0.95rem; min-width: 560px; background: var(--sheet); }
th, td { text-align: left; padding: 9px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.best td { font-weight: 600; }
.links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.next { padding: 64px 0; }

@media (max-width: 860px) {
  .work a.row { grid-template-columns: 1fr; gap: 14px; }
  .result { text-align: left; }
  .about-grid.has-photo { grid-template-columns: 1fr; }
  .about-grid img { max-width: 260px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
