:root {
  color-scheme: light;
  --bg: #f9faf8;
  --text: #172322;
  --muted: #566361;
  --subtle: #72807c;
  --line: #dce4df;
  --accent: #166d58;
  --accent-on: #ffffff;
  --button-bg: #172b26;
  --surface-hover: #f0f4f1;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1716;
  --text: #edf5f0;
  --muted: #b5c4bd;
  --subtle: #92a39c;
  --line: #30403a;
  --accent: #86ddba;
  --accent-on: #10251c;
  --button-bg: #86ddba;
  --surface-hover: #192824;
}
*, *::before, *::after {box-sizing: border-box;}
html {scroll-behavior: smooth; scroll-padding-top: 100px;}
body { margin: 0; background: var(--bg); color: var(--text); font-size: 17px; line-height: 1.7; transition: background-color .2s, color .2s; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button {font: inherit;}
a:focus-visible, button:focus-visible {outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 5px;}
.wrap {width: min(100% - 56px, 900px); margin-inline: auto;}
.skip {position: fixed; top: -80px; left: 16px; z-index: 20; background: var(--text); color: var(--bg); padding: 8px 14px;}
.skip:focus {top: 12px;}
.site-header {border-bottom: 1px solid var(--line);}
.nav {min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px;}
.wordmark {font-size: 20px; font-weight: 750; letter-spacing: -.055em; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px;}
.wordmark-dot {height: 9px; width: 9px; border-radius: 50%; background: var(--accent); display: inline-block; flex: none;}
.nav-actions {display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); font-size: 15px; font-weight: 600;}
.nav-actions > a {transition: color .15s;}
.nav-actions > a span, .hero-actions a span, .contact-links a span {font-family: inherit; margin-left: 3px;}
.theme-toggle {width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; display: inline-grid; place-items: center; color: var(--text); background: transparent; cursor: pointer; flex: none; transition: background-color .15s;}
.theme-toggle:hover {background: var(--surface-hover);}
.theme-icon {width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block;}
:root[data-theme="dark"] .moon, :root:not([data-theme="dark"]) .sun {display: none;}
.hero {padding-top: clamp(76px, 11vw, 142px); padding-bottom: clamp(96px, 11vw, 150px);}
.kicker {font-size: 16px; font-weight: 600; color: var(--accent); margin: 0 0 23px;}
h1, h2, h3, p {margin-top: 0;}
h1 {font-size: clamp(49px, 7.2vw, 88px); letter-spacing: -.072em; line-height: 1.06; font-weight: 760; margin-bottom: 26px; max-width: 820px;}
h1 span {color: var(--accent);}
.hero-description {font-size: clamp(18px, 1.9vw, 20px); line-height: 1.75; color: var(--muted); max-width: 610px; margin-bottom: 30px;}
.hero-actions {display: flex; align-items: center; gap: 16px; flex-wrap: wrap;}
.button {min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 20px; border-radius: 9px; font-size: 14px; font-weight: 700; transition: transform .15s, background .15s;}
.button:hover {transform: translateY(-1px);}
.button.primary {background: var(--button-bg); color: var(--accent-on);}
.button.primary:hover {filter: brightness(1.06);}
.text-button {color: var(--text);}
.text-button:hover {color: var(--accent);}
.location {font-size: 13px; color: var(--subtle); margin: 26px 0 0;}
.section {padding-top: 60px; padding-bottom: 84px; border-top: 1px solid var(--line);}
.section-header {display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px; align-items: baseline; margin-bottom: 26px;}
h2 {font-size: clamp(28px, 3.5vw, 38px); line-height: 1.25; letter-spacing: -.045em; font-weight: 720; margin: 0;}
.section-header > p {font-size: 14px; margin: 0; color: var(--subtle);}
.work-list {border-top: 1px solid var(--line);}
.work-item {display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; column-gap: 18px; align-items: start; padding: 26px 4px; border-bottom: 1px solid var(--line);}
.work-index, .work-kind {font-size: 13px; color: var(--subtle); white-space: nowrap; padding-top: 4px;}
.work-detail h3 {font-size: 19px; font-weight: 680; letter-spacing: -.025em; line-height: 1.35; margin: 0 0 4px;}
.work-detail p {max-width: 615px; font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0;}
.section-note {font-size: 13px; color: var(--subtle); margin: 18px 0 0;}
.about-grid {display: grid; grid-template-columns: .95fr 1.05fr; gap: 58px; margin: 34px 0 40px;}
.about-lead {font-weight: 700; font-size: clamp(21px, 2.7vw, 29px); letter-spacing: -.042em; line-height: 1.4;}
.about-copy p {font-size: 17px; line-height: 1.82; color: var(--muted); margin-bottom: 14px;}
.tools-line {border-top: 1px solid var(--line); padding-top: 20px; display: grid; grid-template-columns: 190px 1fr; gap: 20px;}
.tools-line span {font-size: 14px; font-weight: 700;}
.tools-line p {font-size: 16px; color: var(--muted); margin: 0;}
.contact {padding-bottom: 96px;}
.contact h2 {font-size: clamp(34px, 4.6vw, 48px);}
.contact > p {margin: 14px 0 23px; font-size: 17px; color: var(--muted); max-width: 600px;}
.contact-links {display: flex; gap: 24px; flex-wrap: wrap; font-size: 16px; font-weight: 700;}
.contact-links a {color: var(--accent); text-underline-offset: 5px; text-decoration: underline;}
.contact-links a:hover {text-decoration-thickness: 2px;}
[hidden] {display: none !important;}
.footer {min-height: 74px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); color: var(--subtle); font-size: 13px;}
.footer a {color: var(--muted);}
@media (max-width: 650px) {
  .wrap {width: min(100% - 36px, 920px);}
  .nav {min-height: 72px; gap: 12px;}
  .wordmark {font-size: 17px;}
  .nav-actions {gap: 12px; font-size: 13px;}
  .nav-actions a[href="#about"] {display: none;}
  .nav-actions a#nav-github {display: none;}
  .theme-toggle {width: 38px; height: 38px;}
  .hero {padding-top: 80px; padding-bottom: 96px;}
  h1 {font-size: clamp(46px, 12vw, 68px);}
  .hero-description {font-size: 18px;}
  .section {padding-top: 46px; padding-bottom: 64px;}
  .work-item {grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 22px 0;}
  .work-kind {grid-column: 2; padding: 0; font-size: 12px;}
  .work-detail h3 {font-size: 18px;}
  .about-grid {grid-template-columns: 1fr; gap: 18px; margin: 30px 0;}
  .tools-line {grid-template-columns: 1fr; gap: 8px;}
  .footer {align-items: flex-start; flex-direction: column; padding-top: 22px; padding-bottom: 22px;}
}
@media (prefers-reduced-motion: reduce) {
  html {scroll-behavior: auto;}
  *, *::before, *::after {transition: none !important; animation: none !important;}
}

