/* ═══════════════════════════════════════════════════════════
   Jesper Scerri Portfolio — style.css
   Aesthetic: Dark editorial-cinematic. Syne display, DM Sans body.
   ═══════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:         #0a0a0c;
  --bg-2:       #111116;
  --bg-card:    #13131a;
  --border:     rgba(255,255,255,0.07);
  --border-hi:  rgba(255,255,255,0.15);
  --text:       #e8e6e0;
  --text-muted: #6b6a72;
  --text-dim:   #3d3c44;
  --accent:     #e84a27;
  --accent-2:   #f0a500;
  --accent-glow:rgba(232,74,39,0.18);
  --nav-h:      68px;

  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.7, 0, 0.84, 0);
}

[data-theme="light"] {
  --bg:         #f5f3ef;
  --bg-2:       #ededea;
  --bg-card:    #ffffff;
  --border:     rgba(0,0,0,0.08);
  --border-hi:  rgba(0,0,0,0.2);
  --text:       #0f0f12;
  --text-muted: #7a7880;
  --text-dim:   #c0bec8;
  --accent-glow:rgba(232,74,39,0.10);
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img, video { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── UTILITIES ──────────────────────────────────────────── */
.mono    { font-family: var(--font-mono); letter-spacing: 0.03em; }
.accent  { color: var(--accent); }
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}
.section { padding: 120px 0; }
.section-header {
  display: flex;
  align-items: baseline;
  gap: 32px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}
.section-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.02em;
}
em { font-style: italic; color: var(--text-muted); }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all 0.2s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #d13d1e; transform: translateY(-1px); }
.btn-ghost {
  border: 1px solid var(--border-hi);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-outline {
  border: 1px solid var(--border-hi);
  color: var(--text-muted);
  padding: 8px 16px;
  font-size: 11px;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 11px; }

/* ── REVEAL ANIMATION ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── TAGS ───────────────────────────────────────────────── */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ── PLACEHOLDER ────────────────────────────────────────── */
.project-video {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.media-placeholder {
  width: 100%;
  background: var(--bg-card);
  border: 1px dashed var(--border-hi);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  position: relative;
  overflow: hidden;
}
.media-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg,
      transparent 0, transparent 20px,
      rgba(255,255,255,0.015) 20px, rgba(255,255,255,0.015) 21px);
}
.media-placeholder--portrait { min-height: 420px; }
.placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: var(--text-dim);
  z-index: 1;
}
.placeholder-icon {
  font-size: 28px;
  color: var(--text-dim);
}
.placeholder-inner p { font-size: 12px; }
.placeholder-inner code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: rgba(232,74,39,0.08);
  padding: 3px 8px;
  border-radius: 2px;
}

