/* =============================================
   VARIABLES
============================================= */
:root {
  --bg:         #06080F;
  --bg-2:       #0B1018;
  --surface:    #10182A;
  --surface-2:  #18253C;
  --surface-3:  #223050;
  --cyan:       #00D4FF;
  --cyan-dim:   rgba(0, 212, 255, 0.10);
  --cyan-glow:  0 0 20px rgba(0, 212, 255, 0.35), 0 0 50px rgba(0, 212, 255, 0.15);
  --orange:     #FF6B35;
  --lime:       #A3E635;
  --green:      #22C55E;
  --text:       #E6F0FA;
  --text-muted: #7B9AB5;
  --text-faint: #2E4060;
  --border:     rgba(0, 212, 255, 0.10);
  --border-h:   rgba(0, 212, 255, 0.35);
  --ff-display: 'Bebas Neue', cursive;
  --ff-heading: 'Syne', sans-serif;
  --ff-mono:    'JetBrains Mono', monospace;
  --ff-body:    'DM Sans', sans-serif;
  --nav-h: 68px;
  /* Legacy vars kept for portfolio-details.html */
  --primary-color: #00D4FF;
  --primary-color-rgb: 0, 212, 255;
  --accent-color: #22C55E;
  --accent-color-rgb: 34, 197, 94;
  --bg-color: #06080F;
  --bg-secondary: #0B1018;
  --bg-primary: #06080F;
  --card-bg: #10182A;
  --text-primary: #E6F0FA;
  --text-secondary: #7B9AB5;
  --border-color: rgba(0, 212, 255, 0.10);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.4);
  --shadow: 0 4px 24px rgba(0,0,0,.5);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
  --shadow-xl: 0 20px 60px rgba(0,0,0,.7);
  --glass-bg: rgba(16, 24, 42, 0.8);
  --glass-border: rgba(0, 212, 255, 0.10);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-full: 9999px;
  --gradient-primary: var(--cyan);
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --project-theme-color: var(--cyan);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
}

/* Grain noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px;
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--cyan); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

::selection { background: var(--cyan); color: var(--bg); }
*:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* =============================================
   CUSTOM CURSOR
============================================= */
#cur-dot {
  position: fixed;
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width .15s, height .15s, background .15s;
}

#cur-ring {
  position: fixed;
  width: 34px; height: 34px;
  border: 1.5px solid rgba(0, 212, 255, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width .4s ease, height .4s ease, border-color .3s;
}

body.hovering #cur-dot { width: 11px; height: 11px; background: var(--orange); }
body.hovering #cur-ring { width: 52px; height: 52px; border-color: rgba(255, 107, 53, 0.45); }

@media (max-width: 768px) {
  body { cursor: auto; }
  #cur-dot, #cur-ring { display: none; }
}

