/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Tokens ─────────────────────────────────────────── */
:root {
  --bg:         #0d1117;
  --bg-surface: #0e1320;
  --border:     #1e2d42;
  --text:       #e8e6e0;
  --muted:      #6b7a99;
  --subtle:     #c0bdb8;
  --amber:      #c9a84c;
  --blue:       #4a90d9;
  --font:       'JetBrains Mono', monospace;
  --sidebar-w:  240px;
}

/* ─── Base ───────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--amber);
}
a:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}

/* ─── Layout ─────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

.sidebar-role {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 40px;
}

.nav-label {
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 40px;
}

.nav a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav a::before {
  content: '>';
  color: var(--amber);
  opacity: 0;
  font-size: 0.75rem;
  width: 10px;
  flex-shrink: 0;
}
.nav a:hover { color: var(--text); }
.nav a:hover::before,
.nav a.active::before { opacity: 1; }
.nav a.active { color: var(--text); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar-footer a {
  font-size: 0.8125rem;
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--amber);
}
.sidebar-footer a:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}

/* ─── Main ───────────────────────────────────────────── */
.main {
  flex: 1;
  padding: 52px 64px;
  max-width: 800px;
}

/* ─── Mobile components (hidden on desktop) ──────────── */
.mobile-header { display: none; }
.mobile-nav    { display: none; }

/* ─── Section heads ──────────────────────────────────── */
.section { margin-bottom: 52px; }

.section-head {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ─── About ──────────────────────────────────────────── */
.about-text {
  color: var(--subtle);
  max-width: 540px;
  line-height: 1.85;
}

/* ─── Experience ─────────────────────────────────────── */
.exp-list { list-style: none; }

.exp-item {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.exp-item:last-child { border-bottom: none; }

.exp-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 80px;
  flex-shrink: 0;
}
.exp-years {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.exp-years-mobile { display: none; }
.exp-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.exp-role {
  color: var(--text);
  font-weight: 500;
}
.exp-company {
  font-size: 0.875rem;
  color: var(--amber);
}
.exp-desc {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 480px;
}

/* ─── Projects ───────────────────────────────────────── */
.proj-list { list-style: none; }

.proj-item {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.proj-item:last-child { border-bottom: none; }

.proj-year {
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 36px;
  flex-shrink: 0;
  padding-top: 2px;
}
.proj-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.proj-name {
  color: var(--amber);
}
.proj-name a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--amber);
}
.proj-name a:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}
.proj-desc {
  font-size: 0.875rem;
  color: var(--muted);
}
.proj-tags { display: flex; gap: 12px; margin-top: 4px; }
.proj-tag  {
  font-size: 0.75rem;
  color: var(--blue);
}

/* ─── Notes ──────────────────────────────────────────── */
.notes-list { list-style: none; }

.note-item {
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.note-item:last-child { border-bottom: none; }

.note-title { color: var(--text); }

.note-title a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--amber);
}
.note-title a:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}
.note-source {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ─── Contact ────────────────────────────────────────── */
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.contact-label {
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 72px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.contact-list a {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--amber);
}
.contact-list a:hover {
  color: var(--text);
  text-decoration-color: var(--text);
}

.mobile-contact { display: none; }

/* ─── Mobile ─────────────────────────────────────────── */
@media (max-width: 680px) {

  html, body { overflow-x: clip; }

  .mobile-contact { display: block; }

  .sidebar { display: none; }

  .mobile-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 10;
  }
  .mobile-header-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
  }
  .mobile-header-role {
    font-size: 0.8125rem;
    color: var(--muted);
  }

  .layout {
    padding-top: 57px;
    width: 100%;
  }

  .main {
    padding: 28px 20px;
    min-width: 0;
    max-width: 100%;
  }

  .section { margin-bottom: 40px; }

  .about-text { max-width: 100%; }

  .proj-tags { flex-wrap: wrap; }

  .exp-desc { max-width: 100%; }

  .exp-meta { display: none; }
  .exp-years-mobile { display: block; }

  .exp-item {
    flex-direction: column;
    gap: 4px;
  }

  .proj-item {
    flex-direction: column;
    gap: 4px;
  }

  .contact-list a { overflow-wrap: break-word; word-break: break-all; }
}
