/* =========================================
   Roblox UI Portfolio - Dark / Sleek theme
   Font: Montserrat Extra Bold (800)
   ========================================= */

:root {
  --bg: #0a0a0d;
  --bg-elevated: #131318;
  --bg-card: #17171d;
  --border: #26262e;
  --border-hover: #4a4a58;
  --text: #f4f4f6;
  --text-muted: #8a8a96;
  --accent: #7c5cff;
  --accent-glow: rgba(124, 92, 255, 0.35);
  --radius: 14px;
  --max-width: 1240px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  font-weight: 800;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 60% 40% at 50% -10%, rgba(124, 92, 255, 0.18), transparent 70%);
  background-repeat: no-repeat;
}

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

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 120px 24px 72px;
  text-align: center;
}

.hero__eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero__title {
  font-size: clamp(1.6rem, 6.2vw, 5.25rem);
  white-space: nowrap;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 20px;
}

.hero__tagline {
  font-size: clamp(0.8rem, 1.6vw, 1rem);
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* ---------- Work grid ---------- */

.work {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 96px;
}

.section__title {
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.card {
  display: block;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.card__box {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover .card__box,
.card:focus-visible .card__box {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 18px 40px -18px var(--accent-glow);
}

.card:focus-visible { outline: none; }

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Shown when an image file is missing */
.card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
}

.card__caption {
  margin-top: 14px;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card__sub {
  margin-top: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 64px 24px 48px;
  text-align: center;
}

.footer__text {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.footer__links a {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  transition: color 0.2s ease;
}

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

.footer__copy {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.94);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  z-index: 100;
}

.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: min(1200px, 92vw);
  max-height: 78vh;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.lightbox__caption {
  margin-top: 20px;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Responsive ---------- */

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

@media (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 80px; }
}

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