/* =============================================
   PAGE LOADER
============================================= */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity .5s ease, visibility .5s ease;
}
.page-loader.loaded { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-logo-text {
  font-family: var(--ff-mono);
  font-size: 32px;
  color: var(--text);
  letter-spacing: -.02em;
}
.loader-logo-text em { color: var(--cyan); font-style: normal; }
.loader-bar {
  width: 160px;
  height: 2px;
  background: var(--surface-3);
  margin: 18px auto 0;
  overflow: hidden;
}
.loader-bar::after {
  content: '';
  display: block;
  height: 100%;
  background: var(--cyan);
  animation: loaderSlide 1.8s ease forwards;
}
@keyframes loaderSlide {
  0%   { width: 0; }
  60%  { width: 70%; }
  100% { width: 100%; }
}

/* =============================================
   LAYOUT UTILITIES
============================================= */
section { padding: 110px 0; overflow: hidden; }
.section-bg { background: var(--bg-2); }

.sec-label {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: .18em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.sec-label::before {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background: var(--cyan);
  flex-shrink: 0;
}
.sec-label .num { color: var(--text-faint); }

.sec-title {
  font-family: var(--ff-heading);
  font-weight: 800;
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.06;
  color: var(--text);
}
.sec-title em { color: var(--cyan); font-style: normal; }

.sec-desc {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 540px;
  margin-top: 12px;
}

.sec-header { margin-bottom: 56px; }

/* Reveal animations */
.reveal, .reveal-l, .reveal-r {
  opacity: 0;
  transition: opacity .75s ease, transform .75s ease;
}
.reveal      { transform: translateY(28px); }
.reveal-l    { transform: translateX(-28px); }
.reveal-r    { transform: translateX(28px); }
.reveal.vis, .reveal-l.vis, .reveal-r.vis { opacity: 1; transform: none; }
.d1 { transition-delay: .10s; }
.d2 { transition-delay: .20s; }
.d3 { transition-delay: .30s; }
.d4 { transition-delay: .40s; }
.d5 { transition-delay: .50s; }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cyan);
  color: var(--bg);
  padding: 13px 30px;
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: none;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: box-shadow .3s, transform .3s;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.12);
  transform: translateX(-110%) skewX(-15deg);
  transition: transform .45s ease;
}
.btn-primary:hover { box-shadow: var(--cyan-glow); transform: translateY(-2px); color: var(--bg); }
.btn-primary:hover::after { transform: translateX(120%) skewX(-15deg); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  padding: 13px 30px;
  font-family: var(--ff-mono);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid var(--surface-3);
  cursor: none;
  transition: border-color .3s, color .3s;
}
.btn-outline:hover { border-color: var(--text-muted); color: var(--text); }

/* =============================================
   NAVIGATION
============================================= */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 52px;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  background: rgba(6, 8, 15, 0.85);
  border-bottom: 1px solid var(--border);
  transition: height .3s, box-shadow .3s;
}
#nav.scrolled {
  height: 58px;
  box-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
}
.nav-logo {
  font-family: var(--ff-mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: none;
}
.nav-logo em { color: var(--cyan); font-style: normal; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
}
.nav-links a {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: .04em;
  position: relative;
  transition: color .2s;
  cursor: none;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--cyan);
  transition: width .3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-cta {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 9px 22px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  background: transparent;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: color .3s;
}
.nav-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cyan);
  transform: translateY(101%);
  transition: transform .3s ease;
  z-index: -1;
}
.nav-cta:hover { color: var(--bg); }
.nav-cta:hover::before { transform: translateY(0); }

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-h);
  color: var(--cyan);
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: background .2s;
}
.mobile-nav-toggle:hover { background: var(--cyan-dim); }

/* Mobile full-screen nav */
#mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 15, 0.97);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
#mobile-nav.active { opacity: 1; visibility: visible; }
#mobile-nav ul { list-style: none; text-align: center; }
#mobile-nav ul li { margin-bottom: 28px; }
#mobile-nav ul a {
  font-family: var(--ff-heading);
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.01em;
  transition: color .2s;
}
#mobile-nav ul a:hover { color: var(--cyan); }

/* Back to top */
.back-to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border-h);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 996;
  visibility: hidden;
  opacity: 0;
  transition: all .3s;
  font-size: 22px;
}
.back-to-top.active { visibility: visible; opacity: 1; }
.back-to-top:hover { background: var(--cyan); color: var(--bg); }

/* =============================================
   HERO
============================================= */
#hero {
  width: 100%;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#hero-canvas.loaded { opacity: 1; }

.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(0, 212, 255, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 20% 70%, rgba(255, 107, 53, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 52px;
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 64px;
  align-items: center;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(34, 197, 94, 0.07);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 8px 18px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 28px;
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulseAnim 2s ease-in-out infinite;
}
@keyframes pulseAnim {
  0%,100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(34,197,94,.4); }
  50%      { opacity: .7; transform: scale(.9); box-shadow: 0 0 0 7px rgba(34,197,94,0); }
}

.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(68px, 10.5vw, 148px);
  line-height: .9;
  letter-spacing: .01em;
  margin-bottom: 6px;
}
.hero-name .ghost {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.22);
}

.hero-role {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: 18px;
  color: var(--text-muted);
  margin: 22px 0 10px;
}
.hero-role .prompt { color: var(--cyan); }
.hero-role .typed { color: var(--cyan); min-width: 2px; }
.hero-role .typed-cursor { color: var(--cyan); }

