/* ===================================================
   REVAMP — Bolum Victor Portfolio 2026
   Clean dark-mode design with accent highlights
   =================================================== */

/* ---------- DESIGN TOKENS ---------- */
:root {
  --bg: #0d1117;
  --bg-alt: #161b22;
  --surface: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #58a6ff;
  --accent-glow: rgba(88, 166, 255, 0.15);
  --green: #3fb950;
  --radius: 12px;
  --radius-sm: 6px;
  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'Fira Code', 'Cascadia Code', monospace;
  --nav-h: 64px;
  --transition: 0.3s ease;
}

/* ---------- PAGE LOAD ---------- */
body.loading { opacity: 0; }
body { transition: opacity 0.5s ease; opacity: 1; }

/* ---------- CURSOR GLOW ---------- */
.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: left 0.12s ease, top 0.12s ease;
  opacity: 0.6;
}
[data-theme="light"] .cursor-glow { opacity: 0.25; }

/* ---------- LIGHT MODE ---------- */
[data-theme="light"] {
  --bg:          #ffffff;
  --bg-alt:      #f6f8fa;
  --surface:     #eaeef2;
  --border:      #d0d7de;
  --text:        #1f2328;
  --text-muted:  #656d76;
  --accent:      #0969da;
  --accent-glow: rgba(9, 105, 218, 0.1);
  --green:       #1a7f37;
}
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
ul {
  list-style: none;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* ---------- SELECTION ---------- */
::selection {
  background: var(--accent-glow);
  color: var(--accent);
}

/* ===================================================
   NAV
   =================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition:
    background var(--transition),
    box-shadow var(--transition);
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}
.nav__links a:hover {
  color: var(--text);
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- THEME TOGGLE ---------- */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: rotate(20deg); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: block; }

/* ---------- ACTIVE NAV ---------- */
.nav__links a[data-nav] {
  position: relative;
}
.nav__links a[data-nav]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform var(--transition);
}
.nav__links a[data-nav].active::after { transform: scaleX(1); }
.nav__links a[data-nav].active { color: var(--text); }

/* ---------- AVAILABILITY BADGE ---------- */
.hero__availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.3);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 20px;
}
.availability__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
}

/* ---------- BUTTONS ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--accent);
  color: #0d1117;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition:
    opacity var(--transition),
    transform var(--transition);
}
.btn-primary:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition:
    border-color var(--transition),
    background var(--transition),
    transform var(--transition);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

.btn-outline {
  padding: 8px 20px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.btn-outline:hover {
  background: var(--accent-glow);
}

.accent {
  color: var(--accent);
}

/* ===================================================
   HERO
   =================================================== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) 24px 80px;
  position: relative;
}
.hero__bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 60% 0%,
    rgba(88, 166, 255, 0.06) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}
.hero__greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 8px;
}
.hero__name {
  font-family: 'Syne', var(--font);
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
  overflow: visible;
  position: relative;
}
/* nowrap applied via JS to .hero__name-word on desktop only */
.hero__title {
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 24px;
  min-height: 3em;
}
.hero__title .typewriter {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95em;
  border-right: 2px solid var(--accent);
  padding-right: 3px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%,
  100% {
    border-color: var(--accent);
  }
  50% {
    border-color: transparent;
  }
}

.hero__bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}
.hero__socials {
  display: flex;
  gap: 20px;
}
.hero__socials a {
  color: var(--text-muted);
  transition:
    color var(--transition),
    transform var(--transition);
}
.hero__socials a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}
.hero__socials svg {
  width: 22px;
  height: 22px;
}

.hero__photo {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.hero__photo img {
  width: clamp(200px, 22vw, 300px);
  height: clamp(200px, 22vw, 300px);
  object-fit: cover;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow:
    0 0 0 6px var(--surface),
    0 24px 64px rgba(0, 0, 0, 0.5);
}
.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  animation: bounce 2s infinite;
}
.hero__scroll svg {
  width: 28px;
  height: 28px;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ===================================================
   SECTIONS
   =================================================== */
.section {
  padding: 96px 0;
}
.section--alt {
  background: var(--bg-alt);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section__title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 56px;
  position: relative;
  display: inline-block;
}
.section__title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ===================================================
   ABOUT
   =================================================== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.about__text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.02rem;
}
.about__note {
  background: rgba(248, 201, 52, 0.08);
  border: 1px solid rgba(248, 201, 52, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.88rem !important;
  color: #f8c934 !important;
  margin-top: 8px;
}
.about__details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  transition: border-color var(--transition);
}
.detail-card:hover {
  border-color: var(--accent);
}
.detail-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.detail-value {
  font-size: 0.95rem;
  font-weight: 500;
}
.detail-value a {
  color: var(--accent);
}
.detail-value a:hover {
  text-decoration: underline;
}

/* ===================================================
   TIMELINE
   =================================================== */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline__section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 32px 0 20px -32px;
  padding-left: 24px;
}
.timeline__item {
  position: relative;
  margin-bottom: 24px;
}
.timeline__dot {
  position: absolute;
  left: -28px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-alt);
}
.timeline__dot.work {
  background: var(--accent);
}
.timeline__dot.edu {
  background: var(--green);
}

