:root {
  --ink: #07110f;
  --ink-soft: #0a1715;
  --bone: #eee7d7;
  --bone-muted: #aea99d;
  --sea: #65d8c3;
  --sea-muted: rgba(101, 216, 195, 0.52);
  --orange: #ff6b35;
  --live: #52f7a4;
  --line: rgba(101, 216, 195, 0.62);
  --shell: min(94vw, 1500px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--bone);
  background:
    radial-gradient(circle at 74% 8%, rgba(28, 100, 90, 0.16), transparent 32rem),
    linear-gradient(180deg, #06100e 0%, #071311 70%, #050c0b 100%);
  font-family: Baskerville, "Songti SC", "STSong", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: var(--ink);
  background: var(--bone);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.grain {
  position: fixed;
  z-index: 10;
  inset: 0;
  pointer-events: none;
  opacity: 0.1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.44'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.contours {
  position: absolute;
  z-index: 0;
  width: 48vw;
  height: 28rem;
  right: 0;
  top: 0;
  pointer-events: none;
  opacity: 0.22;
  background: repeating-radial-gradient(ellipse at 60% 0%, transparent 0 21px, var(--sea-muted) 22px, transparent 23px 34px);
  mask-image: linear-gradient(to left, black, transparent);
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  border-bottom: 1px solid rgba(101, 216, 195, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-fish {
  width: 4.6rem;
  fill: none;
  stroke: var(--bone);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-name {
  font-size: clamp(1.5rem, 2.3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand-tagline {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: "Songti SC", serif;
  color: var(--bone-muted);
  letter-spacing: 0.18em;
}

.brand-tagline::before { content: ""; width: 1px; height: 1.6rem; background: var(--bone-muted); }

.header-nav { display: flex; gap: 2rem; }
.header-nav a,
.eyebrow,
.hero-note,
.card-meta,
.card-footer,
.site-footer p,
.depth-note,
.specimen-label,
.depth-scale {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.69rem;
  letter-spacing: 0.14em;
}

.header-nav a {
  text-decoration: none;
  color: var(--sea);
  transition: color 180ms ease;
}

.header-nav a:hover { color: var(--bone); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 6% 50% 44%;
  min-height: 450px;
  padding-block: clamp(3rem, 7vw, 6.5rem) 3rem;
  overflow: hidden;
}

.depth-note {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding-top: 1.1rem;
  color: var(--sea);
  font-size: 0.62rem;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.hero-copy { position: relative; z-index: 2; }
.eyebrow { margin: 0 0 1.3rem; color: var(--sea); }

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(4rem, 7.7vw, 8.7rem);
  font-weight: 650;
  line-height: 0.94;
  letter-spacing: -0.08em;
}

.hero-lead {
  margin: 1.8rem 0 0;
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.5;
}

.hero-note {
  width: min(100%, 42rem);
  margin: 1.5rem 0 0;
  padding-bottom: 1rem;
  color: var(--bone-muted);
  border-bottom: 1px solid var(--line);
}

.hero-specimen {
  position: relative;
  align-self: center;
  min-width: 36rem;
  margin-left: -4rem;
  opacity: 0.54;
}

.hero-specimen svg { width: 100%; overflow: visible; }
.sonar { fill: none; stroke: var(--sea); stroke-width: 0.8; stroke-dasharray: 3 7; opacity: 0.32; }
.skeleton { fill: none; stroke: var(--bone); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.specimen-label { position: absolute; top: 26%; right: 11%; color: var(--sea); line-height: 1.5; }

.depth-scale {
  position: absolute;
  top: 20%;
  right: 0;
  display: grid;
  gap: 2rem;
  padding-left: 1rem;
  color: var(--sea);
  border-left: 1px solid var(--sea);
}

.depth-scale::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -4px;
  width: 7px;
  background: repeating-linear-gradient(to bottom, var(--sea) 0 1px, transparent 1px 7px);
}

.projects {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.project-card {
  position: relative;
  display: grid;
  min-height: 318px;
  padding: 1.25rem 1.35rem 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(11, 31, 27, 0.72), rgba(4, 13, 12, 0.78));
  text-decoration: none;
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease;
  animation: card-in 700ms both;
}

.project-card:has(.maintenance-reason) { min-height: 365px; }

.project-card:nth-child(3) { animation-delay: 60ms; }
.project-card:nth-child(4) { animation-delay: 120ms; }
.project-card:nth-child(5) { animation-delay: 180ms; }
.project-card:nth-child(6) { animation-delay: 240ms; }
.project-card:nth-child(7) { animation-delay: 300ms; }

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(101, 216, 195, 0.13), transparent 45%);
  transition: opacity 220ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  z-index: 2;
  border-color: var(--sea);
  background-color: rgba(20, 52, 45, 0.48);
  transform: translateY(-5px);
  outline: none;
}

.project-card:hover::after,
.project-card:focus-visible::after { opacity: 1; }
.project-card--bidking:hover { border-color: var(--orange); }

.card-meta,
.card-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  color: var(--sea);
}

.card-meta { align-self: start; font-size: 0.9rem; }
.status { display: inline-flex; align-items: center; gap: 0.5rem; }
.status i { width: 0.55rem; height: 0.55rem; border-radius: 50%; }
.status--live i { background: var(--live); box-shadow: 0 0 16px rgba(82, 247, 164, 0.65); }
.status--retired { color: var(--bone-muted); }
.status--retired i { border: 1px solid currentColor; background: transparent; }

.card-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 42%;
  align-items: center;
  gap: 0.5rem;
}

.card-content h3 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.35rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.project-card--meme .card-content h3 { font-size: clamp(1.65rem, 2.3vw, 2.55rem); }
.cn-name { margin: 0.55rem 0 0; font-size: 1.35rem; }
.description { max-width: 22em; margin: 1.35rem 0 0; color: var(--bone-muted); font-size: 1rem; line-height: 1.65; }
.maintenance-reason {
  max-width: 24em;
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(101, 216, 195, 0.24);
  color: var(--bone);
  font-size: 0.88rem;
  line-height: 1.55;
}
.maintenance-reason span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--sea-muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
}

.project-icon {
  width: 100%;
  max-height: 152px;
  fill: none;
  stroke: var(--sea);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.76;
  transition: transform 300ms ease, opacity 300ms ease;
}

.project-card--bidking .project-icon { stroke: var(--orange); }
.project-card:hover .project-icon { opacity: 1; transform: translateY(-3px) rotate(-1deg); }
.accent-stroke { stroke: var(--orange); }
.waveform { stroke-width: 2.3; }

.card-footer { align-self: end; align-items: end; color: var(--bone-muted); font-size: 0.6rem; }
.arrow { color: var(--bone); font-family: Georgia, serif; font-size: 2rem; line-height: 0.7; transition: transform 180ms ease; }
.project-card:hover .arrow { transform: translate(3px, -3px); }

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 2rem;
  margin-top: 2rem;
  padding-block: 2rem 3.5rem;
  border-top: 1px solid var(--line);
}

.site-footer > div { display: flex; flex-direction: column; }
.site-footer strong { font-size: 1.35rem; }
.site-footer span { color: var(--bone-muted); }
.site-footer p { margin: 0; color: var(--sea); line-height: 1.8; }
.site-footer p span { font-family: Baskerville, "Songti SC", serif; font-size: 0.9rem; letter-spacing: 0.05em; }
.coordinates { justify-self: end; text-align: right; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: 7% 64% 29%; }
  .hero-specimen { margin-left: -13rem; opacity: 0.28; }
  .projects { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  :root { --shell: min(91vw, 620px); }
  .site-header { min-height: 82px; }
  .brand { gap: 0.65rem; }
  .brand-fish { width: 3.2rem; }
  .brand-tagline, .header-nav { display: none; }
  .hero { display: block; min-height: 425px; padding-block: 3.5rem 1.8rem; }
  .depth-note { display: none; }
  .hero-copy { max-width: 94%; }
  h1 { font-size: clamp(3.6rem, 18vw, 6.3rem); }
  .hero-lead { max-width: 16em; font-size: 1.15rem; }
  .hero-specimen { position: absolute; width: 35rem; min-width: 0; right: -17rem; bottom: -2rem; margin: 0; opacity: 0.22; }
  .specimen-label, .depth-scale { display: none; }
  .projects { grid-template-columns: 1fr; gap: 0.8rem; }
  .project-card { min-height: 285px; }
  .card-content { grid-template-columns: 1fr 38%; }
  .card-content h3 { font-size: clamp(2.35rem, 12vw, 3.3rem); }
  .project-card--meme .card-content h3 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .site-footer { grid-template-columns: 1fr; gap: 1.5rem; }
  .coordinates { justify-self: start; text-align: left; }
}

@media (max-width: 420px) {
  .project-card { padding-inline: 1rem; }
  .card-content { grid-template-columns: 1fr 33%; }
  .description { font-size: 0.92rem; }
  .card-footer { font-size: 0.52rem; }
}

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