:root {
  --bg: #f5f3ee;
  --panel: #ffffff;
  --ink: #211f1a;
  --ink-soft: #605c50;
  --ink-faint: #a19c8c;
  --accent: #4c8a3f;
  --accent-soft: #dbf0d5;
  --gold: #c9932e;
  --border: #e6e2d6;

  --font-display: "Fraunces", serif;
  --font-body: "Inter", sans-serif;

  --sidebar-w: 260px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.layout {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wordmark-initial {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wordmark-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  color: var(--ink);
}

.sidenav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 56px;
}

.sidenav-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
}

.sidenav-link:hover,
.sidenav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidenav-num {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink-faint);
}

.sidebar-bottom .tagline {
  font-size: 12.5px;
  color: var(--ink-faint);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Main ---------- */
.main {
  flex: 1;
  min-width: 0;
  padding: 40px 64px 80px;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  margin-bottom: 56px;
}

.resume-btn {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 14.5px;
  padding: 11px 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.resume-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.icon-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-links svg {
  width: 20px;
  height: 20px;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

.icon-links a:hover svg { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 110px;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 20px 40px -20px rgba(33, 31, 26, 0.18);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  display: none;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 600;
  color: var(--accent);
}

.hero-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.pill {
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
}

.hi-bubble {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 56px;
  background: var(--accent-soft);
  color: var(--ink);
  padding: 14px 28px;
  border-radius: 16px;
  margin: 0 0 24px;
}

.hero-text {
  max-width: 620px;
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Sections ---------- */
.section {
  margin-bottom: 96px;
  scroll-margin-top: 40px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  margin: 0 0 32px;
  text-transform: lowercase;
}

.section-num {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
}

.about-text {
  font-size: 16.5px;
  color: var(--ink-soft);
  margin: 0;
}

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.fact-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fact-value {
  font-size: 14.5px;
  color: var(--ink-soft);
}

/* Experience */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.exp-item {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.exp-item:last-child { border-bottom: none; }

.exp-when {
  font-size: 13px;
  color: var(--ink-faint);
  padding-top: 4px;
}

.exp-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
}

.exp-org {
  font-size: 14px;
  color: var(--accent);
  margin: 0 0 12px;
  font-weight: 500;
}

.exp-body ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 15px;
}

.exp-body li { margin-bottom: 6px; }

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

a.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -12px rgba(110, 79, 224, 0.25);
  border-color: var(--accent);
}

.project-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.project-card-head h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin: 0;
}

.project-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.project-link-muted { color: var(--ink-faint); }

.project-card p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 11.5px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
}

.skill-group {
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.skill-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.skill-group p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-faint);
}

.footer .icon-links { gap: 20px; }
.footer .icon-links a { font-size: 13px; color: var(--ink-faint); }
.footer .icon-links a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout { flex-direction: column; }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
  }

  .sidebar-bottom { display: none; }
  .sidenav { flex-direction: row; margin-top: 0; gap: 2px; }
  .sidenav-link { font-size: 13px; padding: 8px; }

  .main { padding: 24px 24px 60px; }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    margin-bottom: 72px;
  }

  .hero-visual { display: flex; justify-content: center; }
  .avatar { width: 150px; aspect-ratio: 4 / 5; }

  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hi-bubble { font-size: 40px; }

  .about-grid { grid-template-columns: 1fr; }
  .exp-item { grid-template-columns: 1fr; gap: 8px; }
  .project-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }

  .footer { flex-direction: column; gap: 12px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Focus visibility */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
