@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&display=swap');

/* ── Palette ──────────────────────────────────────────────── */
:root {
  --bg:           #FFF8F0;
  --surface:      #F5EAD8;
  --text:         #4B2E2B;
  --text-muted:   #8C5A3C;
  --accent:       #C08552;
  --border:       #E8D5BE;
}

[data-theme="dark"] {
  --bg:           #1A0C08;
  --surface:      #261510;
  --text:         #FFF8F0;
  --text-muted:   #C4A882;
  --accent:       #C08552;
  --border:       #3D2015;
}

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

html { font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ──────────────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-tab {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text-muted);
  padding: 8px 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.nav-tab:hover {
  color: var(--text);
  text-decoration: none;
  opacity: 1;
}

.nav-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

/* Theme toggle */
.theme-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.theme-btn:hover {
  color: var(--text);
  background: var(--surface);
}

/* ── Main content ─────────────────────────────────────────── */
.main {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 40px 80px;
}

/* ── Typography ───────────────────────────────────────────── */
h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

p {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.75;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Me page ──────────────────────────────────────────────── */
.me-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 24px;
  display: block;
  border: 2px solid var(--border);
}

.me-name {
  margin-bottom: 6px;
}

.me-role {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-weight: 400;
}

.me-bio {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
}

.divider {
  height: 1px;
  background: var(--border);
  border: none;
  margin: 40px 0;
  transition: background 0.25s ease;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Experience items on /me */
.exp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.exp-item {
  display: flex;
  gap: 14px;
}

.exp-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-top: 7px;
}

.exp-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
  display: block;
}

.exp-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Social links */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 40px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: transparent;
  opacity: 1;
  text-decoration: none;
}

.social-link svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Item list (build + write) ────────────────────────────── */
.page-intro {
  margin-bottom: 48px;
}

.page-intro h1 {
  margin-bottom: 8px;
}

.page-intro p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.item {
  display: flex;
  gap: 16px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.35s ease forwards;
}

.item:nth-child(1) { animation-delay: 0.04s; }
.item:nth-child(2) { animation-delay: 0.10s; }
.item:nth-child(3) { animation-delay: 0.16s; }
.item:nth-child(4) { animation-delay: 0.22s; }
.item:nth-child(5) { animation-delay: 0.28s; }
.item:nth-child(6) { animation-delay: 0.34s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.item-bullet {
  margin-top: 6px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.item-content { flex: 1; }

/* Clickable card wrapper */
.item-card {
  flex: 1;
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 10px 12px;
  margin: -10px -12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.item-card:hover {
  transform: translateY(-2px);
  border-color: var(--border);
  box-shadow: 0 4px 18px rgba(192, 133, 82, 0.09);
  text-decoration: none;
  opacity: 1;
  animation: cardFlicker 0.22s ease forwards;
}

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

@keyframes cardFlicker {
  0%   { background: transparent; }
  30%  { background: rgba(192, 133, 82, 0.11); }
  65%  { background: rgba(192, 133, 82, 0.05); }
  100% { background: var(--surface); }
}

.item-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  text-decoration: none;
  transition: color 0.2s;
}

.item-title:hover {
  color: var(--accent);
  text-decoration: none;
  opacity: 1;
}

.item-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.tag {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 1px 6px;
  border-radius: 3px;
  opacity: 0.7;
  line-height: 1.8;
}

/* ── Gallery ──────────────────────────────────────────────── */
.gallery-empty {
  margin-top: 80px;
  text-align: center;
}

.gallery-empty p {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
  font-family: 'Playfair Display', serif;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
  nav { padding: 0 20px; }
  .nav-tab { padding: 8px 10px; font-size: 0.8125rem; }
  .main { padding: 48px 20px 64px; }
  h1 { font-size: 1.6rem; }
}
