/* ═══════════════════════════════════════════════════════════
   ELECTRIC COSMOS — Portfolio CSS
   Rajdhani (display) + Poppins (body)
   Palette: Deep Navy #070b14 | Cyan #00eeff | Accent #ff2d78
═══════════════════════════════════════════════════════════ */

/* ── CSS CUSTOM PROPERTIES ─────────────────────────────── */
/* @import removed — fonts loaded via <link> in index.html (non-blocking) */

:root {
  --bg:        #070b14;
  --bg2:       #0b1220;
  --bg3:       #0d1628;
  --card:      rgba(11, 18, 32, 0.9);
  --card2:     rgba(15, 24, 44, 0.8);
  --cyan:      #00eeff;
  --cyan2:     #7df9ff;
  --cyan-dim:  rgba(0, 238, 255, 0.12);
  --cyan-mid:  rgba(0, 238, 255, 0.35);
  --accent:    #ff2d78;
  --accent-dim:rgba(255, 45, 120, 0.15);
  --text:      #bcc8dc;
  --text-hi:   #ffffff;
  --text-mute: #5a7290;
  --border:    rgba(0, 238, 255, 0.1);
  --border2:   rgba(0, 238, 255, 0.25);

  --glow-xs: 0 0 6px rgba(0,238,255,0.5);
  --glow-sm: 0 0 12px rgba(0,238,255,0.5), 0 0 24px rgba(0,238,255,0.2);
  --glow-md: 0 0 20px rgba(0,238,255,0.6), 0 0 50px rgba(0,238,255,0.25);
  --glow-lg: 0 0 30px rgba(0,238,255,0.8), 0 0 80px rgba(0,238,255,0.35), 0 0 150px rgba(0,238,255,0.12);

  --ease:    cubic-bezier(0.23, 1, 0.32, 1);
  --spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-d:  'Rajdhani', sans-serif;
  --font-b:  'Poppins', sans-serif;
}

/* ── RESET ─────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none; outline: none;
  font-family: var(--font-b);
}
html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  cursor: none;
}
body {
  background: var(--bg);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1.7;
  overflow-x: hidden;
}
*::selection { background: var(--cyan); color: var(--bg); }
img { max-width: 100%; height: auto; vertical-align: top; }
section {
  min-height: 100vh;
  padding: 10rem 9% 5rem;
  position: relative;
  z-index: 10;
}

/* ─────────────────────────────────────────────────────────
   LOADING SCREEN
───────────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hide { opacity: 0; visibility: hidden; }

.loader-hex {
  width: 90px; height: 90px;
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  background: conic-gradient(from 0deg, var(--cyan), var(--accent), var(--cyan));
  animation: loaderSpin 1.5s linear infinite;
  display: flex; align-items: center; justify-content: center;
}
.loader-inner {
  width: 76px; height: 76px;
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: 2.2rem; font-weight: 700;
  color: var(--cyan); letter-spacing: 0.1em;
}
@keyframes loaderSpin { to { filter: hue-rotate(360deg); } }

.loader-text {
  font-family: var(--font-d); font-size: 1.4rem; letter-spacing: 0.3em;
  color: var(--text-mute); text-transform: uppercase;
}
.loader-dots { animation: dotPulse 1.2s ease-in-out infinite; }
@keyframes dotPulse {
  0%,100% { opacity: 1; } 50% { opacity: 0.2; }
}

/* ─────────────────────────────────────────────────────────
   SCROLL PROGRESS BAR
───────────────────────────────────────────────────────── */
#scrollBar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--accent), var(--cyan));
  z-index: 99998;
  box-shadow: var(--glow-sm);
  transition: width 0.1s linear;
}

/* ─────────────────────────────────────────────────────────
   LAYER 1 — LIGHTNING CANVAS (z: 3)
───────────────────────────────────────────────────────── */
#lightningCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.85;
}

/* ─────────────────────────────────────────────────────────
   LAYER 2 — PARTICLES (z: 50) ABOVE EVERYTHING
───────────────────────────────────────────────────────── */
#particles-js {
  position: fixed;
  inset: 0;
  z-index:1;
  pointer-events: none;
}
#particles-js canvas {
  filter: drop-shadow(0 0 5px rgba(0,238,255,0.6))
          drop-shadow(0 0 15px rgba(0,238,255,0.25));
}

/* ─────────────────────────────────────────────────────────
   LAYER — SCAN LINES (z: 51) subtle CRT effect
───────────────────────────────────────────────────────── */
.scan-lines {
  position: fixed;
  inset: 0;
  z-index: 51;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.015) 2px,
    rgba(0,0,0,0.015) 4px
  );
  animation: scanMove 8s linear infinite;
}
@keyframes scanMove { from { background-position: 0 0; } to { background-position: 0 100px; } }

/* ─────────────────────────────────────────────────────────
   AMBIENT ORBS (z: 1)
───────────────────────────────────────────────────────── */
.orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  filter: blur(90px);
  animation: orbDrift 20s ease-in-out infinite;
  will-change: transform;
  contain: layout style;
}
.orb-1 { width: 600px; height: 600px; top: -150px; left: -150px; background: radial-gradient(circle,rgba(0,238,255,0.08),transparent 70%); animation-duration: 25s; }
.orb-2 { width: 500px; height: 500px; bottom: -100px; right: -100px; background: radial-gradient(circle,rgba(0,60,255,0.08),transparent 70%); animation-delay: -10s; animation-duration: 30s; }
.orb-3 { width: 350px; height: 350px; top: 40%; left: 30%; background: radial-gradient(circle,rgba(0,238,255,0.05),transparent 70%); animation-delay: -17s; animation-duration: 22s; }
.orb-4 { width: 280px; height: 280px; top: 20%; right: 15%; background: radial-gradient(circle,rgba(255,45,120,0.05),transparent 70%); animation-delay: -6s; animation-duration: 28s; }

@keyframes orbDrift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%      { transform: translate(50px,-70px) scale(1.1); }
  66%      { transform: translate(-40px,50px) scale(0.9); }
}

