/* ============================================================
   ALEX RIVERA — VIDEO EDITOR PORTFOLIO
   Accent palette:
     #0a0a0f  — near-black background
     #111118  — section dark bg
     #1a1a28  — card surface
     #f0f0f0  — light sections
     var(--accent)  — violet accent (primary)
     var(--accent-light)  — violet lighter
     var(--accent2)  — cyan accent (secondary)
     var(--accent3)  — amber for highlights
   ============================================================ */

/* ——— RESET ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-dark:      #0a0a0f;
  --bg-section:   #111118;
  --bg-card:      #1a1a28;
  --bg-light:     #0d0d15;
  --bg-footer:    #080810;
  --text-white:   #ffffff;
  --text-light:   rgba(255,255,255,0.85);
  --text-muted:   rgba(255,255,255,0.45);
  --text-dark:    #1a1a2e;
  --text-dark-m:  #444;
  --accent:       #7C3AED;
  --accent-light: #A855F7;
  --accent-glow:  rgba(124,58,237,0.25);
  --accent2:      #06B6D4;
  --accent3:      #F59E0B;
  --nav-h:        68px;
  --serif:        'Playfair Display', Georgia, serif;
  --sans:         'Inter', system-ui, sans-serif;
  --display:      'Montserrat', 'Inter', sans-serif;
  --ease-out:     cubic-bezier(0.22, 1, 0.36, 1);
  --tr-fast:      200ms ease;
  --tr-med:       400ms ease;
  --tr-slow:      700ms var(--ease-out);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-dark);
  color: var(--text-white);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 1000;
  transition: background var(--tr-fast), height var(--tr-fast), box-shadow var(--tr-fast);
}
.navbar.scrolled {
  background: rgba(10,10,15,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
  height: 58px;
}
.nav-container {
  max-width: 1300px; margin: 0 auto; padding: 0 40px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display); font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.14em; color: var(--text-white);
  transition: opacity var(--tr-fast);
}
.nav-logo:hover { opacity: 0.7; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 0.85rem; font-weight: 800;
  color: #fff; flex-shrink: 0; letter-spacing: 0.05em;
}
.logo-text { letter-spacing: 0.16em; }
.nav-links { display: flex; }
.nav-item { position: relative; }
.nav-link {
  display: block; padding: 0 18px;
  height: var(--nav-h); line-height: var(--nav-h);
  font-family: var(--display); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); transition: color var(--tr-fast);
}
.navbar.scrolled .nav-link { height: 58px; line-height: 58px; }
.nav-link:hover, .nav-link.active { color: var(--text-white); }
.nav-link::after {
  content: ''; display: block; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width var(--tr-med); border-radius: 1px;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger-line {
  width: 24px; height: 1.5px; background: var(--text-white);
  transition: transform var(--tr-fast), opacity var(--tr-fast);
}
.hamburger.active .hamburger-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px); z-index: 1001;
  opacity: 0; pointer-events: none; transition: opacity var(--tr-med);
}
.mobile-overlay.active { opacity: 1; pointer-events: auto; }
.mobile-menu {
  position: fixed; top: 0; right: -340px; width: 310px;
  height: 100dvh; background: #0d0d15;
  border-left: 1px solid rgba(255,255,255,0.07);
  z-index: 1002; transition: right var(--tr-slow);
  display: flex; flex-direction: column;
}
.mobile-menu.open { right: 0; }
.mobile-menu-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.mobile-close {
  background: none; border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-white); font-size: 1.4rem;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--tr-fast);
}
.mobile-close:hover { background: rgba(255,255,255,0.08); }
.mobile-nav-links { display: flex; flex-direction: column; padding: 12px 0; flex: 1; }
.mobile-nav-link {
  display: block; padding: 16px 28px;
  font-family: var(--display); font-size: 0.88rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.65); border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: color var(--tr-fast), padding var(--tr-fast), background var(--tr-fast);
}
.mobile-nav-link:hover { color: var(--text-white); padding-left: 36px; background: rgba(124,58,237,0.08); }
.mobile-resume-btn {
  display: block; margin: 20px 24px 28px;
  padding: 13px; text-align: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border-radius: 8px;
  font-family: var(--display); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: opacity var(--tr-fast);
}
.mobile-resume-btn:hover { opacity: 0.85; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-solid {
  display: inline-block; padding: 14px 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff; border: none; border-radius: 8px; cursor: pointer;
  font-family: var(--display); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: opacity var(--tr-fast), transform var(--tr-fast), box-shadow var(--tr-med);
}
.btn-solid:hover {
  opacity: 0.9; transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--accent-glow);
}
.btn-solid.full-width { width: 100%; text-align: center; }
.btn-outline-pill {
  display: inline-block; padding: 13px 32px;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 60px; cursor: pointer;
  background: transparent; color: var(--text-white);
  font-family: var(--display); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: background var(--tr-fast), border-color var(--tr-fast), transform var(--tr-fast);
}
.btn-outline-pill:hover {
  background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6);
  transform: translateY(-2px);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}
.reveal-up    { transform: translateY(36px); }
.reveal-left  { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }
.reveal-up.revealed, .reveal-left.revealed, .reveal-right.revealed { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }
.delay-4 { transition-delay: 0.48s; }

/* ============================================================
   SECTION SHARED
   ============================================================ */
