/* ===================== TOKENS ===================== */
:root {
  --max-width: 1080px;

  /* Rafflesia palette */
  --ink:    #1a1413;   /* near-black, warm */
  --paper:  #ffffff;
  --band:   #f6efe9;   /* warm cream band */
  --accent: #b5261e;   /* rafflesia crimson */
  --accent-dark: #7f1a13;
  --muted:  #6d635f;
  --line:   #e7ddd5;

  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.center { text-align: center; }

/* ===================== NAV ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.15s;
}

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

/* ===================== HERO ===================== */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  height: clamp(360px, 48vh, 460px);
}

.hero-panel {
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(1.5rem, 5vw, 5rem);
}

.hero-kicker {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.hero-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero-tagline {
  margin-top: 1.25rem;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  opacity: 0.92;
}

.hero-photo {
  background: var(--accent);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  overflow: hidden;
}

.hero-photo img {
  height: 100%;
  width: auto;
  object-fit: cover;
  object-position: center top;
}

.photo-placeholder {
  color: var(--muted);
  font-family: var(--display);
  letter-spacing: 0.1em;
}

/* ===================== SECTIONS ===================== */
.section { padding: 4.5rem 0; }
.section--alt { background: var(--band); }

.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
  position: relative;
  padding-bottom: 0.6rem;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3rem;
  height: 4px;
  background: var(--accent);
}

.center .section-title { display: inline-block; }
.center .section-title::after { left: 50%; transform: translateX(-50%); }

.section p { margin-bottom: 1rem; max-width: 70ch; }
.center p { margin-left: auto; margin-right: auto; }

.lead { font-size: 1.25rem; color: var(--ink); }

/* ===================== INTRO / CTAs ===================== */
.cta-row {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

/* ===================== BUTTONS ===================== */
.button {
  display: inline-block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: 2px solid var(--accent);
  border-radius: 2px;
  transition: background 0.15s, color 0.15s;
}

.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.button--ghost {
  background: transparent;
  color: var(--accent);
}

.button--ghost:hover { background: var(--accent); color: #fff; }

/* ===================== GALLERY STRIP ===================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.gallery-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--band);
  border-right: 2px solid var(--paper);
  overflow: hidden;
  margin: 0;
}

.gallery-cell:last-child { border-right: none; }

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

.gallery-cell figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 0.9rem 0.7rem;
  color: #fff;
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0));
}

/* ===================== CARDS (projects) ===================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

.card-media {
  aspect-ratio: 16 / 10;
  background: var(--band);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.card-media img { width: 100%; height: 100%; object-fit: cover; }

.card h3 { font-family: var(--display); font-size: 1.15rem; margin: 1.1rem 1.1rem 0.4rem; }
.card p { margin: 0 1.1rem 1rem; max-width: none; }

/* ===================== ENTRIES (exp/edu) ===================== */
.entry { margin-bottom: 2rem; }
.entry h3 { font-family: var(--display); font-size: 1.2rem; margin-bottom: 0.25rem; }

.meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.6rem; }

/* ===================== SKILLS ===================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.skills-grid h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.skills-grid p { max-width: none; }

/* ===================== CONTACT ===================== */
.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 1.05rem;
}

.contact-list a { color: var(--accent); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* ===================== FOOTER ===================== */
.site-footer {
  background: var(--ink);
  color: #cdbfb8;
  padding: 2rem 0;
  font-size: 0.9rem;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; height: auto; }
  .hero-photo { min-height: 340px; order: -1; justify-content: center; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .nav { justify-content: center; }
}
