/* laise-eduardo.com — engineering drawing sheet */

:root {
  --sheet: #fbfbf9;
  --ink: #0d1b2a;
  --ink-2: #3a4653;
  --rule: #9aa4ae;
  --rule-soft: #d9dde2;
  --accent: #1565c0;
  --accent-ink: #ffffff;
  --cell: #ffffff;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: 16px;
  --frame: 1px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sheet: #0f1a2b;
    --ink: #eef2f6;
    --ink-2: #b7c2cf;
    --rule: #5c6b7e;
    --rule-soft: #26344a;
    --accent: #6fb1ff;
    --accent-ink: #0b1526;
    --cell: #13213a;
    color-scheme: dark;
  }
}

/* --- base ---------------------------------------------------------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4rem; }

body {
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding: var(--gutter);
}

::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--sheet); }
::-webkit-scrollbar-thumb { background: var(--rule); border: 2px solid var(--sheet); }
html { scrollbar-color: var(--rule) var(--sheet); scrollbar-width: thin; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 0.95;
  margin: 0;
  text-wrap: balance;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 0.875em; }
.label, .title-block th, .rev th, .scale, .brand, footer, .top nav { font-family: var(--body); }

.skip {
  position: absolute; left: var(--gutter); top: -3rem;
  background: var(--ink); color: var(--sheet);
  padding: 0.5rem 0.75rem; z-index: 10; text-decoration: none;
  font-family: var(--mono); font-size: 0.8rem;
}
.skip:focus { top: var(--gutter); }

/* --- the sheet frame ----------------------------------------------- */

.sheet {
  position: relative;
  border: var(--frame) solid var(--ink);
  outline: var(--frame) solid var(--ink);
  outline-offset: 4px;
  padding: 1.75rem var(--gutter) var(--gutter);
  min-height: calc(100vh - 2 * var(--gutter));
}

.zones {
  position: absolute;
  display: flex;
  justify-content: space-around;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--rule);
  letter-spacing: 0.08em;
  pointer-events: none;
}
.zones-top { left: 0; right: 0; top: 0.3rem; }
.zones-left { display: none; }

@media (min-width: 48rem) {
  .sheet { padding: 2.5rem 2.5rem 2rem; }
  .zones-top { top: 0.6rem; }
  .zones-left { display: flex; flex-direction: column; left: 0.6rem; top: 0; bottom: 0; width: 1rem; }
}

/* --- header ---------------------------------------------------------- */

.top {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.6rem;
  margin-bottom: 2rem;
}
.brand {
  font-family: var(--body); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.top nav { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.top nav a {
  font-family: var(--display); text-transform: uppercase; font-weight: 700;
  font-size: 1rem; letter-spacing: 0.06em; color: var(--ink);
  text-decoration: none; padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
}
.top nav a:hover, .top nav a:focus-visible { border-bottom-color: var(--ink); outline: none; }
@media (min-width: 48rem) { .top nav { gap: 0 1.5rem; } .top nav a { font-size: 1.05rem; } }

/* --- hero / title block -------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 64rem) {
  .hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 3rem; }
}

.hero h1 {
  font-size: clamp(3.4rem, 11vw, 6rem);
  font-weight: 900;
  letter-spacing: 0.01em;
}
.hero .title {
  font-family: var(--body); font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.1em;
  color: var(--ink-2); margin: 1rem 0 0;
  padding-top: 0.6rem;
  border-top: 1px solid var(--ink);
  position: relative;
}
.hero .title::before, .hero .title::after {
  content: ""; position: absolute; top: -4px; width: 1px; height: 9px; background: var(--ink);
}
.hero .title::before { left: 0; }
.hero .title::after { right: 0; }
.pitch { font-size: 1.25rem; line-height: 1.45; max-width: 36ch; margin: 1.25rem 0 0; text-wrap: pretty; }

.callouts { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.callouts a {
  min-width: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.7rem;
  color: var(--ink); text-decoration: none;
}
.callouts strong { font-family: var(--display); font-size: 1.6rem; font-weight: 900; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }
.callouts span { color: var(--ink-2); font-size: 0.95rem; }
.callouts a:hover span, .callouts a:focus-visible span { color: var(--ink); }

/* leader: a rule that runs from the claim to the title block, dot at the target end */
.leader { display: none; }
@media (min-width: 64rem) {
  .callouts { margin-right: -3rem; } /* cross the grid gap so leaders touch the title block */
  .callouts a { flex-wrap: nowrap; }
  .callouts span { white-space: nowrap; }
  .leader {
    display: block; position: relative; flex: 1 1 2rem; min-width: 2rem; height: 1px;
    align-self: center; margin-top: 0.1em;
    background: var(--rule);
  }
  .leader::before {
    content: ""; position: absolute; inset: 0; background: var(--accent);
    transform-origin: left; transform: scaleX(0);
    transition: transform 0.55s var(--ease);
  }
  .leader::after {
    content: ""; position: absolute; right: -3px; top: -3px; width: 7px; height: 7px;
    border-radius: 50%; background: var(--rule);
    transition: background-color 0.2s 0.3s;
  }
  a:hover > .leader::before, a:focus-visible > .leader::before { transform: scaleX(1); }
  a:hover > .leader::after, a:focus-visible > .leader::after { background: var(--accent); }
}

.title-block {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--ink);
  background: var(--cell);
  font-size: 0.95rem;
}
.title-block th, .title-block td { border: 1px solid var(--ink); padding: 0.55rem 0.7rem; vertical-align: top; text-align: left; }
.title-block th {
  font-family: var(--body); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-2); width: 1%; white-space: nowrap;
}
.title-block .links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.title-block .action-row td { padding: 0.7rem; }
.title-block .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.btn {
  display: inline-block;
  font-family: var(--display); text-transform: uppercase; font-weight: 700; font-size: 1.1rem; letter-spacing: 0.06em;
  padding: 0.55rem 1rem; border: 1px solid var(--ink); color: var(--ink);
  text-decoration: none; background: transparent; line-height: 1;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--sheet); }