/* ─────────────────────────────────────────────────────────
   CUSTOM CURSOR
───────────────────────────────────────────────────────── */
.cursor-dot, .cursor-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99997;
  transform: translate(-50%,-50%);
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--cyan);
  box-shadow: var(--glow-sm);
  transition: transform 0.1s ease;
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1.5px solid rgba(0,238,255,0.55);
  box-shadow: var(--glow-xs);
  transition: width 0.25s var(--ease), height 0.25s var(--ease), border-color 0.25s;
}
.cursor-expanded .cursor-ring {
  width: 55px; height: 55px;
  border-color: var(--cyan);
  box-shadow: var(--glow-sm);
}

/* Shooting stars */
.shooting-star {
  position: fixed; top: 0; left: 0;
  width: 3px; height: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px 2px rgba(0,238,255,0.9), 0 0 20px rgba(255,255,255,0.6);
  pointer-events: none;
  z-index: 52;
  animation: shootStar linear forwards;
  will-change: transform, opacity;
}
@keyframes shootStar {
  0%   { transform: translate(0,0); opacity: 1; }
  100% { transform: translate(var(--tx),var(--ty)); opacity: 0; }
}

/* ─────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  /* הפדינג המוקטן שנלקח מ-scrolled */
  padding: 1.4rem 9%; 
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 200;
  /* הרקע הכהה והאטום יותר מ-scrolled */
  background: rgba(7, 11, 20, 0.94); 
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  /* גבול תחתון מודגש יותר וצללית מ-scrolled */
  border-bottom: 1px solid rgba(0,238,255,0.15);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
  transition: all 0.4s var(--ease);
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 30%, var(--accent) 70%, transparent);
  animation: headerGlow 4s ease-in-out infinite;
  opacity: 0.4;
}

@keyframes headerGlow { 0%,100% { opacity: 0.25; } 50% { opacity: 0.7; } }

.logo {
  font-family: var(--font-d);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-hi);
  letter-spacing: 0.08em;
}
.logo-bracket {
  color: var(--cyan);
  text-shadow: var(--glow-sm);
  animation: bracketPulse 2.5s ease-in-out infinite;
}
@keyframes bracketPulse { 0%,100% { text-shadow: var(--glow-xs); } 50% { text-shadow: var(--glow-md); } }

.navbar { display: flex; align-items: center; gap: 0.4rem; }
.navbar a {
  font-family: var(--font-d);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.8rem 1.4rem;
  position: relative;
  transition: color 0.3s ease;
}
.navbar a::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--cyan);
  box-shadow: var(--glow-sm);
  transition: left 0.3s var(--ease), right 0.3s var(--ease);
}
.navbar a:hover, .navbar a.active {
  color: var(--cyan);
  text-shadow: var(--glow-xs);
}
.navbar a:hover::before, .navbar a.active::before {
  left: 1.4rem; right: 1.4rem;
}

#menu-icon {
  font-size: 3.2rem;
  color: var(--text-hi);
  display: none;
  cursor: pointer;
  transition: color 0.3s;
}
#menu-icon:hover { color: var(--cyan); }

/* ─────────────────────────────────────────────────────────
   SHARED UTILITIES
───────────────────────────────────────────────────────── */
.heading {
  font-family: var(--font-d);
  font-size: 5rem;
  font-weight: 700;
  color: var(--text-hi);
  letter-spacing: 0.03em;
  text-align: center;
  margin-bottom: 1.5rem;
}
.heading span {
  color: var(--cyan);
  text-shadow: var(--glow-sm);
}
.section-sub {
  text-align: center;
  color: var(--text-mute);
  font-size: 1.5rem;
  margin-bottom: 5rem;
  letter-spacing: 0.05em;
}
.section-label {
  font-family: var(--font-d);
  font-size: 1.3rem;
  color: var(--cyan);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}
