:root {
  --primary: #2563eb;
  --secondary: #3b82f6;
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.5);
  --text-main: #1e293b;
  --text-dim: #64748b;
  --border: rgba(0, 0, 0, 0.05);
}

body.dark {
  --primary: #38bdf8;
  --secondary: #0ea5e9;
  --bg-main: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.5);
  --text-main: #f1f5f9;
  --text-dim: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
}

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

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6,
.logo,
.nav-menu a,
a.btn,
button,
.uppercase {
  font-family: 'Montserrat', sans-serif;
}

/* Base transitions for theme switching */
body,
nav,
section,
div,
h1,
h2,
h3,
h4,
p,
span,
i,
a {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}

/* One Page Scroll System */
html,
body {
  height: 100%;
  overflow: hidden;
}

#scroll-container {
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  will-change: opacity, transform;
  padding-top: 100px;
  padding-bottom: 80px;
  min-height: 100dvh;
}

@media (max-width: 768px) {
  section {
    padding-top: 80px;
    padding-bottom: 120px;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 100dvh;
  }
}


/* Section Focus & Internal Reveal system */
section.active-focus {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

section:not(.active-focus) {
  pointer-events: none;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

section.active-focus [data-reveal].active {
  opacity: 1;
  transform: translateY(0);
}

/* Dark Mode Filters for logos */
body:not(.dark) .itu-logo {
  filter: brightness(0.2);
}

body.dark .itu-logo {
  filter: none;
}

body.dark .iae-logo {
  filter: brightness(0) invert(1);
}

/* macOS Cursors Implementation */
html,
body,
nav,
#scroll-container,
section,
.container {
  cursor: url('assets/cursors/default.png') 20 14, auto !important;
}

a,
button,
[role="button"],
.nav-menu a {
  cursor: url('assets/cursors/pointer.png') 26 16, pointer !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
span,
code,
pre,
label {
  cursor: url('assets/cursors/text.png') 33 32, text !important;
}

footer,
footer * {
  cursor: auto !important;
}

a *,
button * {
  cursor: inherit !important;
}

/* Utility Classes */
.scrollbar-none {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

/* Experience Carousel Fixes */
#experience .container,
#exp-carousel,
#exp-carousel>div {
  pointer-events: auto !important;
}

#exp-carousel {
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  nav {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  footer {
    padding-top: 0.75rem !important;
    padding-bottom: 2.5rem !important;
    /* Extra bottom for mobile safe area */
  }

  .logo span:last-child {
    font-size: 1.1rem;
  }
}