@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #14181F;
  --bg-raised: #1B212B;
  --text: #EDEAE3;
  --text-dim: #9CA3AF;
  --accent: #5FB8A8;
  --accent-bright: #7FD4C4;
  --amber: #E8A33D;
  --coral: #E2725B;
  --border: #2A3140;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-bright);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

/* ---- Nav ---- */
.nav-shell {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 24, 31, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-prompt {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--amber);
  font-weight: 600;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  font-family: var(--mono);
  font-size: 0.88rem;
}

.nav-links a {
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-bright);
  background: rgba(95, 184, 168, 0.1);
}

.nav-links .sep {
  color: var(--border);
  align-self: center;
}

/* ---- Layout shells ---- */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.page-narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px 24px;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.82rem;
}

/* ---- Hero ---- */
.hero {
  padding: 88px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 1.0;
  filter: blur(2px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(95, 184, 168, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(20, 24, 31, 0.25) 0%, rgba(20, 24, 31, 0.65) 75%, var(--bg) 100%);
  pointer-events: none;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
}

.motd {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 0.82rem;
  max-width: 520px;
  margin: 0 auto 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  text-align: left;
  background: var(--bg-raised);
  position: relative;
  z-index: 2;
}

.motd .line {
  white-space: pre;
}

.motd .prompt-char {
  color: var(--amber);
}

.tagline {
  font-family: var(--mono);
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.3em;
  position: relative;
  z-index: 2;
}

.tagline .accent {
  color: var(--amber);
}

.subtagline {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ---- Cards / grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.person-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.person-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.person-card img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 2px solid var(--border);
}

.person-card h3 {
  margin-bottom: 4px;
}

.person-card .role {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Section heading ---- */
.section-eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.4em;
}

/* ---- Person page ---- */
.person-header {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.person-header img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  flex-shrink: 0;
}

.person-header .info h1 {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.person-header .info .tag {
  font-family: var(--mono);
  color: var(--coral);
  font-size: 0.9rem;
}

/* ---- Husband's series gallery ---- */
.husbands-intro {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--coral);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 40px;
  color: var(--text-dim);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}

.gallery-item {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  display: block;
  cursor: zoom-in;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  cursor: zoom-out;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-family: var(--mono);
  color: var(--text);
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---- Photo strip (sprinkled photos) ---- */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.photo-strip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}

/* ---- Quote board ---- */
.quote-form {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 40px;
}

.quote-form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  margin-top: 16px;
}

.quote-form label:first-of-type {
  margin-top: 0;
}

.quote-form input,
.quote-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 1rem;
}

.quote-form textarea {
  min-height: 80px;
  resize: vertical;
}

.btn {
  font-family: var(--mono);
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  cursor: pointer;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.92rem;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--accent-bright);
}

.btn-coral {
  background: var(--coral);
}

.btn-coral:hover {
  background: #ea8a76;
}

.quote-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quote-item {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  padding: 18px 22px;
}

.quote-item .quote-text {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.quote-item .quote-text::before {
  content: "\201C";
  color: var(--amber);
}

.quote-item .quote-text::after {
  content: "\201D";
  color: var(--amber);
}

.quote-item .quote-meta {
  font-family: var(--mono);
  color: var(--text-dim);
  font-size: 0.8rem;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  font-family: var(--mono);
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.flash {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: rgba(232, 163, 61, 0.12);
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.login-box {
  max-width: 380px;
  margin: 64px auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}

.logout-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

@media (max-width: 600px) {
  .person-header {
    flex-direction: column;
    text-align: center;
  }
  .nav-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
