*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --ink: #07090d;
  --ink-2: #0d1115;
  --ink-3: #141a1f;
  --paper: #f5f7f1;
  --muted: #a7b0ad;
  --line: rgba(245, 247, 241, 0.13);
  --line-strong: rgba(245, 247, 241, 0.24);
  --mint: #58f2b5;
  --cyan: #4dd7ff;
  --amber: #ffbe3d;
  --coral: #ff6b7f;
  --violet: #b68cff;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

body.portfolio-page {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(120deg, rgba(88, 242, 181, 0.08), transparent 34%),
    linear-gradient(250deg, rgba(255, 107, 127, 0.07), transparent 36%),
    linear-gradient(180deg, #07090d 0%, #10151a 50%, #07090d 100%);
  color: var(--paper);
  font-family: var(--font);
  line-height: 1.6;
}

body.portfolio-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(245, 247, 241, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 247, 241, 0.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 86%);
}

body.portfolio-page.game-open {
  overflow: hidden;
}

.portfolio-site {
  min-height: 100vh;
  overflow: hidden;
}

.portfolio-site a {
  color: inherit;
}

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

.portfolio-site button,
.portfolio-site a {
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 120;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.78);
  backdrop-filter: blur(20px);
}

.nav-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 950;
  font-size: 18px;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark,
.capability-icon,
.project-icon,
.stack-list > li > span,
.toast-icon {
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  font-size: 0.78rem;
  font-weight: 950;
}

.brand-mark {
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(245, 247, 241, 0.18);
  box-shadow: 0 0 28px rgba(88, 242, 181, 0.2);
}

.brand-photo img,
.brand-photo .image-fallback {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: inherit;
}