.hero-location {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--text-faint);
  letter-spacing: .05em;
  margin-bottom: 40px;
}
.hero-location span { color: var(--orange); }

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero terminal */
.hero-terminal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.55), var(--cyan-glow);
}
.t-bar {
  background: var(--surface);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--border);
}
.t-dot { width: 11px; height: 11px; border-radius: 50%; }
.t-dot.r { background: #FF5F57; }
.t-dot.y { background: #FFBD2E; }
.t-dot.g { background: #28CA41; }
.t-bar-title {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 auto;
  padding-right: 44px;
}
.t-body {
  padding: 22px 24px;
  font-family: var(--ff-mono);
  font-size: 13.5px;
  line-height: 1.85;
}
.t-row { display: flex; align-items: flex-start; gap: 10px; }
.t-out { padding-left: 20px; color: var(--text-muted); }
.t-sp  { height: 8px; }
.t-prompt { color: var(--cyan); flex-shrink: 0; }
.t-cmd    { color: var(--lime); }
.t-key    { color: var(--orange); }
.t-val    { color: var(--text); }
.t-cmt    { color: var(--text-faint); font-style: italic; }

/* =============================================
   ABOUT
============================================= */
#about {
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
#about .decor {
  position: absolute;
  top: -10px; right: -30px;
  font-family: var(--ff-display);
  font-size: clamp(90px, 14vw, 200px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 212, 255, 0.04);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
.about-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 80px;
  align-items: center;
}
.photo-wrap { position: relative; }
.photo-frame {
  position: relative;
  display: inline-block;
}
.photo-frame img {
  width: 300px;
  height: 380px;
  object-fit: cover;
  object-position: top;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 82% 100%, 0 100%);
  display: block;
}
.photo-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--cyan) 0%, transparent 50%, var(--orange) 100%);
  clip-path: polygon(0 0, 100% 0, 100% 82%, 82% 100%, 0 100%);
  z-index: -1;
}
.photo-badge {
  position: absolute;
  right: -38px;
  bottom: -18px;
  background: var(--surface);
  border: 1px solid var(--border-h);
  padding: 14px 18px;
  text-align: center;
  min-width: 90px;
}
.badge-num {
  font-family: var(--ff-display);
  font-size: 44px;
  line-height: 1;
  color: var(--cyan);
  display: block;
}
.badge-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.about-content p {
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
}
.about-content .about-lead {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 18px;
  display: none;
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 28px 0 34px;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 14px;
  background: rgba(0, 212, 255, 0.03);
  border-left: 2px solid var(--border);
  transition: border-color .25s, background .25s;
}
.info-item:hover { border-color: var(--cyan); background: var(--cyan-dim); }
.info-item .lbl {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .09em;
}
.info-item .val {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--text);
}
.info-item .val.ok { color: var(--green); }

/* =============================================
   SKILLS / TECH STACK
============================================= */
#skills {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
#skills::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.04) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.skills-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 56px;
  align-items: end;
}
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
}
.tech-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px 14px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: none;
  transition: transform .3s, border-color .3s, background .3s, box-shadow .3s;
}
.tech-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.tech-card:hover {
  background: var(--surface-2);
  border-color: var(--border-h);
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0,0,0,.4), var(--cyan-glow);
}
.tech-card:hover::after { transform: scaleX(1); }
.tc-name {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text);
  display: block;
  margin-bottom: 8px;
}
.tc-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-family: var(--ff-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tc-badge--intermediaire {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid #22c55e;
}
.tc-badge--debutant {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid #3b82f6;
}
.tc-badge--avance {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
  border: 1px solid #f97316;
}

/* =============================================
   STATS (cyan band)
============================================= */
#stats {
  background: var(--cyan);
  padding: 64px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stats-item, .stat-item {
  text-align: center;
  padding: 16px 12px;
  border-right: 1px solid rgba(6, 8, 15, 0.14);
}
.stats-item:last-child, .stat-item:last-child { border-right: none; }
.stat-num {
  font-family: var(--ff-display);
  font-size: clamp(50px, 6.5vw, 82px);
  line-height: 1;
  color: var(--bg);
}
.stat-lbl, .counter-label {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: rgba(6,8,15,.6);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 8px;
}
.counter {
  font-family: var(--ff-display);
  font-size: clamp(50px, 6.5vw, 82px);
  line-height: 1;
  color: var(--bg);
  display: inline;
}

/* =============================================
   RESUME / EXPERIENCE
============================================= */
#resume {
  background: var(--bg-2);
  position: relative;
}
.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.exp-col > h3 {
  font-family: var(--ff-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--cyan) 0%, transparent 100%);
}
/* Dynamically rendered resume items */
.resume-item {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.resume-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.resume-item::before {
  content: '';
  position: absolute;
  left: -33px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}
.resume-item h4 {
  font-family: var(--ff-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.resume-item h5 {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 7px;
  background: none;
  padding: 0;
  display: block;
}
.resume-item em {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--orange);
  margin-bottom: 12px;
  display: block;
  font-style: normal;
}
.resume-item em::before { display: none; }
.resume-item ul { list-style: none; padding: 0; margin: 12px 0 0; }
.resume-item ul li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 3px 0 3px 16px;
  position: relative;
}
.resume-item ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: 10px;
  top: 5px;
  font-family: inherit;
}
.resume-item p { color: var(--text-muted); font-size: 14px; margin-top: 8px; }