.timeline__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition:
    border-color var(--transition),
    transform var(--transition);
}
.timeline__card:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}
.timeline__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.timeline__period {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.timeline__badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  background: rgba(63, 185, 80, 0.15);
  color: var(--green);
  border-radius: 20px;
  border: 1px solid rgba(63, 185, 80, 0.3);
}
.timeline__role {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.timeline__company {
  font-size: 0.88rem;
  color: var(--accent);
}

/* ===================================================
   SKILLS
   =================================================== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color var(--transition);
}
.skill-group:hover {
  border-color: var(--accent);
}
.skill-group h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  background: var(--accent-glow);
  border: 1px solid rgba(88, 166, 255, 0.25);
  color: var(--accent);
  border-radius: 20px;
  transition: background var(--transition);
}
.tag:hover {
  background: rgba(88, 166, 255, 0.25);
}

/* ===================================================
   CONTACT — social links
   =================================================== */
.contact__sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: -32px;
  margin-bottom: 40px;
  max-width: 480px;
}
.contact__socials {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}
.social-link:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateX(6px);
}
.social-link svg:first-child { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); }
.social-link span { flex: 1; }
.social-link .arrow { width: 16px; height: 16px; opacity: 0; transition: opacity var(--transition); }
.social-link:hover .arrow { opacity: 1; }

/* ===================================================
   CANVAS BACKGROUND
   =================================================== */
.hero-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}
[data-theme="light"] .hero-canvas { opacity: 0.2; }

/* ===================================================
   HERO — display font + char animation
   =================================================== */
.hero__name-sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.hero__name-word {
  display: block;
  /* white-space: nowrap set via JS on desktop only */
}
.hero__name-word .char {
  display: inline-block;
  will-change: transform, opacity;
}
/* GSAP owns all hero entrance animation — no CSS opacity/transition here */

/* ===================================================
   MAGNETIC BUTTONS
   =================================================== */
.magnetic {
  transition:
    opacity var(--transition),
    box-shadow var(--transition);
  /* transform is overridden by JS — don't set here */
}

/* ===================================================
   PHOTO TILT
   =================================================== */
.hero__photo img {
  transition: transform 0.1s ease, box-shadow var(--transition);
  transform-style: preserve-3d;
  will-change: transform;
}

/* ===================================================
   SECTION TITLE — clip reveal
   =================================================== */
.section__title {
  overflow: visible;
}
.section__title .title-inner {
  display: inline-block;
  will-change: transform, opacity;
}

/* ===================================================
   SKILL TAGS — stagger
   =================================================== */
.skill-tags .tag {
  opacity: 0;
  transform: scale(0.8) translateY(8px);
  transition: border-color var(--transition), background var(--transition);
}
.skill-tags .tag.tag-visible {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color var(--transition),
    background var(--transition);
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ===================================================
   BACK TO TOP
   =================================================== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--transition),
    transform var(--transition),
    border-color var(--transition);
  z-index: 500;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.back-to-top svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

/* ===================================================
   REVEAL ANIMATIONS
   =================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

.nav__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===================================================
   MOBILE MENU (lives outside nav stacking context)
   =================================================== */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 2000;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}
.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--text); }

/* ===================================================
   MOBILE NAV MENU
   =================================================== */
@media (max-width: 768px) {
  .nav__links--desktop { display: none; }
  .nav__toggle { display: flex; }
  .mobile-menu { display: flex; }

  /* Hamburger → X animation */
  .nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  body.nav-open { overflow: hidden; }
}

/* ===================================================
   RESPONSIVE — tablet
   =================================================== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: calc(var(--nav-h) + 32px) 24px 56px;
    min-height: 100svh;
    gap: 28px;
  }
  .hero__content {
    max-width: 100%;
  }
  .hero__bio {
    margin-left: auto;
    margin-right: auto;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__socials {
    justify-content: center;
  }
  .hero__photo {
    order: -1;
    display: flex;
    justify-content: center;
  }
  .hero__photo img {
    width: 160px;
    height: 160px;
  }
  .hero__scroll {
    display: none;
  }
  .about__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===================================================
   RESPONSIVE — mobile
   =================================================== */
@media (max-width: 600px) {
  .hero {
    padding: calc(var(--nav-h) + 20px) 20px 40px;
    gap: 20px;
  }
  .hero__name {
    font-size: clamp(2rem, 8vw, 2.8rem);
    letter-spacing: -1px;
    margin-bottom: 8px;
  }
  .hero__title {
    font-size: 1rem;
    min-height: 2.6em;
    margin-bottom: 16px;
  }
  .hero__bio {
    font-size: 0.93rem;
    margin-bottom: 24px;
  }
  .hero__actions {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    align-items: stretch;
  }
  .hero__actions .btn-primary,
  .hero__actions .btn-ghost {
    justify-content: center;
    width: 100%;
    padding: 13px 22px;
    font-size: 0.9rem;
  }
  .hero__availability {
    margin-bottom: 14px;
  }
  .hero__photo img {
    width: 140px;
    height: 140px;
  }
  .hero__socials {
    gap: 24px;
  }
  .section {
    padding: 60px 0;
  }
  .section__title {
    font-size: 1.7rem;
    margin-bottom: 32px;
  }
  .skill-group {
    padding: 18px 16px;
  }
  .skills__grid {
    grid-template-columns: 1fr;
  }
  .contact__socials {
    max-width: 100%;
  }
  .social-link {
    padding: 14px 18px;
    font-size: 0.9rem;
  }
}

/* Hide cursor glow on touch/mobile — no mouse pointer */
@media (hover: none) and (pointer: coarse) {
  .cursor-glow { display: none; }
}