.section-glow-line {
  position: absolute;
  top: 0; left: 5%; width: 90%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 30%, #fff 50%, var(--cyan) 70%, transparent);
  box-shadow: 0 0 15px var(--cyan), 0 0 40px rgba(0,238,255,0.3);
  animation: glowLine 4s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes glowLine { 0%,100% { opacity: 0.4; transform: scaleX(0.6); } 50% { opacity: 1; transform: scaleX(1); } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 3rem;
  border-radius: 0.5rem;
  font-family: var(--font-d);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: none;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  transform: translateX(-100%) skewX(-15deg);
  transition: transform 0.5s var(--ease);
}
.btn:hover::before { transform: translateX(200%) skewX(-15deg); }

.btn-primary {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: var(--glow-sm);
}
.btn-primary:hover {
  box-shadow: var(--glow-lg);
  transform: translateY(-3px);
}
.btn-outline {
  background: transparent;
  color: var(--cyan);
  border: 1.5px solid var(--cyan);
  box-shadow: inset 0 0 0 rgba(0,238,255,0);
}
.btn-outline:hover {
  background: var(--cyan-dim);
  box-shadow: var(--glow-sm);
  transform: translateY(-3px);
}

/* ─────────────────────────────────────────────────────────
   HOME SECTION
───────────────────────────────────────────────────────── */
/* .home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  background-image: url('../mastar1.png');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  padding-top: 12rem;
}
.home-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(7,11,20,0.55) 0%,
    rgba(7,11,20,0.7) 60%,
    rgba(7,11,20,1) 100%
  );
} */

/* --- MAIN CONTAINER --- */
.home {
  /* 1. Positioning & Sizing */
  position: relative; /* Crucial: traps the absolute overlay inside this container */
  width: 100%;
  height: calc(80% + 8rem);
  z-index: 1; /* Creates a stacking context so negative z-index children don't hide behind the page */

  /* 2. Flexbox Layout */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding-top: 12rem;

  /* 3. Background Settings */
  background-image: url('mastar1.png');
  background-image: image-set(
    url('mastar1.webp') type('image/webp'),
    url('mastar1.png') type('image/png')
  );
  background-size: cover;
  background-position: center top; /* Fixed: 'top top' is invalid */
  background-attachment: fixed; /* Creates the parallax effect */
}

/* --- GRADIENT OVERLAY --- */
.home::before {
  content: ""; /* Valid here because it's a pseudo-element */
  position: absolute;
  inset: 0; /* Shorthand: sets top, right, bottom, left to 0 */
  z-index: -1; /* Puts the overlay BEHIND the flexbox text, but ABOVE the background image */
  pointer-events: none; /* Ensures the overlay never blocks mouse clicks */

  /* Unified Background Gradient */
/* גרסה מוחשכת של הגרדיאנט */
  background: linear-gradient(
    to bottom,
    rgba(7, 11, 20, 0.60) 0%,  /* הועלה מ-0.55 ל-0.85 לאטימות גבוהה למעלה */
    rgba(7, 11, 20, 0.75) 60%, /* הועלה מ-0.7 ל-0.95 */
    rgba(7, 11, 20, 1) 100%    /* למטה נשאר אטום לגמרי */
  );
}



/* Grid decoration */
.grid-lines { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.grid-h, .grid-v { position: absolute; background: rgba(0,238,255,0.04); }
.grid-h { left: 0; right: 0; height: 1px; }
.grid-h:nth-child(1) { top: 33%; }
.grid-h:nth-child(2) { top: 66%; }
.grid-v { top: 0; bottom: 0; width: 1px; }
.grid-v:nth-child(3) { left: 25%; }
.grid-v:nth-child(4) { left: 75%; }

/* Home content */
.home-content { position: relative; z-index: 2; max-width: 60rem; }

.greeting-tag {
  font-family: var(--font-d);
  font-size: 1.4rem;
  color: var(--cyan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.8;
}
.home-subtitle { font-size: 2.8rem; font-weight: 400; color: var(--text); margin-bottom: 0.5rem; }

/* GLITCH effect on name */
.glitch-text {
  font-family: var(--font-d);
  font-size: 7rem;
  font-weight: 700;
  color: var(--text-hi);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  position: relative;
  letter-spacing: 0.03em;
}
.glitch-text::before, .glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.glitch-text::before {
  color: var(--accent);
  animation: glitch1 5s ease-in-out infinite;
  clip-path: polygon(0 0,100% 0,100% 35%,0 35%);
}
.glitch-text::after {
  color: var(--cyan);
  animation: glitch2 5s ease-in-out infinite;
  clip-path: polygon(0 65%,100% 65%,100% 100%,0 100%);
}
@keyframes glitch1 {
  0%,94%,100% { transform: none; opacity: 0; }
  95%          { transform: translate(-4px,0) skewX(-2deg); opacity: 0.8; }
  97%          { transform: translate(4px,0); opacity: 0.6; }
  99%          { transform: none; opacity: 0; }
}
@keyframes glitch2 {
  0%,90%,100% { transform: none; opacity: 0; }
  91%          { transform: translate(4px,0) skewX(2deg); opacity: 0.7; }
  93%          { transform: translate(-4px,0); opacity: 0.5; }
  95%          { transform: none; opacity: 0; }
}

.typed-wrapper {
  font-size: 3rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2.5rem;
}
.typed-wrapper .multiple-text { color: var(--cyan); text-shadow: var(--glow-sm); }
.typed-cursor { color: var(--cyan); animation: blink 0.8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.home-content > p {
  font-size: 1.7rem;
  color: var(--text);
  max-width: 50rem;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* Social links */
.social-media { display: flex; gap: 1.2rem; margin-bottom: 3.5rem; }
.social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 4.4rem; height: 4.4rem;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  color: var(--cyan);
  font-size: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease);
}
.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--cyan);
  transform: scale(0);
  border-radius: 50%;
  transition: transform 0.4s var(--spring);
}
.social-link i { position: relative; z-index: 1; transition: color 0.3s; }
.social-link:hover::before { transform: scale(1); }
.social-link:hover i { color: var(--bg); }
.social-link:hover { border-color: var(--cyan); box-shadow: var(--glow-sm); transform: translateY(-4px); }

.home-btns { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  z-index: 2;
  opacity: 0.6;
  animation: scrollFade 2s ease-in-out infinite;
}
@keyframes scrollFade { 0%,100% { opacity: 0.3; transform: translateX(-50%) translateY(0); } 50% { opacity: 0.7; transform: translateX(-50%) translateY(-5px); } }

.scroll-line {
  width: 1px;
  height: 5rem;
  background: linear-gradient(to bottom, var(--cyan), transparent);
}
.scroll-indicator span {
  font-family: var(--font-d);
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  color: var(--cyan);
  text-transform: uppercase;
}

/* Home image */
.home-img { position: relative; z-index: 2; flex-shrink: 0; }
.img-hex-wrapper {
  position: relative;
  width: 38vw; max-width: 480px;
  display: flex; align-items: center; justify-content: center;
  will-change: transform;
}
.img-hex-wrapper img {
  width: 100%;
  animation: imgFloat 5s ease-in-out infinite;
  filter: drop-shadow(0 0 25px rgba(0,238,255,0.7)) drop-shadow(0 0 60px rgba(0,238,255,0.3));
  will-change: transform;
}
/* Animate only transform — filter is static on the element above (no per-frame recalculation) */
@keyframes imgFloat {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-2rem); }
}

/* Pulsing glow rings around the image */
.hex-glow-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 238, 255, 0.156);
  pointer-events: none;
  animation: ringPulse 4s ease-in-out infinite;
}
.ring-1 { width: 105%; height: 105%; animation-delay: 0s; }
.ring-2 { width: 115%; height: 115%; animation-delay: 1.3s; border-color: rgba(0,238,255,0.15); }
.ring-3 { width: 128%; height: 128%; animation-delay: 2.6s; border-color: rgba(0,238,255,0.08); }
@keyframes ringPulse {
  0%,100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.02); box-shadow: 0 0 20px rgba(0,238,255,0.15); }
}

/* Scan line across the image */
.img-scan {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(0,238,255,0.6), transparent);
  animation: imgScan 3s linear infinite;
  border-radius: 2px;
}
@keyframes imgScan { from { top: 0%; } to { top: 100%; } }

/* ─────────────────────────────────────────────────────────
   ABOUT SECTION
───────────────────────────────────────────────────────── */
.about {
  display: flex;
  align-items: center;
  gap: 6rem;
  background:
    linear-gradient(rgba(7,11,20,0.82), rgba(7,11,20,0.92)),
    url('mastar.png') center/cover fixed;
  background:
    linear-gradient(rgba(7,11,20,0.82), rgba(7,11,20,0.92)),
    image-set(
      url('mastar.webp') type('image/webp'),
      url('mastar.png') type('image/png')
    ) center/cover fixed;
}

