:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --surface-2: #f3f1ee;
  --text: #1b1a1f;
  --muted: #5d5a66;
  --line: #e6e2dc;
  --accent: #0070d6;
  --accent-soft: #e6f2ff;
  --go: #c96a00;
  --go-soft: #fff3e3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 16, 30, .04), 0 8px 24px rgba(20, 16, 30, .06);
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111015;
    --surface: #18171d;
    --surface-2: #211f27;
    --text: #efedf3;
    --muted: #a7a3b2;
    --line: #2d2a35;
    --accent: #4da8ff;
    --accent-soft: #10243a;
    --go: #ffb35c;
    --go-soft: #2e2213;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: "Space Grotesk", "Inter", sans-serif; line-height: 1.15; margin: 0; letter-spacing: -.01em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--text); text-decoration: none; font-size: 18px; white-space: nowrap; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent; transition: transform .15s, background .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #0086ff; color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--go);
  background: var(--go-soft); padding: 6px 12px; border-radius: 999px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
.hero h1 { font-size: clamp(38px, 6vw, 64px); margin: 20px 0 12px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 620px; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photo { position: relative; justify-self: center; }
.hero-photo img { width: 260px; height: 260px; border-radius: 50%; object-fit: cover; border: 6px solid var(--surface); box-shadow: var(--shadow); }
.hero-photo::before {
  content: ""; position: absolute; inset: -18px; border-radius: 50%;
  background: conic-gradient(from 200deg, var(--accent), var(--go), var(--accent));
  opacity: .18; z-index: -1;
}
.contact-line { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-size: 15px; color: var(--muted); }
.contact-line a { color: var(--muted); text-decoration: none; }
.contact-line a:hover { color: var(--accent); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat strong { display: block; font-family: "Space Grotesk", sans-serif; font-size: 30px; color: var(--accent); line-height: 1.1; }
.stat span { font-size: 14px; color: var(--muted); }

/* Sections */
section { padding: 64px 0; }
.section-head { margin-bottom: 36px; }
.section-head .kicker { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--go); }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); margin-top: 6px; }
.section-head p { color: var(--muted); margin: 10px 0 0; max-width: 680px; }
.alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; }
.about-grid p { margin: 0 0 14px; }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.values li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.values b { display: block; margin-bottom: 2px; }
.values span { color: var(--muted); font-size: 15px; }

/* Timeline */
.timeline { position: relative; display: grid; gap: 20px; }
.job {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.job-meta { font-size: 14px; color: var(--muted); }
.job-meta .period { display: block; font-family: "JetBrains Mono", monospace; font-weight: 600; color: var(--text); font-size: 14px; }
.job-meta .type { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.job h3 { font-size: 21px; }
.job h3 .company { color: var(--accent); }
.job p { margin: 10px 0 0; }
.job ul { margin: 10px 0 0; padding-left: 20px; }
.job li { margin: 4px 0; }
.job details { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.job summary { cursor: pointer; font-weight: 600; color: var(--accent); font-size: 15px; list-style: none; }
.job summary::-webkit-details-marker { display: none; }
.job summary::before { content: "+ "; font-family: "JetBrains Mono", monospace; }
.job details[open] summary::before { content: "- "; }
.job details dl { margin: 10px 0 0; }
.job details dt { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--go); font-weight: 600; margin-top: 12px; }
.job details dd { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.job-link { font-size: 14px; }

/* Logos */
.company-logo {
  display: flex; align-items: center; justify-content: center;
  width: 140px; height: 64px; padding: 10px 12px; margin-bottom: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
}
.company-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.company-logo.small { width: 110px; height: 50px; padding: 8px 10px; margin-bottom: 12px; }
.tech-logos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 14px; max-width: 140px; }
.tech-logos img {
  width: 32px; height: 32px; padding: 4px; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.edu-logo { height: 34px; width: auto; margin: 8px 0 4px; background: #fff; border-radius: 6px; padding: 3px 6px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 500;
  padding: 3px 9px; border-radius: 6px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}
.tag.go { background: #e3f6fb; color: #007d9c; border-color: transparent; }
@media (prefers-color-scheme: dark) { .tag.go { background: #13272e; color: #4fc7e6; } }

.early { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.early .item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.early h4 { margin: 0; font-size: 16px; }
.early .period { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--muted); }
.early p { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.subhead { font-family: "Space Grotesk", sans-serif; font-size: 22px; margin: 44px 0 0; }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.skill-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.skill-card h3 { font-size: 17px; margin-bottom: 14px; }
.skill { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 0; font-size: 15px; }
.dots { display: flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); }
.skill-card .tags { margin-top: 4px; }

/* Education */
.edu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.edu-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.edu-item .year { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--go); font-weight: 600; }
.edu-item h3 { font-size: 19px; margin-top: 4px; }
.edu-item .org { color: var(--accent); font-weight: 600; font-size: 15px; }
.edu-item p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.hobbies { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hobbies span { background: var(--surface); border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; font-size: 15px; }

/* Contact */
.contact-card {
  background: linear-gradient(135deg, #0086ff, #0050a8);
  color: #fff; border-radius: 22px; padding: 48px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
}
.contact-card h2 { font-size: clamp(26px, 4vw, 38px); }
.contact-card p { margin: 12px 0 0; opacity: .85; max-width: 560px; }
.contact-card .actions { display: grid; gap: 10px; }
.contact-card .btn { background: #fff; color: #004a99; justify-content: center; white-space: normal; text-align: center; }
.contact-card .btn.outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 960px) {
  .nav { display: none; }
  .site-header .btn { margin-left: auto; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero-photo { grid-row: 1; justify-self: start; }
  .hero-photo img { width: 140px; height: 140px; }
  .hero-photo::before { inset: -10px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-card { grid-template-columns: minmax(0, 1fr); padding: 32px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 32px; }
  .hero .lead { font-size: 17px; }
  section { padding: 48px 0; }
  .job { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 20px; }
  .job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .job-meta .company-logo { flex-basis: 100%; margin-bottom: 4px; }
  .job-meta br { display: none; }
  .job-meta .type { margin-top: 0; }
  .job-meta .tech-logos { flex-basis: 100%; margin-top: 6px; }
  .skills, .edu, .early { grid-template-columns: minmax(0, 1fr); }
  .stat strong { font-size: 24px; }
  .contact-card { padding: 26px; border-radius: 18px; }
}
