/* adamrw.dev — same two inks and paper as the business card.
   Hero = card front (orange flood, commit graph). Contact = card back (man page).
   The sections between are a git log: a rail down the left, one commit each. */

:root {
  /* ---- Palette (from card-fable.html) ---- */
  --orange: #f2501d;   /* flood */
  --burnt:  #9f2c0a;   /* darker tone of the same ink */
  --accent: #d2400f;   /* orange for graphics and large text on paper */
  --accent-text: #bf380c; /* same ink, darkened to pass 4.5:1 for small text on paper */
  --ink:    #1b1611;
  --paper:  #f5eee0;
  --cream:  #fff2de;
  --soft:   #6f6558;   /* secondary text on paper */

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  /* ---- Layout ---- */
  --edge: clamp(16px, 4vw, 48px);    /* page side padding */
  --pad: clamp(56px, 9vw, 112px);    /* space above each log entry */
  --l1: 10px;                        /* x of main lane, from the log's left edge */
  --l2: 34px;                        /* x of branch lane */
  --gutter: 58px;                    /* where content starts */
  --lane: 4px;                       /* lane thickness */
}
@media (min-width: 720px) {
  :root { --l1: 14px; --l2: 54px; --gutter: 104px; }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  background: var(--paper); color: var(--ink);
  font-family: var(--display); font-size: 1.0625rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--mono); }
.display { font-family: var(--display); }
.soft { color: var(--soft); }
ul, ol { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
[id] { scroll-margin-top: 16px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 10;
  background: var(--ink); color: var(--cream); padding: 10px 14px; border-radius: 4px;
  font-size: .8125rem; text-decoration: none;
}
.skip:focus { top: 12px; outline-color: var(--cream); }

/* ============================ HERO ============================ */
.hero {
  background: var(--orange); color: var(--ink);
  min-height: clamp(520px, 82vh, 820px);
  display: flex; flex-direction: column; overflow: hidden;
}

.nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 2px 16px; padding: 14px var(--edge) 10px;
  font-size: .75rem; font-weight: 500; letter-spacing: .06em;
}
.nav ul { display: flex; flex-wrap: wrap; gap: 0 clamp(10px, 2.4vw, 28px); }
.nav a { display: inline-block; padding: 10px 0; text-decoration: none; }
.nav .brand { font-weight: 600; }
.nav ul a { border-bottom: 2px solid transparent; }
.nav ul a:hover, .nav ul a[aria-current="true"] { border-bottom-color: var(--ink); }

.graph { display: block; width: 100%; height: auto; flex: none; margin-top: clamp(4px, 2vw, 28px); }
.graph text { font-family: var(--mono); font-weight: 500; }
.graph-wide { display: none; }
.graph-wide text { font-size: 17px; }
.graph-narrow text { font-size: 11.5px; }
@media (min-width: 640px) {
  .graph-wide { display: block; }
  .graph-narrow { display: none; }
}

.hero-content { margin-top: auto; padding: 32px var(--edge) clamp(24px, 4vw, 44px); }
.word {
  font-size: min(15.5vw, 13rem); line-height: .9; font-weight: 700;
  letter-spacing: -.035em; white-space: nowrap;
  margin-left: -.04em; /* optical: pull the round "a" to the margin */
}
.word .tld { color: var(--cream); }
.meta {
  margin-top: clamp(12px, 1.6vw, 22px); padding-top: clamp(10px, 1.2vw, 16px);
  border-top: 2px solid var(--ink);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 24px;
  font-size: clamp(.75rem, 1.3vw, .9375rem); font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
}
.cmds { margin-top: clamp(16px, 2vw, 26px); display: flex; flex-wrap: wrap; gap: 10px; }
.cmd {
  display: inline-block; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 5px;
  font-size: .8125rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.cmd:hover, .cmd:first-child { background: var(--ink); color: var(--cream); }
.cmd:first-child:hover { background: transparent; color: var(--ink); }

/* Draw the lanes in once, like ink going down. Static if motion is reduced. */
@media (prefers-reduced-motion: no-preference) {
  .graph .draw { stroke-dasharray: 1; animation: draw 1s cubic-bezier(.6, 0, .2, 1) both; }
  .graph .d2 { animation-delay: .25s; }
  .graph .d3 { animation-delay: .5s; }
  .graph .nodes { animation: show .35s ease-out .95s both; }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes show { from { opacity: 0; } to { opacity: 1; } }
}

/* ============================ LOG ============================ */
.log { max-width: 1180px; margin: 0 auto; padding: 0 var(--edge); }

.entry { position: relative; padding-top: var(--pad); }
.entry > * { margin-left: var(--gutter); }
/* main lane */
.entry::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  left: calc(var(--l1) - var(--lane) / 2); width: var(--lane); background: var(--ink);
}