.about-img { flex-shrink: 0; position: relative; }
.about-img-frame {
  position: relative;
  width: 36vw; max-width: 420px;
}
.about-img-frame img {
  width: 100%;
  filter: drop-shadow(0 0 20px rgba(0,238,255,0.5));
  transition: filter 0.5s ease;
}
.about-img-frame:hover img {
  filter: drop-shadow(0 0 40px rgba(0,238,255,0.8));
}

/* Corner brackets */
.frame-corner {
  position: absolute;
  width: 2.5rem; height: 2.5rem;
  border-color: var(--cyan);
  border-style: solid;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s var(--ease);
}
.fc-tl { top: -5px; left: -5px; border-width: 2.5px 0 0 2.5px; transform: translate(5px,5px); }
.fc-tr { top: -5px; right: -5px; border-width: 2.5px 2.5px 0 0; transform: translate(-5px,5px); }
.fc-bl { bottom: -5px; left: -5px; border-width: 0 0 2.5px 2.5px; transform: translate(5px,-5px); }
.fc-br { bottom: -5px; right: -5px; border-width: 0 2.5px 2.5px 0; transform: translate(-5px,-5px); }
.about-img-frame:hover .frame-corner { opacity: 1; transform: translate(0,0); box-shadow: var(--glow-sm); }

.about-img-badge {
  position: absolute;
  bottom: 2rem; right: -2rem;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 1rem;
  padding: 1.2rem 1.8rem;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: var(--glow-sm);
}
.about-img-badge .counter {
  display: block;
  font-family: var(--font-d);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
}
.about-img-badge small {
  font-size: 1.1rem;
  color: var(--text-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* About content */
.about-content { flex: 1; }
.about-content .heading { text-align: left; font-size: 4.5rem; margin-bottom: 1rem; }

.about-role { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.role-tag {
  font-family: var(--font-d);
  font-size: 1.3rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--border2);
  border-radius: 0.4rem;
  padding: 0.4rem 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-content > p { font-size: 1.6rem; color: var(--text); margin-bottom: 3rem; line-height: 1.9; }

/* Stats */
.about-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
}
.stat-item { text-align: center; flex: 1; }
.stat-num {
  display: block;
  font-family: var(--font-d);
  font-size: 4rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: var(--glow-sm);
  line-height: 1;
}
.stat-label { font-size: 1.2rem; color: var(--text-mute); letter-spacing: 0.1em; text-transform: uppercase; }
.stat-divider { width: 1px; height: 5rem; background: var(--border2); }

/* Skills */
.skills { margin-bottom: 3.5rem; }
.skill-row { margin-bottom: 1.8rem; }
.skill-info {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-d);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-hi);
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}
.skill-bar {
  height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  box-shadow: 0 0 10px rgba(0,238,255,0.6);
  transition: width 1.5s var(--ease);
}

/* ─────────────────────────────────────────────────────────
   SERVICES SECTION
───────────────────────────────────────────────────────── */
.services {
  background: var(--bg2);
  min-height: auto;
  padding-bottom: 10rem;
}

/* Animated background grid */
.services::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,238,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,238,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.services-container {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative; z-index: 2;
}

/* ── Services Card ── */
.services-box {
  flex: 1 1 30rem;
  max-width: 36rem;
  background: var(--card);
  border-radius: 1.6rem;
  padding: 4rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  transition: transform 0.5s var(--ease), box-shadow 0.5s ease;
  cursor: none;
}

/* Animated rotating border using @property */
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.box-border-anim {
  position: absolute;
  inset: -1px;
  border-radius: 1.7rem;
  background: conic-gradient(
    from var(--border-angle),
    transparent 0deg,
    var(--cyan) 60deg,
    transparent 120deg,
    transparent 240deg,
    var(--accent) 300deg,
    transparent 360deg
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: rotateBorder 3s linear infinite;
}
@keyframes rotateBorder { to { --border-angle: 360deg; } }

.services-box::after {
  content: '';
  position: absolute;
  inset: 1px;
  background: var(--card);
  border-radius: 1.5rem;
  z-index: -1;
}
.services-box:hover .box-border-anim { opacity: 1; }
.services-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4), var(--glow-sm);
  border-color: transparent;
}

/* Inner glow sweep */
.box-bg-glow {
  position: absolute;
  top: -60px; left: -60px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(0,238,255,0.12), transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
}
.services-box:hover .box-bg-glow { opacity: 1; transform: translate(20px,20px); }

.services-icon {
  width: 7.5rem; height: 7.5rem;
  background: var(--cyan-dim);
  border: 1px solid var(--border2);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  position: relative; z-index: 2;
  transition: all 0.4s var(--ease);
}
.services-icon i {
  font-size: 3.4rem;
  color: var(--cyan);
  transition: all 0.4s var(--ease);
}
.services-box:hover .services-icon {
  background: var(--cyan);
  box-shadow: var(--glow-md);
  transform: scale(1.1) rotate(-5deg);
}
.services-box:hover .services-icon i { color: var(--bg); }

.services-box h3 {
  font-family: var(--font-d);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 1.5rem;
  position: relative; z-index: 2;
}
.services-box p {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.8;
  position: relative; z-index: 2;
}

.service-tags {
  display: flex; flex-wrap: wrap; gap: 0.7rem;
  justify-content: center;
  list-style: none;
  margin-bottom: 2.5rem;
  position: relative; z-index: 2;
}
.service-tags li {
  font-size: 1.2rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 0.3rem 1rem;
  font-family: var(--font-d);
  letter-spacing: 0.05em;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-d);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative; z-index: 2;
  transition: gap 0.3s ease, text-shadow 0.3s;
}
.btn-link:hover { gap: 1rem; text-shadow: var(--glow-sm); }

/* Featured card */
.services-box.featured {
  background: linear-gradient(135deg, rgba(0,238,255,0.06), rgba(0,20,40,0.95));
  border-color: rgba(0,238,255,0.25);
}
.featured-badge {
  position: absolute;
  top: 2rem; right: 2rem;
  font-family: var(--font-d);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--cyan);
  padding: 0.3rem 1rem;
  border-radius: 0.4rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────
   PORTFOLIO SECTION
