:root {
  --bg: #0a0d10;
  --panel: #10161b;
  --panel-strong: #151d24;
  --border: #27343f;
  --text: #eff5f8;
  --muted: #9db0bc;
  --accent: #77ff9d;
  --accent-soft: rgba(119, 255, 157, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(16, 22, 27, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-bar,
.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  gap: 18px;
}

.site-nav a,
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a.is-current {
  color: var(--accent);
}

.site-nav a:hover,
.footer-links a:hover,
.contact-link:hover {
  color: var(--accent);
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 13, 16, 0.65), rgba(10, 13, 16, 0.95)),
    url("assets/mosh.gif") center/cover no-repeat;
  filter: saturate(0.8);
}

.hero-backdrop-cover {
  background:
    linear-gradient(180deg, rgba(10, 13, 16, 0.55), rgba(10, 13, 16, 0.92)),
    url("assets/sangecover.png") center/cover no-repeat;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 28px;
  padding: 88px 0 64px;
}

.hero-copy,
.hero-panel,
.feature-copy,
.feature-shot,
.info-card,
.work-card,
.repo-card,
.stack-group,
.prose-block,
.contact-form {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 22, 27, 0.95), rgba(16, 22, 27, 0.86));
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.feature-copy,
.prose-block {
  padding: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.prose-block h2 {
  margin: 0 0 14px;
  line-height: 1.05;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.lead,
.section-heading p,
.hero-panel li,
.info-card p,
.prose-block p,
.contact-grid p,
.panel-note {
  color: var(--muted);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

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

.button-primary {
  border-color: #5dde83;
  background: var(--accent-soft);
  color: var(--accent);
}

.hero-panel h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

.hero-panel ul {
  margin: 0;
  padding-left: 18px;
}

.section {
  padding: 28px 0 0;
}

.homepage-simple {
  padding-top: 56px;
}

.home-intro {
  max-width: 980px;
}

.home-intro h1 {
  margin: 0 0 18px;
  font-size: clamp(1.45rem, 2.4vw, 2.2rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.home-intro p {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.page-hero {
  padding-top: 40px;
}

.feature-grid,
.intro-grid,
.content-grid,
.page-grid,
.stack-grid,
.contact-grid {
  display: grid;
  gap: 20px;
}

.feature-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr);
}

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

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

.feature-shot {
  overflow: hidden;
}

.feature-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 320px;
}

.info-card {
  padding: 22px;
}

.page-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 22, 27, 0.95), rgba(16, 22, 27, 0.86));
  box-shadow: var(--shadow);
  text-decoration: none;
}

.page-card:hover {
  border-color: var(--accent);
}

.page-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.page-card div {
  padding: 18px;
}

.sange-entry {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 22, 27, 0.95), rgba(16, 22, 27, 0.86));
  box-shadow: var(--shadow);
  text-decoration: none;
}

.sange-entry:hover {
  border-color: var(--accent);
}

.sange-entry img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
}

.sange-entry-copy {
  padding: 26px;
}

.sange-entry-copy h2 {
  margin: 0 0 12px;
}

.sange-entry-copy p:last-child {
  margin: 0;
  color: var(--muted);
}

.info-card h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.section-heading {
  margin-bottom: 20px;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.article-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16, 22, 27, 0.95), rgba(16, 22, 27, 0.86));
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  font-size: 1.15rem;
  line-height: 1.35;
}

.article-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tab-button {
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tab-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.tab-panel {
  padding: 0;
}

.panel-note {
  margin: 0 0 16px;
}

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

.work-card {
  overflow: hidden;
  cursor: pointer;
}

.work-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.work-card figcaption {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  font-weight: 600;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 24px;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  max-width: min(92vw, 1600px);
  max-height: 88vh;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: rgba(16, 22, 27, 0.96);
  color: var(--text);
  cursor: pointer;
}

.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.repo-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  text-decoration: none;
}

.repo-card:hover,
.work-card:hover {
  border-color: var(--accent);
}

.repo-card img {
  aspect-ratio: 1;
  object-fit: cover;
}

.repo-card h3 {
  margin: 0 0 6px;
}

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

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

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

.stack-group {
  padding: 22px;
}

.stack-group h3 {
  margin-top: 0;
}

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

.badge {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.badge img {
  max-height: 44px;
  width: auto;
  margin: 0 auto;
}

.prose-block {
  max-width: 900px;
}

.video-embed {
  margin-top: 18px;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow);
}

.video-embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.engine-points {
  margin: 0 0 18px 20px;
  padding: 0;
  color: var(--muted);
}

.engine-points li + li {
  margin-top: 6px;
}

.contact-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr);
  align-items: start;
  padding-bottom: 28px;
}

.contact-link {
  color: var(--text);
  font-size: 1.2rem;
  text-decoration: none;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: #0c1115;
  color: var(--text);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 16px;
}

@media (max-width: 900px) {
  .hero-grid,
  .feature-grid,
  .intro-grid,
  .content-grid,
  .page-grid,
  .sange-entry,
  .gallery-grid,
  .link-grid,
  .stack-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .header-bar,
  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 0;
  }

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

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

  .repo-card {
    grid-template-columns: 1fr;
  }
}