.resume-title {
  font-family: var(--ff-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  padding-left: 0;
}
.resume-title::before { display: none; }

/* =============================================
   PORTFOLIO
============================================= */
#portfolio { background: var(--bg); }

#portfolio-flters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  list-style: none;
  padding: 0;
  justify-content: center;
  background: none;
  border: none;
  box-shadow: none;
}
#portfolio-flters li {
  font-family: var(--ff-mono);
  font-size: 12px;
  padding: 8px 20px;
  border: 1px solid var(--surface-3);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  letter-spacing: .05em;
  transition: all .2s;
  border-radius: 0;
}
#portfolio-flters li:hover, #portfolio-flters li.filter-active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}

.portfolio-container { gap: 22px 0; }
.portfolio-item { margin-bottom: 22px; }

.portfolio-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color .4s, box-shadow .4s, transform .3s;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 0;
}
.portfolio-wrap:hover {
  border-color: var(--border-h);
  box-shadow: 0 22px 54px rgba(0,0,0,.5);
  transform: translateY(-4px);
}
.portfolio-img-container {
  position: relative;
  overflow: hidden;
  height: 210px;
  flex-shrink: 0;
}
.portfolio-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
  display: block;
  aspect-ratio: unset;
}
.portfolio-wrap:hover img { transform: scale(1.04); }
.portfolio-links {
  opacity: 0;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 3;
  position: absolute;
  transition: opacity .3s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: rgba(6, 8, 15, 0.75);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.portfolio-links a {
  color: var(--text);
  font-size: 20px;
  background: rgba(0, 212, 255, 0.15);
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-h);
  transition: all .2s;
  cursor: none;
}
.portfolio-links a:hover { background: var(--cyan); color: var(--bg); }
.portfolio-wrap:hover .portfolio-links { opacity: 1; }
.portfolio-info-bottom {
  padding: 18px 20px;
  flex-grow: 1;
  background: var(--surface);
  transition: background .3s;
}
.portfolio-info-bottom h4 {
  font-family: var(--ff-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.portfolio-info-bottom p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.portfolio-wrap:hover .portfolio-info-bottom { background: var(--surface-2); }

/* =============================================
   SERVICES
============================================= */
#services { background: var(--bg-2); }
.icon-box {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.icon-box::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.icon-box:hover {
  border-color: var(--border-h);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.icon-box:hover::after { transform: scaleX(1); }
.icon-box .icon {
  width: 56px; height: 56px;
  background: var(--cyan-dim);
  border: 1px solid var(--border-h);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
}
.icon-box .icon i {
  font-size: 26px;
  color: var(--cyan);
  position: relative;
  z-index: 1;
}
.icon-box .icon-bg { display: none; }
.icon-box .title {
  font-family: var(--ff-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  text-align: left;
}
.icon-box .description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}
.icon-box .description ul { list-style: none; padding: 0; margin: 12px 0 0; }
.icon-box .description ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--text-muted);
  transition: color .2s;
}
.icon-box:hover .description ul li { color: var(--text); }
.icon-box .description ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: bold;
}

/* =============================================
   CONTACT
============================================= */
#contact {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.contact-bg-text {
  position: absolute;
  top: 0; left: 0; right: 0;
  text-align: center;
  font-family: var(--ff-display);
  font-size: clamp(80px, 14vw, 200px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 212, 255, 0.05);
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  padding-top: 20px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  position: relative;
  z-index: 1;
  padding-top: 30px;
}
.contact-left p {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.75;
  margin-bottom: 32px;
}
.c-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.c-icon {
  width: 38px; height: 38px;
  background: var(--cyan-dim);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  font-size: 15px;
  flex-shrink: 0;
}
.c-lbl {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: 3px;
}
.c-val { font-size: 14px; color: var(--text); }

