/* Layout: a worksheet. Hero on a faint cell grid with a selected-cell role label and a framed photo,
   then ruled data sections (skills, typing, education), then contact. */
:root {
  --bg: #f2f5f1;
  --surface: #fbfcfa;
  --fg: #14201a;
  --muted: #4d5d54;
  --line: #cfd8d1;
  --accent: #1c6b49;
  --accent-ink: #ffffff;
  --select: #e3b73a;
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1511; --surface: #151e19; --fg: #e5ede8; --muted: #9db0a5;
    --line: #2a3830; --accent: #5cc795; --accent-ink: #0e1511;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1511; --surface: #151e19; --fg: #e5ede8; --muted: #9db0a5;
  --line: #2a3830; --accent: #5cc795; --accent-ink: #0e1511;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 48px;
}
.wrap { max-width: 960px; margin: 0 auto; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--select); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.1; }

/* top bar */
.topbar { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: baseline; padding-block: 20px; border-bottom: 1px solid var(--line); }
.topbar .mark { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; color: var(--muted); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; align-items: center; }
.topbar nav a { color: var(--fg); text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.topbar nav a:hover { border-bottom-color: var(--accent); }
.theme { font: 500 13px var(--font-mono); padding: 3px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }

/* hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
  gap: 40px;
  align-items: center;
  padding-block: 48px;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 40px;
  background-position: -1px -1px;
  border-bottom: 1px solid var(--line);
}
.hero-text { min-width: 0; }
.eyebrow { display: inline-block; background: var(--bg); padding-right: 12px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 12px; }
h1 { display: inline-block; background: var(--bg); padding-right: 16px; font-size: clamp(2.6rem, 8vw, 5rem); font-weight: 700; letter-spacing: -0.02em; }
.role {
  display: block; width: fit-content; max-width: 100%;
  margin: 20px 0 0; padding: 4px 12px;
  background: var(--bg);
  border: 2px solid var(--select);
  font-family: var(--font-mono); font-size: clamp(0.9rem, 2.6vw, 1.1rem); font-weight: 500;
  position: relative;
}
.role::after { content: ""; position: absolute; right: -6px; bottom: -6px; width: 9px; height: 9px; background: var(--select); }
.objective { max-width: 60ch; margin: 28px 0 0; font-size: 1.05rem; background: var(--bg); padding: 4px 8px 4px 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; padding: 10px 18px; font: 500 15px var(--font-body); text-decoration: none; border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.btn.ghost { background: var(--bg); color: var(--accent); }
.btn:hover { filter: brightness(1.08); }

.photo { margin: 0; position: relative; background: var(--bg); padding: 8px; border: 2px solid var(--select); }
.photo::after { content: ""; position: absolute; right: -6px; bottom: -6px; width: 9px; height: 9px; background: var(--select); }
.photo img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 22%; }

/* sections */
section { padding-block: 56px 8px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 24px; }
h2 { font-size: clamp(1.7rem, 5vw, 2.4rem); font-weight: 700; letter-spacing: -0.01em; }
.sec-head span { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
h3 { font-size: 1.2rem; margin-bottom: 12px; }

/* ruled tables */
.scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); }
.table th, .table td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table tr:last-child th, .table tr:last-child td { border-bottom: 0; }
.table th { width: 30%; font-family: var(--font-mono); font-weight: 500; font-size: 13px; letter-spacing: 0.03em; color: var(--muted); text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.chip { font-size: 14px; padding: 2px 10px; border: 1px solid var(--line); background: var(--bg); }
.note { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

/* typing meters */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.meter { background: var(--surface); border: 1px solid var(--line); padding: 20px; min-width: 0; }
.meter .lang { font-family: var(--font-mono); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.meter .num { font-family: var(--font-display); font-size: 3.2rem; font-weight: 700; line-height: 1; margin: 6px 0 14px; font-variant-numeric: tabular-nums; }
.meter .num small { font-family: var(--font-mono); font-size: 1rem; font-weight: 500; color: var(--muted); margin-left: 6px; }
.scale { position: relative; height: 12px; background: var(--bg); border: 1px solid var(--line); }
.scale i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width 0.9s cubic-bezier(.2,.7,.2,1); }
.ticks { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* education */
.edu td.yr, .edu td.score { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.edu td.score { font-weight: 500; color: var(--accent); }
.edu .inst { display: block; color: var(--muted); font-size: 14px; }
.edu .now { display: inline-block; margin-left: 8px; padding: 0 8px; font-family: var(--font-mono); font-size: 11px; background: var(--select); color: #14201a; text-transform: uppercase; letter-spacing: 0.04em; vertical-align: 2px; }
.certs { margin-top: 32px; }

.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.two > div { min-width: 0; }
ul.plain { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
ul.plain li { padding-left: 18px; position: relative; }
ul.plain li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 7px; height: 7px; background: var(--accent); }

/* contact */
.contact { background: var(--surface); border: 1px solid var(--line); padding: 12px 24px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .k { width: 90px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.row .v { font-family: var(--font-mono); font-size: 15px; overflow-wrap: anywhere; min-width: 0; }
.copy { font: 500 13px var(--font-body); padding: 4px 12px; border: 1px solid var(--accent); background: var(--bg); color: var(--accent); cursor: pointer; }
footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* phone width */
@media (max-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .photo { order: -1; width: min(240px, 70%); }
}
@media (max-width: 560px) {
  .table th { width: auto; display: block; padding-bottom: 0; border-bottom: 0; }
  .table td { display: block; padding-top: 6px; }
  .table tr { display: block; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .edu tr { display: grid; grid-template-columns: 1fr auto; }
  .edu td { padding: 12px 16px 0; }
  .edu td.score { text-align: right; }
  .edu td.yr { grid-column: 1 / -1; padding-bottom: 12px; padding-top: 2px; color: var(--muted); }
  .contact { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