───────────────────────────────────────────────────────── */
.portfolio {

  background: var(--bg);
  min-height: auto;
  padding-bottom: 10rem;
}

/* Portfolio filter */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
  position: relative; z-index: 2;
}
.filter-btn {
  font-family: var(--font-d);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.8rem 2.2rem;
  cursor: none;
  transition: all 0.3s var(--ease);
  text-transform: uppercase;
}
.filter-btn:hover, .filter-btn.active {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--cyan-dim);
  box-shadow: var(--glow-xs);
}

/* Portfolio grid */
.portfolio-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  position: relative; z-index: 2;
}
.portfolio-box {
  position: relative;
  border-radius: 1.4rem;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.5s var(--ease);
  cursor: none;
}
.portfolio-img-wrap { overflow: hidden; }
.portfolio-img-wrap img {
  width: 100%;
  height: 25rem;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease), filter 0.5s ease;
}

.portfolio-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(7,11,20,0.97) 0%,
    rgba(0,30,50,0.6) 50%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 2.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portfolio-layer-content { transform: translateY(10px); transition: transform 0.4s var(--ease); }

.p-cat {
  display: inline-block;
  font-family: var(--font-d);
  font-size: 1.2rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--border2);
  border-radius: 0.3rem;
  padding: 0.2rem 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.portfolio-layer h4 {
  font-family: var(--font-d);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-hi);
  margin-bottom: 0.5rem;
}
.portfolio-layer p { font-size: 1.4rem; color: var(--text); margin-bottom: 1.2rem; }

.p-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 5.5rem; height: 5.5rem;
  background: var(--cyan);
  border-radius: 50%;
  color: var(--bg);
  font-size: 2.2rem;
  box-shadow: var(--glow-sm);
  transition: all 0.3s var(--ease);
}
.p-link-label {
  display: none;
}
/* ── Teaser / Coming Soon Cards ── */
.portfolio-teaser {
  border: 1px dashed var(--border2);
  background: var(--card);
}
.teaser-placeholder {
  width: 100%;
  height: 25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 20px,
      rgba(0,238,255,0.03) 20px,
      rgba(0,238,255,0.03) 22px
    ),
    linear-gradient(160deg, var(--bg2), var(--bg3));
}
.teaser-icon {
  width: 5rem;
  height: 5rem;
  color: var(--cyan);
  opacity: 0.35;
  animation: teaserPulse 3s ease-in-out infinite;
}
@keyframes teaserPulse {
  0%,100% { opacity: 0.25; transform: scale(1); }
  50%     { opacity: 0.5;  transform: scale(1.08); }
}
.portfolio-layer--teaser {
  opacity: 1;
  background: linear-gradient(
    to top,
    rgba(7,11,20,0.95) 0%,
    rgba(7,11,20,0.7) 60%,
    transparent 100%
  );
}
.p-cat--teaser {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(255,45,120,0.3);
}
.teaser-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-d);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding: 0.5rem 1.4rem;
  border: 1px solid rgba(255,45,120,0.3);
  border-radius: 0.5rem;
  background: var(--accent-dim);
  text-transform: uppercase;
}
/* ── Desktop Hover Effects (mouse-capable devices only) ── */
@media (hover: hover) and (pointer: fine) {
  .portfolio-box:hover {
    border-color: rgba(0,238,255,0.4);
    box-shadow: 0 0 30px rgba(0,238,255,0.15), 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(-6px);
  }
  .portfolio-box:hover .portfolio-img-wrap img {
    transform: scale(1.12);
    filter: brightness(0.55) saturate(1.2);
  }
  .portfolio-box:hover .portfolio-layer { opacity: 1; }
  .portfolio-box:hover .portfolio-layer-content { transform: translateY(0); }
  .p-link:hover { transform: scale(1.15); box-shadow: var(--glow-md); }
  .portfolio-teaser:hover {
    border-color: rgba(255,45,120,0.4);
    box-shadow: 0 0 30px rgba(255,45,120,0.1), 0 20px 50px rgba(0,0,0,0.5);
  }
  .portfolio-teaser:hover .teaser-icon {
    opacity: 0.6;
    color: var(--accent);
  }
}

/* ── Touch / Mobile — tap-to-reveal overlay ── */
@media (hover: none), (pointer: coarse) {
  .portfolio-box,
  .filter-btn,
  .btn,
  .services-box,
  .menu-btn { cursor: pointer; }

  .portfolio-box.touch-active:not(.portfolio-teaser) .portfolio-layer {
    opacity: 1;
  }
  .portfolio-box.touch-active:not(.portfolio-teaser) .portfolio-layer-content {
    transform: translateY(0);
  }
  .portfolio-box.touch-active:not(.portfolio-teaser) .portfolio-img-wrap img {
    filter: brightness(0.4) saturate(1.1);
  }
  .p-link {
    width: auto;
    height: auto;
    min-height: 48px;
    padding: 1rem 2.4rem;
    border-radius: 3rem;
    font-size: 1.4rem;
    font-family: var(--font-d);
    font-weight: 600;
    letter-spacing: 0.06em;
    gap: 0.8rem;
    box-shadow: var(--glow-md);
    animation: pLinkPulse 2.5s ease-in-out infinite;
  }
  .p-link-label {
    display: inline;
    white-space: nowrap;
  }
  .p-link .ui-icon {
    width: 2rem;
    height: 2rem;
  }
  .portfolio-layer {
    padding: 1.8rem;
  }
  .portfolio-layer h4 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    line-height: 1.3;
  }
  .portfolio-layer p {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .p-cat {
    font-size: 1rem;
    padding: 0.15rem 0.6rem;
    margin-bottom: 0.5rem;
  }
}

@keyframes pLinkPulse {
  0%, 100% { box-shadow: var(--glow-sm); }
  50%      { box-shadow: 0 0 20px rgba(0,238,255,0.7), 0 0 50px rgba(0,238,255,0.3); }
}

/* Hide animation */
.portfolio-box.hide {
  display: none;
}