/* Contact form */
.php-email-form { max-width: unset; margin: 0; }
.f-group { margin-bottom: 18px; }
.f-label, .php-email-form label {
  display: block;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 7px;
  font-weight: 400;
}
.php-email-form label code {
  color: var(--cyan);
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.f-ctrl,
.php-email-form input,
.php-email-form textarea,
.php-email-form select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-3);
  color: var(--text);
  padding: 13px 16px;
  font-family: var(--ff-body);
  font-size: 14.5px;
  outline: none;
  transition: border-color .3s, box-shadow .3s;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
.f-ctrl::placeholder,
.php-email-form input::placeholder,
.php-email-form textarea::placeholder { color: var(--text-faint); }
.f-ctrl:focus,
.php-email-form input:focus,
.php-email-form textarea:focus,
.php-email-form select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.07);
}
.php-email-form textarea { min-height: 130px; resize: vertical; }
.f-ctrl option, .php-email-form select option { background: var(--surface); color: var(--text); }
.php-email-form .form-control { border-radius: 0; }
.php-email-form .form-group { margin-bottom: 18px; }

.btn-submit, .php-email-form button[type="submit"] {
  width: 100%;
  background: transparent;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 15px;
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color .3s;
  border-radius: 0;
  display: block;
  text-align: center;
}
.btn-submit::before, .php-email-form button[type="submit"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cyan);
  transform: translateX(-101%);
  transition: transform .32s ease;
  z-index: -1;
}
.btn-submit:hover, .php-email-form button[type="submit"]:hover { color: var(--bg); }
.btn-submit:hover::before, .php-email-form button[type="submit"]:hover::before { transform: translateX(0); }

