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

:root {
  --sidebar-w: 240px;
  --ink:        #1a1610;
  --paper:      #f5f2ed;
  --accent:     #c8522a;
  --muted:      #9e9890;
  --border:     #dedad3;
}

html { height: 100%; }

body {
  display: flex;
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  height: 100%;
  /* Do NOT set overflow:hidden — the content area scrolls itself */
}

/* ── Sidebar ───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;             /* sticks to viewport */
  position: fixed;
  top: 0; left: 0; bottom: 0;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.75rem;
  z-index: 10;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 3.5rem;
}
.brand-mark { color: var(--accent); font-size: 1rem; }
.brand-name { font-family: 'DM Serif Display', serif; font-size: 1.25rem; color: #fff; letter-spacing: 0.02em; }

.nav-links { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover                { background: rgba(255,255,255,0.06); }
.nav-link.active               { background: var(--accent); }
.nav-number {
  font-size: 0.65rem; color: var(--muted); font-weight: 500;
  letter-spacing: 0.08em; transition: color 0.2s;
}
.nav-label {
  font-size: 0.95rem; color: rgba(255,255,255,0.75);
  font-weight: 400; transition: color 0.2s;
}
.nav-link.active .nav-number,
.nav-link.active .nav-label   { color: #fff; }
.nav-link:hover .nav-label    { color: #fff; }

.sidebar-footer { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.04em; }


/* ── Main Content — scrollable ─────────────────────── */
.content {
  margin-left: var(--sidebar-w);
  flex: 1;

  /* KEY CHANGE: full viewport height, scrollable vertically */
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;

  padding: 4rem 5rem;
  position: relative;
  animation: fadeIn 0.35s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Short pages (Home, About, Contact) are centred vertically.
   Long pages (CT, ML) naturally start at the top and scroll. */
.content-inner {
  max-width: 560px;
  position: relative;
  z-index: 1;
  /* margin: auto centres it when the page has spare vertical space */
  margin-top: auto;
  margin-bottom: auto;
}

/* ── Typography ────────────────────────────────────── */
.page-tag {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1.25rem;
}
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1; color: var(--ink); margin-bottom: 1.75rem;
}
.page-title em { font-style: italic; color: var(--accent); }

.page-body  { font-size: 1.05rem; line-height: 1.75; color: #4a4540; font-weight: 300; margin-bottom: 1.25rem; }
.page-hint  { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.04em; }

.divider { width: 48px; height: 2px; background: var(--border); margin: 2rem 0; }

/* ── Contact list ──────────────────────────────────── */
.contact-list { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-item { display: flex; flex-direction: column; gap: 0.2rem; }
.contact-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 500; }
.contact-value { font-size: 1rem; color: var(--ink); }

/* ── Background shape ──────────────────────────────── */
.bg-shape {
  position: fixed;    /* fixed so it doesn't scroll with content */
  right: -120px; bottom: -120px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,82,42,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Nav section dividers & labels ─────────────────── */
.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0.6rem 0;
}
.nav-section-label {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  padding: 0.25rem 0.75rem 0;
  display: block;
}
