/* ============================================================
   NIGHT THEME — game designer portfolio
   Colors live in :root — tweak them to re-skin the whole site.
   ============================================================ */

:root {
  --bg: #0b0e14;            /* page background */
  --bg-alt: #10141d;        /* alternating sections */
  --surface: #151a26;       /* cards */
  --surface-hover: #1a2130;
  --border: #232b3d;
  --text: #e8ecf4;
  --text-dim: #9aa4b8;
  --accent: #7c5cff;        /* violet */
  --accent-2: #38e1c8;      /* teal glow */
  --radius: 14px;
  --font-display: "Chakra Petch", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(1100px, 100% - 2.5rem);
  margin-inline: auto;
}

/* ===== Header ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--text);
}
.nav-logo:hover { text-decoration: none; }

.logo-mark { color: var(--accent); }
.logo-accent { color: var(--accent-2); }

.nav-links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ===== Hero ===== */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 12vw, 8.5rem);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 75%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.hero-tag {
  font-family: var(--font-display);
  color: var(--accent-2);
  letter-spacing: 0.25em;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6.5vw, 4.2rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.glow {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(124, 92, 255, 0.55);
}

.hero-sub {
  max-width: 34rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

/* ===== Buttons ===== */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  letter-spacing: 0.04em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5a3fe0);
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(124, 92, 255, 0.5); }

/* ===== Sections ===== */

.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin-bottom: 2.2rem;
}

.section-num {
  color: var(--accent-2);
  font-size: 0.7em;
  vertical-align: middle;
  margin-right: 0.5rem;
  opacity: 0.9;
}

/* ===== Project grid ===== */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  background: var(--surface-hover);
}

.card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-alt);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.project-card:hover .card-image img { transform: scale(1.04); }

.card-body {
  padding: 1.1rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card-role { color: var(--accent-2); }
.card-year { color: var(--text-dim); }

.card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.card-summary {
  color: var(--text-dim);
  font-size: 0.93rem;
  flex: 1;
}

.card-tags, .skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ===== About / Contact ===== */

.about-body { max-width: 46rem; display: grid; gap: 1.4rem; }
.about-body p { color: var(--text-dim); }

.contact p { color: var(--text-dim); margin-bottom: 1.5rem; }

.contact-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}

/* ===== Project page ===== */

.project-page { padding-block: 2.5rem 4rem; }

.back-link {
  display: inline-block;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}
.back-link:hover { color: var(--text); text-decoration: none; }

.project-header { margin-bottom: 2.2rem; display: grid; gap: 0.7rem; }

.project-header .card-meta { justify-content: flex-start; gap: 1.2rem; }

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.15;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 1.2rem;
  margin-bottom: 2.8rem;
}

.gallery-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}
.gallery-item img:hover { opacity: 0.9; }

.gallery-item figcaption {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

.project-description { max-width: 46rem; display: grid; gap: 1.1rem; }

.project-description h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.project-description p { color: var(--text-dim); }

.project-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.8rem; }

/* ===== Lightbox ===== */

.lightbox[hidden] { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 7, 11, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
}
.lightbox-close:hover { color: var(--accent-2); }

/* ===== Footer ===== */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 1.6rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===== Mobile ===== */

@media (max-width: 600px) {
  .nav { flex-direction: column; gap: 0.5rem; padding-block: 0.8rem; }
  .nav-links { gap: 1.1rem; }
  .project-grid { grid-template-columns: 1fr; }
  .card-image { aspect-ratio: 16 / 10; }
  .contact-links { gap: 1.1rem; }
}

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