.brand-photo .image-fallback span {
  min-width: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.8rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 5px;
  height: 2px;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--paper);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-social {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-link,
.game-action {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: var(--paper);
  background: rgba(245, 247, 241, 0.05);
  text-decoration: none;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-link:hover,
.game-action:hover {
  transform: translateY(-2px);
  border-color: rgba(88, 242, 181, 0.5);
  background: rgba(88, 242, 181, 0.1);
}

.cv-download,
.game-launcher,
.memorial-trigger {
  position: fixed;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.run-dock {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.run-dock .game-launcher {
  position: static;
  right: auto;
  bottom: auto;
}

.run-menu {
  position: absolute;
  right: 64px;
  bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px) scale(0.98);
  transform-origin: right center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.run-dock.is-open .run-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

.run-menu-action {
  min-width: 76px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--paper);
  background: rgba(10, 14, 18, 0.84);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.run-menu-action.primary {
  color: var(--ink);
  background: linear-gradient(135deg, var(--mint), var(--cyan));
}

.run-menu-action:hover {
  transform: translateY(-2px);
  border-color: rgba(88, 242, 181, 0.48);
}

.cv-download,
.game-launcher {
  right: 20px;
  width: 52px;
  min-height: 52px;
  gap: 0;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.cv-download {
  left: 20px;
  right: auto;
  bottom: 24px;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
}

.game-launcher {
  bottom: 24px;
  background: linear-gradient(135deg, var(--amber), var(--coral));
}

.cv-download span:last-child,
.game-launcher span:last-child {
  display: none;
}

.cv-download:hover,
.game-launcher:hover,
.memorial-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 56px rgba(88, 242, 181, 0.2);
}

.memorial-trigger {
  right: 20px;
  bottom: 88px;
  width: 36px;
  height: 36px;
  color: var(--paper);
  background: rgba(245, 247, 241, 0.06);
  opacity: 0.72;
}

.hero {
  position: relative;
  min-height: min(880px, 88svh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  padding: 132px 0 78px;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 10px;
  padding: 90px 24px 26px;
  opacity: 0.46;
  filter: saturate(1.12) contrast(1.04);
  transform: scale(1.035);
}

.hero-media img,
.hero-media .image-fallback {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border: 1px solid rgba(245, 247, 241, 0.14);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(88, 242, 181, 0.16), rgba(77, 215, 255, 0.08)), var(--ink-2);
}

.hero-media img:nth-child(1),
.hero-media .image-fallback:nth-child(1) {
  grid-column: 1 / span 4;
  grid-row: 1 / span 4;
}

.hero-media img:nth-child(2),
.hero-media .image-fallback:nth-child(2) {
  grid-column: 5 / span 3;
  grid-row: 1 / span 2;
}

.hero-media img:nth-child(3),
.hero-media .image-fallback:nth-child(3) {
  grid-column: 8 / span 5;
  grid-row: 1 / span 3;
}

.hero-media img:nth-child(4),
.hero-media .image-fallback:nth-child(4) {
  grid-column: 2 / span 4;
  grid-row: 5 / span 2;
}

.hero-media img:nth-child(5),
.hero-media .image-fallback:nth-child(5) {
  grid-column: 6 / span 3;
  grid-row: 3 / span 4;
}

.hero-media img:nth-child(6),
.hero-media .image-fallback:nth-child(6) {
  grid-column: 9 / span 4;
  grid-row: 4 / span 3;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.97) 0%, rgba(7, 9, 13, 0.82) 44%, rgba(7, 9, 13, 0.52) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(7, 9, 13, 0.26) 44%, rgba(7, 9, 13, 0.86) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  background: repeating-linear-gradient(0deg, rgba(245, 247, 241, 0.08) 0 1px, transparent 1px 8px);
  mix-blend-mode: overlay;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 46px;
  align-items: end;
}

.hero-copy {
  max-width: 860px;
}

.eyebrow,
.section-kicker,
.hero-card-kicker {
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 950;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mint);
  font-size: 13px;
}

.eyebrow::before {
  content: "";
  width: 38px;
  height: 2px;
  background: currentColor;
}

.hero h1 {
  margin: 16px 0 18px;
  max-width: 850px;
  font-size: clamp(56px, 11vw, 136px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 720px;
  margin: 0;
  color: #e1e8df;
  font-size: clamp(19px, 2.6vw, 31px);
  line-height: 1.26;
  font-weight: 780;
}

.hero-note {
  max-width: 630px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--paper);
  background: rgba(245, 247, 241, 0.06);
  text-decoration: none;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.button.primary {
  color: var(--ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--mint), var(--amber));
  box-shadow: 0 16px 42px rgba(88, 242, 181, 0.18);
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(88, 242, 181, 0.52);
  background: rgba(88, 242, 181, 0.1);
}

.button.primary:hover {
  color: var(--ink);
  background: linear-gradient(135deg, var(--amber), var(--mint));
}

.hero-card,
.capability,
.project-card,
.timeline-body,
.signal-panel,
.game-window {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 17, 21, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card {
  overflow: hidden;
}

.portrait-shell {
  aspect-ratio: 4 / 4.6;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--ink-2);
}

.portrait-shell img,
.portrait-shell .image-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.hero-card-kicker {
  color: var(--cyan);
  font-size: 12px;
}

.hero-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
  letter-spacing: 0;
}

.hero-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-card-tags,
.tags,
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-card-tags span,
.tags span,
.project-links a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 247, 241, 0.13);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--paper);
  background: rgba(245, 247, 241, 0.05);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.quick-stats {
  position: relative;
  z-index: 4;
  width: min(1180px, calc(100% - 40px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.stat {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  border: 1px solid rgba(245, 247, 241, 0.13);
  border-radius: 8px;
  padding: 24px 22px 22px;
  background:
    linear-gradient(180deg, rgba(245, 247, 241, 0.06), transparent 62%),
    rgba(10, 14, 18, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
}

.stat::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  opacity: 0.68;
}

.stat strong {
  display: block;
  color: var(--paper);
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.25;
}

.section {
  padding: 104px 0;
  scroll-margin-top: 92px;
}

#about.section {
  padding-top: 74px;
}

.section-quiet {
  border-block: 1px solid rgba(245, 247, 241, 0.06);
  background:
    linear-gradient(120deg, rgba(245, 247, 241, 0.035), transparent 40%),
    rgba(245, 247, 241, 0.015);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(260px, 0.6fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 42px;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 12px;
}

.section-title {
  margin: 0;
  max-width: 820px;
  font-size: clamp(34px, 5.8vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

.section-intro {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  gap: 42px;
  align-items: start;
}

.prose {
  color: #d9e2d7;
  font-size: 18px;
}

.prose p {
  margin: 0 0 22px;
}

.capability-grid {
  display: grid;
  gap: 12px;
}

.capability {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px;
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.capability:hover,
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(88, 242, 181, 0.36);
  background: rgba(20, 26, 31, 0.88);
}

.capability-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--amber), var(--mint));
}

.capability h3,
.capability p {
  grid-column: 2;
}

.capability h3 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.capability p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.project-card {
  display: flex;
  min-height: 100%;
  overflow: hidden;
  border-top: 3px solid var(--accent, var(--mint));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.project-card-featured {
  grid-column: span 2;
}

.project-media {
  flex: 0 0 43%;
  min-height: 260px;
  overflow: hidden;
  background: var(--ink-2);
}

.project-card:not(.project-card-featured) {
  flex-direction: column;
}

.project-card:not(.project-card-featured) .project-media {
  flex: none;
  min-height: 0;
  aspect-ratio: 16 / 10;
}

.project-media img,
.project-media .image-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.project-card:hover .project-media img {
  transform: scale(1.04);
}

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.project-icon {
  width: 34px;
  height: 34px;
  background: var(--accent, var(--mint));
}

.project-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
  line-height: 1.14;
  letter-spacing: 0;
}

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

.tags {
  margin-top: auto;
  padding-top: 20px;
}

.project-links {
  margin-top: 14px;
}

.project-links a:hover {
  border-color: var(--accent, var(--mint));
  color: var(--paper);
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--mint), var(--coral), var(--cyan));
  opacity: 0.72;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 34px;
  padding-left: 44px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 7px rgba(88, 242, 181, 0.16);
}

