:root {
  --bg: #14171f;
  --bg-panel: #1c202a;
  --bg-panel-hover: #232838;
  --border: #2b3040;
  --border-soft: #232736;
  --text: #e9e7de;
  --text-dim: #8d94a3;
  --text-faint: #565d6d;
  --accent: #f2a65a;
  --accent-soft: rgba(242, 166, 90, 0.14);
  --teal: #5fb8ad;
  --teal-soft: rgba(95, 184, 173, 0.14);
  --violet: #9b8cd9;
  --violet-soft: rgba(155, 140, 217, 0.14);
  --green: #7ec488;
  --green-soft: rgba(126, 196, 136, 0.14);
  --coral: #e2795c;
  --coral-soft: rgba(226, 121, 92, 0.14);
  --blue: #6fa3d8;
  --blue-soft: rgba(111, 163, 216, 0.14);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
}

/* subtle scanline texture, fixed, very low opacity */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.012),
    rgba(255, 255, 255, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
}

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.16;
  transition: transform 0.7s ease-out;
  will-change: transform;
}

.blob-amber {
  width: 460px;
  height: 460px;
  top: -120px;
  left: -100px;
  background: var(--accent);
}

.blob-teal {
  width: 420px;
  height: 420px;
  top: 40vh;
  right: -140px;
  background: var(--teal);
}

.blob-violet {
  width: 380px;
  height: 380px;
  bottom: -140px;
  left: 20vw;
  background: var(--violet);
}

@media (prefers-reduced-motion: reduce) {
  .blob { transition: none !important; }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 23, 31, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
}

.wordmark-dot { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  transition: color 0.15s ease;
}

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

.kofi-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  color: var(--accent) !important;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  transition: background 0.15s ease;
}

.kofi-pill:hover { background: rgba(242, 166, 90, 0.26); }

/* ---------- hero ---------- */

.hero {
  padding: 96px 32px 72px;
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  margin: 0 auto 24px;
  max-width: 20ch;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0 auto 40px;
}

.hero-engines {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}

.engine-tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
}

/* ---------- log section ---------- */

.log-section {
  padding: 40px 32px 96px;
  position: relative;
  z-index: 2;
}

.log-heading {
  margin-bottom: 24px;
}

.log-heading h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 8px;
}

.log-heading-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
}

.subsection-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.subsection-title-personal { color: var(--accent); }
.subsection-title-jam { color: var(--coral); }

.project-bands {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.project-band {
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 22px 24px 6px;
}

.project-band.band-personal {
  background: linear-gradient(180deg, var(--accent-soft), rgba(242, 166, 90, 0.02) 65%, transparent);
  border-color: rgba(242, 166, 90, 0.18);
}

.project-band.band-jam {
  background: linear-gradient(180deg, var(--coral-soft), rgba(226, 121, 92, 0.02) 65%, transparent);
  border-color: rgba(226, 121, 92, 0.18);
}

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

@media (min-width: 1080px) {
  .project-grid { grid-template-columns: repeat(3, 1fr); }
}

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

.project-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font: inherit;
}

.project-card:hover,
.project-card:focus-visible {
  background: var(--bg-panel-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1e2330, #171a22);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 12px;
  position: relative;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-badge-thumb {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(14, 16, 21, 0.82) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 2px 8px rgba(10, 12, 16, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

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

.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  margin: 0;
  color: var(--text);
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.status-active { color: var(--accent); background: var(--accent-soft); }
.status-prototype { color: var(--teal); background: var(--teal-soft); }
.status-concept { color: var(--violet); background: var(--violet-soft); }
.status-released { color: var(--green); background: var(--green-soft); }
.status-game-jam { color: var(--coral); background: var(--coral-soft); }
.status-industry { color: var(--blue); background: var(--blue-soft); }

.card-tagline {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
  flex: 1;
}

.card-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.placement-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(242, 166, 90, 0.35);
  border-radius: 6px;
  padding: 5px 9px;
  width: fit-content;
}

.tool-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
}

/* ---------- about ---------- */

.about {
  padding: 40px 32px 100px;
  border-top: 1px solid var(--border-soft);
  position: relative;
  z-index: 2;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  padding-top: 48px;
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
}

.about h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 16px;
}

.about p {
  color: var(--text-dim);
  font-size: 15px;
}

.about-stack-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0 0 14px;
}

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

.stack-tags .tool-tag {
  font-size: 12px;
  padding: 5px 10px;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 48px 32px 64px;
  border-top: 1px solid var(--border-soft);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0 0 8px;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0;
  max-width: 40ch;
}

.footer-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.footer-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 16, 0.72);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
  overflow-y: auto;
  z-index: 100;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 760px;
  width: 100%;
  padding: 32px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

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

.modal-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  margin: 0;
}

.modal-tagline {
  color: var(--text-dim);
  font-size: 15px;
  margin: 4px 0 24px;
}

.play-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  padding: 8px 14px;
  border-radius: 6px;
  margin: 4px 0 20px;
}

.play-link:hover { background: rgba(242, 166, 90, 0.24); }

.modal-play-embed {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0e1015;
  border-radius: 8px;
  overflow: hidden;
  margin: 4px 0 24px;
  border: 1px solid var(--border);
}

.modal-play-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.modal-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0e1015;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}

.modal-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.modal-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 13px;
}

.modal-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 24px 0 10px;
}

.modal-summary {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.7;
}

.modal-meta-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.modal-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.modal-gallery-placeholder {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