.about-more {margin:0 0 32px; font-size:15px; font-weight:700;}
.about-more a {color:var(--accent); text-decoration:underline; text-underline-offset:4px;}

/* v3: consistent navigation, compact terminal, and controlled SVG arrows */
.nav-actions > a[aria-current="page"] { color: var(--accent); }
.nav-actions > a { white-space: nowrap; }
.ui-arrow { display: inline-block; width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; fill: none; flex: none; vertical-align: -3px; }
.hero-actions .ui-arrow { width: 17px; height: 17px; }
.contact-links .ui-arrow { width: 16px; height: 16px; }
.footer a { display: inline-flex; align-items: center; gap: 7px; }
.footer .ui-arrow { width: 15px; height: 15px; }
.hero-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); align-items: center; gap: clamp(30px, 5vw, 70px); }
.hero { padding-top: clamp(68px, 8vw, 104px); padding-bottom: clamp(88px, 10vw, 132px); }
.hero h1 { font-size: clamp(46px, 5.1vw, 70px); line-height: 1.1; }
.hero-description { font-size: 18px; line-height: 1.75; }
.hero-copy { min-width: 0; }
.terminal-card { min-width: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: 0 14px 38px rgba(0,0,0,.055); }
:root[data-theme="dark"] .terminal-card { background: #121e1a; box-shadow: 0 14px 36px rgba(0,0,0,.12); }
.terminal-bar { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; border-bottom: 1px solid var(--line); background: var(--surface-hover); min-height: 44px; padding: 0 15px; }
.terminal-dots { display:flex; gap:5px; }
.terminal-dots i { display:block; width:7px; height:7px; border:1px solid var(--subtle); border-radius:50%; opacity:.8; }
.terminal-title { text-align:center; font-size:11px; letter-spacing:.02em; color:var(--muted); font-family:ui-monospace, SFMono-Regular, Consolas, monospace; }
.terminal-body { padding: 26px 23px 27px; font: 13px/1.85 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--text); }
.terminal-body p { margin:0; }
.terminal-symbol { color: var(--accent); font-weight: 700; margin-right: 10px; }
.terminal-command { font-weight: 650; white-space: nowrap; }
.terminal-code { padding: 18px 0 16px 23px; }
.terminal-code p { overflow-wrap: anywhere; }
.terminal-key { color: var(--accent); }
.terminal-end { display: flex; align-items: center; gap:7px; }
.terminal-cursor { display:inline-block; width:7px; height:14px; background:var(--accent); opacity:.65; }
@media (max-width: 820px) {
  .hero-layout { grid-template-columns:1fr; gap:38px; }
  .hero { padding-top:68px; }
  .hero h1 { max-width:720px; }
  .terminal-card { width:min(100%,540px); }
  .hero-description { max-width:620px; }
}
@media (max-width: 650px) {
  .nav-actions { gap: 13px; }
  .nav-actions .nav-work, .nav-actions a[data-github] { display:none; }
  .hero { padding-top:64px; padding-bottom:90px; }
  .hero-layout { gap:34px; }
  .hero h1 { font-size:clamp(44px, 11vw, 62px); }
  .terminal-body { padding:22px 19px; font-size:12px; }
}
@media (max-width: 360px) {
  .wordmark { font-size:15px; }
  .nav-actions { gap:10px; font-size:12px; }
  .theme-toggle { width:34px; height:34px; }
}
