/* =========================
   Theme
   ========================= */
:root {
  --bg: #07090b;
  --bg-2: #0a0d10;
  --panel: #171a20;
  --panel-2: #1d2027;

  --text: #f5f6f8;
  --muted: #aeb5c2;
  --muted-2: #798292;

  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);

  --accent: #f0d070;
  --accent-soft: rgba(240, 208, 112, 0.13);
  --warning-red: #ff4d4d;
  --green: #61d394;

  --radius: 28px;
  --max-width: 1120px;
}

/* =========================
   Base
   ========================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 22% -18%, rgba(240, 208, 112, 0.10), transparent 34rem),
    radial-gradient(circle at 92% 6%, rgba(111, 127, 255, 0.08), transparent 30rem),
    linear-gradient(180deg, #0a0d10 0%, var(--bg) 58%, #06080a 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 32vh;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.38));
}

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

p {
  color: var(--muted);
  line-height: 1.7;
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.065em;
}

h1 {
  max-width: 650px;
  font-size: clamp(3rem, 5.6vw, 5.25rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(2.35rem, 5vw, 4.4rem);
  line-height: 0.96;
}

h3 {
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  line-height: 1;
}

/* =========================
   Shared components
   ========================= */
.page-shell {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 38px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 950;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.index-card,
.project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.078), rgba(255, 255, 255, 0.035)),
    var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

.top-nav a,
.actions a,
.lightbox-header a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 850;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.top-nav a:hover,
.actions a:hover,
.lightbox-header a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

/* =========================
   Header
   ========================= */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 8px 0 92px;
}

.wordmark {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.top-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(16px);
}

/* =========================
   Hero
   ========================= */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 48px;
  padding: 34px 0 96px;
}

.hero-copy {
  min-width: 0;
}

.construction-notice {
  width: fit-content;
  margin: 26px 0 0;
  padding: 10px 14px;
  border: 1px solid rgba(240, 208, 112, 0.32);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 77, 77, 0.15), rgba(240, 208, 112, 0.16)),
    rgba(255, 255, 255, 0.035);
  color: var(--accent);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 950;
  letter-spacing: -0.035em;
  box-shadow: 0 16px 42px rgba(240, 208, 112, 0.09);
  text-shadow: 0 0 22px rgba(255, 77, 77, 0.16);
}


/* =========================
   Project index
   ========================= */
.index-card {
  align-self: center;
}

.index-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: #cbd1dc;
  font-weight: 900;
}

.index-header strong {
  color: var(--accent);
}

.index-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 18px 20px;
  transition: background 160ms ease;
}

.index-row:hover {
  background: rgba(255, 255, 255, 0.055);
}

.index-row strong {
  display: block;
  margin-bottom: 5px;
}

.index-row small {
  color: var(--muted);
  font-size: 0.9rem;
}

.index-dot {
  width: 11px;
  height: 11px;
  margin-top: 7px;
  border-radius: 99px;
}

.index-dot.green {
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(97, 211, 148, 0.12);
}

.index-dot.amber {
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

/* =========================
   Projects section
   ========================= */
.projects {
  padding-top: 4px;
}

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

.section-heading p:last-child {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 1rem;
}

.project-list {
  display: grid;
  gap: 22px;
}

/* =========================
   Project cards
   ========================= */
.project-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  padding: 30px;
}

.project-card.with-preview {
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 30px;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(240, 208, 112, 0.09), transparent 30rem);
}

.project-main,
.project-preview {
  position: relative;
}

.project-card p {
  max-width: 760px;
  margin: 18px 0 0;
}

.project-meta-line,
.tech-list,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-meta-line {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.badge,
.tech-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #c9ced8;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge {
  padding: 8px 10px;
}

.badge.highlighted {
  color: var(--accent);
  border-color: rgba(240, 208, 112, 0.35);
}

.tech-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.tech-list li {
  padding: 9px 11px;
  color: #d8dce5;
  letter-spacing: 0;
  text-transform: none;
}

.actions {
  margin-top: 28px;
}

.actions a {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
}

.actions a.primary-action {
  color: #101216;
  border-color: transparent;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(240, 208, 112, 0.12);
}

/* =========================
   Project screenshot preview
   ========================= */
.project-preview {
  min-height: 272px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #090b0f;
  outline: none;
}

.project-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 272px;
  object-fit: cover;
  opacity: 0.78;
  filter: saturate(0.98) contrast(1.05);
  transition: transform 220ms ease, opacity 220ms ease, filter 220ms ease;
}

.project-preview:hover img,
.project-preview:focus-visible img {
  transform: scale(1.035);
  opacity: 0.96;
  filter: saturate(1.05) contrast(1.08);
}

.project-preview span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(8, 10, 13, 0.80);
  backdrop-filter: blur(14px);
  color: #dfe3ea;
  font-weight: 900;
}

/* =========================
   Footer
   ========================= */
.site-footer {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 0.88rem;
}

/* =========================
   Lightbox
   ========================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 24px;
}

.lightbox:target {
  display: grid;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(12px);
  animation: lightboxFadeIn 180ms ease-out both;
}

.lightbox-panel {
  position: relative;
  width: min(1120px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #080a0d;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.75);
  transform-origin: center;
  animation: screenshotPopIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.lightbox-header strong {
  font-weight: 900;
}

.lightbox-header a {
  min-height: 34px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.lightbox-panel img {
  display: block;
  width: 100%;
  max-height: calc(90vh - 64px);
  object-fit: contain;
  background: #030405;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes screenshotPopIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
    filter: blur(6px);
  }

  72% {
    transform: translateY(-2px) scale(1.01);
    filter: blur(0);
  }

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

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

/* =========================
   Responsive
   ========================= */
@media (max-width: 960px) {
  .masthead {
    padding-bottom: 52px;
  }

  .hero,
  .project-card.with-preview {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 28px;
    padding-bottom: 70px;
  }

  .index-card {
    max-width: 520px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 24px, var(--max-width));
    padding-bottom: 32px;
  }

  .masthead {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 6px;
  }

  .top-nav {
    width: 100%;
  }

  .top-nav a {
    flex: 1;
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 4.1rem);
  }

  .construction-notice {
    border-radius: 18px;
    font-size: 1.1rem;
  }

  .project-card {
    padding: 22px;
    border-radius: 22px;
  }

  .project-meta-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-preview,
  .project-preview img {
    min-height: 220px;
  }

  .lightbox {
    padding: 12px;
  }
}