.php-email-form .loading {
  display: none;
  color: var(--text-muted);
  font-family: var(--ff-mono);
  font-size: 13px;
  padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.php-email-form .error-message {
  display: none;
  color: #EF4444;
  border: 1px solid rgba(239,68,68,.3);
  padding: 12px;
  margin-bottom: 14px;
  font-size: 13px;
}
.php-email-form .sent-message {
  display: none;
  color: var(--green);
  border: 1px solid rgba(34,197,94,.3);
  padding: 12px;
  margin-bottom: 14px;
  font-size: 13px;
  text-align: center;
}
@keyframes animate-loading {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =============================================
   FOOTER
============================================= */
#footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  position: static;
  width: auto;
  color: var(--text-muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.f-logo {
  font-family: var(--ff-mono);
  font-size: 15px;
  color: var(--text-muted);
}
.f-logo em { color: var(--cyan); font-style: normal; }
.f-social { display: flex; gap: 22px; }
.f-social a {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: color .2s;
  cursor: none;
}
.f-social a:hover { color: var(--cyan); }
.f-copy {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-faint);
}
#footer .copyright { display: none; }

/* =============================================
   MAIN LAYOUT
============================================= */
#main { margin-left: 0; }
#header { display: none; }
.top-contact { display: none; }
.mobile-nav-toggle { display: none; }
.theme-toggle { display: none; }
.sidebar-footer { display: none; }

/* Section title (legacy, used nowhere new but kept safe) */
.section-title { padding-bottom: 40px; text-align: center; }
.section-title h2 {
  font-family: var(--ff-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
}
.section-title p { color: var(--text-muted); }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1080px) {
  .hero-container { grid-template-columns: 1fr; gap: 48px; }
  .hero-terminal { max-width: 480px; }
  .about-grid { grid-template-columns: 1fr; gap: 52px; }
  .photo-wrap { display: flex; justify-content: center; }
  .exp-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 52px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .skills-head { grid-template-columns: 1fr; }
}
@media (max-width: 992px) {
  #nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .mobile-nav-toggle { display: flex; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  section { padding: 72px 0; }
  #nav { padding: 0 20px; }
  .hero-container { padding: 0 24px; }
  .container { padding-left: 20px; padding-right: 20px; }
  .info-grid { grid-template-columns: 1fr; }
  #stats { padding: 48px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .photo-badge { right: -10px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item, .stats-item { border-right: none; border-bottom: 1px solid rgba(6,8,15,.14); }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn-primary, .hero-btns .btn-outline { text-align: center; justify-content: center; }
}

/* Print */
@media print {
  #nav, #footer, .back-to-top { display: none !important; }
  #main { margin-left: 0 !important; }
}

/* =============================================
   PORTFOLIO DETAILS (kept intact)
============================================= */
.project-hero {
  position: relative;
  background-color: #000;
  overflow: hidden;
  padding: 0 !important;
  margin-top: var(--nav-h) !important;
}
.project-hero-slider { position: relative; background: #06080F; }
.project-hero-slider img { width: 100%; height: auto; max-height: 85vh; object-fit: contain; display: block; opacity: 1; }
.project-hero-content {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  padding: 60px 0 22px;
  background: linear-gradient(to top, rgba(6,8,15,0.88) 0%, rgba(6,8,15,0.4) 55%, transparent 100%);
  z-index: 10;
  color: #fff;
  pointer-events: none;
}
.category-badge {
  display: inline-block;
  padding: 6px 18px;
  background-color: var(--project-theme-color);
  color: #fff;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.project-info-bar {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  position: relative;
  z-index: 20;
}
.project-accent-color { color: var(--project-theme-color) !important; }
.project-accent-text  { color: var(--project-theme-color); }
.tech-stack-card { background-color: var(--bg-secondary); border-color: var(--border-color); }
.tech-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 12px;
  background-color: var(--surface);
  border-radius: 0;
  border: 1px solid var(--border-color);
  transition: transform .3s, border-color .3s;
}
.tech-item:hover { transform: translateX(5px); border-color: var(--project-theme-color); }
.tech-item i { font-size: 24px; margin-right: 15px; color: var(--project-theme-color); }
.tech-item span { font-weight: 600; color: var(--text-primary); }
.project-benefits { background-color: var(--bg-secondary); }
.benefit-card {
  background-color: var(--card-bg);
  padding: 35px 25px;
  border-radius: 0;
  height: 100%;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--project-theme-color);
  transition: transform .3s;
  text-align: center;
}
.benefit-card:hover { transform: translateY(-8px); }
.benefit-icon {
  width: 70px; height: 70px;
  background-color: var(--bg-secondary);
  color: var(--project-theme-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}
.benefit-card h4 { font-weight: 700; margin-bottom: 15px; color: var(--text-primary); }
.benefit-card p { color: var(--text-secondary); font-size: 1rem; line-height: 1.6; }
.project-hero .swiper-button-next,
.project-hero .swiper-button-prev {
  color: #fff;
  background: rgba(255,255,255,.1);
  width: 50px; height: 50px;
  border-radius: 50%;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transition: background .3s;
}
.project-hero .swiper-button-next:hover,
.project-hero .swiper-button-prev:hover { background: var(--project-theme-color); }
.project-hero .swiper-button-next::after,
.project-hero .swiper-button-prev::after { font-size: 20px; }
.project-hero .swiper-pagination-bullet { background: #fff; opacity: .5; width: 10px; height: 10px; }
.project-hero .swiper-pagination-bullet-active {
  background: var(--project-theme-color);
  opacity: 1;
  width: 20px;
  border-radius: 10px;
}