.timeline-date {
  padding-top: 18px;
  color: var(--amber);
  font-weight: 950;
  font-size: 13px;
  text-transform: uppercase;
}

.timeline-body {
  padding: 18px;
  box-shadow: none;
}

.timeline-body h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.18;
}

.timeline-body p {
  margin: 0;
  color: var(--muted);
}

.timeline-compact .timeline-item {
  grid-template-columns: 220px minmax(0, 1fr);
}

.stack-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 34px;
  align-items: start;
}

.stack-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.stack-list > li > span {
  width: 48px;
  height: 48px;
  background: var(--accent, var(--mint));
}

.stack-list h3 {
  margin: 0 0 4px;
  font-size: 19px;
}

.stack-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.signal-panel {
  min-height: 420px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(88, 242, 181, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(255, 190, 61, 0.12), transparent 30%),
    #0a0d10;
}

.panel-bar {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 241, 0.04);
}

.panel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
}

.panel-dot:nth-child(2) {
  background: var(--amber);
}

.panel-dot:nth-child(3) {
  background: var(--mint);
}

.panel-code {
  margin: 0;
  padding: 24px;
  color: #bfffe6;
  font: 750 14px/1.85 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.guestbook-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(88, 242, 181, 0.1), transparent 30%),
    linear-gradient(315deg, rgba(255, 190, 61, 0.08), transparent 28%),
    rgba(245, 247, 241, 0.012);
}

.guestbook-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(245, 247, 241, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 247, 241, 0.08) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, transparent, black 18%, black 82%, transparent);
}

.guestbook-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.55fr);
  gap: 18px;
  align-items: stretch;
}

.guestbook-copy {
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 360px;
  border: 1px solid rgba(245, 247, 241, 0.1);
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(88, 242, 181, 0.11), transparent 48%),
    rgba(7, 9, 13, 0.52);
}

.guestbook-copy .section-intro {
  max-width: 700px;
}

.guestbook-proof {
  width: fit-content;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(88, 242, 181, 0.22);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(7, 9, 13, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.guestbook-proof strong {
  color: var(--paper);
  font-size: 18px;
}

.proof-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 18px rgba(88, 242, 181, 0.72);
}

.guestbook-form {
  display: grid;
  gap: 14px;
  align-self: stretch;
  border: 1px solid rgba(88, 242, 181, 0.2);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(88, 242, 181, 0.06), transparent 44%),
    rgba(8, 12, 14, 0.88);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.guestbook-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.guestbook-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.guestbook-form input,
.guestbook-form textarea {
  width: 100%;
  border: 1px solid rgba(245, 247, 241, 0.13);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--paper);
  background: rgba(0, 0, 0, 0.34);
  font: inherit;
  font-size: 14px;
  outline: none;
}

.guestbook-form textarea {
  min-height: 122px;
  resize: vertical;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: rgba(88, 242, 181, 0.52);
  box-shadow: 0 0 0 3px rgba(88, 242, 181, 0.08);
}