.section-container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-eyebrow {
  display: block; font-family: var(--display); font-size: 0.6rem;
  font-weight: 700; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--accent-light); margin-bottom: 14px;
}
.section-headline {
  font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700; line-height: 1.15; color: var(--text-white); margin-bottom: 16px;
}
.section-headline.light { color: var(--text-white); }
.section-headline em { font-style: italic; font-weight: 400; color: var(--accent-light); }
.section-sub { font-size: 0.95rem; color: var(--text-muted); max-width: 520px; margin: 0 auto; line-height: 1.65; }
.section-sub.light { color: var(--text-muted); }

/* ANIMATED BACKGROUND UTILITY */
.animated-bg {
  position: relative; overflow: hidden;
}
.animated-bg::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(124,58,237,0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(6,182,212,0.05) 0%, transparent 40%);
  animation: bgDrift 20s ease-in-out infinite alternate;
  pointer-events: none;
}
.animated-bg > * { position: relative; z-index: 1; }

@keyframes bgDrift {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(-2%, 2%) scale(1.1); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; width: 100%; height: 100vh; min-height: 620px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(124,58,237,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 70%, rgba(6,182,212,0.1) 0%, transparent 60%),
    linear-gradient(to bottom, #0a0a0f 0%, #0d0a1a 100%);
}
.hero-content { position: relative; z-index: 3; padding: 0 24px; max-width: 820px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border: 1px solid rgba(124,58,237,0.5);
  border-radius: 60px; background: rgba(124,58,237,0.12);
  font-family: var(--display); font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent-light);
  margin-bottom: 24px;
}
.hero-badge::before { content: '●'; font-size: 0.5em; color: #5eead4; animation: pulseGreen 2s infinite; }
@keyframes pulseGreen {
  0%,100% { opacity: 1; } 50% { opacity: 0.3; }
}
.hero-headline {
  font-family: var(--serif); font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700; line-height: 1.08; color: var(--text-white);
  letter-spacing: -0.02em; margin-bottom: 24px;
  text-shadow: 0 0 80px rgba(124,58,237,0.3);
}
.hero-headline em { font-style: italic; font-weight: 400; color: var(--accent-light); }
.hero-roles { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 4px; margin-bottom: 20px; }
.role-tag {
  font-family: var(--display); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
}
.role-sep { color: var(--accent-light); font-size: 0.9em; }
.hero-sub { font-size: 1rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 40px; max-width: 520px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll-indicator {
  position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: scrollFade 2s ease-in-out infinite alternate;
}
.scroll-label { font-family: var(--display); font-size: 0.58rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-muted); }
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--accent-light), transparent); }
@keyframes scrollFade { from { opacity: 0.4; transform: translateX(-50%) translateY(0); } to { opacity: 0.8; transform: translateX(-50%) translateY(6px); } }

