@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --bg: #0d1117;
  --bg-2: #010409;
  --surface: #161b22;
  --surface-2: #1c2330;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --green: #3fb950;
  --blue: #58a6ff;
  --purple: #bc8cff;
  --orange: #ffa657;
  --red: #ff7b72;
  --accent: var(--green);
  --on-accent: #04130a;
  --shadow: 0 0 0 1px rgba(240, 246, 252, .04), 0 12px 32px rgba(1, 4, 9, .55);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --maxw: 1000px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f6f8fa;
  --surface: #f6f8fa;
  --surface-2: #eef1f5;
  --border: #d0d7de;
  --text: #1f2328;
  --muted: #59636e;
  --green: #1a7f37;
  --blue: #0969da;
  --purple: #8250df;
  --orange: #bc4c00;
  --red: #cf222e;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(31, 35, 40, .06), 0 8px 24px rgba(31, 35, 40, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(rgba(139, 148, 158, .13) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--green) 35%, transparent); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); }
.g { color: var(--green); } .b { color: var(--blue); } .p { color: var(--purple); }
.o { color: var(--orange); } .r { color: var(--red); } .m { color: var(--muted); }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 6px; font-family: var(--mono);
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.brand { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .at { color: var(--muted); font-weight: 400; }
.caret { display: inline-block; width: .6em; height: 1.05em; margin-left: 3px; vertical-align: text-bottom; background: var(--green); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 13px; }
.nav-links a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--muted); }
.nav-links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-links a.active { color: var(--green); background: var(--surface); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
}
.icon-btn:hover { border-color: var(--muted); }
.icon-btn svg { width: 16px; height: 16px; }
.menu-btn { display: none; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 6px;
  font-family: var(--mono); font-size: 14px; font-weight: 600; border: 1px solid var(--border); cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: var(--green); }

/* hero */
.hero { padding: 64px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hello { font-family: var(--mono); color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.hello .g { font-weight: 600; }
.id { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.id img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); }
h1 { font-family: var(--mono); font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.1; letter-spacing: -.045em; margin: 0; white-space: nowrap; }
.tagline { font-family: var(--mono); font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted); margin: 10px 0 18px; }
.tagline b { color: var(--green); font-weight: 600; }
.lead { color: var(--muted); max-width: 54ch; margin: 0 0 24px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.socials { display: flex; gap: 8px; margin-top: 22px; }
.socials a {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.socials a:hover { border-color: var(--green); color: var(--green); }
.socials svg { width: 18px; height: 18px; }

/* terminal / window chrome */
.window { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r1 { background: #ff5f56; } .dot.y1 { background: #ffbd2e; } .dot.g1 { background: #27c93f; }
.window-title { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.code { margin: 0; padding: 18px 20px; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; overflow-x: auto; white-space: pre; color: var(--text); }
.code .ln { color: var(--muted); user-select: none; display: inline-block; width: 2ch; margin-right: 2ch; text-align: right; opacity: .55; }

/* sections */
section { padding: 56px 0; }
.sec-head { font-family: var(--mono); margin: 0 0 28px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--mono); font-size: clamp(1.4rem, 3.4vw, 1.9rem); letter-spacing: -.03em; margin: 0; }
.sec-head h2::before { content: "## "; color: var(--green); }
.sec-head .cmt { color: var(--muted); font-size: 13px; }
h3 { font-size: 1.05rem; margin: 0; letter-spacing: -.01em; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 24px; }
.about p { margin: 0 0 12px; color: var(--muted); }
.about p:last-child { margin: 0; }
.about strong { color: var(--text); font-weight: 600; }

/* experience as git log */
.log { list-style: none; margin: 0; padding: 0; position: relative; }
.log::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 14px; width: 2px; background: var(--border); }
.commit { position: relative; padding: 0 0 28px 36px; }
.commit:last-child { padding-bottom: 0; }
.commit::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--muted);
}
.commit.head::before { border-color: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 20%, transparent); }
.refs { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); margin-right: 6px; }
.tag.head { color: var(--green); border-color: color-mix(in srgb, var(--green) 50%, var(--border)); }
.tag.branch { color: var(--purple); }
.commit-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 16px; }
.commit-title h3 { font-family: var(--mono); font-size: 1.1rem; }
.commit-title .at { color: var(--muted); font-weight: 400; }
.commit-title .at a { color: inherit; text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.commit-title .at a:hover { color: var(--blue); text-decoration-color: currentColor; }
.commit-title .when { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.commit-body { margin-top: 12px; }
.commit-body > p { color: var(--muted); margin: 0 0 12px; font-size: 15px; }

.customers { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 16px; padding: 0; }
.customers li { font-family: var(--mono); font-size: 12.5px; padding: 3px 10px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--border); color: var(--orange); }
.customers li::before, .customers li::after { content: '"'; color: var(--muted); }

.diff { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.diff li { position: relative; padding: 8px 12px 8px 34px; border-radius: 6px; background: color-mix(in srgb, var(--green) 7%, transparent); border-left: 2px solid var(--green); font-size: 14.5px; color: var(--muted); }
.diff li::before { content: "+"; position: absolute; left: 12px; top: 8px; font-family: var(--mono); font-weight: 700; color: var(--green); }
.diff b { color: var(--text); font-weight: 600; }

/* skills */
.window .code .k { color: var(--red); }
.window .code .s { color: var(--blue); }
.window .code .n { color: var(--purple); }
.window .code .c { color: var(--muted); }
.window .code .f { color: var(--orange); }

/* edu / certs */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kv { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; color: var(--muted); }
.kv li { padding-left: 16px; position: relative; }
.kv li::before { content: ">"; position: absolute; left: 0; font-family: var(--mono); color: var(--green); }
.kv b { color: var(--text); font-weight: 600; }
.sub { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 4px; }

/* contact */
.contact-list { list-style: none; margin: 0; padding: 18px 20px; font-family: var(--mono); font-size: 14px; display: grid; gap: 8px; }
.contact-list .prompt { color: var(--green); margin-right: 8px; }
.contact-list .k { color: var(--muted); display: inline-block; min-width: 9ch; }
.contact .cta { padding: 0 20px 20px; }

footer { padding: 28px 0 44px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  .btn { transition: none; }
}

@media (max-width: 860px) {
  .hero { padding-top: 36px; }
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .menu-btn { display: inline-grid; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 56px; flex-direction: column;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 20px 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 8px; }
  .brand .at-host { display: none; }
  .id { gap: 12px; }
  h1 { white-space: normal; overflow-wrap: anywhere; }
  .code { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12.5px; }
}

@media print {
  .site-header, .skip-link, .cta, .socials { display: none; }
  body { background: #fff; color: #000; }
  .js .reveal { opacity: 1; transform: none; }
}