.project-facts {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── NAV ────────────────────────────────────────────────── */
.nav-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav-wrap.scrolled {
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
[data-theme="light"] .nav-wrap.scrolled {
  background: rgba(245, 243, 239, 0.85);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 48px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-left: auto;
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-github {
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 2px;
  color: var(--text-muted);
}
.nav-github:hover { border-color: var(--border-hi); color: var(--text); }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 24px;
  flex-shrink: 0;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--border-hi); }
.theme-icon {
  position: absolute;
  font-size: 14px;
  transition: opacity 0.2s, transform 0.2s;
}
.theme-icon.sun { opacity: 0; transform: scale(0.8); }
.theme-icon.moon { opacity: 1; }
[data-theme="light"] .theme-icon.sun  { opacity: 1; transform: scale(1); }
[data-theme="light"] .theme-icon.moon { opacity: 0; transform: scale(0.8); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 70%);
}
.hero-glow {
  position: absolute;
  top: 20%;
  left: -10%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: heroGlowPulse 8s ease-in-out infinite alternate;
}
@keyframes heroGlowPulse {
  from { transform: translate(0, 0) scale(1); opacity: 0.6; }
  to   { transform: translate(40px, -40px) scale(1.1); opacity: 1; }
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 60px;
  padding-bottom: 80px;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(72px, 12vw, 140px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin-bottom: 28px;
}
.hero-title {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-intro {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 40px;
  font-weight: 300;
}
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 80px;
}
.hero-scroll {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scroll-line {
  width: 48px; height: 1px;
  background: var(--text-dim);
}

/* stagger hero reveals */
.hero .reveal:nth-child(1) { transition-delay: 0.1s; }
.hero .reveal:nth-child(2) { transition-delay: 0.2s; }
.hero .reveal:nth-child(3) { transition-delay: 0.3s; }
.hero .reveal:nth-child(4) { transition-delay: 0.4s; }
.hero .reveal:nth-child(5) { transition-delay: 0.5s; }
.hero .reveal:nth-child(6) { transition-delay: 0.6s; }

/* ── PROJECTS ───────────────────────────────────────────── */

.project-hero {
  grid-template-columns: 1fr;
  gap: 40px;
}

.project-hero .project-title {
  font-size: clamp(42px, 5vw, 64px);
}

.project-hero .project-desc {
  font-size: 17px;
}

.project-media {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.project-media:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.project-media::after {
  content: '';
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-media:hover::after {
  opacity: 1;
}

.project-media video,
.project-media img {
  border-radius: 6px;
}

.section-projects { background: var(--bg); }

.project-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-bottom: 120px;
  padding-bottom: 120px;
  border-bottom: 1px solid var(--border);
}
.project-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.project-block--alt { direction: rtl; }
.project-block--alt > * { direction: ltr; }

.project-media {
  position: relative;
}
.project-number {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 11px;
  color: var(--accent);
  background: rgba(0,0,0,0.6);
  padding: 4px 8px;
  border-radius: 2px;
  z-index: 2;
}

.project-info {}
.project-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.project-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 20px;
}
.project-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
  font-weight: 300;
}
.feature-list {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.feature-list li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}
.feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 11px;
}
.project-outcome {
  margin-top: 28px;
  padding: 16px 20px;
  border-left: 2px solid var(--accent);
  background: var(--bg-card);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.outcome-label {
  display: block;
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.igaming-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.igaming-item {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.igaming-item img {
  width: 100%;
  display: block;
}

.igaming-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

/* ── ABOUT ──────────────────────────────────────────────── */
.section-about { background: var(--bg-2); }
.about-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 80px;
  align-items: start;
}
.about-left .section-label { display: block; margin-bottom: 12px; }
.about-left .section-title { margin-bottom: 40px; }
.about-img-wrap { width: 100%; }
.about-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 20px;
  font-weight: 300;
}
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}
.skill-group {
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 2px;
}
.skill-heading {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}
.skill-group ul li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}
.skill-group ul li:last-child { border-bottom: none; }

/* ── CV ─────────────────────────────────────────────────── */
.section-cv { background: var(--bg); }
.section-cv .section-header { margin-bottom: 60px; }
.cv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.cv-block { margin-bottom: 40px; }
.cv-block-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.cv-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cv-entry:last-child { border-bottom: none; }
.cv-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.cv-entry strong { font-size: 14px; }
.cv-date { font-size: 11px; color: var(--text-muted); }
.cv-company { font-size: 13px; color: var(--text-muted); }
.cv-block p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.lang-list { display: flex; flex-direction: column; gap: 0; }
.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.lang-item:last-child { border-bottom: none; }
.lang-level { font-size: 11px; color: var(--text-muted); }

/* ── CONTACT ────────────────────────────────────────────── */
.section-contact {
  background: var(--bg-2);
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.contact-inner {
  max-width: 680px;
}
.contact-inner .section-label { display: block; margin-bottom: 12px; }
.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-bottom: 24px;
}
.contact-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 48px;
  font-weight: 300;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: border-color 0.2s, color 0.2s;
}
.contact-link:hover { border-color: var(--accent); color: var(--text); }
.contact-link-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-location { cursor: default; }
.contact-location:hover { border-color: var(--border); color: var(--text-muted); }

/* ── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-copy { font-size: 11px; color: var(--text-dim); }
.footer-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.footer-link:hover { color: var(--accent); }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .project-block { grid-template-columns: 1fr; gap: 40px; }
  .project-block--alt { direction: ltr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-img-wrap { display: none; }
  .cv-grid { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 80px 0; }
  .nav-inner { padding: 0 20px; gap: 0; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px 32px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
    z-index: 99;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav-link {
    font-size: 13px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
  .nav-github { border: none; padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--border); }

  .nav-actions .btn-outline { display: none; }
  .hamburger { display: flex; }

  .hero-name { font-size: clamp(56px, 15vw, 100px); }
  .skills-grid { grid-template-columns: 1fr; }
  .section-header { flex-direction: column; gap: 8px; }
  .cv-entry-header { flex-direction: column; gap: 2px; }
  .footer-inner { flex-direction: column; text-align: center; gap: 8px; }
}