/* ─────────────────────────────────────────────────────────
   CONTACT SECTION
───────────────────────────────────────────────────────── */
.contact {
  background:
    linear-gradient(rgba(7,11,20,0.88), rgba(7,11,20,0.96)),
    url('mastar.png') center/cover fixed;
  background:
    linear-gradient(rgba(7,11,20,0.88), rgba(7,11,20,0.96)),
    image-set(
      url('mastar.webp') type('image/webp'),
      url('mastar.png') type('image/png')
    ) center/cover fixed;
  min-height: auto;
  padding-bottom: 10rem;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 5rem;
  align-items: start;
  position: relative; z-index: 2;
}

/* Info Panel */
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.info-card {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  padding: 2rem 2.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  backdrop-filter: blur(10px);
  transition: all 0.4s var(--ease);
}
.info-card:hover {
  border-color: var(--border2);
  transform: translateX(5px);
  box-shadow: var(--glow-xs);
}
.info-icon {
  width: 5rem; height: 5rem;
  background: var(--cyan-dim);
  border: 1px solid var(--border2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.info-icon i { font-size: 2.2rem; color: var(--cyan); }
.info-text h4 { font-family: var(--font-d); font-size: 1.6rem; font-weight: 700; color: var(--text-hi); margin-bottom: 0.2rem; }
.info-text p { font-size: 1.4rem; color: var(--text-mute); }

.contact-social {
  display: flex;
  gap: 1rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  justify-content: center;
}
.contact-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 4.2rem; height: 4.2rem;
  border-radius: 50%;
  border: 1px solid var(--border2);
  color: var(--cyan);
  font-size: 1.8rem;
  transition: all 0.3s var(--ease);
}
.contact-social a:hover { background: var(--cyan); color: var(--bg); box-shadow: var(--glow-sm); transform: translateY(-3px); }

/* Form */
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.6rem;
  padding: 4rem;
  backdrop-filter: blur(12px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }

.float-field {
  position: relative;
  padding-top: 2rem;
}
.float-field.full { grid-column: 1 / -1; }
.float-field.full { margin-bottom: 2rem; }

.float-field input,
.float-field textarea {
  width: 100%;
  padding: 1.2rem 0;
  font-size: 1.5rem;
  color: var(--text-hi);
  background: transparent;
  border-bottom: 1px solid var(--border2);
  font-family: var(--font-b);
  transition: border-color 0.3s;
}
.float-field textarea { resize: none; min-height: 12rem; line-height: 1.7; }

.float-field label {
  position: absolute;
  top: 3rem; left: 0;
  font-size: 1.4rem;
  color: var(--text-mute);
  pointer-events: none;
  transition: all 0.3s var(--ease);
}
.float-field input:focus ~ label,
.float-field input:not(:placeholder-shown) ~ label,
.float-field textarea:focus ~ label,
.float-field textarea:not(:placeholder-shown) ~ label {
  top: 0;
  font-size: 1.1rem;
  color: var(--cyan);
  letter-spacing: 0.05em;
}
.float-field input::placeholder,
.float-field textarea::placeholder { color: transparent; }

.field-line {
  position: absolute;
  bottom: 0; left: 0;
  width: 0%; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  box-shadow: var(--glow-xs);
  transition: width 0.4s var(--ease);
}
.float-field input:focus ~ .field-line,
.float-field textarea:focus ~ .field-line { width: 100%; }
.float-field input:focus,
.float-field textarea:focus { border-bottom-color: transparent; }

.full-btn { width: 100%; justify-content: center; font-size: 1.7rem; padding: 1.4rem; }
.full-btn:disabled { opacity: 0.7; cursor: not-allowed; pointer-events: none; }

.btn-success {
  background: #00c896 !important;
  border-color: #00c896 !important;
  box-shadow: 0 0 20px rgba(0,200,150,0.4), 0 0 50px rgba(0,200,150,0.15);
}
.btn-error {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 20px rgba(255,45,120,0.4), 0 0 50px rgba(255,45,120,0.15);
}
.btn-rate-limited {
  background: #ff9500 !important;
  border-color: #ff9500 !important;
  box-shadow: 0 0 20px rgba(255,149,0,0.4);
}

/* ── Toast Notifications ──────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 2rem;
  min-width: 32rem;
  max-width: 44rem;
  background: var(--card);
  backdrop-filter: blur(12px);
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  font-family: var(--font-b);
  font-size: 1.4rem;
  color: var(--text-hi);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.5s var(--spring), opacity 0.4s ease;
}
.toast.show {
  transform: translateX(0);
  opacity: 1;
}
.toast.hide {
  transform: translateX(120%);
  opacity: 0;
}
.toast-icon {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}
.toast-success { border-color: rgba(0,200,150,0.4); }
.toast-success .toast-icon { background: rgba(0,200,150,0.2); color: #00c896; }
.toast-error   { border-color: rgba(255,45,120,0.3); }
.toast-error   .toast-icon { background: var(--accent-dim); color: var(--accent); }
.toast-warn    { border-color: rgba(255,149,0,0.3); }
.toast-warn    .toast-icon { background: rgba(255,149,0,0.15); color: #ff9500; }
.toast-body    { flex: 1; line-height: 1.5; }
.toast-body strong { display: block; margin-bottom: 0.2rem; font-size: 1.5rem; }
.toast-body small  { color: var(--text-mute); font-size: 1.2rem; }
.toast-close {
  flex-shrink: 0;
  background: none;
  color: var(--text-mute);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.4rem;
  line-height: 1;
  transition: color 0.2s;
}
.toast-close:hover { color: var(--text-hi); }

/* ─────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────── */
.footer {
  background: var(--bg2);
  position: relative;
  z-index: 10;
}
.footer-glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 30%, var(--accent) 70%, transparent);
  box-shadow: 0 0 20px rgba(0,238,255,0.4);
  animation: glowLine 5s ease-in-out infinite;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4rem;
  padding: 5rem 9% 3rem;
  flex-wrap: wrap;
}
.footer-brand .logo { display: inline-block; margin-bottom: 1.5rem; font-size: 2.8rem; }
.footer-brand p { font-size: 1.4rem; color: var(--text-mute); line-height: 1.8; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-links a {
  font-family: var(--font-d);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s, padding-left 0.3s;
}
.footer-links a:hover { color: var(--cyan); padding-left: 0.5rem; text-shadow: var(--glow-xs); }

.footer-social {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 4.2rem; height: 4.2rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.8rem;
  transition: all 0.3s var(--ease);
}
.footer-social a:hover { color: var(--cyan); border-color: var(--cyan); box-shadow: var(--glow-sm); transform: translateY(-3px); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 9%;
  border-top: 1px solid var(--border);
}
.footer-bottom p { font-size: 1.4rem; color: var(--text-mute); }
.footer-bottom span { color: var(--cyan); }

.back-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.2rem; height: 4.2rem;
  background: var(--cyan);
  border-radius: 0.8rem;
  color: var(--bg);
  font-size: 2.2rem;
  transition: all 0.4s var(--ease);
  box-shadow: var(--glow-sm);
}
.back-top:hover { box-shadow: var(--glow-md); transform: translateY(-4px); }



