/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --bg:             #FAFAF8;
  --bg-surface:     #F0EDE6;
  --bg-hover:       #EAE6DD;
  --border:         #E2DDD5;
  --text:           #1C1C1E;
  --text-sec:       #6B6B6B;
  --text-light:     #9A9A9A;
  --accent:         #1C3557;
  --accent-tint:    rgba(28, 53, 87, 0.06);
  --gold:           #C4A55A;
  --gold-tint:      rgba(196, 165, 90, 0.1);
  --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:      'Fira Code', 'SF Mono', monospace;
  --transition:     0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
  --sidebar-w:      340px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img  { display: block; width: 100%; height: 100%; object-fit: cover; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }

/* ── Base ──────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-sec);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Cursor spotlight glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    500px at var(--mouse-x, -999px) var(--mouse-y, -999px),
    rgba(28, 53, 87, 0.04),
    transparent 80%
  );
}

/* ── Layout ────────────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 0;
  position: relative;
  z-index: 1;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 96px 0 96px;
  display: flex;
  flex-direction: column;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.sidebar-top { flex: 1; }

/* Name & role */
.site-name {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
}

.site-role {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 16px;
}

.site-tagline {
  font-size: 0.9rem;
  color: var(--text-sec);
  max-width: 260px;
  line-height: 1.6;
  margin-bottom: 48px;
}

/* Nav */
.sidebar-nav ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.nav-line {
  display: block;
  height: 1px;
  width: 32px;
  background: var(--border);
  transition: width var(--transition), background var(--transition);
}

.nav-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  transition: color var(--transition);
}

.nav-item:hover .nav-line,
.nav-item.active .nav-line {
  width: 64px;
  background: var(--text);
}

.nav-item:hover .nav-label,
.nav-item.active .nav-label {
  color: var(--text);
}

.nav-item.active .nav-line { background: var(--accent); }
.nav-item.active .nav-label { color: var(--accent); }

/* Social links */
.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 20px;
}

.social-link {
  color: var(--text-light);
  transition: color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
}

.social-link:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

/* ── Main content ──────────────────────────────────────────── */
.content {
  flex: 1;
  padding: 96px 0 96px 80px;
  min-width: 0;
}

section {
  margin-bottom: 96px;
}

/* ── Section headings ──────────────────────────────────────── */
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 40px;
  white-space: nowrap;
}

.section-heading::after {
  content: '';
  display: block;
  height: 1px;
  width: 100%;
  background: var(--border);
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 400;
}

/* ── About ─────────────────────────────────────────────────── */
.about-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 1rem;
  color: var(--text-sec);
  max-width: 600px;
}

.about-body p { line-height: 1.75; }

.inline-link {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.inline-link:hover { border-bottom-color: var(--accent); }

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

.exp-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 20px;
  border-radius: 4px;
  transition: background var(--transition), box-shadow var(--transition);
  cursor: default;
}

.exp-card:hover {
  background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--border);
}

.exp-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-light);
  padding-top: 4px;
  white-space: nowrap;
  text-transform: uppercase;
}

.exp-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.exp-company {
  color: var(--accent);
  transition: opacity var(--transition);
}
.exp-company:hover { opacity: 0.75; }

.ext-icon {
  font-size: 0.75rem;
  font-style: normal;
}

.exp-desc {
  font-size: 0.9rem;
  color: var(--text-sec);
  line-height: 1.7;
  margin-bottom: 14px;
}

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

.tag-list li,
.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid rgba(28, 53, 87, 0.15);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* ── Project cards ─────────────────────────────────────────── */
.project-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.project-card {
  padding: 20px;
  border-radius: 4px;
  transition: background var(--transition), box-shadow var(--transition);
  cursor: default;
}

.project-card:hover {
  background: var(--bg-surface);
  box-shadow: 0 0 0 1px var(--border);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

.project-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--text-light);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.2); }
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-sec);
}

/* ── Life / photos ─────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 180px 180px;
  gap: 8px;
  margin-bottom: 36px;
  border-radius: 4px;
  overflow: hidden;
}

.photo-cell {
  overflow: hidden;
  background: var(--bg-surface);
}

.photo-cell img {
  transition: transform 0.5s ease, opacity 0.3s;
  opacity: 0.88;
}

.photo-cell:hover img {
  transform: scale(1.05);
  opacity: 1;
}

.cell-tall { grid-row: span 2; }

/* Interest tags */
.interests {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  padding-top: 48px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-domain { color: var(--gold); }

/* ── Reveal animation ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--transition), transform 0.5s var(--transition);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1080px) {
  :root { --sidebar-w: 280px; }
  .site-name { font-size: 2rem; }
  .content { padding-left: 48px; }
}

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
    padding: 0 20px;
  }

  .sidebar {
    width: 100%;
    position: static;
    height: auto;
    padding: 64px 0 40px;
  }

  .sidebar-nav { display: none; } /* nav becomes page scroll on mobile */
  .sidebar-inner { gap: 32px; }

  .content {
    padding: 0 0 64px;
  }

  .exp-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .photo-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 160px 160px 160px;
  }
  .cell-tall { grid-row: span 1; }

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

@media (max-width: 480px) {
  .photo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 180px);
  }
  .site-name { font-size: 1.75rem; }
}
