/* ── Tokens ── */
:root {
  --bg:     #ffffff;
  --bg2:    #fafafa;
  --text:   #171717;
  --muted:  #737373;
  --border: #e5e5e5;
  --tag-bg: #f5f5f5;
}
[data-theme="dark"] {
  --bg:     #0a0a0a;
  --bg2:    #111111;
  --text:   #ededed;
  --muted:  #737373;
  --border: #262626;
  --tag-bg: #1a1a1a;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

/* ── Container ── */
.wrap { max-width: 680px; margin: 0 auto; padding: 0 24px; }

/* ── Header ── */
header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.header-inner {
  max-width: 680px; margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.header-left {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 500; color: var(--muted);
  letter-spacing: 0.5px; filter: grayscale(1);
  transition: filter 0.3s; flex-shrink: 0; user-select: none;
}
.header-left:hover .avatar { filter: grayscale(0.3); }
.header-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  letter-spacing: -0.01em; white-space: nowrap;
}
.header-right { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 20px; list-style: none; }
.nav-links a {
  font-size: 14px; color: var(--muted); text-decoration: none; transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.theme-btn {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: 15px; padding: 4px 2px; line-height: 1;
  display: flex; align-items: center; transition: color 0.15s;
}
.theme-btn:hover { color: var(--text); }

/* ── Hamburger ── */
.nav-ham {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-ham span { display: block; width: 20px; height: 1.5px; background: var(--muted); transition: background 0.2s; }
.nav-ham:hover span { background: var(--text); }

/* ── Main ── */
main { padding: 56px 0 96px; }
section { margin-bottom: 72px; }
section:last-child { margin-bottom: 0; }

/* ── Section label ── */
.s-label {
  font-size: 12px; font-weight: 500; color: var(--muted);
  letter-spacing: 0.07em; text-transform: uppercase;
  margin-bottom: 24px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ── Intro (landing) ── */
.intro-name {
  font-size: 24px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--text); margin-bottom: 4px;
}
.intro-sub {
  font-size: 14px; color: var(--muted); margin-bottom: 20px;
  font-family: 'JetBrains Mono', monospace;
}
.intro-bio {
  font-size: 15px; color: var(--text); line-height: 1.8;
  margin-bottom: 24px; max-width: 600px;
}
.intro-bio a, .body-text a {
  color: var(--text); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--border); transition: text-decoration-color 0.15s;
}
.intro-bio a:hover, .body-text a:hover { text-decoration-color: var(--muted); }

/* ── Social row ── */
.social-row { display: flex; flex-wrap: wrap; gap: 16px; }
.social-link {
  display: flex; align-items: center; gap: 5px; font-size: 13px;
  color: var(--muted); text-decoration: none; transition: color 0.15s;
}
.social-link:hover { color: var(--text); }
.social-link svg { flex-shrink: 0; }

/* ── View all ── */
.view-all {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--muted); text-decoration: none;
  margin-top: 16px; transition: color 0.15s;
  font-family: 'JetBrains Mono', monospace;
}
.view-all:hover { color: var(--text); }

/* ── Post list ── */
.post-list { display: flex; flex-direction: column; }
.post-item {
  display: flex; align-items: baseline; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: opacity 0.15s;
}
.post-item:first-child { border-top: 1px solid var(--border); }
.post-item:hover { opacity: 0.65; }
.post-date {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted); white-space: nowrap; min-width: 68px; flex-shrink: 0;
}
.post-title-text { font-size: 15px; color: var(--text); flex: 1; line-height: 1.5; }
.post-cat-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--muted); flex-shrink: 0; white-space: nowrap;
  display: none;
}
.post-ext {
  font-size: 12px; color: var(--muted); opacity: 0;
  transition: opacity 0.15s; flex-shrink: 0;
}
.post-item:hover .post-ext { opacity: 1; }
@media (min-width: 540px) { .post-cat-tag { display: block; } }

/* ── Body text ── */
.body-text p { font-size: 15px; line-height: 1.8; color: var(--text); margin-bottom: 16px; }
.body-text p:last-of-type { margin-bottom: 0; }