.guestbook-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.guestbook-form-row small,
.guestbook-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.guestbook-status {
  margin: 0;
  color: var(--coral);
}

.guestbook-wall {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-top: 16px;
}

.guestbook-note,
.guestbook-empty {
  border: 1px solid rgba(245, 247, 241, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(245, 247, 241, 0.055), transparent 54%),
    rgba(7, 9, 13, 0.62);
}

.guestbook-note {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  min-height: 156px;
  padding: 16px;
  overflow: hidden;
}

.guestbook-note::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--mint), var(--cyan));
  opacity: 0.68;
}

.guestbook-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  font-size: 12px;
  font-weight: 950;
}

.guestbook-note-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.guestbook-note strong {
  color: var(--paper);
  font-size: 15px;
}

.guestbook-note time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.guestbook-note p {
  margin: 10px 0 0;
  color: #dce5dc;
  font-size: 14px;
  line-height: 1.45;
}

.guestbook-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  padding: 22px;
  color: var(--muted);
}

.guestbook-empty strong {
  color: var(--paper);
}

.contact-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  width: 100%;
  min-height: calc(100svh - 72px);
  margin: 0;
  padding: 92px 0;
  scroll-margin-top: 92px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(120deg, rgba(88, 242, 181, 0.14), rgba(255, 107, 127, 0.08) 54%, rgba(77, 215, 255, 0.12)),
    var(--ink-2);
}

.contact-inner {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  justify-items: center;
  text-align: center;
}

.contact-inner h2 {
  margin: 0;
  font-size: clamp(38px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: 0;
}

.contact-inner p {
  max-width: 720px;
  margin: 20px auto 30px;
  color: #dbe5da;
  font-size: 18px;
}

.contact-actions {
  width: min(560px, 100%);
  justify-content: center;
}

.contact-actions .button {
  flex: 1 1 150px;
}

.toast-stack {
  position: fixed;
  top: 88px;
  right: 20px;
  z-index: 95;
  width: min(380px, calc(100% - 40px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(88, 242, 181, 0.34);
  border-radius: 8px;
  color: var(--paper);
  background: rgba(7, 9, 13, 0.92);
  box-shadow: var(--shadow);
  animation: toastIn 0.24s ease both, toastOut 0.26s ease 3.28s forwards;
}

.toast-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--mint), var(--amber));
}

.toast strong,
.toast span {
  display: block;
}

.toast strong {
  font-size: 14px;
}

.toast span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.memorial-backdrop,
.game-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 9, 13, 0.8);
  backdrop-filter: blur(18px);
}

.memorial-backdrop {
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.memorial-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.memorial-message {
  width: min(760px, 100%);
  text-align: center;
}

.memorial-message p {
  margin: 0;
  color: var(--paper);
  font-size: clamp(28px, 5.6vw, 64px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
}

.memorial-message span {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
}

.memorial-restore {
  margin-top: 26px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 15px;
  color: var(--paper);
  background: rgba(245, 247, 241, 0.07);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.game-modal {
  z-index: 90;
}

.flappy-modal {
  background: #000;
  backdrop-filter: none;
}

.game-window {
  width: min(980px, 100%);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(88, 242, 181, 0.08), transparent 30%),
    linear-gradient(315deg, rgba(255, 107, 127, 0.1), transparent 32%),
    #090b0e;
}

.flappy-window {
  width: min(1060px, 100%);
  border: 1px solid rgba(88, 255, 164, 0.55);
  background: #000;
  box-shadow:
    0 0 0 1px rgba(88, 255, 164, 0.1),
    0 0 46px rgba(88, 255, 164, 0.18);
}

.shooter-window {
  width: min(1320px, calc(100vw - 44px));
  height: min(820px, calc(100svh - 44px));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(88, 242, 181, 0.22);
  background:
    linear-gradient(135deg, rgba(88, 242, 181, 0.08), transparent 32%),
    #07090d;
}

.game-hud {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(260px, 1.6fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 241, 0.04);
}

.game-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.game-title span {
  min-width: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--ink);
  background: var(--amber);
}

.flappy-title span {
  color: #000;
  background: #58ffa4;
  box-shadow: 0 0 18px rgba(88, 255, 164, 0.45);
}

.shooter-title span {
  color: var(--ink);
  background: var(--mint);
}

.flappy-window .game-hud {
  border-bottom-color: rgba(88, 255, 164, 0.38);
  background: #000;
}

.flappy-window .game-title,
.flappy-window .game-stat,
.flappy-window .game-stat strong,
.flappy-window .game-note {
  color: #58ffa4;
  text-shadow: 0 0 10px rgba(88, 255, 164, 0.32);
}

.flappy-window .game-stat,
.flappy-window .game-action {
  border-color: rgba(88, 255, 164, 0.38);
  color: #58ffa4;
  background: #000;
  box-shadow: inset 0 0 18px rgba(88, 255, 164, 0.08);
}

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

.game-stat {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(245, 247, 241, 0.11);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(7, 9, 13, 0.52);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.game-stat strong {
  color: var(--paper);
  font-size: 15px;
}

.game-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.game-canvas-shell {
  padding: 12px;
}

#signal-game {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid rgba(245, 247, 241, 0.14);
  border-radius: 8px;
  background: #050608;
  touch-action: none;
}

.shooter-canvas-shell {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px;
  cursor: none;
}

#bottle-game {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  border: 1px solid rgba(88, 242, 181, 0.24);
  border-radius: 8px;
  background: #040506;
  cursor: none;
  touch-action: none;
}

