:root {
  --bg-page: #d9d9df;
  --paper: #f2f0ea;
  --orange: #ff5a00;
  --orange-soft: #ff7a00;
  --ink: #111111;
  --dark: #0f1012;
  --off: #f5efe4;
  --blue: #2c2cff;
  --line: 4px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg-page);
  color: var(--ink);
  font-family: "JetBrains Mono", "IBM Plex Mono", "SF Mono", Consolas, monospace;
  padding: 24px 16px 42px;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, 0.08) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
  opacity: 0.22;
  z-index: 0;
}

.frame {
  width: min(1220px, calc(100vw - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.pixel-outline {
  border: var(--line) solid var(--ink);
  border-radius: 20px;
  box-shadow: 3px 3px 0 var(--ink);
}

.top-strip {
  background: var(--paper);
  padding: 12px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.brand {
  font-family: "Press Start 2P", "JetBrains Mono", monospace;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
}

.meta-mail {
  margin: 0;
  font-size: 12px;
  color: #3b3b3b;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.top-nav a {
  text-decoration: none;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 12px;
  background: #fff;
}

.top-cta {
  text-decoration: none;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  font-size: 12px;
}

.hero {
  background: var(--orange);
  padding: 28px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.badge {
  margin: 0 0 12px;
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.3);
}

.hero h1 {
  margin: 0;
  font-family: "Press Start 2P", "JetBrains Mono", monospace;
  font-size: clamp(20px, 2.8vw, 44px);
  line-height: 1.22;
  max-width: 22ch;
}

.hero-sub {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ascii-block {
  margin: 18px 0 0;
  padding: 14px;
  background: #17181b;
  color: #e7f8d7;
  border: 3px solid var(--ink);
  border-radius: 14px;
  max-width: 480px;
  white-space: pre-wrap;
  line-height: 1.3;
  font-size: 12px;
}

.lang-switch {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lang-switch a {
  text-decoration: none;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 4px 9px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.lang-switch a.active {
  background: var(--ink);
  color: #fff;
}

.hero-meta {
  display: grid;
  gap: 12px;
  align-content: start;
}

.portrait {
  background: #16171b;
  padding: 10px;
  margin: 0;
}

.portrait img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #25262b;
  image-rendering: pixelated;
}

.portrait figcaption {
  margin: 8px 0 0;
  font-size: 12px;
  color: #d8d8d8;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  background: #0f1012;
  color: #f4f4f4;
  padding: 10px;
}

.stat span {
  display: block;
  font-size: 11px;
  color: #ffae80;
  margin-bottom: 6px;
}

.stat strong {
  font-size: 12px;
  line-height: 1.35;
}

.contact-line {
  background: #111;
  padding: 9px 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-line a {
  color: #fff;
  text-decoration: none;
  border: 2px solid #fff;
  border-radius: 9px;
  padding: 4px 8px;
  font-size: 11px;
}

.hero-symbol {
  position: absolute;
  right: 18px;
  bottom: 6px;
  font-family: "Press Start 2P", "JetBrains Mono", monospace;
  font-size: clamp(52px, 9vw, 120px);
  letter-spacing: 0.02em;
  color: rgba(0, 0, 0, 0.82);
  line-height: 1;
  pointer-events: none;
}

main {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.section {
  background: var(--dark);
  color: var(--off);
  padding: 18px;
}

.headline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 2px solid #3e3e3e;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.section h2 {
  margin: 0;
  font-family: "Press Start 2P", "JetBrains Mono", monospace;
  font-size: clamp(16px, 2.2vw, 28px);
  color: #fff0dc;
}

.headline p {
  margin: 0;
  color: #ffb48a;
  font-size: 12px;
  max-width: 42ch;
}

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

.project-card {
  background: #1a1b1f;
  padding: 12px;
}

.project-card:nth-child(1) {
  grid-column: span 6;
  background: #1f2222;
}

.project-card:nth-child(2) {
  grid-column: span 6;
  background: #1e1b2b;
}

.project-card:nth-child(3),
.project-card:nth-child(4),
.project-card:nth-child(5) {
  grid-column: span 4;
}

.project-card:nth-child(6),
.project-card:nth-child(7) {
  grid-column: span 6;
  background: #13252f;
}

.project-tag {
  margin: 0 0 8px;
  color: #ff9f62;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}

.project-card h3 {
  margin: 0;
  font-size: 18px;
  color: #ffffff;
}

.project-period {
  margin: 8px 0 10px;
  font-size: 11px;
  color: #9ecbff;
}

.project-desc {
  margin: 0;
  line-height: 1.45;
  color: #d3d3d3;
  font-size: 13px;
}

.dual-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.subpanel {
  background: #191a1f;
  padding: 12px;
}

.subpanel h3 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  color: #ffab74;
}

.pixel-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.45;
  font-size: 13px;
}

.pixel-list li + li {
  margin-top: 8px;
}

.thesis {
  margin: 10px 0 0;
  padding: 12px;
  background: #111;
  color: #ffccab;
}

.thesis p {
  margin: 0;
  line-height: 1.5;
  font-size: 13px;
}

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

.manifest-card {
  background: linear-gradient(160deg, #ff5a00, #ff7d1f);
  color: #121212;
  padding: 12px;
}

.manifest-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.manifest-card p {
  margin: 0;
  line-height: 1.4;
  font-size: 13px;
}

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

.gallery img {
  width: 100%;
  height: 100%;
  min-height: 122px;
  object-fit: cover;
  border-radius: 10px;
  border: 3px solid #141414;
  image-rendering: pixelated;
  background: #111;
}

.footer {
  margin-top: 14px;
  background: var(--paper);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 12px;
}

.footer p {
  margin: 0;
}

.footer a {
  color: #111;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: 0.45s ease;
}

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

@media (max-width: 1060px) {
  .top-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .meta-mail {
    display: none;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 90px;
  }

  .hero-symbol {
    font-size: clamp(48px, 14vw, 100px);
  }

  .project-card,
  .project-card:nth-child(1),
  .project-card:nth-child(2),
  .project-card:nth-child(3),
  .project-card:nth-child(4),
  .project-card:nth-child(5),
  .project-card:nth-child(6),
  .project-card:nth-child(7) {
    grid-column: span 12;
  }

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

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

@media (max-width: 720px) {
  body {
    padding: 10px 8px 28px;
  }

  .frame {
    width: calc(100vw - 16px);
  }

  .hero h1 {
    font-size: clamp(18px, 8vw, 28px);
  }

  .stats-grid,
  .dual-cols,
  .manifest-grid {
    grid-template-columns: 1fr;
  }

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

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