/* ============================================================
   SKILLS STRIP
   ============================================================ */
.skills-strip {
  overflow: hidden; background: var(--bg-section);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 20px 0;
}
.skills-track {
  display: flex; gap: 32px; white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.skills-track span {
  font-family: var(--display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.strip-dot { color: var(--accent-light) !important; font-size: 0.5em !important; vertical-align: middle; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio-section { background: var(--bg-light); padding: 110px 0; }

.filter-tabs {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 50px;
}
.filter-btn {
  padding: 9px 22px; border-radius: 60px; border: 1px solid rgba(255,255,255,0.15);
  background: transparent; cursor: pointer;
  font-family: var(--display); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted);
  transition: background var(--tr-fast), color var(--tr-fast), border-color var(--tr-fast), transform var(--tr-fast);
}
.filter-btn:hover { background: rgba(124,58,237,0.08); border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-btn:hover { transform: translateY(-1px); }

.portfolio-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.port-card {
  background: var(--bg-card); border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 30px rgba(0,0,0,0.25);
  transition: transform var(--tr-med), box-shadow var(--tr-med), opacity var(--tr-fast);
  cursor: pointer;
}
.port-card:hover { transform: translateY(-8px); box-shadow: 0 24px 60px rgba(0,0,0,0.14); }
.port-card.hidden { display: none !important; }
.port-thumb {
  height: 210px; background-size: cover; background-position: center;
  position: relative; overflow: hidden;
  /* Dark gradient fallback when thumbnail image fails to load */
  background-color: #111122;
  background-image: linear-gradient(135deg, rgba(124,58,237,0.2) 0%, rgba(6,182,212,0.1) 100%);
}
.port-thumb[style*="url("] {
  /* Ensure background-image from inline style takes precedence but keeps the color fallback below */
  background-color: #111122;
}
.port-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,0.85));
  transition: opacity var(--tr-med);
}
.port-card:hover .port-thumb::after { opacity: 0.8; }
.port-play-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(124,58,237,0.9); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2; opacity: 0; transition: opacity var(--tr-med), transform var(--tr-med);
}
.port-play-btn svg { width: 22px; height: 22px; color: #fff; margin-left: 3px; }
.port-card:hover .port-play-btn { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.port-info { padding: 20px 22px 22px; }
.port-tag {
  display: inline-block; font-family: var(--display); font-size: 0.58rem;
  font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.port-title { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; color: var(--text-white); margin-bottom: 8px; line-height: 1.3; }
.port-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 14px; }
.port-watch-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--sans); font-size: 0.8rem; font-weight: 600;
  color: var(--accent); letter-spacing: 0.02em;
  transition: color var(--tr-fast), gap var(--tr-fast);
}
.port-watch-btn:hover { color: var(--accent-light); }

/* ============================================================
   RESUME SECTION
   ============================================================ */
