/* ============================================================
   Editorial light theme — cream, navy, gold.
   Palette lives in these variables:
   --neon = primary (navy), --neon2 = gold accent, --neon3 = slate.
   ============================================================ */
:root {
  --bg: #faf7f0;
  --bg-raised: #f3eee3;
  --bg-card: #fffdf8;
  --line: #e3dac9;
  --text: #16233b;
  --text-dim: #5b6473;
  --neon: #1b365d;        /* navy — primary */
  --neon2: #b08437;       /* gold — accent */
  --neon3: #5d7291;       /* slate — tertiary */
  --radius: 4px;
  --font: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 88px 24px 76px;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-glow { display: none; }

/* ---------- FEATURE BANNER ---------- */
.feature-banner {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px 14px;
  padding: 12px 16px; background: var(--neon); color: var(--bg);
  text-decoration: none; text-align: center; font-size: 0.92rem;
}
.feature-banner[hidden] { display: none; }
.feature-kicker { color: var(--neon2); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.feature-text { font-family: var(--serif); font-size: 1.02rem; }
.feature-cta { font-weight: 600; border-bottom: 1px solid var(--neon2); }
.feature-banner:hover .feature-cta { color: var(--neon2); }
.hero-content { position: relative; max-width: 760px; margin: 0 auto; }
.avatar {
  width: 200px; height: 200px; margin: 0 auto 28px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 3.4rem; font-weight: 500;
  color: var(--bg); background: var(--neon);
  border-radius: 50%;
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 1px var(--neon2), 0 14px 36px rgba(22, 35, 59, 0.14);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 7vw, 4.2rem); letter-spacing: -0.02em; line-height: 1.05; }
.tagline {
  margin-top: 12px; font-size: 1.1rem; font-weight: 500; color: var(--text);
}
.school { margin-top: 10px; color: var(--text-dim); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; }
.hero-bio { margin: 20px auto 0; max-width: 640px; color: var(--text-dim); font-size: 1.02rem; }
.hero-actions { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-links { margin-top: 22px; display: flex; gap: 22px; justify-content: center; }
.hero-links a { color: var(--text-dim); text-decoration: none; font-size: 0.92rem; letter-spacing: 0.04em; text-transform: uppercase; }
.hero-links a:hover { color: var(--neon2); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block; padding: 12px 26px;
  border-radius: 2px; font-weight: 500; font-size: 0.98rem;
  text-decoration: none; cursor: pointer; border: none; font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary {
  color: #fff;
  background: var(--neon);
}
.btn-primary:hover { transform: translateY(-2px); background: #142a4a; box-shadow: 0 8px 20px rgba(27, 54, 93, 0.2); }
.btn-ghost { color: var(--text); background: transparent; border: 1px solid #cfc4b0; }
.btn-ghost:hover { border-color: var(--neon); color: var(--neon); }
.btn-large { padding: 16px 40px; font-size: 1.1rem; }
.link-btn { background: none; border: none; color: var(--neon2); cursor: pointer; font: inherit; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ---------- SECTIONS ---------- */
.section { max-width: 1100px; margin: 0 auto; padding: 72px 24px; }
.section-title { font-family: var(--serif); font-weight: 500; font-size: 2.4rem; letter-spacing: -0.01em; }
.section-title::after {
  content: ""; display: block; width: 56px; height: 2px; margin-top: 12px;
  background: var(--neon2);
}
.section-subtitle { color: var(--text-dim); margin: 12px 0 32px; }

/* ---------- FILTER BAR ---------- */

/* ---------- GALLERY ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: #cdbf9f;
  box-shadow: 0 14px 34px rgba(22, 35, 59, 0.10);
}
.card-media { height: 170px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card-media.cover-fallback {
  display: grid; place-items: center; font-size: 3.4rem;
  background: linear-gradient(135deg, #f3ede1, #ebe3d3);
}
.status-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.status-shipped { background: #e7f0e9; color: #2f6b4a; border: 1px solid #b9d3c1; }
.status-in-progress { background: #f7eedb; color: #8a6420; border: 1px solid #e0cb9e; }
.status-concept { background: #e9edf3; color: var(--neon3); border: 1px solid #c7d0de; }
.status-draft { background: #f0ece4; color: var(--text-dim); border: 1px solid var(--line); }

.card-body { padding: 24px; background: #f7f2e8; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-title { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; line-height: 1.2; }
.card-why { color: var(--text-dim); font-size: 0.9rem; flex: 1; }
.card-why strong { color: var(--text); font-weight: 600; }
.card-actions { display: flex; gap: 10px; margin-top: 4px; }
.card-actions .btn { padding: 9px 18px; font-size: 0.88rem; }

/* ---------- BEYOND THE PROJECTS (pillar cards) ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.pillar {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; text-align: center;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.pillar:hover {
  transform: translateY(-4px);
  border-color: #cdbf9f;
  box-shadow: 0 14px 34px rgba(22, 35, 59, 0.10);
}
.pillar-emoji { font-size: 2.2rem; }
.pillar-media {
  height: 300px; margin: -28px -24px 0; border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden; border-bottom: 1px solid var(--line);
}
.pillar-media img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.pillar-media.fit-contain { background: #fff; }
.pillar-media.fit-contain img { object-fit: contain; padding: 18px; box-sizing: border-box; }
.pillar-title { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin-top: 12px; }
.pillar-stat {
  font-family: var(--serif); font-size: 2.8rem; font-weight: 500; margin-top: 10px; line-height: 1;
  color: var(--neon);
}
.pillar-stat-word { font-size: 2.1rem; white-space: nowrap; line-height: 1.33; }
.pillar-stat-label { color: var(--text-dim); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; margin-top: 6px; }
.pillar-bullets { list-style: none; margin-top: 18px; text-align: left; }
.pillar-bullets li {
  color: var(--text-dim); font-size: 0.9rem; padding: 8px 0 8px 22px; position: relative;
  border-top: 1px solid var(--line);
}
.pillar-bullets li::before { content: "▸"; position: absolute; left: 4px; color: var(--neon2); }

/* ---------- TIMELINE ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px;
  background: #d6cbb6;
}
.timeline-item { position: relative; padding: 0 0 26px 12px; }
.timeline-item::before {
  content: ""; position: absolute; left: -28px; top: 7px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--neon2);
}
.timeline-date { font-size: 0.76rem; color: var(--neon2); font-weight: 600; letter-spacing: 0.12em; }
.timeline-text { color: var(--text-dim); font-size: 0.95rem; margin-top: 2px; max-width: 720px; }

/* ---------- CONTACT / FOOTER ---------- */
.contact-section { text-align: center; }
.contact-section .section-title::after { margin-left: auto; margin-right: auto; }
.footer { border-top: 1px solid var(--line); padding: 28px 24px; text-align: center; color: var(--text-dim); font-size: 0.88rem; }

/* ---------- MODALS ---------- */
.modal-backdrop[hidden] { display: none; }
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(22, 35, 59, 0.45); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  position: relative; width: min(680px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: 0 24px 60px rgba(22, 35, 59, 0.25);
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--text-dim);
  font-size: 1.6rem; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--neon2); }
.modal-title { font-family: var(--serif); font-weight: 500; font-size: 1.8rem; margin-bottom: 6px; padding-right: 30px; }
.modal-hint { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 18px; }
.modal-hint code { color: var(--neon2); }
.modal h4 { color: var(--neon2); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 18px 0 6px; }
.modal p { color: var(--text-dim); font-size: 0.95rem; }

/* ---------- ADD FORM ---------- */
#add-form { display: flex; flex-direction: column; gap: 14px; }
#add-form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.85rem; color: var(--text-dim); font-weight: 600; }
#add-form input, #add-form textarea, #add-form select {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font: inherit; font-size: 0.92rem;
}
#add-form input:focus, #add-form textarea:focus, #add-form select:focus {
  outline: none; border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.12);
}
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
#draft-list { margin-top: 20px; }
.draft-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--line); padding: 10px 2px; font-size: 0.9rem;
}
.draft-row .link-btn { font-size: 0.82rem; }
.draft-row .del { color: #b3261e; }

@media (max-width: 560px) {
  .hero { padding-top: 64px; }
  .section { padding: 48px 18px; }
}
