/* ===================================
   MAROUANE RADI PORTFOLIO — CSS
   =============================== */

/* ---- VARIABLES ---- */
:root {
  --bg: #070a0f;
  --bg2: #0d1117;
  --bg3: #111827;
  --surface: rgba(255,255,255,0.04);
  --surface2: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);

  --text: #f0f4f8;
  --text2: #94a3b8;
  --text3: #64748b;

  --accent: #00d4ff;
  --accent2: #7c3aed;
  --accent3: #f59e0b;
  --accent4: #10b981;

  --glow: 0 0 30px rgba(0,212,255,.18), 0 0 60px rgba(0,212,255,.08);
  --glow2: 0 0 30px rgba(124,58,237,.2);

  --radius: 16px;
  --radius-sm: 10px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
  --transition-slow: .6s cubic-bezier(.4,0,.2,1);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg2: #f1f5f9;
  --bg3: #e2e8f0;
  --surface: rgba(0,0,0,.04);
  --surface2: rgba(0,0,0,.06);
  --border: rgba(0,0,0,.08);
  --border2: rgba(0,0,0,.14);
  --text: #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
  --glow: 0 0 30px rgba(0,212,255,.12);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
  transition: background var(--transition-slow), color var(--transition-slow);
}
a { text-decoration: none; color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
img { max-width: 100%; }
button { cursor: none; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }
ul { list-style: none; }

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

/* ---- CURSOR ---- */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform .1s, width .3s, height .3s, opacity .3s;
  mix-blend-mode: screen;
}
.cursor-follower {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform .18s cubic-bezier(.4,0,.2,1), width .3s, height .3s, opacity .3s, border-color .3s;
  opacity: .5;
}
body:has(a:hover) .cursor { width: 6px; height: 6px; }
body:has(a:hover) .cursor-follower { width: 50px; height: 50px; opacity: .3; border-color: var(--accent3); }
body:has(button:hover) .cursor-follower { width: 50px; height: 50px; opacity: .3; border-color: var(--accent3); }

/* ---- MATRIX CANVAS ---- */
.matrix-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9990;
  pointer-events: none;
}
.matrix-canvas.hidden { display: none; }
.matrix-canvas.active { display: block; animation: fadeIn .5s; }

/* ---- KONAMI MSG ---- */
.konami-msg {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(0,0,0,.95);
  border: 1px solid var(--accent);
  padding: 2rem 3rem;
  border-radius: var(--radius);
  text-align: center;
  z-index: 9995;
  transition: transform .5s cubic-bezier(.34,1.56,.64,1);
  box-shadow: var(--glow);
}
.konami-msg.show { transform: translate(-50%, -50%) scale(1); }
.konami-icon { font-size: 3rem; display: block; margin-bottom: .5rem; }
.konami-msg p { font-family: 'Space Mono', monospace; color: var(--accent); font-size: 1.2rem; letter-spacing: 4px; }
.konami-msg small { color: var(--text3); font-size: .75rem; }

/* ---- THEME BTN ---- */
.theme-btn {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 48px; height: 48px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  transition: var(--transition);
  backdrop-filter: blur(10px);
}
.theme-btn:hover { background: var(--accent); color: var(--bg); transform: rotate(180deg); }
.theme-icon { font-size: 1.2rem; }

/* ---- LOADER ---- */
.loader {
  position: fixed; inset: 0;
  background: #020408;
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s ease, visibility .8s ease;
}
.loader.done { opacity: 0; visibility: hidden; }
.loader-inner { width: 520px; max-width: 90vw; }
.loader-scan {
  position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scan 2s linear infinite;
}
@keyframes scan {
  from { top: 0; } to { top: 100%; }
}
.loader-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
.loader-content { position: relative; }
.loader-code {
  font-family: 'Space Mono', monospace;
  font-size: .78rem;
  color: var(--text3);
  line-height: 2;
  margin-bottom: 1.5rem;
}
.loader-line {
  display: block;
  opacity: 0;
  animation: fadeLine .4s ease forwards;
  animation-delay: var(--d);
}
.loader-success { color: var(--accent4) !important; }
@keyframes fadeLine {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: none; }
}
.loader-bar-wrap {
  height: 2px;
  background: rgba(255,255,255,.07);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: .5rem;
}
.loader-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  transition: width .05s linear;
  box-shadow: 0 0 10px var(--accent);
}
.loader-percent {
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  color: var(--accent);
  text-align: right;
}

