:root {
  color-scheme: light;
  --bg: #f5f7f2;
  --paper: #ffffff;
  --ink: #16201d;
  --muted: #66736f;
  --line: #dfe6df;
  --teal: #087b7a;
  --teal-dark: #055d5c;
  --reef: #d45d43;
  --sun: #e6a93d;
  --blue: #2d6f9f;
  --shadow: 0 18px 50px rgba(27, 42, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(223, 230, 223, 0.84);
  background: rgba(245, 247, 242, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.module-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.nav a:hover {
  background: #e9efeb;
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: clamp(36px, 8vw, 92px) clamp(18px, 6vw, 84px) 48px;
}

.hero-copy {
  max-width: 700px;
}

.hero-logo {
  display: block;
  width: min(250px, 70vw);
  height: auto;
  margin: 0 0 22px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(3rem, 6.5vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.hero-text,
.section-heading p,
.status-card p,
.module-card p,
.project-card p,
.photo-notes p,
.timeline p {
  color: var(--muted);
}

.hero-text {
  max-width: 620px;
  margin: 24px 0 0;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.aquarium-panel {
  overflow: hidden;
  border: 1px solid #cbd9d7;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.gallery-frame {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #76c7c7 0%, #126b82 52%, #093d55 100%);
}

.gallery-frame::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

#gallery-image,
#photo-stage-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

#gallery-image:not([hidden]) ~ .coral,
#gallery-image:not([hidden]) ~ .fish,
#gallery-image:not([hidden]) ~ .bubbles,
#gallery-image:not([hidden]) ~ .gallery-empty {
  display: none;
}

.gallery-empty {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 1;
  max-width: 360px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(10px);
}

.gallery-empty span,
.photo-placeholder span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.gallery-empty strong,
.photo-placeholder strong {
  display: block;
  font-size: 1.25rem;
}

.gallery-empty p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.coral,
.fish,
.bubbles {
  position: absolute;
  display: block;
}

.coral {
  bottom: 0;
  width: 54px;
  height: 122px;
  border-radius: 32px 32px 0 0;
  background: var(--reef);
  transform-origin: bottom center;
}

.coral::before,
.coral::after {
  content: "";
  position: absolute;
  bottom: 30px;
  width: 28px;
  height: 76px;
  border-radius: 24px 24px 0 0;
  background: inherit;
}

.coral::before {
  left: -20px;
  transform: rotate(-22deg);
}

.coral::after {
  right: -18px;
  transform: rotate(24deg);
}

.coral-one {
  left: 12%;
  background: #d45d43;
}

.coral-two {
  left: 48%;
  height: 94px;
  background: #e6a93d;
  transform: scaleX(0.8);
}

.coral-three {
  right: 13%;
  height: 136px;
  background: #49a078;
}

.fish {
  width: 58px;
  height: 28px;
  border-radius: 50%;
  background: #f2c14e;
}

.fish::after {
  content: "";
  position: absolute;
  right: -18px;
  top: 6px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 20px solid #f2c14e;
}

.fish-one {
  top: 34%;
  left: 18%;
}

.fish-two {
  top: 54%;
  right: 20%;
  width: 46px;
  height: 22px;
  background: #f7efe5;
  transform: scaleX(-1);
}

.fish-two::after {
  border-left-color: #f7efe5;
}

.bubbles {
  top: 40px;
  right: 26%;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  box-shadow: 22px 42px 0 -2px rgba(255, 255, 255, 0.56), -10px 88px 0 -3px rgba(255, 255, 255, 0.48);
}

.mini-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.mini-dashboard div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.mini-dashboard div:last-child {
  border-right: 0;
}

.mini-dashboard span,
.label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-dashboard strong {
  display: block;
  margin-top: 4px;
  font-size: 1.22rem;
}

.section {
  padding: clamp(56px, 8vw, 96px) clamp(18px, 6vw, 84px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.status-grid,
.module-grid,
.project-grid,
.timeline {
  display: grid;
  gap: 16px;
}

.status-grid {
  grid-template-columns: 1.25fr 1fr 1fr;
}

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

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

.status-card,
.module-card,
.project-card,
.photo-notes article,
.timeline article {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.primary-card {
  background: #e7f2ef;
  border-color: #bfdbd3;
}

.project-section {
  background: #fffaf2;
}

.gallery-section {
  background: var(--paper);
}

.photo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  align-items: stretch;
}

.photo-stage {
  position: relative;
  overflow: hidden;
  min-height: clamp(340px, 48vw, 620px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 123, 122, 0.18), rgba(212, 93, 67, 0.12)),
    #102a32;
}

.photo-placeholder {
  position: absolute;
  inset: 24px;
  display: grid;
  align-content: end;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  color: #fff;
}

.photo-placeholder strong {
  max-width: 520px;
}

.photo-notes {
  display: grid;
  gap: 16px;
}

.status-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.module-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.module-card:nth-child(2) .module-icon {
  background: var(--blue);
}

.module-card:nth-child(3) .module-icon {
  background: var(--sun);
  color: #2c2618;
}

.module-card:nth-child(4) .module-icon {
  background: var(--reef);
}

.approach-section {
  background: #edf2ec;
}

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

.timeline span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 6vw, 84px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 920px) {
  .hero,
  .status-grid,
  .module-grid,
  .project-grid,
  .photo-layout,
  .timeline {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

@media (max-width: 640px) {
  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  h1 {
    font-size: clamp(2.8rem, 18vw, 4.4rem);
  }

  .gallery-frame {
    min-height: 280px;
  }

  .mini-dashboard,
  .module-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .mini-dashboard div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mini-dashboard div:last-child {
    border-bottom: 0;
  }
}
