/* ============================================
   PALETTE & VARIABLES
   ============================================ */
:root {
  --bg-dark: #111010;
  --bg-card: #1a1a1a;
  --bg-elevated: #222018;
  --bg-subtle: #2a2218;
  --accent: #E8822A;
  --accent-dim: #c06a1e;
  --accent-glow: rgba(232, 130, 42, 0.15);
  --accent-border: #5a3a14;
  --text-primary: #f0e6d4;
  --text-secondary: #b8a890;
  --text-muted: #786a58;
  --font-display: 'Cinzel', serif;
  --font-body: 'Outfit', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow: hidden;
  height: 100dvh;
}

::selection {
  background: var(--accent);
  color: var(--bg-dark);
}

/* ============================================
   SCROLL SNAP CONTAINER
   ============================================ */
.scroll-container {
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

/* ============================================
   SLIDE BASE
   ============================================ */
.slide {
  height: 100dvh;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   SIDE NAVIGATION
   ============================================ */
.side-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}

.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  padding: 0;
}

.nav-dot:hover,
.nav-dot.active {
  background: var(--accent);
  transform: scale(1.4);
  box-shadow: 0 0 12px var(--accent-glow);
}

.dot-label {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  transform: translateY(-50%) translateX(8px);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: 4px;
  border: 0.5px solid var(--accent-border);
}

.nav-dot:hover .dot-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ============================================
   LANDING PAGE
   ============================================ */
.slide-landing {
  background: var(--bg-dark);
  flex-direction: column;
}

.landing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  padding: 0 24px;
  animation: fadeUp 1s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Avatar */
.avatar-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(
    var(--accent) 0deg,
    transparent 60deg,
    var(--accent) 120deg,
    transparent 180deg,
    var(--accent) 240deg,
    transparent 300deg,
    var(--accent) 360deg
  );
  animation: ringRotate 12s linear infinite;
  margin-bottom: 16px;
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-initials {
  font-family: var(--font-display);
  font-size: 36px;
  color: var(--accent);
  letter-spacing: 2px;
}

/* Text */
.landing-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.landing-title {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
}

.landing-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 12px 0;
}

.landing-bio {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: center;
  max-width: 500px;
  font-weight: 300;
}

/* CTAs */
.cta-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background: #f09030;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(232, 130, 42, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-1px);
}

/* Scroll hint */
.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 40px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fadeUp 1s ease-out 0.5s both;
}

.scroll-arrow {
  font-size: 18px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Ambient glows */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.glow-1 {
  width: 400px;
  height: 400px;
  background: rgba(232, 130, 42, 0.06);
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 300px;
  height: 300px;
  background: rgba(232, 130, 42, 0.04);
  bottom: -50px;
  right: -50px;
}

.glow-3 {
  width: 500px;
  height: 500px;
  background: rgba(232, 130, 42, 0.05);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Floating particles */
.particle-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-20px) scale(1); }
}

/* ============================================
   ROLE SLIDES — IMAGE DOMINANT
   ============================================ */
.slide-role {
  align-items: flex-end;
  justify-content: flex-start;
}

.slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-img {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 40%, rgba(232, 130, 42, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #1a1818 0%, #221e1a 50%, #1a1818 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.placeholder-size {
  font-size: 11px;
  opacity: 0.5;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(17, 16, 16, 0.95) 0%,
    rgba(17, 16, 16, 0.8) 30%,
    rgba(17, 16, 16, 0.3) 60%,
    rgba(17, 16, 16, 0.1) 100%
  );
}

.slide-content {
  position: relative;
  z-index: 2;
  padding: 40px clamp(24px, 5vw, 80px);
  width: 100%;
  max-width: 900px;
}

/* Scroll-triggered animation */
.slide-content {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide.in-view .slide-content {
  opacity: 1;
  transform: translateY(0);
}

.slide-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.slide-period {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 4px 14px;
  background: rgba(232, 130, 42, 0.1);
  border: 0.5px solid var(--accent-border);
  border-radius: 20px;
}

.slide-counter {
  font-family: var(--font-display);
  font-size: 48px;
  color: rgba(232, 130, 42, 0.12);
  font-weight: 600;
  line-height: 1;
}

.slide-role-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.slide-company {
  font-size: 16px;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 400;
}

.slide-description {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 600px;
  font-weight: 300;
  margin-bottom: 28px;
}

/* ============================================
   CERTIFICATE GALLERY
   ============================================ */
.cert-heading {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
  font-weight: 400;
}

.cert-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-border) transparent;
}

.cert-scroll::-webkit-scrollbar {
  height: 4px;
}

.cert-scroll::-webkit-scrollbar-thumb {
  background: var(--accent-border);
  border-radius: 2px;
}

.cert-card {
  flex-shrink: 0;
  width: 140px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.cert-card:hover {
  transform: translateY(-4px);
}

.cert-placeholder {
  width: 140px;
  height: 100px;
  background: var(--bg-subtle);
  border-radius: 8px;
  border: 0.5px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: border-color 0.3s;
}

.cert-card:hover .cert-placeholder {
  border-color: var(--accent);
}

.cert-card img {
  width: 140px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 0.5px solid var(--accent-border);
}

.cert-name {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  text-align: center;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 32px;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: var(--accent);
}

.lightbox-content {
  max-width: 80vw;
  max-height: 80vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
}

.lightbox-placeholder {
  width: 400px;
  height: 300px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 0.5px solid var(--accent-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-muted);
}

/* ============================================
   HOBBIES SECTION
   ============================================ */
.slide-hobbies {
  background: var(--bg-dark);
  flex-direction: column;
}

.hobbies-content {
  z-index: 2;
  padding: 0 clamp(24px, 5vw, 80px);
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-hobbies.in-view .hobbies-content {
  opacity: 1;
  transform: translateY(0);
}

.hobbies-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 32px;
  letter-spacing: 1px;
}

.hobbies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.hobby-card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
  border: 0.5px solid rgba(232, 130, 42, 0.1);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.hobby-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 8px 32px rgba(232, 130, 42, 0.08);
}

.hobby-img {
  height: 140px;
  overflow: hidden;
}

.hobby-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.hobby-card:hover .hobby-img img {
  transform: scale(1.05);
}

.hobby-placeholder {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 50%, rgba(232, 130, 42, 0.06) 0%, transparent 70%),
    var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.hobby-info {
  padding: 16px;
}

.hobby-info h3 {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-weight: 600;
}

.hobby-info p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 300;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .side-nav {
    right: 12px;
    gap: 12px;
  }

  .dot-label {
    display: none;
  }

  .slide-content {
    padding: 24px;
  }

  .slide-overlay {
    background: linear-gradient(
      to top,
      rgba(17, 16, 16, 0.98) 0%,
      rgba(17, 16, 16, 0.9) 40%,
      rgba(17, 16, 16, 0.5) 70%,
      rgba(17, 16, 16, 0.2) 100%
    );
  }

  .cert-card {
    width: 120px;
  }

  .cert-placeholder {
    width: 120px;
    height: 85px;
  }

  .hobbies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .hobby-img {
    height: 100px;
  }

  .cta-row {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .btn {
    justify-content: center;
    width: 100%;
  }
}

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

  .slide-counter {
    display: none;
  }
}

/* ============================================
   KEYBOARD NAVIGATION
   ============================================ */
.nav-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-container {
    scroll-behavior: auto;
  }
}
