:root {
  --background: #232323;
  --surface: #292929;
  --surface-2: #303030;
  --surface-3: #383838;
  --text: #fff;
  --muted: #c2c2c2;
  --outline: #4a4a4a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  background: #fff;
  color: #000;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

.scroll-progress::before {
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  content: "";
}

.shell {
  min-height: calc(100vh - 48px);
  margin: 24px;
  overflow: hidden;
  border: 1px solid var(--outline);
  border-radius: 10px;
}

.nav {
  position: fixed;
  top: 40px;
  right: 40px;
  left: 40px;
  z-index: 50;
  display: flex;
  height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(35, 35, 35, 0.72);
  padding: 0 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: top 180ms ease, background 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.nav.is-scrolled {
  top: 24px;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(35, 35, 35, 0.84);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.42);
}

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

.nav-link,
.back-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.lang-toggle {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-height: 32px;
  overflow: hidden;
  border: 1px solid var(--outline);
}

.lang-toggle button {
  min-width: 38px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.lang-toggle button.active {
  background: #fff;
  color: #000;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.brand img {
  display: block;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.16));
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link:hover,
.back-link:hover {
  color: #fff;
}

main {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 132px 24px 80px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.breadcrumb a {
  color: var(--muted);
  transition: color 180ms ease;
}

.breadcrumb a:hover,
.breadcrumb span:last-child {
  color: #fff;
}

.breadcrumb .separator {
  color: var(--outline);
}

.hero {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: end;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--outline);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  border: 1px solid var(--outline);
  padding: 6px 8px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(34px, 4.7vw, 56px);
  font-weight: 900;
  line-height: 1.06;
}

.summary {
  max-width: 680px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.meta-grid {
  display: grid;
  gap: 10px;
}

.meta-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--outline);
  background: var(--surface);
  padding: 16px;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.meta-item::before,
.section-card::before,
.cta::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 1px;
  background: rgba(255, 255, 255, 0.7);
  content: "";
  opacity: 0;
  transition: opacity 180ms ease, width 180ms ease;
}

.meta-item:hover {
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.meta-item:hover::before,
.section-card:hover::before,
.cta:hover::before {
  width: 72px;
  opacity: 1;
}

.meta-item span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-item strong {
  font-size: 14px;
}

.preview {
  position: relative;
  min-height: 280px;
  margin: 56px 0;
  overflow: hidden;
  border: 1px solid var(--outline);
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    var(--surface);
  background-size: 32px 32px;
  padding: 24px;
  transition: border-color 180ms ease, background-position 360ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.preview:hover {
  border-color: rgba(255, 255, 255, 0.44);
  background-position: 12px 0, 0 12px, 0 0;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.preview.has-image {
  min-height: auto;
  padding: 0;
  background: var(--surface);
}

.preview.has-image img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.03);
  transition: filter 180ms ease, transform 220ms ease;
}

.preview.has-image:hover img {
  filter: saturate(1) contrast(1.04);
  transform: scale(1.01);
}

.preview-inner {
  display: grid;
  height: 232px;
  gap: 12px;
  grid-template-columns: 0.85fr 1.15fr;
}

.preview-block,
.preview-row {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

.preview-block {
  min-height: 100%;
}

.preview-stack {
  display: grid;
  gap: 12px;
}

.preview-row {
  min-height: 34px;
}

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

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

.project-gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--outline);
  background: var(--surface);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-gallery figure:hover {
  border-color: rgba(255, 255, 255, 0.44);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.project-gallery figure:first-child {
  grid-column: 1 / -1;
}

.project-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.04);
  transition: filter 180ms ease, transform 180ms ease;
}

.project-gallery figure:hover img {
  filter: saturate(1) contrast(1.04);
  transform: scale(1.01);
}

.section-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--outline);
  background: var(--surface);
  padding: 24px;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.section-card:hover {
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.section-card.wide {
  grid-column: 1 / -1;
}

.section-card h2 {
  margin-bottom: 14px;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-card p,
.section-card li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

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

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  border: 1px solid var(--outline);
  padding: 8px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.chips span:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: #fff;
  color: #000;
  transform: translateY(-1px);
}

.stack-groups {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.stack-group {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  border-top: 1px solid var(--outline);
  padding-top: 12px;
  transition: border-color 180ms ease, transform 180ms ease;
}

.stack-group:hover {
  border-color: rgba(255, 255, 255, 0.48);
  transform: translateX(3px);
}

.stack-group span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.stack-group strong {
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
}

.cta {
  position: relative;
  overflow: hidden;
  margin-top: 56px;
  border: 1px solid var(--outline);
  background: var(--surface-2);
  padding: 32px;
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.cta:hover {
  border-color: rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.cta h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
}

.cta p {
  max-width: 620px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  padding: 0 22px;
  font-size: 13px;
  font-weight: 800;
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  opacity: 0.92;
  transform: translateY(-1px);
}

.project-footer {
  border-top: 1px solid var(--outline);
  background: rgba(35, 35, 35, 0.72);
}

.project-footer-inner {
  display: flex;
  width: min(100%, 1120px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 28px 24px;
}

.project-footer strong,
.project-footer a {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-footer span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.project-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.project-footer a {
  color: var(--muted);
  transition: color 180ms ease;
}

.project-footer a:hover {
  color: #fff;
}

.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms ease, transform 620ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.preview.reveal-item.is-visible:hover,
.section-card.reveal-item.is-visible:hover,
.cta.reveal-item.is-visible:hover {
  transform: translateY(-2px);
}

@media (max-width: 760px) {
  .shell {
    margin: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .nav {
    top: 16px;
    right: 8px;
    left: 8px;
    padding: 0 16px;
  }

  .nav.is-scrolled {
    top: 8px;
  }

  .brand span {
    display: none;
  }

  .nav-actions {
    gap: 8px;
  }

  .back-link {
    display: none;
  }

  .nav-link {
    font-size: 11px;
  }

  main {
    padding: 116px 16px 64px;
  }

  .project-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 16px;
  }

  .hero,
  .content-grid,
  .preview-inner,
  .project-gallery {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(32px, 11vw, 46px);
  }

  .summary {
    font-size: 13px;
  }

  .stack-group {
    grid-template-columns: 1fr;
  }

  .preview {
    min-height: 240px;
  }
}