/* ---- NAV ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2rem;
  z-index: 500;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.nav.scrolled {
  background: rgba(7,10,15,.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.5rem;
  letter-spacing: -1px;
  transition: var(--transition);
}
.nav-logo-dot { color: var(--accent); }
.nav-logo:hover { color: var(--accent); }
.nav-menu {
  display: flex; gap: 2rem; align-items: center;
  transition: var(--transition-slow);
}
.nav-link {
  font-size: .88rem;
  font-weight: 500;
  color: var(--text2);
  position: relative;
  transition: color .25s;
  letter-spacing: .02em;
}
.nav-link::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .3s;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link-cta {
  background: var(--accent);
  color: var(--bg) !important;
  padding: .5rem 1.2rem;
  border-radius: 8px;
  font-weight: 700;
}
.nav-link-cta::after { display: none; }
.nav-link-cta:hover { background: var(--text); transform: translateY(-1px); }
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 6px;
  z-index: 600;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.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); }

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative;
  overflow: hidden;
  padding: 6rem 2rem 4rem;
}
.hero-particles {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 1;
  animation: gridFloat 20s linear infinite;
}
@keyframes gridFloat {
  from { background-position: 0 0; }
  to { background-position: 60px 60px; }
}
.hero-content {
  position: relative; z-index: 10;
  max-width: 780px;
  margin-left: max(2rem, calc((100vw - 1200px)/2));
  padding-right: 2rem;
}
.hero-status {
  display: inline-flex; align-items: center; gap: .6rem;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.3);
  padding: .4rem 1rem;
  border-radius: 100px;
  font-size: .8rem;
  color: var(--accent4);
  margin-bottom: 1.5rem;
  animation: fadeUp .6s ease .3s both;
}
.hero-status-dot {
  width: 8px; height: 8px;
  background: var(--accent4);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(16,185,129,.7);
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,.7); }
  70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.hero-name-wrap { margin-bottom: 1.5rem; }
.hero-glitch-wrap { line-height: 1; }
.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -3px;
  display: block;
  animation: fadeUp .7s ease .2s both;
  position: relative;
}
.hero-name-last {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  animation-delay: .3s;
  position: relative;
}
.hero-name-last::before {
  content: attr(data-text);
  position: absolute; left: 0; top: 0;
  color: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  animation: glitchClip 4s infinite linear;
  opacity: .3;
}
@keyframes glitchClip {
  0%, 90%, 100% { transform: none; opacity: 0; }
  92% { transform: translateX(-4px); opacity: .4; }
  94% { transform: translateX(4px); opacity: .4; }
  96% { transform: none; opacity: 0; }
}
.hero-role-wrap {
  display: flex; align-items: center; gap: .5rem;
  margin-top: .75rem;
  animation: fadeUp .7s ease .4s both;
}
.hero-role-bracket {
  font-family: 'Space Mono', monospace;
  font-size: 1.3rem;
  color: var(--accent);
  opacity: .6;
}
.hero-role {
  font-family: 'Space Mono', monospace;
  font-size: clamp(.9rem, 1.8vw, 1.2rem);
  color: var(--accent);
  letter-spacing: 2px;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text2);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 2rem;
  animation: fadeUp .7s ease .5s both;
}
.hero-actions {
  display: flex; gap: 1rem;
  animation: fadeUp .7s ease .6s both;
  flex-wrap: wrap;
}
.hero-scroll {
  position: absolute;
  bottom: 2.5rem; left: max(2rem, calc((100vw - 1200px)/2));
  display: flex; align-items: center; gap: 1rem;
  animation: fadeUp .7s ease .8s both;
}
.hero-scroll span {
  font-family: 'Space Mono', monospace;
  font-size: .7rem;
  letter-spacing: 3px;
  color: var(--text3);
  text-transform: uppercase;
}
.hero-scroll-line {
  width: 40px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
  0%, 100% { width: 40px; opacity: 1; }
  50% { width: 20px; opacity: .4; }
}
.hero-side {
  position: absolute; right: max(2rem, calc((100vw - 1200px)/2));
  top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2rem;
  z-index: 10;
  animation: fadeIn 1s ease .8s both;
}
.hero-stat {
  text-align: right;
  padding-right: 1rem;
  border-right: 2px solid var(--border2);
}
.hero-stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  line-height: 1;
}
.hero-stat-num::after { content: '+'; }
.hero-stat-label {
  font-size: .75rem;
  color: var(--text3);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .01em;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: white;
  opacity: 0;
  transition: opacity .3s;
}
.btn:hover::before { opacity: .07; }
.btn svg { width: 16px; height: 16px; transition: transform .3s; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover { box-shadow: 0 0 30px rgba(0,212,255,.4); transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--border2);
  color: var(--text);
  background: var(--surface);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-full { width: 100%; justify-content: center; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* ---- CONTAINERS & SECTIONS ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section {
  padding: 6rem 0;
  position: relative;
}
.section-dark { background: var(--bg2); }
.section-label {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-num {
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  color: var(--accent);
  background: rgba(0,212,255,.1);
  border: 1px solid rgba(0,212,255,.2);
  padding: .25rem .6rem;
  border-radius: 6px;
}
.section-tag {
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  color: var(--text3);
  letter-spacing: 1px;
}
.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--text2);
  font-size: 1.05rem;
  margin-bottom: 3rem;
}
.text-accent { color: var(--accent); }

/* ---- GLASS CARD ---- */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: var(--border2);
  box-shadow: var(--glow);
}