.resume-section {
  position: relative; background: var(--bg-section);
  padding: 120px 0; overflow: hidden;
}
.resume-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(124,58,237,0.12) 0%, transparent 65%),
    url('assets/experience-bg.jpg') center/cover no-repeat;
  opacity: 0.15;
}
.hex-grid { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hex {
  position: absolute; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border: 1px solid rgba(124,58,237,0.15); background: rgba(124,58,237,0.04);
}
.hex-1 { width: 280px; height: 243px; right: 60px; top: 40px; }
.hex-2 { width: 180px; height: 156px; right: -40px; top: 220px; }
.hex-3 { width: 220px; height: 191px; right: 180px; bottom: 20px; }
.hex-4 { width: 150px; height: 130px; left: 60px; bottom: 60px; opacity: 0.5; }
.resume-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start;
}
.resume-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.resume-timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item {
  display: flex; gap: 20px; padding-bottom: 36px; position: relative;
}
.timeline-item:not(:last-child)::after {
  content: ''; position: absolute; left: 7px; top: 16px; bottom: 0;
  width: 1px; background: linear-gradient(to bottom, var(--accent), rgba(124,58,237,0.1));
}
.timeline-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 12px var(--accent-glow); position: relative; z-index: 1;
}
.timeline-body { flex: 1; }
.timeline-year {
  display: block; font-family: var(--display); font-size: 0.62rem;
  font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-light); margin-bottom: 6px;
}
.timeline-role { font-family: var(--display); font-size: 1rem; font-weight: 700; color: var(--text-white); margin-bottom: 4px; }
.timeline-company { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.timeline-desc { font-size: 0.83rem; color: rgba(255,255,255,0.5); line-height: 1.6; }

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.certs-section { background: var(--bg-light); padding: 110px 0; }
.certs-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.cert-card {
  background: var(--bg-card); border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2); cursor: pointer;
  transition: transform var(--tr-med), box-shadow var(--tr-med);
}
.cert-card:hover { transform: translateY(-6px) rotate(-0.5deg); box-shadow: 0 24px 60px rgba(0,0,0,0.35); }
.cert-img-wrap { position: relative; height: 180px; overflow: hidden; }
.cert-img {
  width: 100%; height: 100%; background-size: cover; background-position: center;
  transition: transform 0.6s ease;
}
.cert-card:hover .cert-img { transform: scale(1.07); }
.cert-img-overlay {
  position: absolute; inset: 0; background: rgba(124,58,237,0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--tr-med);
}
.cert-card:hover .cert-img-overlay { opacity: 1; }
.cert-view-icon { color: #fff; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.1em; }
.cert-info { padding: 18px 20px; }
.cert-issuer {
  display: block; font-family: var(--display); font-size: 0.58rem;
  font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px;
}
.cert-title { font-family: var(--serif); font-size: 0.95rem; font-weight: 700; color: var(--text-white); line-height: 1.35; margin-bottom: 6px; }
.cert-year { font-size: 0.75rem; color: var(--text-muted); }

/* ============================================================
   ABOUT
   ============================================================ */
.about-section { position: relative; background: var(--bg-section); padding: 120px 0; overflow: hidden; }
.about-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 50%, rgba(6,182,212,0.08) 0%, transparent 65%);
}
.about-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: center;
}
.portrait-frame {
  width: 100%; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(124,58,237,0.3);
  box-shadow: 0 0 60px rgba(124,58,237,0.15); position: relative;
}
.portrait-img {
  width: 100%; height: 100%;
  background: url('https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=600&q=80') center/cover no-repeat;
}
.portrait-stats {
  display: flex; justify-content: space-between; margin-top: 20px; gap: 8px;
}
.stat-item { text-align: center; flex: 1; }
.stat-num {
  display: block; font-family: var(--display); font-size: 1.6rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 2px;
}
.stat-label { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.05em; }
.about-bio { font-size: 0.92rem; color: rgba(255,255,255,0.6); line-height: 1.75; margin-bottom: 16px; }
.about-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tool-badge {
  padding: 6px 14px; border-radius: 6px; background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25); color: var(--accent-light);
  font-family: var(--display); font-size: 0.67rem; font-weight: 600;
  letter-spacing: 0.08em; transition: background var(--tr-fast);
}
.tool-badge:hover { background: rgba(124,58,237,0.22); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section { background: var(--bg-dark); padding: 120px 0; }
.contact-layout {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 80px; align-items: start;
}
.contact-item {
  display: flex; align-items: flex-start; gap: 16px; margin-bottom: 28px;
}
.contact-icon { font-size: 1.2rem; margin-top: 2px; }
.contact-label {
  display: block; font-family: var(--display); font-size: 0.6rem;
  font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 4px;
}
.contact-value { display: block; font-size: 0.9rem; color: var(--text-white); }
a.contact-value:hover { color: var(--accent-light); }
.contact-socials { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.social-link {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5); transition: border-color var(--tr-fast), color var(--tr-fast), background var(--tr-fast);
}
.social-link svg { width: 15px; height: 15px; }
.social-link:hover { border-color: var(--accent-light); color: var(--accent-light); background: rgba(124,58,237,0.1); }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-family: var(--display); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted);
}
.form-input, .form-select, .form-textarea {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: var(--text-white); font-family: var(--sans);
  font-size: 0.9rem; padding: 12px 16px; outline: none; resize: none;
  transition: border-color var(--tr-fast), background var(--tr-fast);
}
.form-select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.3)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.form-select option { background: #1a1a28; color: #fff; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent); background: rgba(124,58,237,0.07);
}
.form-input::placeholder, .form-textarea::placeholder { color: rgba(255,255,255,0.2); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg-footer); border-top: 1px solid rgba(255,255,255,0.06); }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 72px 40px;
  display: grid; grid-template-columns: 1.2fr 2fr; gap: 80px;
}
.footer-logo-mark { width: 48px; height: 48px; font-size: 1rem; border-radius: 10px; margin-bottom: 16px; }
.footer-tagline { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }
.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.25); }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.footer-col-title {
  font-family: var(--display); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.85); margin-bottom: 18px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link { font-size: 0.8rem; color: rgba(255,255,255,0.38); transition: color var(--tr-fast), padding var(--tr-fast); }