.btn.primary { background: var(--ink); color: var(--sheet); }
.btn.primary:hover, .btn.primary:focus-visible { background: var(--sheet); color: var(--ink); }

/* --- sections -------------------------------------------------------- */

main > section { padding: 2.75rem 0; border-bottom: 1px solid var(--rule); }
main > section:last-child { border-bottom: 0; }

h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; margin-bottom: 1.4rem; }

.prose { max-width: 68ch; }
.prose p { margin: 0 0 1em; }

/* specifications: each group is a dimension line — items are the dimensioned span,
   the group name is the measured value set on the line between extension ticks */
.dims { margin: 0; display: grid; gap: 1.6rem; }
.dim-row { display: grid; gap: 0.35rem; }
.dim-row dt { order: 2; } /* term first in markup for semantics, drawn as the measured value beneath the span */
.dims dd { margin: 0; }
.span { list-style: none; margin: 0; padding: 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; }
.span li { font-size: 1.05rem; position: relative; }
.span li + li::before { content: ""; position: absolute; left: -0.75rem; top: 0.3em; bottom: 0.3em; width: 1px; background: var(--rule); }
.dims dt { position: relative; height: 1.4rem; display: grid; place-items: center; }
.dims dt::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--ink); }
.dims dt::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 5px); height: 11px;
  border-left: 1px solid var(--ink); border-right: 1px solid var(--ink);
}
.measure {
  position: relative; z-index: 1; background: var(--sheet); padding: 0 0.6rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
}

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips li {
  border: 1px solid var(--ink); padding: 0.25rem 0.6rem; font-size: 0.85rem; line-height: 1.3;
  background: var(--cell);
}

/* revision table (experience) */
.rev { width: 100%; border-collapse: collapse; border: 1px solid var(--ink); background: var(--cell); }
.rev th, .rev td { border: 1px solid var(--ink); padding: 0.7rem 0.8rem; text-align: left; vertical-align: top; }
.rev th { font-family: var(--body); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.rev td.period { white-space: nowrap; }
.rev-title { margin: 0 0 0.4rem; }
.rev ul { margin: 0; padding-left: 1.1rem; }
.rev li { margin: 0.15rem 0; }
@media (max-width: 47.99rem) {
  .rev thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rev tr { display: grid; grid-template-columns: auto 1fr; }
  .rev td:last-child { grid-column: 1 / -1; }
  .rev td.period { white-space: normal; }
}

/* detail views (projects): headline detail first at full width, support details below */
.details { display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .details { grid-template-columns: repeat(3, minmax(0, 1fr)); } .detail.headline { grid-column: 1 / -1; } }
.detail {
  border: 1px solid var(--ink); background: var(--cell); padding: 1.1rem 1.2rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.8rem; position: relative;
}
.detail-head { display: flex; align-items: center; gap: 0.8rem; }
.bubble {
  width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--ink);
  display: inline-grid; place-items: center; font-family: var(--mono); font-size: 0.8rem; flex: none;
}
.detail h3 { font-size: 1.6rem; font-weight: 700; flex: 1; }
.scale { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--rule); padding: 0.15rem 0.4rem; }
.detail p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; font-size: 0.85rem; color: var(--ink-2); }
.notes li::before { content: "— "; color: var(--rule); }
.detail-links { display: flex; gap: 1.25rem; margin-top: auto; }
.detail-links a { font-family: var(--display); text-transform: uppercase; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.06em; }
.detail:hover .bubble, .detail:focus-within .bubble { background: var(--ink); color: var(--sheet); }
@media (min-width: 48rem) {
  .detail.headline { padding: 1.6rem 1.8rem 1.8rem; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; column-gap: 2.5rem; }
  .detail.headline .detail-head { grid-column: 1 / -1; }
  .detail.headline h3 { font-size: 2.6rem; }
  .detail.headline > p { font-size: 1.2rem; color: var(--ink); grid-row: 2; }
  .detail.headline .notes { grid-row: 3; grid-column: 1; }
  .detail.headline .detail-links { grid-column: 2; grid-row: 2 / 4; align-self: end; justify-content: end; }
}

/* contact */
.contact-row { display: grid; gap: 1.25rem; align-items: center; }
@media (min-width: 48rem) { .contact-row { grid-template-columns: 1fr auto; } }
#contact .pitch { margin: 0; }
#contact .btn { font-family: var(--mono); text-transform: none; letter-spacing: 0; font-size: 0.95rem; padding: 0.75rem 1rem; }

footer { margin-top: 2rem; padding-top: 0.75rem; border-top: 1px solid var(--ink); font-family: var(--body); font-size: 0.78rem; letter-spacing: 0.02em; color: var(--ink-2); }
footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .leader::before { transition: none; }
}

/* title block reflow on narrow sheets */
@media (max-width: 63.99rem) {
  .title-block, .title-block tbody { display: block; }
  .title-block tr { display: grid; grid-template-columns: max-content minmax(0, 1fr); }
  .title-block tr:not(:first-child) th, .title-block tr:not(:first-child) td { border-top: 0; }
  .title-block th { border-right: 0; width: auto; white-space: normal; }
  .title-block td:not(:last-child) { border-right: 0; }
  .title-block td[colspan] { grid-column: 2; }
  .title-block .action-row td { grid-column: 1 / -1; }
}
