:root {
  --page-bg: #0d1118;
  --panel-bg: linear-gradient(160deg, rgba(8, 18, 29, 0.92), rgba(10, 28, 42, 0.68));
  --edge: rgba(145, 232, 255, 0.2);
  --text: rgba(245, 249, 255, 0.95);
  --soft: rgba(216, 228, 240, 0.8);
  --accent: rgba(145, 239, 255, 0.84);
  --serif: "Baskerville Old Face", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
}

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

html, body { margin: 0; min-height: 100%; }

body.view-project-body {
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(73, 136, 186, 0.16), transparent 36%),
    radial-gradient(circle at bottom right, rgba(24, 86, 92, 0.16), transparent 28%),
    var(--page-bg);
  overflow-x: hidden;
}

#project-bubbles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

#project-bubbles::before,
#project-bubbles::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.46;
  background-repeat: no-repeat;
}

#project-bubbles::before {
  background-image:
    radial-gradient(circle at 20% 22%, rgba(119, 223, 255, 0.16), transparent 22%),
    radial-gradient(circle at 76% 28%, rgba(152, 196, 255, 0.12), transparent 18%),
    radial-gradient(circle at 68% 82%, rgba(33, 188, 174, 0.12), transparent 18%);
}

#project-bubbles::after {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900'%3E%3Cpath d='M72 240c160-101 317-129 476-38 93 53 168 116 298 92 98-18 175-76 286-106 143-39 281-16 432 86' fill='none' stroke='rgba(126,230,255,0.18)' stroke-width='2'/%3E%3Cpath d='M70 642c128-40 241-35 344 21 91 49 174 82 275 66 90-14 161-54 227-102 117-84 259-101 610-25' fill='none' stroke='rgba(160,206,255,0.14)' stroke-width='2'/%3E%3C/svg%3E");
  background-size: cover;
}

.project-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.project-topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.project-topbar a {
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(139, 226, 255, 0.12), transparent 28%),
    radial-gradient(circle at 80% 78%, rgba(64, 131, 255, 0.12), transparent 24%),
    var(--panel-bg);
  box-shadow: 0 28px 72px rgba(2, 9, 19, 0.46);
  backdrop-filter: blur(18px);
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.project-copy-panel,
.project-fact-panel,
.spread { padding: 28px 26px; }

.project-kicker,
.spread-eyebrow {
  margin: 0 0 12px;
  color: rgba(164, 224, 242, 0.72);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-copy-panel h1,
.project-fact-panel h2,
.spread h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.project-copy-panel h1 {
  max-width: 10ch;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.92;
}

.project-summary,
.fact-grid dd,
.spread p,
.content-list li {
  color: var(--soft);
  font-size: 1rem;
  line-height: 1.66;
}

.project-summary { max-width: 52ch; margin: 18px 0 0; }

.sample-panel {
  padding: 26px;
  margin-bottom: 18px;
}

.sample-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.sample-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(146, 232, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.sample-card:hover,
.sample-card:focus-visible {
  border-color: rgba(145, 239, 255, 0.46);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
  outline: none;
}

.sample-card span {
  color: rgba(164, 224, 242, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sample-card strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1;
}

.sample-card p {
  margin: 0;
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.55;
}

.project-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(146, 232, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(229, 240, 250, 0.86);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-badge svg {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

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

.fact-grid dt {
  margin-bottom: 6px;
  color: rgba(171, 221, 236, 0.66);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fact-grid dd { margin: 0; }

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

.spread { grid-column: span 4; min-height: 280px; }
.spread-wide { grid-column: span 8; }

.content-list {
  margin: 20px 0 0;
  padding-left: 18px;
}

@media (max-width: 980px) {
  .project-shell {
    width: min(100vw - 24px, 860px);
    padding: 18px 0 36px;
  }

  .project-hero,
  .project-grid,
  .sample-grid {
    grid-template-columns: 1fr;
  }

  .spread,
  .spread-wide {
    grid-column: auto;
    min-height: unset;
  }
}
