:root {
  --bg: #070b12;
  --bg-2: #0b111c;
  --panel: rgba(15, 23, 38, 0.9);
  --panel-2: rgba(13, 22, 36, 0.94);
  --line: #1d2940;
  --line-soft: rgba(79, 157, 255, 0.16);
  --text: #e7ecf3;
  --muted: #7c8aa0;
  --cyan: #56e1ff;
  --blue: #4f9dff;
  --blue-deep: #1f6df0;
  --amber: #d08a5e;
  --red: #f06a4f;
  --display: "Anton", Impact, sans-serif;
  --body: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 15% 4%, rgba(79, 157, 255, 0.18), transparent 68%),
    radial-gradient(760px 480px at 86% 2%, rgba(86, 225, 255, 0.11), transparent 66%),
    linear-gradient(180deg, #070b12 0%, #0b111c 45%, #070b12 100%);
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(79, 157, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 157, 255, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.86), rgba(0,0,0,0.28));
}

body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}

@keyframes grain {
  0%,100% { transform: translate(0,0); }
  10% { transform: translate(-3%,-5%); }
  30% { transform: translate(4%,2%); }
  50% { transform: translate(-4%,6%); }
  70% { transform: translate(5%,-3%); }
  90% { transform: translate(-2%,4%); }
}

img {
  display: block;
  width: 100%;
  height: auto;
}

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

::selection {
  background: var(--blue);
  color: #070b12;
}

@media (pointer: fine) {
  body.cursor-probe,
  body.cursor-probe a,
  body.cursor-probe button {
    cursor: none;
  }

  #probe {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    pointer-events: none;
    mix-blend-mode: screen;
    will-change: transform;
  }

  #probe::before,
  #probe::after {
    content: "";
    position: absolute;
    background: var(--blue);
    box-shadow: 0 0 12px rgba(79, 157, 255, 0.64);
  }

  #probe::before {
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    transform: translateX(-0.5px);
  }

  #probe::after {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    transform: translateY(-0.5px);
  }

  #probe span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--cyan);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--cyan);
  }
}

@media (pointer: coarse) {
  #probe { display: none; }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(20px, calc((100vw - var(--max)) / 2));
  background: linear-gradient(180deg, rgba(7, 11, 18, 0.96), rgba(7, 11, 18, 0.68));
  border-bottom: 1px solid rgba(79, 157, 255, 0.18);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--mono);
  font-size: 13px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #061020;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 4px;
  font-weight: 850;
  box-shadow: 0 0 22px rgba(79, 157, 255, 0.28);
}

.brand span span {
  color: var(--blue);
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav a:hover { color: var(--cyan); }

nav a {
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

nav a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.hero {
  min-height: 100svh;
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero > img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.24) saturate(0.95) contrast(1.08);
  opacity: 0.26;
  mix-blend-mode: screen;
}

#scope {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.88;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,0.18) 3px 4px),
    radial-gradient(120% 90% at 50% 36%, transparent 44%, rgba(7, 11, 18, 0.94) 100%),
    linear-gradient(90deg, rgba(7, 11, 18, 0.98), rgba(7, 11, 18, 0.68) 48%, rgba(7, 11, 18, 0.18));
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: 150px 0 110px;
  text-shadow: 0 16px 38px rgba(0, 0, 0, 0.52);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.22em;
  font-family: var(--mono);
}

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

h1 {
  margin: 0;
  max-width: 900px;
  font-family: var(--body);
  font-weight: 750;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.02;
  letter-spacing: 0;
}

h1 span {
  color: var(--cyan);
  -webkit-text-stroke: 0;
}

h1::after {
  content: "";
  display: block;
  width: min(360px, 62vw);
  height: 2px;
  margin-top: 24px;
  background: linear-gradient(90deg, var(--blue-deep), var(--cyan), transparent);
  box-shadow: 0 0 18px rgba(79, 157, 255, 0.48);
}

h2 {
  margin: 0;
  font-family: var(--body);
  font-weight: 720;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.2;
}

.lead {
  max-width: 700px;
  margin: 22px 0 0;
  color: #b9c9d8;
  font-size: 18px;
  line-height: 1.58;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(236, 247, 244, 0.28);
  border-radius: 4px;
  color: var(--text);
  font-weight: 700;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, filter 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.button.primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #061020;
  border-color: transparent;
}

.button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.button.primary:hover {
  color: #061020;
  filter: brightness(1.08);
}

.hero-status {
  position: absolute;
  left: max(20px, calc((100vw - var(--max)) / 2));
  right: max(20px, calc((100vw - var(--max)) / 2));
  bottom: 24px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(79, 157, 255, 0.24);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.hero-status b {
  color: var(--cyan);
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  margin-top: 22px;
  color: var(--cyan);
  font-weight: 800;
  border-bottom: 1px solid rgba(64, 210, 200, 0.48);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section, .feature-band, .photo-strip, .split, .contact {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0;
}

.intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: end;
}

.intro > p, .feature-copy p, .split p, .repo-row p, .contact p {
  color: var(--muted);
  font-size: 16px;
}

.feature-band {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 36px;
  align-items: center;
  border-top: 1px solid rgba(79, 157, 255, 0.14);
}

.feature-band.reverse figure {
  order: -1;
}

.feature-band figure {
  margin: 0;
}

.feature-band figure img, .split > img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.photo-strip {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  padding-top: 0;
}

.photo-strip figure {
  margin: 0;
}

.photo-strip img {
  height: clamp(260px, 30vw, 420px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.check-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}

.check-list li {
  padding-left: 22px;
  position: relative;
  color: #d9ebe7;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
}

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

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.project-card {
  min-height: 250px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 38, 0.92), rgba(8, 13, 22, 0.98));
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.project-card::before,
.design-grid article::before,
.capability-list > div::before,
.repo-row::before,
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(79, 157, 255, 0.14), transparent 34%),
    radial-gradient(520px 110px at 18% 0%, rgba(86, 225, 255, 0.08), transparent 62%);
  opacity: 0.72;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(86, 225, 255, 0.36);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38), 0 0 24px rgba(79, 157, 255, 0.08);
}