/* ═══════════════════════════════════════════════════════════════════
   SVG ICON SYSTEM — Add this block to style.css
   ───────────────────────────────────────────────────────────────────

   The fundamental rule:
     SVG icons use `currentColor` for all their fills and strokes.
     This means the icon's color is always whatever `color` is set
     to on its parent element in CSS — exactly like a text character.

   Result:
     You never set color ON the icon. You set it on the container.
     The icon adapts automatically to every context it appears in.

   Usage pattern:
     <svg class="ui-icon" aria-hidden="true">
       <use href="#icon-name" />
     </svg>

   Size modifier classes:
     .ui-icon           → 1em  (scales with font-size — default)
     .ui-icon-sm        → 1.4rem
     .ui-icon-md        → 2.0rem  (nav toggle button)
     .ui-icon-lg        → 2.4rem  (contact info cards)
     .ui-icon-service   → 3.4rem  (large service card icons)

═══════════════════════════════════════════════════════════════════ */

/* ── BASE ICON RULE ─────────────────────────────────────────────
   display: inline-block  → sits inline with text, like a glyph
   width / height: 1em    → scales with the current font-size
   vertical-align         → optically aligned with cap-height
   fill / stroke          → both set to currentColor so the icon
                            inherits whatever `color` is on its parent
   flex-shrink: 0         → never squash in flex containers
   pointer-events: none   → the icon itself isn't a click target;
                            the <a> or <button> around it is
─────────────────────────────────────────────────────────────────── */
.ui-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;    /* aligns baseline to text cap-height  */
  fill: currentColor;           /* brand icons (solid paths)            */
  stroke: currentColor;         /* line icons (stroked paths)           */
  flex-shrink: 0;
  pointer-events: none;
  overflow: visible;            /* allows drop-shadows / glows to show  */
  transition: color 0.3s ease,  /* picks up parent hover transitions     */
              opacity 0.3s ease;
}

/* ── SIZE MODIFIERS ─────────────────────────────────────────────
   Override the 1em default for specific contexts.
   All values use rem so they're independent of local font-size.
─────────────────────────────────────────────────────────────────── */
.ui-icon-sm      { width: 1.4rem;  height: 1.4rem; }   /* small badges, tags   */
.ui-icon-md      { width: 2.0rem;  height: 2.0rem; }   /* nav toggle           */
.ui-icon-lg      { width: 2.4rem;  height: 2.4rem; }   /* contact info cards   */
.ui-icon-service { width: 3.4rem;  height: 3.4rem; }   /* service card display */


/* ── MENU TOGGLE BUTTON ─────────────────────────────────────────
   Replaces the old `<div class="bx bx-menu" id="menu-icon">`.

   The button contains two SVG icons:
     .icon-menu  — hamburger (visible by default)
     .icon-close — × mark  (hidden by default)

   JS adds class `bx-x` when menu is open (existing JS behaviour
   is preserved — no JS changes needed).
─────────────────────────────────────────────────────────────────── */
.menu-btn {
  display: none;               /* hidden on desktop */
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: none;
  color: var(--text-hi);
  line-height: 0;              /* removes phantom space below SVG */
  transition: color 0.3s ease;
}
.menu-btn:hover { color: var(--cyan); }

/* Show only the hamburger by default */
.menu-btn .icon-close { display: none; }
.menu-btn .icon-menu  { display: inline-block; }

/* When JS adds .bx-x: swap to × close icon */
.menu-btn.bx-x .icon-menu  { display: none; }
.menu-btn.bx-x .icon-close { display: inline-block; }

/* Show the button on mobile */
@media (max-width: 768px) {
  .menu-btn { display: inline-flex; align-items: center; }
}


/* ── CONTEXTUAL COLOR INHERITANCE — HOW IT WORKS ────────────────

   Every icon container below sets its own `color`.
   The .ui-icon inside automatically uses that same color
   because of `fill: currentColor` and `stroke: currentColor`.

   BEFORE (Boxicons — explicit icon color):
     .social-link i { color: var(--cyan); }

   AFTER (SVG sprite — inherited from parent):
     .social-link { color: var(--cyan); }
     .ui-icon inside gets cyan automatically — no extra rule

   You don't write color rules for icons anymore.
   You write them for the containers they live in.
─────────────────────────────────────────────────────────────────── */


/* ── SOCIAL LINKS ───────────────────────────────────────────────
   .social-link sets color → .ui-icon inside inherits it.
   On hover: parent color changes → icon changes with it.
─────────────────────────────────────────────────────────────────── */
.social-link {
  /* existing layout rules stay exactly as they were */
  color: var(--cyan);           /* icon WILL inherit this */
}
.social-link:hover {
  color: var(--bg);             /* icon inherits the dark bg color after fill */
}


/* ── BUTTON ICONS ───────────────────────────────────────────────
   .btn sets color in its rule, but icons inside btns
   sometimes need an explicit size nudge.
─────────────────────────────────────────────────────────────────── */
.btn .ui-icon     { width: 1.8rem; height: 1.8rem; }
.btn-link .ui-icon{ width: 1.6rem; height: 1.6rem; }

/* Arrow icon in btn-link gets a smooth slide on hover */
.btn-link:hover .ui-icon {
  transform: translateX(4px);
  transition: transform 0.3s var(--ease);
}


/* ── PORTFOLIO LINK ICON ────────────────────────────────────────
   The circular link button on portfolio cards.
   .p-link sets color: var(--bg) (dark) — icon inherits it.
─────────────────────────────────────────────────────────────────── */
.p-link {
  color: var(--bg);             /* icon will be dark inside the cyan circle */
}
.p-link .ui-icon {
  width: 2.4rem;
  height: 2.4rem;
}