.footer-link:hover { color: rgba(255,255,255,0.85); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  max-width: 1200px; margin: 0 auto;
  padding: 20px 40px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-legal-text { font-size: 0.72rem; color: rgba(255,255,255,0.25); }
.footer-legal-links { display: flex; gap: 22px; }
.footer-legal-link { font-size: 0.72rem; color: rgba(255,255,255,0.28); transition: color var(--tr-fast); }
.footer-legal-link:hover { color: rgba(255,255,255,0.7); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--tr-med);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.88); backdrop-filter: blur(8px); }
.lightbox-inner {
  position: relative; z-index: 1; width: 94vw; max-width: 900px;
  background: #0d0d18; border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1); overflow: hidden;
  transform: scale(0.94); transition: transform var(--tr-med);
  /* Allow content to scroll on very small screens */
  max-height: 96vh; display: flex; flex-direction: column;
}
.lightbox-inner .lb-video-wrap { flex-shrink: 0; }
.lightbox.open .lightbox-inner { transform: scale(1); }
.lb-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(0,0,0,0.5);
  color: var(--text-white); font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--tr-fast);
}
.lb-close:hover { background: var(--accent); border-color: var(--accent); }
.lb-title { padding: 24px 60px 0 24px; font-family: var(--serif); font-size: 1.1rem; color: var(--text-white); margin-bottom: 16px; }
.lb-video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  /* 16:9 via padding-bottom fallback for browsers without aspect-ratio support */
  padding-bottom: 56.25%;
  height: 0;
}
/* Override for modern browsers that support aspect-ratio */
@supports (aspect-ratio: 16/9) {
  .lb-video-wrap {
    padding-bottom: 0;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
/* #plyr-player is the direct child of .lb-video-wrap — scoped inside
   #video-lightbox so it cannot escape its container */
#video-lightbox #plyr-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#video-lightbox .lb-video-wrap iframe,
#video-lightbox .lb-video-wrap #plyr-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.plyr--video { background: #000; }
.cert-lb-inner { max-width: 700px; }
.cert-lb-img-wrap { padding: 0 24px 24px; }
.cert-lb-img-display {
  width: 100%;
  min-height: 320px;
  border-radius: 8px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0a0a14;
}
.resume-lb-inner { max-width: 720px; max-height: 90vh; overflow-y: auto; }
.resume-preview-body { padding: 0 28px 28px; }
.resume-preview-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.resume-preview-header h2 { font-size: 1.8rem; color: var(--text-white); margin-bottom: 6px; }
.resume-preview-header p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 4px; }
.resume-preview-section { margin-bottom: 24px; }
.resume-preview-section h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent-light); margin-bottom: 12px; font-family: var(--display); }
.resume-preview-section p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 10px; }