.commit-line {
  position: relative; display: flex; align-items: center; gap: 1ch;
  height: 24px; font-size: .75rem; font-weight: 500; letter-spacing: .02em; white-space: nowrap;
}
.node {
  position: absolute; top: 4px; left: calc(var(--l1) - var(--gutter) - 8px);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--paper); border: var(--lane) solid var(--ink);
}
.node-head { top: 1px; left: calc(var(--l1) - var(--gutter) - 11px); width: 22px; height: 22px; background: var(--ink); }
.ref {
  background: var(--ink); color: var(--cream); border-radius: 4px;
  padding: 3px 8px; line-height: 1.2; font-weight: 500;
}
.ref-branch { background: var(--orange); color: var(--ink); }

.entry h2 {
  margin-top: 10px; font-size: clamp(2.25rem, 6vw, 4rem); line-height: 1;
  font-weight: 700; letter-spacing: -.035em;
}
.prompt { margin-top: 14px; font-size: .8125rem; color: var(--soft); }

/* ---- About ---- */
.about { margin-top: clamp(22px, 3vw, 36px); display: grid; gap: 32px; }
.prose { max-width: 40rem; }
.prose p + p { margin-top: 1.1em; }
.lede { font-size: clamp(1.3rem, 2.5vw, 1.75rem); line-height: 1.3; font-weight: 500; letter-spacing: -.015em; }
.opts {
  align-self: start; font-size: .8125rem; line-height: 1.5;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 14px 0;
  display: grid; gap: 6px;
}
.opts > div { display: grid; grid-template-columns: 9ch minmax(0, 1fr); column-gap: 2ch; }
.opts dt { color: var(--accent-text); font-weight: 500; }
@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; }
}

/* ---- Projects: branch lane forks off main, carries the project commits, merges back ---- */
.entry > .branch { margin-left: 0; }
.branch { position: relative; padding: 48px 0 48px var(--gutter); margin-top: 8px; }
.branch::before {
  content: ""; position: absolute; top: 48px; bottom: 48px;
  left: calc(var(--l2) - var(--lane) / 2); width: var(--lane); background: var(--orange);
}
.curve {
  position: absolute; left: var(--l1); width: calc(var(--l2) - var(--l1)); height: 48px;
  overflow: visible; fill: none; stroke: var(--orange); stroke-width: 4;
}
.curve path { vector-effect: non-scaling-stroke; }
.curve.fork { top: 0; }
.curve.merge { bottom: 0; }

.commits { display: grid; gap: clamp(36px, 5vw, 56px); padding: 12px 0; }
.commits > li { position: relative; display: grid; gap: 10px; }
.commits .node { left: calc(var(--l2) - var(--gutter) - 8px); border-color: var(--orange); }
.commits > li:hover .node { background: var(--orange); }
.hash { font-size: .75rem; line-height: 24px; font-weight: 500; }
.commits h3 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; font-weight: 600; letter-spacing: -.025em; }
.commits .body { max-width: 36rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; font-size: .75rem; }
.tags li { border: 1.5px solid var(--ink); border-radius: 4px; padding: 2px 8px; }
.more { margin-top: 12px; font-size: .8125rem; }
.more a::after { content: " ->"; }
@media (min-width: 900px) {
  .commits > li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; }
  .commits .body { padding-top: 24px; }
}

