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

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:       #0A0A0A;
  --surface:  #111111;
  --border:   #1E1E1E;
  --text:     #F5F5F5;
  --muted:    #6B6B6B;
  --accent:   #F59E0B;
  --font:     'Inter', system-ui, -apple-system, sans-serif;
  --max:      680px;
  --gap:      1.5rem;
}

/* ─── Base ───────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding: 0 1.25rem;
}

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  max-width: var(--max);
  margin: 0 auto;
}

/* ─── Nav ────────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-name {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  padding: 2.5rem 0 2rem;
}

/* ─── Avatar ─────────────────────────────────────────────── */
.hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
}

.hero-text { flex: 1; }

.avatar {
  display: block;
  width: 130px;
  height: 155px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center 15%;
  background: #1E1E1E;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

@media (max-width: 520px) {
  .hero-inner { flex-direction: column-reverse; gap: 1.5rem; }
  .avatar { width: 100px; height: 120px; }
}

/* ─── Claude Badge ───────────────────────────────────────── */
.claude-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 1rem;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.claude-badge:hover { opacity: 1; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
}

/* ─── Sections ───────────────────────────────────────────── */
section {
  padding: var(--gap) 0;
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

/* ─── Work Grid ──────────────────────────────────────────── */
.work-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.work-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.work-item:last-child { border-bottom: none; }
.work-item:hover .work-name { color: var(--accent); }

.work-col1 {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.work-col2 {
  flex-shrink: 0;
  text-align: right;
}

.work-sub {
  font-size: 0.83rem;
  color: var(--muted);
}

.work-role {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

/* legacy — kept for safety */
.work-main { display: contents; }

.work-name {
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.work-name .arrow {
  font-size: 0.75rem;
  color: var(--muted);
  transition: color 0.15s;
}

.work-item:hover .arrow { color: var(--accent); }

.work-desc {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
  flex-shrink: 0;
}

/* ─── Background List ────────────────────────────────────── */
.bg-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bg-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.bg-list li:last-child { border-bottom: none; }

.bg-list .role { color: var(--text); }
.bg-list .org  { color: var(--muted); font-size: 0.85rem; text-align: right; }

/* ─── Education ──────────────────────────────────────────── */
.edu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.edu-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.edu-list li:last-child { border-bottom: none; }

.edu-list .degree { color: var(--text); }
.edu-list .school { color: var(--muted); font-size: 0.85rem; text-align: right; }

/* ─── Writing Page ───────────────────────────────────────── */
.writing-empty {
  padding: 4rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: opacity 0.15s;
}

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

.post-item:hover .post-title { color: var(--accent); }

.post-title {
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s;
}

.post-date {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-note {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-note a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-note a:hover { color: var(--accent); }

.footer-built {
  font-size: 0.78rem;
  color: var(--border);
}

/* ─── Utility ────────────────────────────────────────────── */
a { color: inherit; }

.amber { color: var(--accent); }

.lang-line {
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.5rem 0;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 520px) {
  .work-item, .bg-list li, .edu-list li {
    flex-direction: column;
    gap: 0.2rem;
  }
  .work-desc, .bg-list .org, .edu-list .school {
    text-align: left;
  }
  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
