:root {
  --blue: #1d4ed8;
  --blue-dark: #0f2f6f;
  --silver: #d9dee7;
  --white: #ffffff;
  --ink: #0f172a;
  --muted: #52607a;
  --surface: #f5f7fb;
  --surface-alt: #eef2f8;
  --glow: rgba(29, 78, 216, 0.15);
  --hero-bg: url("https://images.unsplash.com/photo-1743090661053-3d1feb2beab7?auto=format&fit=crop&fm=jpg&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&ixlib=rb-4.1.0&q=80&w=2400");
  font-synthesis: none;
}

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

body {
  font-family: "Manrope", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #ffffff 0%, #f2f6fd 45%, #eaf0fb 100%);
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  padding: 24px 6vw;
  gap: 24px;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  z-index: 10;
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav button:hover {
  color: var(--blue);
}

.site-nav button {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background: var(--blue);
  color: var(--white);
  font-weight: 600;
  box-shadow: 0 12px 30px var(--glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  font-family: inherit;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(29, 78, 216, 0.25);
}

.ghost {
  border: 1px solid rgba(29, 78, 216, 0.2);
  color: var(--blue-dark);
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 40px;
  padding: 80px 6vw 60px;
  background-image: linear-gradient(
      120deg,
      rgba(8, 18, 40, 0.88) 0%,
      rgba(8, 18, 40, 0.62) 60%,
      rgba(8, 18, 40, 0.25) 100%
    ),
    var(--hero-bg);
  background-size: cover;
  background-position: center;
  color: #f8fbff;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.8rem;
  color: rgba(214, 231, 255, 0.9);
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.1;
}

.lead {
  font-size: 1.05rem;
  color: rgba(230, 239, 255, 0.8);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.note {
  font-size: 0.95rem;
  color: rgba(230, 239, 255, 0.72);
}

.hero-card {
  position: relative;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.82), rgba(230, 240, 255, 0.78));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  padding: 28px 28px 72px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  color: var(--ink);
}

.hero-card h2 {
  color: #0b1f4a;
}

.hero-card li {
  color: #1f355d;
}

.hero-card .tone-explain {
  position: absolute;
  right: 20px;
  bottom: 20px;
  font-size: 0.85rem;
  padding: 8px 16px;
}

.tone-modal {
  border: none;
  border-radius: 24px;
  padding: 0;
  width: min(96vw, 1080px);
  margin: auto;
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.25);
}

.tone-modal::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.tone-content {
  padding: 28px;
  display: grid;
  gap: 16px;
}

.tone-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.tone-label {
  font-weight: 600;
  color: #0b1f4a;
}

.tone-details {
  background: rgba(245, 247, 251, 0.9);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 0.95rem;
  color: var(--muted);
  display: grid;
  gap: 10px;
}

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

.tone-signal-block p {
  font-weight: 600;
  color: #0b1f4a;
  margin-bottom: 6px;
}

.tone-signal-list {
  margin: 0;
  padding-left: 22px;
}

.tone-signals {
  font-size: 0.85rem;
}

.tone-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tone-chip {
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tone-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.tone-chip.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 24px var(--glow);
}

.hero .ghost {
  border-color: rgba(230, 239, 255, 0.4);
  color: #e6efff;
  background: rgba(15, 23, 42, 0.25);
}

.card-inner h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.card-inner p + h2 {
  margin-top: 18px;
}

.card-inner ul {
  list-style: disc;
  padding-left: 20px;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.section {
  padding: 60px 6vw;
  scroll-margin-top: 110px;
}

.section.alt {
  background: var(--surface);
}

.section-header {
  max-width: 640px;
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--muted);
}

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

.panel {
  background: var(--white);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.panel h3 {
  margin-bottom: 10px;
}

.panel p {
  color: var(--muted);
}

.projects .panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.news-inline {
  margin-top: 16px;
}

.tag {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.12);
  color: var(--blue-dark);
  font-size: 0.8rem;
  font-weight: 600;
}

.contact-modal,
.news-modal,
.project-modal {
  border: none;
  border-radius: 24px;
  padding: 0;
  width: min(90vw, 760px);
  margin: auto;
  box-shadow: 0 30px 80px rgba(8, 18, 40, 0.35);
}

.news-modal {
  width: min(94vw, 980px);
  margin: auto;
}

.contact-modal::backdrop,
.news-modal::backdrop,
.project-modal::backdrop {
  background: rgba(8, 18, 40, 0.6);
  backdrop-filter: blur(4px);
}

.contact-form,
.news-content,
.project-content {
  display: grid;
  gap: 16px;
  padding: 28px;
  background: var(--white);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#project-modal-body {
  white-space: pre-line;
}

#episode-modal-body {
  white-space: pre-line;
}

.modal-links {
  display: grid;
  gap: 10px;
}

.modal-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.modal-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-close {
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: transparent;
  color: var(--ink);
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  cursor: pointer;
}

.contact-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--ink);
}

.contact-form input,
.contact-form textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.news-list {
  list-style: none;
  display: grid;
  gap: 14px;
  padding-left: 0;
}

.news-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.news-list a {
  color: var(--blue-dark);
  font-weight: 600;
  line-height: 1.4;
  display: inline-block;
}

.news-list a:hover {
  color: var(--blue);
}

.news-meta {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.news-tag {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--muted);
  font-weight: 700;
}

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

.source-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.source-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 10px;
}

.source-badge {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.08);
  color: var(--blue-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.source-title {
  color: var(--blue-dark);
  font-weight: 700;
}

.source-title:hover {
  color: var(--blue);
}

.source-blurb {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.site-footer {
  padding: 40px 6vw 60px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--muted);
  font-size: 0.9rem;
}

.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  background: #0b1f4a;
  color: #ffffff;
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
  z-index: 30;
}

@media (min-width: 900px) {
  .cookie-banner {
    width: 50%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

.cookie-banner p {
  margin: 0;
  font-weight: 600;
}

.cookie-close {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #ffffff;
  width: 34px;
  height: 34px;
  font-size: 1.2rem;
  cursor: pointer;
}

.cookie-banner.is-hidden {
  display: none;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: start;
    position: static;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .cta {
    width: 100%;
  }

  .hero {
    padding-top: 50px;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ghost,
  .cta {
    width: 100%;
  }

  .tone-signal-grid {
    grid-template-columns: 1fr;
  }

  .cookie-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
}