/* ---- ABOUT ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5rem;
  align-items: center;
}
.about-visual { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.about-avatar-wrap { position: relative; }
.about-avatar-frame {
  width: 220px; height: 220px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.about-avatar-inner {
  width: 180px; height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,212,255,.15), rgba(124,58,237,.15));
  border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.about-avatar-inner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(0,212,255,.1), transparent 70%);
}
.about-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative; z-index: 1;
}
.about-initials {
  font-family: 'Syne', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent);
  position: relative; z-index: 1;
}
.about-avatar-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(0,212,255,.2);
  animation: ringRotate linear infinite;
}
.ring-1 { width: 220px; height: 220px; animation-duration: 12s; border-style: dashed; }
.ring-2 { width: 260px; height: 260px; animation-duration: 20s; animation-direction: reverse; }
.ring-3 { width: 300px; height: 300px; animation-duration: 30s; border-color: rgba(124,58,237,.15); }
@keyframes ringRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.about-avatar-badge {
  position: absolute; bottom: -10px; right: -10px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 100px;
  padding: .3rem .8rem;
  font-size: .8rem;
  display: flex; gap: .4rem; align-items: center;
}
.about-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}
.about-lang {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem 1.2rem;
  border-radius: 100px;
  font-size: .85rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all .35s ease;
}
.about-lang:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow);
  border-color: var(--accent);
}
.about-lang::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, transparent, var(--accent), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s ease;
}
.about-lang:hover::before { opacity: 1; }
.about-lang::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg);
  transition: .7s;
}
.about-lang:hover::after { left: 140%; }
.lang-badge {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: var(--bg);
  font-weight: 700;
  font-size: .7rem;
  padding: 6px 12px;
  border-radius: 50px;
  letter-spacing: 1px;
  transition: transform .3s ease;
}
.about-lang:hover .lang-badge { transform: scale(1.12); }
.about-lang.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg);
  border-color: transparent;
  box-shadow: 0 0 20px rgba(0,212,255,.6);
}
.about-lang.active .lang-badge { background: var(--bg); color: var(--accent); }
.about-lang:active { transform: scale(.96); }
.about-p { color: var(--text2); line-height: 1.8; margin-bottom: 1rem; }
.about-traits { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }
.about-trait {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.about-trait:hover { border-color: rgba(0,212,255,.3); transform: translateX(4px); }
.about-trait-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.about-trait strong { display: block; font-size: .92rem; margin-bottom: .2rem; }
.about-trait small { color: var(--text3); font-size: .8rem; }
.about-cta { display: flex; align-items: center; gap: 1.5rem; margin-top: 1.5rem; flex-wrap: wrap; }
.about-resume-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .88rem; color: var(--text2);
  transition: color .3s;
}
.about-resume-link svg { width: 15px; height: 15px; }
.about-resume-link:hover { color: var(--accent); }

/* ---- SKILLS ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: default;
}
.skill-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transition: transform .4s;
  transform-origin: left;
}
.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,212,255,.3);
  box-shadow: var(--glow);
}
.skill-card:hover::before { transform: scaleX(1); }
.skill-card-icon {
  width: 44px; height: 44px;
  background: rgba(0,212,255,.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
}
.skill-card-icon svg { width: 22px; height: 22px; }
.skill-card h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .75rem;
}
.skill-bar {
  height: 3px;
  background: rgba(255,255,255,.07);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: .75rem;
}
.skill-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 6px var(--accent);
}
.skill-tag {
  font-size: .72rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: 'Space Mono', monospace;
}

/* ---- EXPERIENCE ---- */
.exp-timeline {
  position: relative;
  padding-left: 2rem;
}
.exp-line {
  position: absolute; left: 7px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent2), transparent);
}
.exp-item {
  position: relative;
  margin-bottom: 3rem;
}
.exp-dot {
  position: absolute; left: -2rem;
  top: 1.5rem;
  width: 16px; height: 16px;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.exp-dot-inner {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.exp-card {
  padding: 1.75rem;
  transition: var(--transition);
}
.exp-card:hover {
  transform: translateX(6px);
  border-color: rgba(0,212,255,.3);
  box-shadow: var(--glow);
}
.exp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.exp-badge {
  display: inline-block;
  font-size: .7rem;
  font-family: 'Space Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 4px;
  background: rgba(0,212,255,.12);
  border: 1px solid rgba(0,212,255,.2);
  color: var(--accent);
  margin-bottom: .4rem;
}
.exp-badge-edu { background: rgba(124,58,237,.12); border-color: rgba(124,58,237,.3); color: #a78bfa; }
.exp-badge-school { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); color: var(--accent3); }
.exp-role {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.exp-company { color: var(--text2); font-size: .88rem; display: block; }
.exp-date {
  display: flex; align-items: center; gap: .5rem;
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  color: var(--text3);
  white-space: nowrap;
}
.exp-date-sep { color: var(--accent); }
.exp-list { display: flex; flex-direction: column; gap: .6rem; }
.exp-list li { display: flex; align-items: flex-start; gap: .75rem; color: var(--text2); font-size: .9rem; }
.exp-check { color: var(--accent4); flex-shrink: 0; font-weight: 700; margin-top: .1rem; }
.exp-desc { color: var(--text2); line-height: 1.7; }
.exp-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.25rem; }
.exp-tags span {
  font-size: .72rem;
  font-family: 'Space Mono', monospace;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: .2rem .6rem;
  border-radius: 4px;
  color: var(--text3);
}

/* ---- PROJECTS ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,212,255,.3);
  box-shadow: var(--glow);
}
.project-img { overflow: hidden; }
.project-img-inner {
  height: 200px;
  position: relative;
  transition: transform .5s ease;
}
.project-card:hover .project-img-inner { transform: scale(1.02); }
.project-img-1 { background: linear-gradient(135deg, #0d2137, #0a3d2e); }
.project-img-2 { background: linear-gradient(135deg, #0d2137, #0d3a1a); }
.project-img-3 { background: linear-gradient(135deg, #1a1a0d, #2d2a0a); }
.project-img-4 { background: linear-gradient(135deg, #1a0d2d, #0d0d2d); }
.project-preview {
  margin: 12px;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  height: calc(100% - 24px);
  overflow: hidden;
}
.pp-bar {
  height: 24px;
  background: rgba(255,255,255,.05);
  display: flex; align-items: center; gap: 5px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.pp-bar span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
}
.pp-bar span:nth-child(1) { background: #ff5f57; }
.pp-bar span:nth-child(2) { background: #febc2e; }
.pp-bar span:nth-child(3) { background: #28c840; }
.pp-content { padding: 10px 12px; }
.pp-hero { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; color: var(--accent); margin-bottom: 8px; }
.pp-line {
  height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.12);
  margin: 5px 0;
}
.w60 { width: 60%; }
.w70 { width: 70%; }
.w80 { width: 80%; }
.w50 { width: 50%; }
.pp-cards { display: flex; gap: 5px; margin-top: 8px; }
.pp-mini-card {
  flex: 1; height: 30px;
  border-radius: 4px;
  background: rgba(0,212,255,.12);
  border: 1px solid rgba(0,212,255,.15);
}
.pp-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.pp-col { flex: 1; }
.pp-price {
  font-family: 'Space Mono', monospace;
  font-size: .8rem;
  color: var(--accent4);
  margin-left: 8px;
}
.pp-task {
  display: flex; align-items: center; gap: 8px;
  margin: 5px 0;
}
.pp-check-circle {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2);
  flex-shrink: 0;
}
.pp-check-circle.done { background: var(--accent4); border-color: var(--accent4); }
.pp-form { margin-top: 6px; }
.pp-field {
  height: 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 4px;
  padding: 3px 6px;
  margin: 5px 0;
  display: flex; align-items: center;
}
.pp-submit {
  height: 18px;
  background: rgba(124,58,237,.4);
  border-radius: 4px;
  margin-top: 6px;
}
.project-info { padding: 1.5rem; }
.project-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .75rem; gap: .5rem; flex-wrap: wrap;
}
.project-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem; font-weight: 700;
}
.project-status {
  font-size: .68rem;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: .2rem .6rem;
  border-radius: 4px;
  white-space: nowrap;
}
.project-status.open {
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.3);
  color: var(--accent4);
}
.project-info p { color: var(--text2); font-size: .88rem; line-height: 1.65; margin-bottom: 1rem; }
.project-tech {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: 1.25rem;
}
.project-tech span {
  font-size: .72rem;
  font-family: 'Space Mono', monospace;
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: .2rem .6rem;
  border-radius: 4px;
  color: var(--text3);
}
.project-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.proj-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .9rem;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 600;
  transition: var(--transition);
  border: 1px solid var(--border2);
  color: var(--text2);
  background: var(--surface2);
}
.proj-btn svg { width: 13px; height: 13px; }
.proj-btn:hover { transform: translateY(-2px); }
.proj-btn-github:hover { border-color: rgba(255,255,255,.3); color: var(--text); }
.proj-btn-collab {
  border-color: rgba(16,185,129,.3);
  color: var(--accent4);
  background: rgba(16,185,129,.07);
}
.proj-btn-collab:hover { background: rgba(16,185,129,.15); box-shadow: 0 0 15px rgba(16,185,129,.2); }
.proj-btn-demo {
  border-color: rgba(0,212,255,.3);
  color: var(--accent);
  background: rgba(0,212,255,.07);
}
.proj-btn-demo:hover { background: rgba(0,212,255,.15); box-shadow: 0 0 15px rgba(0,212,255,.2); }
.projects-cta {
  display: flex; justify-content: center;
  margin-top: 3rem;
}

/* ---- CERTIFICATES ---- */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.cert-card {
  padding: 1.5rem;
  display: flex; gap: 1.25rem;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.cert-card:hover { transform: translateY(-6px); }
.cert-glow {
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .4s;
}
.cert-card:hover .cert-glow { opacity: 1; }
.cert-icon {
  font-size: 2rem;
  width: 52px; height: 52px;
  background: var(--surface2);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cert-body h3 { font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.cert-body p { color: var(--text2); font-size: .83rem; line-height: 1.5; margin-bottom: .75rem; }
.cert-badge {
  display: inline-block;
  font-size: .68rem;
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: .18rem .5rem;
  border-radius: 4px;
  background: rgba(0,212,255,.1);
  border: 1px solid rgba(0,212,255,.2);
  color: var(--accent);
}

/* ---- CONTACT ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
  align-items: center;
}
.contact-sub { color: var(--text2); line-height: 1.8; margin-bottom: 2rem; max-width: 420px; }
.contact-info { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 2rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem;
  color: var(--text2);
  font-size: .9rem;
  transition: color .3s;
}
.contact-item:hover { color: var(--accent); }
.contact-item-icon {
  width: 36px; height: 36px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .85rem;
}
.contact-socials { display: flex; gap: .75rem; }
.social-btn {
  width: 44px; height: 44px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  transition: var(--transition);
}
.social-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  transform: translateY(-3px);
}
.social-btn svg { width: 17px; height: 17px; }
.contact-form { padding: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: .5rem;
  letter-spacing: .03em;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  color: var(--text);
  font-size: .9rem;
  transition: border-color .3s, box-shadow .3s;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,255,.08);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text3); }
.form-group textarea { resize: vertical; }
.form-group select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select { background: rgba(0,0,0,.03); }

/* ---- FOOTER ---- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1.5rem;
}
.footer-logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  display: block;
  margin-bottom: .3rem;
}
.footer-logo span { color: var(--accent); }
.footer-left p { font-size: .82rem; color: var(--text3); line-height: 1.7; }
.footer-hint { font-size: .8rem; color: var(--text3); font-style: italic; }
kbd {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: .1rem .4rem;
  font-family: 'Space Mono', monospace;
  font-size: .72rem;
  color: var(--text2);
}

/* ---- TOAST ---- */
.toast {
  position: fixed; bottom: 5rem; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: .75rem 1.5rem;
  font-size: .88rem;
  z-index: 9999;
  opacity: 0;
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .4s;
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
.reveal-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: var(--delay, 0s);
}
.reveal-up.visible { opacity: 1; transform: none; }

/* ---- TYPING CURSOR ---- */
.hero-role::after {
  content: '|';
  color: var(--accent);
  animation: blink .7s step-end infinite;
  margin-left: 2px;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-visual { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .hero-side { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav { padding: 1rem 1.25rem; }
  .nav-menu {
    position: fixed; top: 0; right: 0;
    height: 100vh; width: min(320px, 100vw);
    background: rgba(7,10,15,.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    border-left: 1px solid var(--border);
  }
  .nav-menu.open { transform: none; }
  .nav-link { font-size: 1.1rem; }
  .nav-toggle { display: flex; }
  .hero { padding: 5rem 1.25rem 3rem; }
  .hero-content { margin-left: 0; padding-right: 0; }
  .hero-scroll { left: 1.25rem; }
  .section { padding: 4rem 0; }
  .container { padding: 0 1.25rem; }
  .section-title { font-size: clamp(1.7rem, 7vw, 2.5rem); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .cursor, .cursor-follower { display: none; }
  body { cursor: auto; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .project-actions { flex-wrap: wrap; }
}

/* ---- NOISE TEXTURE OVERLAY ---- */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9997;
  opacity: .4;
}
