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

:root {
  --bg:          #080808;
  --bg-card:     #111111;
  --bg-hover:    #161616;
  --accent:      #7B2FFF;
  --accent-glow: #9D5CFF;
  --accent-dim:  rgba(123, 47, 255, 0.15);
  --text:        #f0f0f0;
  --text-muted:  #555;
  --text-faint:  #2a2a2a;
  --border:      #1c1c1c;
  --border-hover:#7B2FFF;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --transition:   0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);

  --section-pad:  clamp(80px, 10vw, 140px);
  --container:    1280px;
  --gutter:       clamp(20px, 5vw, 80px);
}

html {
  scroll-behavior: smooth;
  cursor: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

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

/* ─────────────────────────────────────────
   LIGHT MODE — [data-theme="light"]
───────────────────────────────────────── */
[data-theme="light"] {
  --bg:          #f5f3ef;
  --bg-card:     #eceae5;
  --bg-hover:    #e4e2dd;
  --accent:      #6020e0;
  --accent-glow: #7B2FFF;
  --accent-dim:  rgba(96, 32, 224, 0.12);
  --text:        #101010;
  --text-muted:  #777;
  --text-faint:  #ccc;
  --border:      #d8d5ce;
  --border-hover:#6020e0;
}

[data-theme="light"] .nav--scrolled {
  background: rgba(245, 243, 239, 0.92);
}

[data-theme="light"] .grain {
  opacity: 0.02;
  mix-blend-mode: multiply;
}

[data-theme="light"] .loader {
  background: var(--bg);
}

[data-theme="light"] .nav__links {
  background: var(--bg);
}

[data-theme="light"] .cursor {
  mix-blend-mode: normal;
}

[data-theme="light"] .cursor__ring {
  border-color: rgba(16, 16, 16, 0.7);
}

[data-theme="light"] .cursor__dot {
  background: #111111;
}

[data-theme="light"] .cursor--hover .cursor__ring {
  border-color: var(--accent);
}

[data-theme="light"] .cursor--hover .cursor__dot {
  background: var(--accent);
}

/* ─── SKIP LINK ─── */
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 10000;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: top 0.2s ease;
  outline: none;
}

.skip-link:focus {
  top: 20px;
}

/* ─── FOCUS VISIBLE ─── */
:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Remove focus ring for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── NAV RIGHT ─── */
.nav__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ─── THEME TOGGLE BUTTON ─── */
.nav__theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.nav__theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent-glow);
}

/* ─── LANG TOGGLE BUTTON ─── */
.nav__lang-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 2px;
  transition: border-color var(--transition), color var(--transition);
  flex-shrink: 0;
}

.nav__lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent-glow);
}

/* Show only the right icon per theme */
[data-theme="dark"]  .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }

/* ─── SECTION INTRO PARAGRAPHS ─── */
.experiences__intro,
.competences__intro {
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

/* ─── GRAIN OVERLAY ─── */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.035;
  pointer-events: none;
  z-index: 9999;
}

/* ─── SCROLL PROGRESS ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  z-index: 1000;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--accent);
}

/* ─── NAVIGATION ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--gutter);
  transition: padding var(--transition), background var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  padding: 16px var(--gutter);
  background: rgba(8, 8, 8, 0.92);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.05em;
  color: var(--text);
  transition: color var(--transition);
}

.nav__logo:hover {
  color: var(--accent-glow);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__cta {
  padding: 8px 20px !important;
  border: 1px solid var(--border) !important;
  border-radius: 2px;
  transition: border-color var(--transition), color var(--transition) !important;
}

.nav__cta:hover {
  border-color: var(--accent) !important;
  color: var(--accent-glow) !important;
}

.nav__cta::after {
  display: none !important;
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 30px;
  z-index: 101;
}

.nav__burger span {
  display: block;
  height: 1px;
  background: var(--text);
  transition: transform var(--transition), opacity var(--transition), width var(--transition);
}

.nav__burger span:last-child {
  width: 60%;
}

.nav__burger[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav__burger[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
  width: 100%;
}

/* ─── SECTION MARKER ─── */
.section-marker {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 60px;
}

.section-marker__num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}

.section-marker__label {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── BUTTON ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  transition: var(--transition);
}

.btn--outline {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent-glow);
  box-shadow: 0 0 20px var(--accent-dim);
}

/* ─── TAG CHIPS ─── */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 2px;
  transition: border-color var(--transition), color var(--transition);
}

.exp-card__body:hover .tag,
.exp-card.is-open .tag {
  border-color: rgba(123, 47, 255, 0.4);
  color: var(--accent-glow);
}

/* ─── LOADER ─── */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader__monogram {
  font-family: var(--font-display);
  font-size: 72px;
  letter-spacing: 0.1em;
  color: var(--text);
  line-height: 1;
}

.loader__bar {
  width: 120px;
  height: 1px;
  background: var(--border);
  overflow: hidden;
}

.loader__progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  transition: width 0.05s linear;
  box-shadow: 0 0 8px var(--accent);
}

.loader__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ─── CURSOR ─── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: difference;
}

.cursor__ring {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(240, 240, 240, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), border-color 0.3s;
}

.cursor__dot {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--text);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor--hover .cursor__ring {
  width: 64px;
  height: 64px;
  border-color: var(--accent-glow);
}

.cursor--hover .cursor__dot {
  background: var(--accent-glow);
}

@media (max-width: 768px) {
  html { cursor: auto; }
  .cursor { display: none; }
  .nav__burger { display: flex; }
  .nav__right { gap: 12px; }
  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-out);
    z-index: 99;
  }
  .nav__links.is-open {
    transform: translateX(0);
  }
  .nav__links a {
    font-size: 14px;
  }
}