/* ── Skills ── */
.skills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 24px; }
.skill {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted); background: var(--tag-bg); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 4px; transition: color 0.15s, border-color 0.15s;
}
.skill:hover { color: var(--text); border-color: var(--muted); }

/* ── Experience ── */
.exp-list { display: flex; flex-direction: column; gap: 36px; }
.exp-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-bottom: 3px; flex-wrap: wrap;
}
.exp-role { font-size: 15px; font-weight: 500; color: var(--text); }
.exp-period {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted); white-space: nowrap; flex-shrink: 0;
}
.exp-company { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.exp-desc { font-size: 14px; color: var(--text); line-height: 1.75; }
.exp-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.exp-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--muted); background: var(--tag-bg); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 3px;
}

/* ── Education ── */
.edu-list {
  margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.edu-item {
  display: flex; justify-content: space-between;
  align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.edu-deg { font-size: 14px; font-weight: 500; color: var(--text); }
.edu-school { font-size: 13px; color: var(--muted); }
.edu-year {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted); white-space: nowrap; flex-shrink: 0;
}

/* ── Projects ── */
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.proj-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px;
  text-decoration: none; display: block; background: var(--bg2);
  transition: border-color 0.2s, background 0.2s;
}
.proj-card:hover { border-color: var(--muted); background: var(--bg); }
.proj-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.proj-name { font-size: 14px; font-weight: 500; color: var(--text); }
.proj-arrow { font-size: 12px; color: var(--muted); opacity: 0; transition: opacity 0.15s; }
.proj-card:hover .proj-arrow { opacity: 1; }
.proj-desc { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.proj-status {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: var(--muted); display: flex; align-items: center; gap: 5px;
}
.dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-live { background: #22c55e; }
.dot-test { background: #f59e0b; }
.dot-dev  { background: #818cf8; }

.gh-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  text-decoration: none; background: var(--bg2);
  transition: border-color 0.2s, background 0.2s;
}
.gh-card:hover { border-color: var(--muted); background: var(--bg); }
.gh-left { display: flex; align-items: center; gap: 12px; }
.gh-icon { color: var(--muted); flex-shrink: 0; }
.gh-title { font-size: 14px; font-weight: 500; color: var(--text); }
.gh-meta { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); margin-top: 2px; }
.gh-arrow { font-size: 14px; color: var(--muted); }

/* ── Achievements ── */
.achieve-list { display: flex; flex-direction: column; gap: 10px; }
.achieve-item { font-size: 14px; color: var(--text); line-height: 1.6; display: flex; gap: 10px; }
.achieve-bullet { color: var(--muted); flex-shrink: 0; font-size: 13px; margin-top: 1px; }
.achieve-item a {
  color: var(--text); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--border); transition: text-decoration-color 0.15s;
}
.achieve-item a:hover { text-decoration-color: var(--muted); }

/* ── Contact ── */
.contact-text { font-size: 15px; color: var(--text); line-height: 1.8; margin-bottom: 28px; }
.contact-rows { display: flex; flex-direction: column; }
.contact-row {
  display: flex; align-items: baseline; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: opacity 0.15s;
}
.contact-row:first-child { border-top: 1px solid var(--border); }
.contact-row:hover { opacity: 0.65; }
.contact-key {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted); min-width: 68px; flex-shrink: 0;
}
.contact-val { font-size: 14px; color: var(--text); }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner {
  max-width: 680px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy { font-size: 13px; color: var(--muted); }
.footer-icons { display: flex; gap: 14px; align-items: center; }
.f-icon { color: var(--muted); text-decoration: none; display: flex; align-items: center; transition: color 0.15s; }
.f-icon:hover { color: var(--text); }

/* ── Mobile ── */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 56px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 0 16px; gap: 0; z-index: 49;
  }
  .nav-links.open a { padding: 12px 24px; font-size: 15px; }
  .nav-ham { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 12px; }
  .exp-head { flex-direction: column; gap: 2px; }
  main { padding: 40px 0 64px; }
  section { margin-bottom: 52px; }
}
