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

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

:root {
  --bg: #F4EFE6;
  --bg-card: #FFFFFF;
  --ink: #1A1A2E;
  --ink-muted: #5A5A72;
  --accent: #B84033;
  --accent-light: #D4574A;
  --border: #D8D0C4;
  --nav-bg: #1A1A2E;
  --nav-text: #F4EFE6;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── NAV ─────────────────────────────────────────────────────────────── */
nav {
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--nav-text);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.nav-logo span {
  color: var(--accent-light);
}

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

.nav-links a {
  color: rgba(244,239,230,0.75);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--nav-text);
  background: rgba(255,255,255,0.08);
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ── LAYOUT ──────────────────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  width: 100%;
}

/* ── HERO ────────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
}

.hero-text h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.hero-text h1 em {
  font-style: italic;
  color: var(--accent);
}

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

.hero-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  background-color: var(--bg);
}

.hero-cartoon {
  width: 390px;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
}

/* ── NAV CARDS ───────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(26,26,46,0.12);
  border-color: transparent;
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.card-desc {
  font-size: 0.83rem;
  color: var(--ink-muted);
  font-weight: 300;
  line-height: 1.5;
}

/* ── PAGE HEADERS ────────────────────────────────────────────────────── */
.page-header {
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.page-header .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.6rem;
  display: block;
}

.page-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink);
}

/* ── PROSE ───────────────────────────────────────────────────────────── */
.prose p {
  color: var(--ink-muted);
  font-weight: 300;
  line-height: 1.8;
  margin-bottom: 1.2rem;
  font-size: 1.02rem;
}

.prose p:last-child { margin-bottom: 0; }

/* ── CV TABLE ────────────────────────────────────────────────────────── */
.cv-section {
  margin-bottom: 2.5rem;
}

.cv-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

.cv-entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cv-entry:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.cv-year {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding-top: 0.1rem;
}

.cv-entry h3 {
  font-weight: 500;
  font-size: 0.98rem;
  margin-bottom: 0.3rem;
  color: var(--ink);
}

.cv-entry p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  font-weight: 300;
  line-height: 1.6;
}

/* ── PROJECTS ────────────────────────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
}

.project-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  font-weight: 300;
  line-height: 1.6;
}

/* ── LINKS LIST ──────────────────────────────────────────────────────── */
.links-list {
  list-style: none;
}

.links-list li {
  border-bottom: 1px solid var(--border);
}

.links-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}

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

.links-list .link-arrow {
  color: var(--border);
  font-size: 1.1rem;
  transition: color 0.2s, transform 0.2s;
}

.links-list a:hover .link-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ── CONTACT ─────────────────────────────────────────────────────────── */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
  max-width: 520px;
}

.contact-box p {
  color: var(--ink-muted);
  font-weight: 300;
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.contact-email:hover { color: var(--accent-light); }

/* ── FOOTER ──────────────────────────────────────────────────────────── */
footer {
  background: var(--nav-bg);
  color: rgba(244,239,230,0.5);
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

footer a { color: rgba(244,239,230,0.6); text-decoration: none; }
footer a:hover { color: var(--nav-text); }

/* ── ANIMATIONS ──────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.5s ease both;
}

.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.12s; }
.fade-up-3 { animation-delay: 0.19s; }
.fade-up-4 { animation-delay: 0.26s; }
.fade-up-5 { animation-delay: 0.33s; }
.fade-up-6 { animation-delay: 0.40s; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-text p { max-width: 100%; }
  .hero-badge { flex-direction: row; justify-content: center; }

  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr; }

  .cv-entry { grid-template-columns: 1fr; gap: 0.25rem; }
  .cv-year { font-size: 0.75rem; }

  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 1rem; font-size: 0.88rem; }
}

@media (max-width: 420px) {
  .card-grid { grid-template-columns: 1fr; }
}