/* ---- Experience: git log --oneline, nodes sit on main ---- */
.oneline { margin-top: 18px; border-top: 2px solid var(--ink); }
.oneline > li {
  position: relative; padding: 16px 0; border-bottom: 1px solid rgba(27, 22, 17, .28);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px;
  grid-template-areas: "hash when" "what what";
}
.oneline .node { top: 20px; }
.oneline .hash { grid-area: hash; color: var(--accent-text); }
.oneline .when { grid-area: when; justify-self: end; font-size: .75rem; line-height: 24px; color: var(--soft); white-space: nowrap; }
.oneline .what { grid-area: what; }
.oneline strong { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.015em; }
.oneline .note { display: block; color: var(--soft); font-size: .9375rem; }
@media (min-width: 760px) {
  .oneline > li { grid-template-columns: 8ch minmax(0, 1fr) auto; grid-template-areas: "hash what when"; column-gap: 24px; }
  .oneline .hash, .oneline .when { line-height: 30px; }
  .oneline .node { top: 23px; }
}

/* ---- Contact: the man page ---- */
.entry-head { padding-bottom: clamp(56px, 8vw, 96px); }
/* main stops at HEAD; below it the future is dotted, as on the card */
.entry-head::before { bottom: auto; height: calc(var(--pad) + 12px); }
.entry-head::after {
  content: ""; position: absolute; top: calc(var(--pad) + 24px); bottom: 0;
  left: calc(var(--l1) - var(--lane) / 2); width: var(--lane); margin: 0; opacity: .55;
  background: radial-gradient(circle, var(--ink) 1.9px, transparent 2.3px) 0 0 / 4px 13px repeat-y;
}

.man {
  margin-top: 22px; max-width: 46rem;
  background: var(--cream); border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--orange);   /* flat second-ink offset, not a soft shadow */
  padding: clamp(16px, 3vw, 30px);
  font-size: .875rem; line-height: 1.6;
}
.bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: .75rem; line-height: 1; letter-spacing: .06em; white-space: nowrap; color: var(--soft);
}
.bar b { font-weight: 600; color: var(--ink); }
.bar.head { padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.bar.foot { padding-top: 12px; border-top: 2px solid var(--ink); }
.bar svg { width: 72px; height: 13.2px; display: block; flex: none; }
.bar .mid { display: none; }

.man-body { display: grid; gap: 22px; padding: clamp(20px, 3vw, 30px) 0; }
.man h3 { font: inherit; font-size: .75rem; font-weight: 600; letter-spacing: .14em; color: var(--accent-text); margin-bottom: 6px; }
.man-body > div > :not(h3) { margin-left: clamp(0px, 3vw, 3ch); }
.man .name { font-size: clamp(2rem, 6vw, 3rem); line-height: 1; font-weight: 600; letter-spacing: -.025em; margin-bottom: 8px; }
.man .flag, .man-opts dt { color: var(--accent-text); font-weight: 500; }
.man-opts { display: grid; gap: 2px; }
.man-opts > div { display: grid; grid-template-columns: 8ch minmax(0, 1fr); column-gap: 2ch; align-items: baseline; }
.man-opts dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1ch; }
.man a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.man a:hover { background: var(--ink); color: var(--cream); text-decoration-color: transparent; }
.man a, .copy { padding: 4px 0; }
.copy { font: inherit; color: var(--soft); background: none; border: 0; cursor: pointer; }
.copy:hover { color: var(--ink); }
@media (min-width: 560px) {
  .man { box-shadow: 10px 10px 0 var(--orange); }
  .bar .mid { display: inline; }
}

.status { min-height: 0; font-size: .75rem; color: var(--soft); }
.status:not(:empty) { margin-top: 22px; }
.future { margin-top: clamp(40px, 6vw, 72px); font-size: .75rem; color: var(--soft); letter-spacing: .04em; }

/* ============================ FOOTER ============================ */
.footer { background: var(--orange); color: var(--ink); font-size: .75rem; font-weight: 500; letter-spacing: .06em; }
.footer-in {
  max-width: 1180px; margin: 0 auto; padding: 18px var(--edge);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 24px;
}
.footer svg { width: 84px; height: 15.4px; display: block; flex: none; }
.footer a { display: inline-block; padding: 8px 0; text-underline-offset: 3px; }
@media (max-width: 559px) { .footer svg { display: none; } }

/* ============================ PRINT ============================ */
@media print {
  .nav, .cmds, .copy, .skip { display: none; }
  .hero { min-height: 0; }
  .hero, .footer, .ref, .man { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