/* Privacy Modal Specifics */
.privacy-lb-inner { max-width: 800px; max-height: 85vh; display: flex; flex-direction: column; }
.privacy-content-wrap { flex: 1; padding: 0 40px 40px; overflow-y: auto; }
.privacy-body-text { font-size: 0.95rem; color: rgba(255,255,255,0.7); line-height: 1.8; }
.privacy-body-text h1, .privacy-body-text h2, .privacy-body-text h3 { color: var(--text-white); margin: 24px 0 12px; font-family: var(--serif); }
.privacy-body-text p { margin-bottom: 16px; }
.privacy-content-wrap::-webkit-scrollbar { width: 6px; }
.privacy-content-wrap::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: #111120; border-top: 1px solid rgba(255,255,255,0.08);
  padding: 18px 40px; display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
  transform: translateY(100%); transition: transform 0.5s ease 0.6s;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-text { font-size: 0.8rem; color: var(--text-muted); max-width: 560px; line-height: 1.5; }
.cookie-link { color: var(--accent-light); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-btn {
  padding: 9px 22px; border-radius: 6px; cursor: pointer;
  font-family: var(--display); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; border: none;
  transition: background var(--tr-fast), transform var(--tr-fast);
}
.cookie-accept { background: var(--accent); color: #fff; }
.cookie-accept:hover { background: var(--accent-light); }
.cookie-decline { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.cookie-decline:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
#scroll-bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 9999; pointer-events: none; transition: width 0.1s linear;
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 1024px) {
  .nav-container { padding: 0 24px; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .certs-grid      { grid-template-columns: 1fr 1fr; }
  .resume-inner    { grid-template-columns: 1fr; gap: 48px; }
  .about-inner     { grid-template-columns: 1fr; gap: 48px; }
  .contact-layout  { grid-template-columns: 1fr; gap: 48px; }
  .footer-inner    { grid-template-columns: 1fr; gap: 48px; }
  .footer-nav      { grid-template-columns: repeat(3,1fr); }
  .form-row        { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-container { padding: 0 20px; }
  .logo-text { display: none; }
  .section-container { padding: 0 20px; }

  .hero { min-height: 100svh; }
  .hero-headline { font-size: clamp(2.4rem, 9vw, 3.5rem); }
  .hero-actions { flex-direction: column; }
  .btn-solid, .btn-outline-pill { width: 100%; text-align: center; }

  .portfolio-section, .certs-section, .resume-section, .about-section, .contact-section { padding: 80px 0; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .certs-grid      { grid-template-columns: 1fr; }

  .footer-inner { padding: 52px 20px; }
  .footer-nav   { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { padding: 18px 20px; flex-direction: column; align-items: flex-start; }

  .cookie-banner { padding: 16px 20px; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .footer-nav { grid-template-columns: 1fr; }
  .filter-tabs { gap: 6px; }
  .filter-btn { font-size: 0.62rem; padding: 8px 14px; }
}

/* ============================================================
   PLYR PLAYER THEMING
   ============================================================ */
:root {
  --plyr-color-main: var(--accent);
  --plyr-video-background: rgba(0, 0, 0, 0.95);
  --plyr-menu-background: var(--bg-card);
  --plyr-menu-color: var(--text-white);
  --plyr-control-radius: 8px;
  --plyr-tooltip-radius: 5px;
  --plyr-font-family: var(--sans);
}

.plyr--full-ui input[type=range] {
  color: var(--accent);
}

.plyr__control--overlaid {
  background: var(--accent);
  backdrop-filter: blur(8px);
}

.plyr--video .plyr__control.plyr__tab-focus, 
.plyr--video .plyr__control:hover, 
.plyr--video .plyr__control[aria-expanded=true] {
  background: var(--accent);
  color: #fff;
}

/* Custom shadow for the player controls */
.plyr__controls {
  padding-top: 20px !important;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0)) !important;
}

/* Fix for lightbox video wrap with Plyr */
.lb-video-wrap {
  padding-bottom: 0;
  height: auto;
  min-height: 200px;
  background: #000;
  position: relative;
  z-index: 5;
}

.plyr__video-embed {
  width: 100% !important;
  aspect-ratio: 16 / 9;
  position: relative !important;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  z-index: 1; /* Lower than Plyr's default controls (z-index 3) */
}

.plyr--video {
  background: #000 !important;
  border-radius: 8px;
  overflow: hidden;
}

/* Explicitly force controls to be on top and visible */
.plyr__controls {
  z-index: 100 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
