:root {
  --bg: #f8f8fa;
  --card: #ffffff;
  --alt: #f5f5f7;
  --text: #1f2133;
  --muted: #636579;
  --blue: #1f448a;
  --blue-dark: #18366f;
  --border: #e7e8ee;
  --gold: #c8a24d;
  --shadow: 0 8px 24px rgba(20, 21, 31, 0.04);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", Arial, sans-serif;
  line-height: 1.8;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

.site-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 28px 80px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: stretch;
  margin-bottom: 44px;
}

.hero-text {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 42px;
  box-shadow: var(--shadow);
}

.hero-badge {
  display: inline-block;
  background: #e7edf8;
  color: var(--blue);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0 0 14px;
  font-family: "DM Serif Text", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.08;
  color: var(--text);
}

.hero-tagline {
  margin: 0 0 18px;
  font-family: "DM Serif Text", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  color: #c53838;
}

.hero-intro {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 60ch;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-block;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.button:hover,
.button:focus {
  text-decoration: none;
  transform: translateY(-1px);
}

.button-primary {
  background: var(--blue);
  color: #ffffff;
}

.button-primary:hover,
.button-primary:focus {
  background: var(--blue-dark);
  color: #ffffff;
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid #cfd3de;
}

.button-secondary:hover,
.button-secondary:focus {
  background: #f2f4f8;
  color: var(--text);
}

.hero-panel {
  background: linear-gradient(180deg, var(--blue) 0%, #173362 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: 0 10px 26px rgba(20, 21, 31, 0.08);
}

.hero-panel h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-family: "DM Serif Text", Georgia, serif;
  font-size: 1.8rem;
}

.hero-panel-list {
  margin: 0;
  padding-left: 1.2rem;
}

.hero-panel-list li {
  margin-bottom: 10px;
  color: rgba(255,255,255,0.92);
}

/* Sections */
.section {
  padding: 18px 0 26px;
}

.section-heading {
  margin-bottom: 20px;
  max-width: 780px;
}

.section-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue);
  margin-bottom: 8px;
}

.section h2 {
  margin: 0;
  font-family: "DM Serif Text", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.2;
}

/* Cards */
.content-card,
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: 0 6px 18px rgba(20, 21, 31, 0.04);
}

.narrative-card p,
.content-card p,
.project-card p {
  color: var(--muted);
  margin-top: 0;
}

.narrative-card p:last-child,
.content-card p:last-child,
.project-card p:last-child {
  margin-bottom: 0;
}

.card-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Project groups */
.project-groups {
  display: grid;
  gap: 28px;
}

.project-group h3 {
  margin-top: 0;
  margin-bottom: 14px;
  font-family: "DM Serif Text", Georgia, serif;
  font-size: 1.6rem;
  color: var(--text);
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gold);
}

.project-card h4 {
  margin-top: 4px;
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.project-card h4 a {
  color: var(--text);
}

.project-card h4 a:hover,
.project-card h4 a:focus {
  color: var(--blue);
  text-decoration: none;
}

/* Status */
.status-banner {
  background: #eef3fb;
  color: var(--text);
  border: 1px solid #d9e2f4;
  border-radius: var(--radius-md);
  padding: 18px 22px;
}

/* Responsive */
@media (max-width: 980px) {
  .hero,
  .card-grid,
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-shell {
    padding: 24px 18px 60px;
  }

  .hero-text,
  .hero-panel,
  .content-card,
  .project-card {
    padding: 22px;
  }

  .hero-buttons .button {
    width: 100%;
    text-align: center;
  }
}
.project-shell {
  max-width: 980px;
}

.project-article {
  background: #ffffff;
  border: 1px solid #e7e8ee;
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 8px 24px rgba(20, 21, 31, 0.04);
}

.project-hero {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e7e8ee;
}

.project-badge {
  display: inline-block;
  background: #e7edf8;
  color: #1f448a;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.project-hero h1 {
  margin: 0 0 14px;
  font-family: "DM Serif Text", Georgia, serif;
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  line-height: 1.1;
  color: #1f2133;
}

.project-subtitle {
  font-family: "DM Serif Text", Georgia, serif;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.6;
  color: #c53838;
  margin-bottom: 18px;
}

.project-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: #636579;
  font-size: 0.98rem;
}

.project-article h2,
.project-article h3,
.project-article h4 {
  font-family: "DM Serif Text", Georgia, serif;
  color: #1f2133;
}

.project-article h2 {
  margin-top: 2.2rem;
  margin-bottom: 0.7rem;
  font-size: 2rem;
}

.project-article h3 {
  margin-top: 1.7rem;
  margin-bottom: 0.55rem;
  font-size: 1.45rem;
}

.project-article p,
.project-article li {
  color: #636579;
  line-height: 1.85;
}

.project-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0 1.8rem;
  background: #ffffff;
  border: 1px solid #e7e8ee;
  border-radius: 14px;
  overflow: hidden;
}

.project-article th,
.project-article td {
  padding: 12px 14px;
  border-bottom: 1px solid #e7e8ee;
  text-align: left;
}

.project-article th {
  background: #f5f5f7;
  color: #1f2133;
}

.project-article pre {
  background: #14151f;
  color: #f5f7fb;
  padding: 18px;
  border-radius: 14px;
  overflow-x: auto;
  line-height: 1.6;
}

.project-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.project-article pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.project-article :not(pre) > code {
  background: #eef3fb;
  color: #1f448a;
  padding: 0.15em 0.4em;
  border-radius: 6px;
}

.project-article hr {
  border: 0;
  border-top: 1px solid #e7e8ee;
  margin: 2rem 0;
}

.project-article blockquote {
  margin: 1.6rem 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid #c8a24d;
  background: #faf8f2;
  color: #4f5263;
}

@media (max-width: 768px) {
  .project-article {
    padding: 24px;
  }

  .project-meta {
    flex-direction: column;
    gap: 8px;
  }
}

/* =========================
   Top site navigation
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(248, 246, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(40, 52, 64, 0.08);
}

.site-header-inner {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.95rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.site-brand {
  font-family: "DM Serif Text", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--ink, #1f2a33);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-brand:hover,
.site-brand:focus {
  color: var(--accent, #8b1e2d);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-list li {
  margin: 0;
  padding: 0;
}

.nav-list a,
.nav-list summary {
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent, #8b1e2d);
  text-decoration: none;
  cursor: pointer;
  list-style: none;
}

.nav-list a:hover,
.nav-list a:focus,
.nav-list summary:hover,
.nav-list summary:focus {
  color: var(--ink, #1f2a33);
  text-decoration: none;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown details {
  position: relative;
}

.nav-dropdown summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  content: "▾";
  font-size: 0.8em;
  line-height: 1;
}

.dropdown-menu {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0.5rem;
  min-width: 190px;
  background: #ffffff;
  border: 1px solid rgba(40, 52, 64, 0.08);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(25, 35, 45, 0.10);
  position: absolute;
  right: 0;
}

.dropdown-menu li + li {
  margin-top: 0.2rem;
}

.dropdown-menu a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  color: var(--ink, #1f2a33);
  font-weight: 500;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background: rgba(139, 30, 45, 0.08);
  color: var(--accent, #8b1e2d);
}

@media (max-width: 820px) {
  .site-header-inner {
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
  }

  .nav-list {
    width: 100%;
    gap: 0.55rem 1rem;
  }

  .dropdown-menu {
    position: static;
    margin-top: 0.5rem;
    box-shadow: none;
  }
}
