@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Karla:wght@300;400;500;600&display=swap');

:root {
  --font-heading: 'EB Garamond', Georgia, serif;
  --font-body: 'Karla', Helvetica, sans-serif;
  --text: #1a1a1a;
  --text-light: #666;
  --bg: #fff;
  --border: #e0e0e0;
  --max-w: 820px;
  --nav-h: 56px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

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

/* ════════════════════════════════════
   NAV — solid (default, inner pages)
   ════════════════════════════════════ */

header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.site-name {
  font-family: var(--font-heading);
  font-size: 1.3rem; font-weight: 500;
  letter-spacing: 0.02em;
}

nav { display: flex; gap: 26px; }

nav a {
  font-family: var(--font-body);
  font-size: 0.78rem; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-light);
  position: relative;
}

nav a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px; background: var(--text);
  transition: width 0.25s;
}

nav a:hover { color: var(--text); }
nav a:hover::after, nav a.active::after { width: 100%; }
nav a.active { color: var(--text); }

/* ── NAV — homepage transparent overlay ── */

body.page-home header { background: transparent; border-color: transparent; }
body.page-home .site-name { color: #fff; }
body.page-home .site-name:hover { color: rgba(255,255,255,.7); }
body.page-home nav a { color: rgba(255,255,255,.65); }
body.page-home nav a:hover { color: #fff; }
body.page-home nav a::after { background: #fff; }
body.page-home .hamburger span { background: #fff; }

/* ── Hamburger ── */

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.hamburger span { width: 22px; height: 1.5px; background: var(--text); }

.mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--bg); z-index: 200;
  flex-direction: column; align-items: center; justify-content: center; gap: 28px;
}
.mobile-overlay.open { display: flex; }
.mobile-overlay a {
  font-family: var(--font-heading); font-size: 1.6rem; color: var(--text);
}
.mobile-overlay .close-btn {
  position: absolute; top: 16px; right: 40px;
  font-size: 2rem; cursor: pointer; background: none; border: none;
  color: var(--text); font-weight: 300;
}

/* ════════════════════════════════════
   HOMEPAGE — full-bleed hero
   ════════════════════════════════════ */

.hero {
  width: 100%; height: 100vh;
  position: relative; overflow: hidden; background: #111;
}

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

.hero-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.2);
  font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
}

.hero-caption {
  position: absolute; bottom: 24px; left: 40px;
  font-size: 0.78rem; font-style: italic;
  color: rgba(255,255,255,.5);
}

/* ════════════════════════════════════
   WORK — project grid
   ════════════════════════════════════ */

.work-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) 40px 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.work-item {
  display: block;
}

.work-item img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; display: block;
  transition: opacity 0.3s;
}

.work-item:hover img { opacity: 0.85; }

/* placeholder box when no image yet */
.work-thumb-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: #eee;
  display: flex; align-items: center; justify-content: center;
  color: #bbb; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
}

.work-item-title {
  font-family: var(--font-heading);
  font-size: 0.95rem; font-weight: 400;
  margin-top: 10px; color: var(--text);
}

/* ════════════════════════════════════
   PROJECT PAGE — image stack
   ════════════════════════════════════ */

.project-page {
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 40px) 40px 80px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.8rem; font-weight: 400;
  margin-bottom: 36px;
}

.project-image {
  margin-bottom: 40px;
}

.project-image img {
  width: 100%; display: block;
}

.project-image-placeholder {
  width: 100%; aspect-ratio: 3/2;
  background: #eee;
  display: flex; align-items: center; justify-content: center;
  color: #bbb; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
}

.project-image figcaption {
  font-size: 0.8rem; color: var(--text-light);
  margin-top: 8px; font-style: italic;
}

/* ════════════════════════════════════
   CV PAGE
   ════════════════════════════════════ */

.cv-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 50px) 40px 80px;
}

.cv-header { margin-bottom: 40px; }

.cv-header .subtitle {
  font-size: 0.88rem; color: var(--text-light); line-height: 1.8;
}

.cv-section { margin-bottom: 36px; }

.cv-section h2 {
  font-family: var(--font-heading);
  font-size: 1.12rem; font-weight: 700;
  margin-bottom: 12px;
}

.cv-entry {
  margin-bottom: 5px; font-size: 0.86rem; line-height: 1.75;
}

.cv-entry .year {
  display: inline-block; min-width: 68px;
  color: var(--text-light); font-variant-numeric: tabular-nums;
}

.cv-entry em { font-style: italic; }

.cv-list-inline { font-size: 0.86rem; line-height: 1.85; }


/* ════════════════════════════════════
   CONTACT PAGE
   ════════════════════════════════════ */

.contact-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 60px) 40px 80px;
}

.contact-page h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem; font-weight: 400;
  margin-bottom: 12px;
}

.contact-page h2 a { border-bottom: 1px solid transparent; }
.contact-page h2 a:hover { border-bottom-color: var(--text); }

/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */

@media (max-width: 720px) {
  header { padding: 0 20px; }
  nav { display: none; }
  .hamburger { display: flex; }

  .work-grid {
    grid-template-columns: 1fr;
    padding: calc(var(--nav-h) + 30px) 20px 60px;
  }

  .project-page, .cv-page, .contact-page {
    padding-left: 20px; padding-right: 20px;
  }

  .hero-caption { left: 20px; bottom: 20px; }

  .cv-entry .year { display: block; min-width: unset; }
}