.project-card span {
  display: block;
  margin-bottom: 54px;
  color: var(--amber);
  font-weight: 800;
  font-family: var(--mono);
}

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

.design-section {
  padding-top: 0;
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.design-grid article {
  min-height: 210px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(15, 23, 38, 0.92), rgba(8, 13, 22, 0.98));
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.design-grid p {
  margin: 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
  align-items: center;
}

.capability-list {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.capability-list > div {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.capability-list p {
  margin: 6px 0 0;
  font-size: 15px;
}

.repos {
  border-top: 1px solid var(--line);
}

.repo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.repo-row p {
  margin: 0;
  max-width: 760px;
}

.repo-row + .repo-row {
  margin-top: 14px;
}

.repo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 42px;
  margin-bottom: 42px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 22px 68px rgba(0, 0, 0, 0.34);
}

.contact p {
  margin-bottom: 0;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px max(20px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
  background: rgba(7, 11, 18, 0.86);
  color: var(--muted);
  font-size: 13px;
}

footer p { margin: 0; }

.credits { text-align: right; }

.subpage-hero {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0 56px;
}

.subpage-hero h1 {
  max-width: 860px;
}

.subpage-hero .lead {
  max-width: 820px;
}

.page-cover {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.page-cover img {
  height: clamp(320px, 42vw, 560px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.system-diagram {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: stretch;
}

.flow-node {
  min-height: 180px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.flow-node strong {
  display: block;
  margin-bottom: 10px;
  color: var(--amber);
}

.flow-node p {
  margin: 0;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.detail-card {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-card p {
  margin: 0;
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-item {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-item img {
  height: 260px;
  object-fit: cover;
}

.gallery-item figcaption {
  margin: 0;
  padding: 16px;
}

.gallery-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 17px;
}

@media (max-width: 920px) {
  .site-header {
    position: sticky;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(7, 11, 18, 0.96);
  }

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

  .hero {
    min-height: 760px;
  }

  .hero::after {
    background: rgba(7, 16, 15, 0.72);
  }

  .hero-copy {
    padding-top: 118px;
    padding-bottom: 138px;
  }

  .intro, .feature-band, .photo-strip, .split {
    grid-template-columns: 1fr;
  }

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

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

  .system-diagram, .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .feature-band.reverse figure {
    order: 0;
  }

  .contact, footer, .repo-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .credits { text-align: left; }
}

@media (max-width: 680px) {
  body {
    line-height: 1.5;
  }

  .site-header {
    padding: 10px 14px;
    background: rgba(7, 11, 18, 0.96);
  }

  .brand {
    gap: 8px;
    font-size: 12px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  nav {
    gap: 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  nav a {
    flex: 0 0 auto;
    padding: 7px 9px;
    border: 1px solid rgba(79, 157, 255, 0.16);
    border-radius: 4px;
    background: rgba(15, 23, 38, 0.72);
  }

  nav a::after {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  #scope {
    opacity: 0.42;
  }

  .hero > img {
    opacity: 0.18;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(7, 11, 18, 0.78), rgba(7, 11, 18, 0.96));
  }

  .hero-copy {
    width: min(100% - 28px, var(--max));
    padding: 68px 0 36px;
    text-shadow: none;
  }

  .hero-copy .eyebrow {
    display: inline-flex;
    max-width: 100%;
    margin-bottom: 14px;
    padding: 7px 10px;
    border: 1px solid rgba(86, 225, 255, 0.34);
    border-radius: 4px;
    background: rgba(7, 11, 18, 0.78);
    color: #d8fbff;
    font-size: 10px;
    letter-spacing: 0.08em;
    line-height: 1.25;
    white-space: normal;
  }

  .lead {
    margin-top: 16px;
    font-size: 16px;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 22px;
  }

  .button {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 11px;
  }

  .hero-status {
    position: static;
    width: min(100% - 28px, var(--max));
    margin: 0 auto 18px;
    padding-top: 12px;
    font-size: 10px;
  }

  .intro {
    gap: 18px;
  }

  .feature-band {
    gap: 22px;
  }

  .intro > p,
  .feature-copy p,
  .split p,
  .repo-row p,
  .contact p {
    font-size: 15px;
  }

  .project-grid,
  .design-grid,
  .system-diagram,
  .detail-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .design-grid article,
  .flow-node {
    min-height: auto;
  }

  .project-card {
    padding: 18px;
  }

  .project-card span {
    margin-bottom: 18px;
  }

  .repo-row {
    padding: 18px;
  }

  .gallery-item img {
    height: 210px;
  }

  .subpage-hero {
    width: min(100% - 28px, var(--max));
    padding: 44px 0 34px;
  }

  .page-cover {
    width: min(100% - 28px, var(--max));
  }

  .page-cover img {
    height: 260px;
  }
}

@media (max-width: 560px) {
  .hero-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  h1 {
    font-size: clamp(34px, 11vw, 52px);
  }

  .section, .feature-band, .photo-strip, .split, .contact {
    width: min(100% - 28px, var(--max));
    padding: 58px 0;
  }

  .photo-strip {
    padding-top: 0;
  }

  .contact {
    padding: 24px;
  }

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

  .design-grid {
    grid-template-columns: 1fr;
  }

  .system-diagram, .detail-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 210px;
  }

  .project-card span {
    margin-bottom: 18px;
  }
}
