/* ============================================================
   GLOBAL.CSS — bold & colorful theme
   reset, variables, typography, nav, footer, utilities
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Bricolage+Grotesque:opsz,wght@12..96,300;12..96,400;12..96,500;12..96,700;12..96,800&family=Fira+Code:wght@400;500&display=swap');

/* ── Light mode (default) ── */
:root {
  --bg: #f0ebe2;
  --bg-2: #e8e1d6;
  --bg-3: #dfd7ca;
  --ink: #0f0e0c;
  --ink-2: #3b3730;
  --ink-3: #8c857c;

  --footer-bg: #0f0e0c;
  --footer-text: rgba(240, 235, 226, 0.4);
  --footer-link: rgba(240, 235, 226, 0.5);
  --footer-link-hover: #f0ebe2;

  --c1: #ff3500;
  --c2: #00bfa5;
  --c3: #6d28d9;
  --c4: #f0b800;
  --c5: #e8175d;
  --c6: #1a7a4a;
  --c7: #1d4ed8;
  --c8: #c8820a;
  --c9: #d95f02;
  --c10: #0e7490;
  --c11: #4d7c0f;
  --c12: #d97706;
  --border: rgba(15, 14, 12, 0.1);
  --border-mid: rgba(15, 14, 12, 0.22);
  --radius: 3px;
  --nav-h: 60px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Dark mode ── */
[data-theme="dark"] {
  --bg: #111010;
  --bg-2: #1a1917;
  --bg-3: #242220;
  --ink: #f0ebe2;
  --ink-2: #b8b2a8;
  --ink-3: #6b6560;

  --footer-bg: #0a0908;
  --footer-text: rgba(240, 235, 226, 0.3);
  --footer-link: rgba(240, 235, 226, 0.4);
  --footer-link-hover: #f0ebe2;

  --c1: #ff4d1a;
  --c2: #00d4b8;
  --c3: #8b5cf6;
  --c4: #ffc107;
  --c5: #f03070;
  --c6: #4ade80;
  --c7: #4d8ef5;
  --c8: #e8a030;
  --c9: #fb8c00;
  --c10: #22d3ee;
  --c11: #84cc16;
  --c12: #fbbf24;

  --border: rgba(240, 235, 226, 0.08);
  --border-mid: rgba(240, 235, 226, 0.16);
}

/* ── Smooth theme transitions (bg, border, color only) ── */
html {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

body,
nav,
.nav-drawer,
footer,
.about-left,
.about-right,
.about-stats,
.stat-box,
.ticker-wrap,
.projects-section,
.hero,
.about-section {
  transition:
    background-color 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}

/* ── Helpers ── */
.mono {
  font-family: 'Fira Code', monospace;
}

.label {
  font-family: 'Fira Code', monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}


/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.nav-logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c1);
  flex-shrink: 0;
  animation: dotCycle 4s ease-in-out infinite;
}

@keyframes dotCycle {

  0%,
  100% {
    background: var(--c1);
  }

  25% {
    background: var(--c4);
  }

  50% {
    background: var(--c2);
  }

  75% {
    background: var(--c3);
  }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-links a {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  padding: 0.42rem 0.9rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--bg-3);
  border-color: var(--border-mid);
}

/* ── THEME TOGGLE ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-mid);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform 0.2s ease;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--bg-3);
  border-color: var(--ink-3);
  color: var(--ink);
}

.theme-toggle:active {
  transform: scale(0.92);
}

/* Sun and moon icons swap */
.icon-sun,
.icon-moon {
  position: absolute;
  width: 16px;
  height: 16px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Light mode: show sun, hide moon */
.icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Dark mode: show moon, hide sun */
[data-theme="dark"] .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer {
  display: none;
  pointer-events: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 2px solid var(--ink);
  z-index: 190;
  flex-direction: column;
  padding: 0.5rem 1rem 1rem;
  gap: 0.15rem;
  transform: translateY(-6px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}


.nav-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer a {
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  color: var(--ink-2);
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}

.nav-drawer a:hover {
  background: var(--bg-3);
}

/* ── FOOTER ── */
footer {
  background: var(--footer-bg);
  border-top: 2px solid var(--ink);
  padding: 1.75rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-name {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--footer-text);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--footer-link);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--footer-link-hover);
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-fade-up {
  opacity: 0;
  animation: fadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.anim-fade-up:nth-child(1) {
  animation-delay: 0.05s;
}

.anim-fade-up:nth-child(2) {
  animation-delay: 0.16s;
}

.anim-fade-up:nth-child(3) {
  animation-delay: 0.27s;
}

.anim-fade-up:nth-child(4) {
  animation-delay: 0.38s;
}

hr.divider {
  border: none;
  border-top: 2px solid var(--ink);
}

.tag {
  display: inline-block;
  font-family: 'Fira Code', monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.65rem;
  border-radius: 99px;
  border: 1.5px solid var(--border-mid);
  color: var(--ink-2);
  background: var(--bg-2);
}