.flappy-terminal {
  position: relative;
  width: calc(100% - 24px);
  display: block;
  margin: 12px;
  overflow: hidden;
  border: 1px solid rgba(88, 255, 164, 0.62);
  border-radius: 8px;
  padding: 14px;
  color: #58ffa4;
  background: #000;
  box-shadow:
    inset 0 0 0 1px rgba(88, 255, 164, 0.08),
    inset 0 0 32px rgba(88, 255, 164, 0.12),
    0 18px 46px rgba(0, 0, 0, 0.32);
  font: inherit;
  text-align: left;
  text-shadow:
    0 0 8px rgba(88, 255, 164, 0.5),
    0 0 18px rgba(88, 255, 164, 0.2);
  cursor: pointer;
  touch-action: manipulation;
}

.flappy-terminal::after {
  content: none;
}

.flappy-terminal:focus-visible {
  outline: 2px solid #58ffa4;
  outline-offset: 3px;
}

.flappy-terminal pre {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  font-family: "Cascadia Mono", "Fira Code", Consolas, "Courier New", monospace;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
  white-space: pre;
  user-select: none;
}

@keyframes terminalSweep {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

.game-note {
  padding: 0 14px 14px;
  color: var(--muted);
  font-size: 13px;
}

.game-touch-controls {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.touch-control {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.flappy-window .touch-control {
  border-color: rgba(88, 255, 164, 0.55);
  color: #58ffa4;
  background: #000;
  box-shadow:
    inset 0 0 18px rgba(88, 255, 164, 0.12),
    0 0 18px rgba(88, 255, 164, 0.12);
  text-shadow: 0 0 10px rgba(88, 255, 164, 0.38);
}

.image-fallback {
  display: grid;
  place-items: center;
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(88, 242, 181, 0.16), transparent 50%),
    linear-gradient(315deg, rgba(255, 190, 61, 0.14), transparent 42%),
    var(--ink-2);
}

.image-fallback span {
  display: grid;
  place-items: center;
  min-width: 54px;
  min-height: 54px;
  border: 1px solid rgba(245, 247, 241, 0.18);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--paper);
  background: rgba(7, 9, 13, 0.42);
  font-weight: 950;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

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

@media (max-width: 1080px) {
  .nav-social {
    display: none;
  }

  .nav-links a {
    padding: 0 8px;
    font-size: 11px;
  }

  .hero-grid,
  .section-head,
  .about-grid,
  .stack-layout,
  .guestbook-layout {
    grid-template-columns: 1fr;
  }

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

  .hero-copy {
    order: 1;
  }

  .hero-card {
    order: 2;
    max-width: 620px;
  }

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

  .project-card-featured {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .site-nav {
    position: sticky;
  }

  .nav-inner {
    width: min(100% - 28px, 1180px);
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

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

  .nav-links a {
    white-space: nowrap;
  }

  .hero {
    min-height: 82svh;
    padding: 84px 0 48px;
  }

  .hero-media {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(7, 1fr);
    padding: 20px 14px;
    opacity: 0.2;
  }

  .hero-media img:nth-child(1),
  .hero-media .image-fallback:nth-child(1) {
    grid-column: 1 / span 3;
    grid-row: 1 / span 3;
  }

  .hero-media img:nth-child(2),
  .hero-media .image-fallback:nth-child(2) {
    grid-column: 4 / span 3;
    grid-row: 1 / span 2;
  }

  .hero-media img:nth-child(3),
  .hero-media .image-fallback:nth-child(3) {
    grid-column: 1 / span 4;
    grid-row: 4 / span 2;
  }

  .hero-media img:nth-child(4),
  .hero-media .image-fallback:nth-child(4) {
    grid-column: 5 / span 2;
    grid-row: 3 / span 3;
  }

  .hero-media img:nth-child(5),
  .hero-media .image-fallback:nth-child(5) {
    grid-column: 1 / span 3;
    grid-row: 6 / span 2;
  }

  .hero-media img:nth-child(6),
  .hero-media .image-fallback:nth-child(6) {
    grid-column: 4 / span 3;
    grid-row: 6 / span 2;
  }

  .quick-stats {
    width: min(100% - 28px, 1180px);
    margin-top: 20px;
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 76px 0;
  }

  #about.section {
    padding-top: 58px;
  }

  .project-grid,
  .project-card-featured {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .project-card,
  .project-card-featured {
    flex-direction: column;
  }

  .project-media,
  .project-card-featured .project-media {
    flex: none;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .timeline-item,
  .timeline-compact .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline-date {
    padding-top: 0;
  }

  .game-hud {
    grid-template-columns: 1fr;
  }

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

  .game-actions {
    justify-content: flex-start;
  }

  .shooter-window {
    width: calc(100vw - 28px);
    height: calc(100svh - 28px);
  }

  .game-touch-controls {
    display: grid;
  }

  .flappy-terminal pre {
    font-size: 10px;
  }
}

@media (max-width: 560px) {
  .wrap,
  .contact-inner {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    padding: 56px 0 34px;
  }

  .hero-media {
    display: none;
  }

  .brand span:last-child {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .hero-lede {
    font-size: 21px;
  }

  .contact-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .hero-actions .button {
    min-width: 0;
    padding: 0 12px;
    font-size: 14px;
  }

  .hero-actions .button.primary {
    grid-column: 1 / -1;
  }

  .button {
    width: 100%;
  }

  .hero-card {
    display: none;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .stat {
    min-height: 118px;
    padding: 22px 20px 20px;
  }

  .section-head {
    gap: 18px;
  }

  .section-title {
    font-size: clamp(32px, 12vw, 54px);
  }

  .guestbook-wall {
    grid-template-columns: 1fr;
  }

  .guestbook-form-row {
    align-items: stretch;
    flex-direction: column;
  }

  .capability {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .capability-icon,
  .stack-list > li > span {
    width: 42px;
    height: 42px;
  }

  .timeline::before {
    left: 10px;
  }

  .timeline-item {
    padding-left: 34px;
  }

  .timeline-item::before {
    left: 3px;
  }

  .panel-code {
    padding: 18px;
    font-size: 12px;
  }

  .cv-download,
  .memorial-trigger {
    display: none;
  }

  .run-dock {
    right: 14px;
    bottom: 14px;
  }

  .run-menu {
    right: 0;
    bottom: 64px;
    flex-direction: column;
    align-items: stretch;
    transform: translateY(10px) scale(0.98);
    transform-origin: right bottom;
  }

  .run-dock.is-open .run-menu {
    transform: translateY(0) scale(1);
  }

  .run-menu-action {
    min-width: 116px;
  }

  .toast-stack {
    top: 112px;
    right: 14px;
    width: calc(100% - 28px);
  }

  .memorial-message p {
    font-size: clamp(29px, 12vw, 52px);
  }

  .game-modal {
    padding: 10px;
  }

  .game-window {
    max-height: calc(100svh - 20px);
    overflow-y: auto;
  }

  .shooter-window {
    height: calc(100svh - 20px);
    overflow: hidden;
  }

  .shooter-canvas-shell {
    padding: 8px;
  }

  .flappy-terminal {
    padding: 10px;
  }

  .flappy-terminal pre {
    font-size: 7px;
  }

  .game-stat {
    min-width: 0;
  }
}

.portfolio-site [hidden],
.game-modal[hidden],
.memorial-backdrop[hidden],
.toast-stack[hidden] {
  display: none !important;
}