/* ── SERVICE ICON CONTAINERS ────────────────────────────────────
   .services-icon sets color → icon inherits.
   On card hover: color changes to var(--bg) (dark) because
   the container background becomes cyan.
─────────────────────────────────────────────────────────────────── */
.services-icon {
  color: var(--cyan);           /* default: cyan icon on dark bg     */
}
.services-box:hover .services-icon {
  color: var(--bg);             /* hover: dark icon on cyan bg       */
}


/* ── CONTACT INFO ICONS ─────────────────────────────────────────
   .info-icon is the circular container — its color prop
   flows into the .ui-icon inside it.
─────────────────────────────────────────────────────────────────── */
.info-icon {
  color: var(--cyan);           /* icon inherits cyan */
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ── CONTACT & FOOTER SOCIAL ICONS ─────────────────────────────
   Both .contact-social a and .footer-social a use the same rule.
─────────────────────────────────────────────────────────────────── */
.contact-social a,
.footer-social a {
  color: var(--text);           /* default: muted text colour */
}
.contact-social a:hover,
.footer-social a:hover {
  color: var(--cyan);           /* icon goes cyan on hover   */
}


/* ── BACK-TO-TOP BUTTON ─────────────────────────────────────────
   .back-top is a cyan block — icon must be dark.
─────────────────────────────────────────────────────────────────── */
.back-top {
  color: var(--bg);             /* icon inherits dark colour */
}
.back-top .ui-icon {
  width: 2.2rem;
  height: 2.2rem;
}


/* ── ACCESSIBILITY ──────────────────────────────────────────────
   Icons that carry meaning (not decorative) must have
   an accessible label. We handle this two ways:

   1. aria-hidden="true" on the SVG + text in the parent
      e.g. <button> Download CV <svg aria-hidden></svg> </button>

   2. aria-label on the link/button itself + aria-hidden on SVG
      e.g. <a aria-label="GitHub"> <svg aria-hidden></svg> </a>

   We NEVER put aria-label on the SVG itself.
   We NEVER omit aria-label on icon-only links.
─────────────────────────────────────────────────────────────────── */
/* Visually hidden text helper for screen readers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* ── REMOVE BOXICONS FALLBACK ───────────────────────────────────
   If any legacy <i class="bx ..."> remains elsewhere,
   this ensures it doesn't double-render.
─────────────────────────────────────────────────────────────────── */
i.bx { display: none !important; }


/* ─────────────────────────────────────────────────────────
   ACCESSIBILITY — Respect user motion preferences
───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .scan-lines,
  .orb,
  .hex-glow-ring,
  .shooting-star,
  .scroll-indicator,
  .section-glow-line,
  .footer-glow-line,
  .img-scan,
  .img-hex-wrapper img {
    animation: none !important;
  }
  #particles-js { display: none; }
  #lightningCanvas { display: none; }
}

/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  html { font-size: 56%; }
  .glitch-text { font-size: 6rem; }
}

@media (max-width: 992px) {
  html { font-size: 52%; }
  section { padding: 10rem 5% 5rem; }
  .home { flex-direction: column; padding-top: 14rem; text-align: center; }
  .home-content { max-width: 100%; }
  .social-media { justify-content: center; }
  .home-btns { justify-content: center; }
  .img-hex-wrapper { width: 55vw; max-width: 380px; }
  .scroll-indicator { display: none; }

  .about { flex-direction: column-reverse; text-align: center; }
  .about-img-frame { width: 55vw; max-width: 380px; margin: 0 auto; }
  .about-img-badge { bottom: -1rem; right: -1rem; }
  .about-content .heading { text-align: center; }
  .about-role { justify-content: center; }
  .about-stats { flex-direction: column; gap: 1.5rem; }
  .stat-divider { width: 8rem; height: 1px; }

  .portfolio-container { grid-template-columns: repeat(2,1fr); }
  .contact-wrapper { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { align-items: center; flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 768px) {
  html { font-size: 55%; cursor: auto; }
  .cursor-dot, .cursor-ring, .scan-lines, .orb { display: none; }
  #menu-icon { display: block; }
  .navbar {
    position: absolute; top: 100%; left: 0;
    width: 100%; flex-direction: column;
    padding: 2rem; gap: 0;
    background: rgba(7,11,20,0.97);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: none;
  }
  .navbar.active { display: flex; }
  .navbar a { font-size: 2rem; padding: 1.5rem 2rem; border-bottom: 1px solid var(--border); }
  .navbar a::before { display: none; }
  .glitch-text { font-size: 4.5rem; }
  .form-row { grid-template-columns: 1fr; }
  #particles-js canvas { filter: none; }
  .toast-container { bottom: 1rem; right: 1rem; left: 1rem; }
  .toast { min-width: 0; width: 100%; }

  .section-sub             { font-size: 1.6rem; }
  .home-content > p        { font-size: 1.8rem; }
  .about-content > p       { font-size: 1.8rem; }
  .services-box p          { font-size: 1.7rem; }
  .portfolio-layer p       { font-size: 1.6rem; }
  .stat-label              { font-size: 1.4rem; }
  .skill-info              { font-size: 1.5rem; }
  .role-tag                { font-size: 1.4rem; }
  .filter-btn              { font-size: 1.4rem; }
  .info-text p             { font-size: 1.5rem; }
  .footer-brand p,
  .footer-links a,
  .footer-bottom p         { font-size: 1.6rem; }

  .portfolio-box,
  .filter-btn,
  .btn,
  .services-box,
  .menu-btn { cursor: pointer; }
}

@media (max-width: 580px) {
  .portfolio-container { grid-template-columns: 1fr; }
  .glitch-text { font-size: 4.2rem; }
  .contact-form { padding: 3rem 2rem; }
  .p-link { font-size: 1.3rem; padding: 0.8rem 1.8rem; }
  .p-link .ui-icon { width: 1.8rem; height: 1.8rem; }
  .portfolio-layer h4 { font-size: 1.6rem; }
  .portfolio-layer p { font-size: 1.1rem; -webkit-line-clamp: 2; line-clamp: 2; }
}

@media (max-width: 400px) {
  html { font-size: 50%; }
  .about-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .stat-divider { display: none; }
}
