/* mikexcohen.com
   One page, three typefaces, the Sincxpress palette.
   Colors and fonts are set once in the variables below. */

@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }

:root {
  --blue: #6187FF; --teal: #57BDC9; --orange: #FF9366; --yellow: #E5E55C; --red: #E57373;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* dark (default) */
  --bg: #212121;
  --ink: #DDE2F4;
  --soft: rgba(221, 226, 244, 0.78);
  --muted: rgba(221, 226, 244, 0.62);
  --line: rgba(221, 226, 244, 0.14);
  --link-line: var(--blue);
  --env: rgba(221, 226, 244, 0.16);
}
/* light: follows the system unless the visitor picked a theme with the button */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F6F5F1; --ink: #212121; --soft: rgba(33, 33, 33, 0.80); --muted: rgba(33, 33, 33, 0.66);
    --line: rgba(33, 33, 33, 0.14); --env: rgba(33, 33, 33, 0.14);
  }
}
:root[data-theme="light"] {
  --bg: #F6F5F1; --ink: #212121; --soft: rgba(33, 33, 33, 0.80); --muted: rgba(33, 33, 33, 0.66);
  --line: rgba(33, 33, 33, 0.14); --env: rgba(33, 33, 33, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.65 var(--sans); transition: background 0.25s, color 0.25s; }
p, h1, h2, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; border-radius: 4px; }
.wrap { max-width: 1080px; margin: 0 auto; padding-inline: clamp(22px, 6vw, 56px); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--yellow); color: #212121; padding: 8px 14px; border-radius: 8px; z-index: 5; }
.skip:focus { left: 8px; }
.x { color: var(--blue); }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; }
.mark { font: 400 26px/1 var(--serif); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; letter-spacing: 0.01em; }
.top nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.top nav a:hover { color: var(--ink); }
#theme { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 50%; }
#theme:hover { color: var(--ink); }

/* ---------- shared ---------- */
.label { font: 400 12.5px/1.4 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.block { padding-block: clamp(56px, 9vw, 112px); border-top: 1px solid var(--line); }
.block > .label { margin-bottom: clamp(24px, 4vw, 44px); }
.prose { color: var(--soft); max-width: 38em; }
.prose p + p { margin-top: 1em; }
.prose.big { font: 400 clamp(1.5rem, 2.9vw, 2.15rem)/1.32 var(--serif); color: var(--ink); max-width: 27em; letter-spacing: 0.002em; }
.prose.big p + p { margin-top: 0.8em; }
.links { display: flex; flex-wrap: wrap; gap: 2px 26px; margin-top: 22px; font-size: 16px; }
.links a { display: inline-flex; align-items: center; min-height: 44px; }
.links a::after { content: "↗"; font-family: var(--mono); font-size: 0.8em; margin-left: 6px; color: var(--muted); }
.links a[href^="mailto"]::after, .links a[href$=".pdf"]::after { content: ""; margin: 0; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(40px, 9vh, 110px); }
.hero h1 { font: 400 clamp(4rem, 15vw, 11.5rem)/0.92 var(--serif); letter-spacing: -0.025em; margin: 18px 0 0 -0.04em; }
.hero h1 .x { font-weight: bold; padding-inline: 0.02em; }
.lede { margin-top: clamp(22px, 3vw, 36px); font-size: clamp(1.08rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--soft); max-width: 33em; }
.wavelet { margin-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(40px, 6vw, 72px); touch-action: pan-y; }
.wavelet svg { display: block; width: 100%; height: clamp(150px, 24vw, 250px); overflow: visible; }
.wavelet path { fill: none; vector-effect: non-scaling-stroke; }
.wave { stroke: var(--blue); stroke-width: 2.25; stroke-linejoin: round; }
.env { stroke: var(--env); stroke-width: 1.25; stroke-dasharray: 3 5; }
.wavelet figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.readout { font: 400 13px var(--mono); color: var(--ink); min-width: 13.5em; font-variant-numeric: tabular-nums; }
.hint { flex: 1 1 320px; max-width: 46em; }
.hint-touch { display: none; }
@media (hover: none), (pointer: coarse) { .hint-mouse { display: none; } .hint-touch { display: inline; } }

/* ---------- work rows ---------- */
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 12px clamp(24px, 5vw, 72px); padding-block: clamp(28px, 4vw, 44px); border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; padding-top: 0; }
.row:last-of-type { padding-bottom: 0; }
.row h2 { font: 400 clamp(2.2rem, 5vw, 3.6rem)/1 var(--serif); letter-spacing: -0.01em; }
.books { margin-top: 26px; border-top: 1px solid var(--line); }
.books li { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 20px; flex-wrap: wrap; padding: 11px 0; border-bottom: 1px solid var(--line); }
.books a { text-decoration: none; padding-block: 4px; }
.books a:hover cite { text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.books cite { font: italic 400 1.34rem/1.25 var(--serif); }
.books span { font: 400 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.stats { display: flex; flex-wrap: wrap; gap: 18px clamp(28px, 5vw, 60px); margin-top: 28px; }
.stats dt { font: 400 clamp(2.2rem, 4.5vw, 3.2rem)/1 var(--serif); }
.stats dd { font: 400 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }

/* ---------- path / timeline ---------- */
.timeline { display: flex; gap: 6px; }
.timeline li { flex: var(--span) 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 0 0; border-top: 4px solid var(--c); font-size: 15px; color: var(--soft); }
.timeline li.open { border-image: linear-gradient(90deg, var(--c) 55%, transparent) 1; }
.timeline .years { font: 400 12.5px var(--mono); color: var(--muted); letter-spacing: 0.04em; }
.timeline strong { font: 400 1.55rem/1.15 var(--serif); color: var(--ink); }
.aside { margin-top: clamp(36px, 5vw, 60px); }
@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
  .timeline { flex-direction: column; gap: 22px; }
  .timeline li { flex: none; border-top: 0; border-left: 4px solid var(--c); padding: 2px 0 2px 16px; }
  .timeline li.open { border-image: linear-gradient(180deg, var(--c) 55%, transparent) 1; }
}

/* ---------- advise list ---------- */
.roles { margin-top: 26px; border-top: 1px solid var(--line); }
.roles li { padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.role-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; }
.roles h3 { margin: 0; font: 400 1.34rem/1.25 var(--serif); }
.role-head span { font: 400 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.roles p { margin-top: 6px; font-size: 15.5px; color: var(--soft); max-width: 38em; }

/* ---------- contact / footer ---------- */
.hello { font: 400 clamp(1.9rem, .4vw, 4.6rem)/1.1 var(--serif); letter-spacing: -0.015em; overflow-wrap: anywhere; }
.hello a { text-decoration-thickness: 2px; text-underline-offset: 0.12em; }
.hello a:hover { text-decoration-thickness: 4px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-block: 28px 44px; border-top: 1px solid var(--line); font: 400 12.5px var(--mono); color: var(--muted); }
