/* ═══════════════════════════════════════════════════
   AEROSPACE PORTFOLIO — style.css
   Deep-Space Dark Theme · Orange/Cyan/Violet Accents
   Ahmed Hesham Mohamed · Aerospace Engineer
═══════════════════════════════════════════════════ */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');

/* ══════════════════════════
   DESIGN TOKENS
══════════════════════════ */
:root {
  /* colours */
  --bg:        #03060f;
  --bg2:       #060b18;
  --surface:   #080d1a;
  --surface2:  #0c1425;
  --glass:     rgba(8, 15, 35, 0.6);
  --glass-b:   rgba(14, 28, 65, 0.45);

  --accent:    #e8630a;   /* rocket orange */
  --accent-d:  #b84a00;
  --accent2:   #0af0ff;   /* ion-thruster cyan */
  --accent3:   #8b5cf6;   /* nebula violet */

  --border:    rgba(232, 99, 10, 0.18);
  --border-h:  rgba(232, 99, 10, 0.45);
  --border2:   rgba(10, 240, 255, 0.15);

  --text:      #e8edf8;
  --text-m:    #8a9bbf;
  --text-d:    #4a5a7a;

  /* spacing / shape */
  --radius:    1rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1.5rem;

  /* shadows */
  --shadow:    0 8px 32px rgba(0,0,0,0.6);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.8);
  --glow:      0 0 30px rgba(232,99,10,0.25);
  --glow2:     0 0 30px rgba(10,240,255,0.15);
}

/* ══════════════════════════
   RESET
══════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Outfit', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
  cursor: none;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ══════════════════════════
   STAR CANVAS
══════════════════════════ */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

/* ══════════════════════════
   CUSTOM CURSOR
══════════════════════════ */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 0 12px var(--accent);
}
.cursor-follower {
  position: fixed; top: 0; left: 0;
  width: 32px; height: 32px;
  border: 1.5px solid rgba(232,99,10,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%,-50%);
  transition: transform 0.14s ease, width 0.2s, height 0.2s, border-color 0.2s;
}
body:has(a:hover) .cursor-follower,
body:has(button:hover) .cursor-follower {
  width: 48px; height: 48px;
  border-color: rgba(10,240,255,0.6);
}

/* ══════════════════════════
   GLASSMORPHISM
══════════════════════════ */
.glass {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ══════════════════════════
   NAVBAR
══════════════════════════ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  transition: background 0.4s, box-shadow 0.4s, padding 0.3s;
}
#navbar.scrolled {
  background: rgba(3, 6, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1200px; margin: auto;
  display: flex; align-items: center;
  height: 70px;
}
.nav-links {
  display: flex; list-style: none; gap: 2rem;
}
.nav-link {
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0.04em;
  color: var(--text-m);
  position: relative; padding: 0.25rem 0;
  transition: color 0.2s;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  transition: width 0.3s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* nav-socials (desktop) */
.nav-socials { display: flex; align-items: center; gap: 0.6rem; }

/* ── MOBILE NAV SOCIALS BAR ── */
.mobile-nav-bar {
  display: none; /* hidden on desktop */
}

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 8px;
  z-index: 10;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text-m);
  border-radius: 2px;
  transition: 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════════════
   MOBILE NAV — ≤ 768px
══════════════════════════ */
@media (max-width: 768px) {
  /* Shrink padding so header doesn't overflow */
  #navbar { padding: 0; }
  #navbar.scrolled { padding: 0; }

  /* The original nav-inner becomes the bottom strip for desktop links
     — hide it on mobile, we use mobile-nav-bar instead */
  .nav-inner {
    height: 0;
    overflow: hidden;
    pointer-events: none;
  }

  /* ── Mobile Header Row ── */
  .mobile-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 1rem;
    width: 100%;
    background: rgba(3, 6, 15, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1001;
  }

  /* Left side: phone + social icons */
  .mobile-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: calc(100% - 60px);
  }

  .mobile-header-phone {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-m);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s;
  }
  .mobile-header-phone:hover { color: var(--accent); }
  .mobile-header-phone svg { flex-shrink: 0; }

  .mobile-header-divider {
    width: 1px;
    height: 20px;
    background: var(--border-h);
    flex-shrink: 0;
  }

  .mobile-header-socials {
    display: flex;
    align-items: center;
    gap: 0.55rem;
  }
  .mobile-header-socials a {
    color: var(--text-m);
    display: flex;
    align-items: center;
    transition: color 0.2s, transform 0.2s;
  }
  .mobile-header-socials a:hover {
    color: var(--accent);
    transform: translateY(-1px);
  }

  /* Right side: burger button */
  .mobile-header-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  /* Show hamburger */
  .hamburger { display: flex; }

  /* Desktop nav-links: slide-down mobile menu */
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: center; gap: 0;
    background: rgba(3, 6, 15, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border);
    padding: 1rem 0 1.5rem;
    transform: translateY(-110%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link {
    padding: 0.9rem 2rem;
    font-size: 1rem;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(232,99,10,0.06);
  }
  .nav-link:last-child { border-bottom: none; }

  /* Hide desktop socials bar on mobile */
  .nav-socials { display: none; }
}

/* ══════════════════════════
   HERO SECTION
══════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 100px 2rem 2rem;
  overflow: hidden;
  z-index: 1;
}
/* subtle nebula radial glow behind hero */
#hero::before {
  content: '';
  position: absolute;
  top: 15%; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 500px;
  background: radial-gradient(ellipse, rgba(232,99,10,0.08) 0%, rgba(139,92,246,0.06) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 4rem;
  max-width: 1250px; margin: auto;
}

/* ── HERO PHOTO — EMERGE FROM CIRCLE ──
   Layer order (back → front):
   0: spinning decor rings
   1: ::before — full static ring frame (below image top, above bottom)
   2: .hero-circle-backdrop — dark circle interior (below image)
   3: .hero-photo — the person emerging upward
   4: ::after — bottom-half arc (above image, creates “inside from below”)
   5: .hero-badge
*/
.hero-photo-wrap {
  position: relative;
  flex-shrink: 0;
  width: 370px;
  height: 486px;  /* extra space above the 348px circle for emergence */
}

/* Spinning decoration rings — anchored to the circle at the bottom */
.hero-photo-ring {
  position: absolute;
  bottom: -20px; left: 50%;
  transform: translateX(-50%);
  width: 392px; height: 392px;
  border-radius: 50%;
  border: 2px solid rgba(232,99,10,0.3);
  animation: spinRing 18s linear infinite;
  z-index: 0;
}
.hero-photo-ring.ring2 {
  bottom: -40px;
  width: 436px; height: 436px;
  border-color: rgba(10,240,255,0.15);
  animation-duration: 28s; animation-direction: reverse;
}

/* Full static circle ring — BEHIND image at top; visible at sides */
.hero-photo-wrap::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 348px; height: 348px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  box-shadow: 0 0 0 8px rgba(232,99,10,0.14),
              0 0 55px rgba(232,99,10,0.12),
              inset 0 0 55px rgba(0,0,0,0.4);
  z-index: 1;           /* behind the image */
  pointer-events: none;
}

/* Dark circular backdrop — matches hero section bg, fills circle interior */
.hero-circle-backdrop {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 340px; height: 340px;  /* slightly inside the ring */
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 75%,
    rgba(6,11,24,0.55) 0%,
    rgba(3,6,15,0.92)  55%,
    rgba(2,4,12,0.98)  100%
  );
  z-index: 2;           /* behind the image */
  pointer-events: none;
}

/* The person photo — emerges upward above the circle */
.hero-photo {
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  width: 270px;          /* narrower than 348px circle → sides stay inside */
  height: 445px;         /* taller than wrap circle to fill upward */
  object-fit: cover;
  object-position: top center;
  border-radius: 0;
  border: none;
  box-shadow: none;
  z-index: 3;
  /* Bottom fade: feet dissolve into the dark circle base */
  -webkit-mask-image:
    linear-gradient(to top, transparent 0%, rgba(0,0,0,0.6) 10%, black 22%),
    linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to top, transparent 0%, rgba(0,0,0,0.6) 10%, black 22%),
    linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-composite: intersect;
  filter:
    drop-shadow(-4px 0 14px rgba(0,0,0,0.55))
    drop-shadow( 4px 0 14px rgba(0,0,0,0.55))
    drop-shadow(0 -8px 24px rgba(0,0,0,0.35));
  transition: transform 0.4s ease;
}
.hero-photo:hover { transform: translateX(-50%) translateY(-9px) scale(1.02); }

/* Bottom-half arc overlay — sits IN FRONT of image, creating the
   “inside the circle from below” illusion */
.hero-photo-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 356px;
  height: 178px;          /* exactly half of 356 */
  border-radius: 0 0 178px 178px;
  background: transparent;
  border: 4px solid var(--accent);
  border-top: none;
  box-shadow:
    0 14px 55px rgba(232,99,10,0.28),
    inset 0 -8px 28px rgba(232,99,10,0.06);
  z-index: 4;             /* in front of image */
  pointer-events: none;
}
@keyframes spinRing {
  to { transform: rotate(360deg); }
}

/* badge */
.hero-badge {
  position: absolute; bottom: 0px; right: -24px;
  z-index: 5;
  background: linear-gradient(135deg, var(--accent), var(--accent-d));
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.45rem;
  box-shadow: 0 4px 16px rgba(232,99,10,0.4);
  animation: badgePulse 3s ease-in-out infinite;
}
.hero-badge svg { width: 14px; height: 14px; }
@keyframes badgePulse {
  0%,100% { box-shadow: 0 4px 16px rgba(232,99,10,0.4); }
  50%      { box-shadow: 0 4px 30px rgba(232,99,10,0.7); }
}

/* text */
.hero-text { flex: 1; }
.hero-greeting {
  color: var(--accent2);
  font-size: 1rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.hero-name {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #e8edf8 0%, var(--accent2) 60%, var(--accent3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title-wrap {
  display: flex; align-items: center; gap: 0.25rem;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 500; color: var(--text-m);
  margin-bottom: 1.25rem;
}
.hero-typewriter { color: var(--accent); font-weight: 600; }
.typewriter-cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-bio {
  font-size: 1.05rem; color: var(--text-m);
  max-width: 540px; margin-bottom: 2rem;
  line-height: 1.8;
}

/* CTA buttons */
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.95rem; font-weight: 600;
  letter-spacing: 0.03em; cursor: pointer;
  transition: all 0.25s ease;
  border: none; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c05200);
  color: #fff;
  box-shadow: 0 4px 20px rgba(232,99,10,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232,99,10,0.55);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-h);
}
.btn-outline:hover {
  background: rgba(232,99,10,0.08);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn-cv {
  background: transparent;
  color: var(--accent2);
  border: 1.5px solid var(--accent2);
  box-shadow: 0 0 0 rgba(10,240,255,0);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.btn-cv::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,240,255,0.12), rgba(10,240,255,0.04));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.btn-cv:hover {
  color: var(--accent2);
  border-color: var(--accent2);
  box-shadow: 0 0 18px rgba(10,240,255,0.25), 0 4px 16px rgba(10,240,255,0.15);
  transform: translateY(-2px);
}
.btn-cv:hover::before { opacity: 1; }
.btn-cv i {
  font-size: 1.15rem;
  transition: transform 0.25s ease;
  position: relative;
}
.btn-cv:hover i {
  transform: translateY(3px);
}
.btn-cv span { position: relative; }
.btn-full { width: 100%; justify-content: center; }
.btn-arrow { font-size: 1.1rem; transition: transform 0.2s; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* stats */
.hero-stats {
  display: flex; align-items: center; gap: 1.5rem;
}
.stat { text-align: center; }
.stat-num {
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
.stat-plus { color: var(--accent); font-size: 1.3rem; font-weight: 700; }
.stat-label { display: block; font-size: 0.78rem; color: var(--text-d); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 0.1rem; }
.stat-divider { width: 1px; height: 40px; background: var(--border-h); }

/* scroll hint */
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 2;
  animation: scrollHint 2s ease-in-out infinite;
}
.scroll-hint-dot {
  width: 28px; height: 46px;
  border: 2px solid rgba(232,99,10,0.4);
  border-radius: 20px;
  position: relative;
}
.scroll-hint-dot::after {
  content: '';
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot { 0%,100% { top: 6px; opacity: 1; } 50% { top: 22px; opacity: 0.4; } }
@keyframes scrollHint { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }

/* hero responsive */
@media (max-width: 860px) {
  #hero {
    padding: 90px 1.25rem 3rem;
    min-height: 100svh;
  }
  .hero-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    align-items: center;
    width: 100%;
  }
  .hero-photo-wrap {
    width: 260px;
    height: 340px;
    flex-shrink: 0;
  }
  .hero-photo-ring {
    width: 280px; height: 280px;
    bottom: -14px;
  }
  .hero-photo-ring.ring2 {
    width: 310px; height: 310px;
    bottom: -28px;
  }
  .hero-photo-wrap::before {
    width: 248px; height: 248px;
  }
  .hero-circle-backdrop {
    width: 240px; height: 240px;
  }
  .hero-photo {
    width: 192px;
    height: 316px;
  }
  .hero-photo-wrap::after {
    width: 256px;
    height: 128px;
    border-radius: 0 0 128px 128px;
  }
  .hero-badge {
    right: -10px;
    bottom: -4px;
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
  }
  .hero-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-bio {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    font-size: 0.97rem;
  }
  .hero-actions { justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
  .hero-stats { justify-content: center; gap: 1rem; }
  .hero-name { font-size: clamp(1.7rem, 7vw, 2.6rem); }
  .hero-title-wrap { justify-content: center; font-size: clamp(0.95rem, 3.5vw, 1.3rem); }
}

@media (max-width: 480px) {
  #hero { padding: 80px 1rem 2.5rem; }
  .hero-photo-wrap {
    width: 220px;
    height: 290px;
  }
  .hero-photo-ring {
    width: 238px; height: 238px;
  }
  .hero-photo-ring.ring2 {
    width: 265px; height: 265px;
  }
  .hero-photo-wrap::before {
    width: 210px; height: 210px;
  }
  .hero-circle-backdrop {
    width: 202px; height: 202px;
  }
  .hero-photo {
    width: 162px;
    height: 268px;
  }
  .hero-photo-wrap::after {
    width: 218px;
    height: 109px;
    border-radius: 0 0 109px 109px;
  }
  .hero-badge {
    right: 0px;
    bottom: -4px;
    font-size: 0.68rem;
    padding: 0.28rem 0.6rem;
  }
  .hero-name { font-size: clamp(1.5rem, 6vw, 2rem); }
  .stat-num { font-size: 1.6rem; }
  .btn { padding: 0.7rem 1.4rem; font-size: 0.88rem; }
}

/* ══════════════════════════
   SECTIONS / LAYOUT
══════════════════════════ */
.section {
  position: relative; z-index: 1;
  padding: 6rem 2rem;
}
.section-alt { background: rgba(8, 13, 30, 0.7); }
.container { max-width: 1100px; margin: auto; width: 100%; }

@media (max-width: 768px) {
  .section { padding: 4rem 1.25rem; }
}
@media (max-width: 480px) {
  .section { padding: 3rem 1rem; }
}

.section-tag {
  display: inline-block;
  background: rgba(232,99,10,0.12);
  color: var(--accent);
  border: 1px solid rgba(232,99,10,0.3);
  padding: 0.3rem 1rem;
  border-radius: 2rem;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-subtitle {
  color: var(--text-m);
  font-size: 1.05rem; max-width: 600px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════
   ABOUT SECTION
══════════════════════════ */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start;
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .about-cards { grid-template-columns: 1fr; }
  .about-tags { justify-content: center; }
}

.about-text p {
  color: var(--text-m);
  margin-bottom: 1.25rem;
  font-size: 1.02rem; line-height: 1.85;
}
.about-text strong { color: var(--text); font-weight: 600; }

.about-tags {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem;
}
.tag {
  background: rgba(232,99,10,0.1);
  border: 1px solid rgba(232,99,10,0.25);
  color: var(--text-m);
  padding: 0.35rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.82rem; font-weight: 500;
}

.about-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.info-card {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.2rem;
  border-radius: var(--radius);
  transition: transform 0.25s, box-shadow 0.25s;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--glow); }
.info-card-icon { font-size: 1.6rem; }
.info-card-body h4 { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.info-card-body p { font-size: 0.82rem; color: var(--text-m); line-height: 1.55; }

/* ══════════════════════════
   SKILLS SECTION
══════════════════════════ */
.skills-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.2rem; margin-bottom: 2.5rem;
}
@media (max-width: 600px) { .skills-grid { grid-template-columns: 1fr; } }

.skill-item { padding: 1rem 1.2rem; }
.skill-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.65rem; }
.skill-info { display: flex; align-items: center; gap: 0.6rem; }
.skill-icon { font-size: 1.2rem; }
.skill-name { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.skill-pct { font-size: 0.82rem; font-weight: 700; color: var(--accent2); }

.skill-bar {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px; overflow: hidden;
}
.skill-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 10px;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 8px rgba(10,240,255,0.3);
}

.tech-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.badge {
  background: rgba(10,240,255,0.07);
  border: 1px solid rgba(10,240,255,0.2);
  color: var(--accent2);
  padding: 0.35rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.8rem; font-weight: 500;
  transition: all 0.2s;
}
.badge:hover {
  background: rgba(10,240,255,0.14);
  border-color: var(--accent2);
  box-shadow: 0 0 12px rgba(10,240,255,0.2);
}

/* ══════════════════════════
   TIMELINE / EXPERIENCE
══════════════════════════ */
@media (max-width: 480px) {
  .timeline-header { flex-direction: column; gap: 0.4rem; }
  .timeline-date { align-self: flex-start; }
}

.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute; left: 7px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2), transparent);
}
.timeline-item { position: relative; margin-bottom: 2.5rem; }
.timeline-dot {
  position: absolute; left: -2rem; top: 1.6rem;
  width: 16px; height: 16px;
  background: var(--accent);
  border: 3px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(232,99,10,0.5);
}
.timeline-card {
  padding: 1.6rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.timeline-card:hover { transform: translateX(4px); box-shadow: var(--glow); }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.8rem; }
.timeline-role { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.timeline-company { display: flex; align-items: center; gap: 0.5rem; color: var(--text-m); font-size: 0.88rem; margin-top: 0.2rem; }
.company-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; display: inline-block; flex-shrink: 0; }
.timeline-date { color: var(--accent2); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.timeline-desc { color: var(--text-m); font-size: 0.93rem; line-height: 1.75; margin-bottom: 1rem; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-sm {
  background: rgba(232,99,10,0.1);
  border: 1px solid rgba(232,99,10,0.25);
  color: var(--accent);
  padding: 0.2rem 0.65rem;
  border-radius: 1rem;
  font-size: 0.76rem; font-weight: 600;
}

/* ══════════════════════════
   EDUCATION
══════════════════════════ */
.edu-card {
  display: flex; gap: 1.5rem;
  padding: 2rem; align-items: flex-start;
  margin-bottom: 1rem;
  transition: box-shadow 0.25s;
}
@media (max-width: 600px) {
  .edu-card { flex-direction: column; gap: 1rem; padding: 1.5rem; }
  .edu-header { flex-direction: column; gap: 0.3rem; }
  .edu-date { align-self: flex-start; }
  .edu-honors { flex-direction: column; }
  .certs-grid { grid-template-columns: 1fr; }
}
.edu-card:hover { box-shadow: var(--glow); }
.edu-icon { font-size: 2.5rem; }
.edu-body { flex: 1; }
.edu-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.75rem; }
.edu-degree { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.edu-school { color: var(--text-m); font-size: 0.88rem; margin-top: 0.25rem; }
.edu-date { color: var(--accent); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.edu-desc { color: var(--text-m); font-size: 0.93rem; line-height: 1.75; margin-bottom: 1.25rem; }
.edu-desc strong { color: var(--text); }

.edu-honors { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.honor-badge {
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(232,99,10,0.1);
  border: 1px solid rgba(232,99,10,0.25);
  color: var(--text-m);
  padding: 0.4rem 0.9rem;
  border-radius: 0.5rem;
  font-size: 0.82rem; font-weight: 500;
}

/* certificates grid */
.certs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem; margin-top: 1rem;
}
.cert-card {
  padding: 1.25rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--glow2); }
.cert-org {
  font-size: 0.82rem; font-weight: 700;
  color: var(--accent2);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.cert-card h4 { font-size: 0.9rem; font-weight: 600; color: var(--text); line-height: 1.45; }

/* ══════════════════════════
   PROJECTS GRID
══════════════════════════ */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
}
@media (max-width: 480px) {
  .projects-grid { grid-template-columns: 1fr; gap: 1rem; }
  .project-img-wrap { height: 160px; }
}
.project-card {
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.project-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0,0,0,0.6), var(--glow); }

.project-img-wrap { position: relative; height: 180px; overflow: hidden; }
.project-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #0c1425 0%, #070e20 100%);
  display: flex; align-items: center; justify-content: center;
}

/* project mockup */
.project-mockup { width: 70%; }
.mockup-bar { height: 8px; background: rgba(232,99,10,0.25); border-radius: 4px; margin-bottom: 10px; }
.mockup-body { display: flex; flex-direction: column; gap: 6px; }
.mockup-line { height: 5px; background: rgba(255,255,255,0.07); border-radius: 3px; }
.mockup-block { height: 50px; background: rgba(10,240,255,0.06); border-radius: 4px; margin: 6px 0; border: 1px solid rgba(10,240,255,0.1); }

/* real image */
.project-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-img-wrap img { transform: scale(1.04); }

/* overlay */
.project-overlay {
  position: absolute; inset: 0;
  background: rgba(3,6,15,0.75);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-live-btn {
  background: linear-gradient(135deg, var(--accent), #c05200);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem;
  transition: transform 0.2s;
}
.project-live-btn:hover { transform: scale(1.05); }

/* body */
.project-body { padding: 1.35rem; }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.65rem; }
.project-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.project-type { font-size: 0.76rem; font-weight: 600; color: var(--accent2); white-space: nowrap; padding: 0.2rem 0.6rem; border: 1px solid rgba(10,240,255,0.2); border-radius: 1rem; }
.project-desc { color: var(--text-m); font-size: 0.88rem; line-height: 1.65; margin-bottom: 0.9rem; }
.project-plugins { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.75rem; }
.plugin-tag {
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.25);
  color: var(--accent3);
  padding: 0.2rem 0.6rem;
  border-radius: 0.75rem;
  font-size: 0.75rem; font-weight: 600;
}
.project-link { color: var(--accent); font-size: 0.85rem; font-weight: 600; transition: gap 0.2s; }
.project-link span { display: inline-block; transition: transform 0.2s; }
.project-link:hover span { transform: translateX(3px); }

/* "more" card */
.project-more { display: flex; align-items: center; justify-content: center; min-height: 300px; }
.project-more-inner { text-align: center; padding: 2rem; }
.project-more-icon { font-size: 3rem; margin-bottom: 1rem; filter: drop-shadow(0 0 12px rgba(232,99,10,0.5)); }
.project-more-inner h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--text); }
.project-more-inner p { color: var(--text-m); font-size: 0.9rem; line-height: 1.65; }

/* ══════════════════════════
   CONTACT SECTION
══════════════════════════ */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem; align-items: start;
}
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 480px) {
  .contact-form { padding: 1.25rem; }
  .contact-item { padding: 0.85rem 1rem; }
}

.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.2rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.contact-item:hover { transform: translateX(4px); box-shadow: var(--glow); }
.contact-item-icon { font-size: 1.4rem; }
.contact-item-body { flex: 1; display: flex; flex-direction: column; }
.contact-label { font-size: 0.76rem; font-weight: 700; color: var(--text-d); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-value { font-size: 0.92rem; color: var(--text); }
.contact-arrow { color: var(--accent); font-size: 1.1rem; }

/* contact form */
.contact-form { padding: 2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.2rem; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: var(--text-m); text-transform: uppercase; letter-spacing: 0.06em; }
.form-group input,
.form-group textarea,
.form-group select {
  background: rgba(255,255,255,0.03);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text);
  font-family: inherit; font-size: 0.93rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,99,10,0.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-d); }

.form-success {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-sm);
  color: #34d399; font-size: 0.9rem;
  display: none;
}
.form-success.show { display: block; }

/* ══════════════════════════
   FOOTER
══════════════════════════ */
#footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem;
}
.footer-inner { max-width: 1100px; margin: auto; text-align: center; }
.footer-copy { color: var(--text-d); font-size: 0.85rem; }

/* ══════════════════════════
   BACK TO TOP
══════════════════════════ */
.back-to-top-float {
  position: fixed; bottom: 2rem; right: 2rem;
  z-index: 999;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), #c05200);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(232,99,10,0.4);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
}
.back-to-top-float.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top-float:hover { box-shadow: 0 6px 28px rgba(232,99,10,0.6); }

/* ══════════════════════════
   TILT CARD
══════════════════════════ */
.tilt-card { transform-style: preserve-3d; }

/* ══════════════════════════
   MARKDOWN PERFORMANCE MODE
══════════════════════════ */
body.markdown-mode {
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji" !important;
  cursor: auto !important;
  overflow-x: hidden;
}

/* Hide performance-heavy or complex elements completely */
body.markdown-mode #particle-canvas,
body.markdown-mode .cursor,
body.markdown-mode .cursor-follower,
body.markdown-mode .scroll-hint,
body.markdown-mode .hero-photo-ring,
body.markdown-mode .hero-circle-backdrop,
body.markdown-mode .hero-photo-wrap::before,
body.markdown-mode .hero-photo-wrap::after,
body.markdown-mode .timeline::before,
body.markdown-mode .timeline-dot,
body.markdown-mode .project-overlay,
body.markdown-mode #hero::before {
  display: none !important;
  animation: none !important;
}

/* Strip complex backgrounds, borders, gradients, and shadows from everything */
body.markdown-mode *, body.markdown-mode *::before, body.markdown-mode *::after {
  background: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: none !important;
  border-radius: 0 !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
  transition: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentcolor !important;
}

/* Redefine specific base layout areas */
body.markdown-mode #navbar {
  position: static !important;
  background: var(--surface) !important;
  border-bottom: 2px solid var(--border) !important;
  padding: 1rem 2rem !important;
}
body.markdown-mode .nav-link { color: var(--accent) !important; text-decoration: underline !important; padding: 0 !important; }
body.markdown-mode .nav-link::after { display: none !important; }
body.markdown-mode .hamburger span { background: var(--text) !important; }

/* Hero adjustments */
body.markdown-mode #hero {
  min-height: auto !important;
  padding: 4rem 2rem 2rem !important;
  background: var(--bg) !important;
}
body.markdown-mode .hero-content {
  flex-direction: row !important;
  gap: 2rem !important;
  max-width: 900px !important;
  margin: 0 auto !important;
}
body.markdown-mode .hero-text { flex: 3 !important; }
body.markdown-mode .hero-photo-wrap {
  flex: 1 !important;
  width: auto !important; height: auto !important;
  margin-bottom: 2rem !important;
}
body.markdown-mode .hero-photo {
  position: static !important;
  width: 200px !important; height: 200px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 1px solid var(--border-h) !important;
}
body.markdown-mode .hero-name { color: var(--text) !important; font-weight: 600 !important; font-size: 2.5rem !important; }
body.markdown-mode .hero-title-wrap { color: var(--text-m) !important; font-size: 1.25rem !important; margin-bottom: 1rem !important; }
body.markdown-mode .hero-bio { color: var(--text) !important; }
body.markdown-mode .hero-badge {
  position: static !important;
  display: inline-block !important;
  margin-top: 1rem !important;
  background: var(--surface) !important;
  color: var(--text-m) !important;
  border: 1px solid var(--border) !important;
  padding: 0.2rem 0.5rem !important;
  border-radius: 3px !important;
  font-size: 0.85rem !important;
}
body.markdown-mode .btn-primary { background: var(--accent) !important; color: white !important; border: 1px solid var(--border-h) !important; border-radius: 6px !important; text-decoration: none !important; }
body.markdown-mode .btn-outline { background: var(--surface) !important; color: var(--text) !important; border: 1px solid var(--border-h) !important; border-radius: 6px !important; }
body.markdown-mode .stat-num { color: var(--accent) !important; }
body.markdown-mode .stat-plus { color: var(--accent) !important; }

/* General Sections */
body.markdown-mode .section { padding: 3rem 2rem !important; background: var(--bg) !important; border-top: 1px solid var(--border) !important; }
body.markdown-mode .section-title { font-size: 2rem !important; color: var(--text) !important; border-bottom: 1px solid var(--border) !important; padding-bottom: 0.5rem !important; margin-bottom: 1.5rem !important; font-weight: 600 !important; }
body.markdown-mode .section-subtitle { color: var(--text-m) !important; }
body.markdown-mode .section-tag { display: none !important; } /* Hide decorative tags */

/* Cards to simplistic borders */
body.markdown-mode .glass, 
body.markdown-mode .info-card, 
body.markdown-mode .timeline-card, 
body.markdown-mode .edu-card, 
body.markdown-mode .cert-card, 
body.markdown-mode .project-card, 
body.markdown-mode .contact-item {
  background: var(--bg2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  padding: 1.5rem !important;
  margin-bottom: 1rem !important;
}
body.markdown-mode .info-card h4, 
body.markdown-mode .timeline-role, 
body.markdown-mode .edu-degree, 
body.markdown-mode .project-title,
body.markdown-mode .skill-name { color: var(--accent) !important; font-weight: 600 !important; }

/* Text colors */
body.markdown-mode p, body.markdown-mode span:not(.hero-badge-text) { color: var(--text) !important; }
body.markdown-mode .timeline-date, 
body.markdown-mode .edu-date, 
body.markdown-mode .project-type, 
body.markdown-mode .cert-org { color: var(--text-d) !important; }

/* Tags/Pills */
body.markdown-mode .tag, 
body.markdown-mode .tag-sm, 
body.markdown-mode .badge, 
body.markdown-mode .plugin-tag, 
body.markdown-mode .honor-badge {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 3px !important;
  font-size: 0.8rem !important;
  font-weight: 400 !important;
  padding: 0.2em 0.5em !important;
}

/* Skills specifically */
body.markdown-mode .skill-bar { background: var(--surface2) !important; height: 10px !important; border-radius: 5px !important; }
body.markdown-mode .skill-fill { background: var(--accent) !important; border-radius: 5px !important; }

/* Projects specifically */
body.markdown-mode .project-img-wrap { display: none !important; } /* Hide images for ultimate performance */
body.markdown-mode .project-body { padding: 1rem !important; }
body.markdown-mode .project-link { color: var(--accent2) !important; text-decoration: underline !important; }

/* Footer */
body.markdown-mode footer { background: var(--surface) !important; border-top: 1px solid var(--border) !important; color: var(--text-m) !important; }
body.markdown-mode .footer-social a, body.markdown-mode .footer-links a { color: var(--accent) !important; }

@media (max-width: 860px) {
  body.markdown-mode .hero-content { flex-direction: column !important; text-align: left !important; }
  body.markdown-mode .hero-photo { width: 140px !important; height: 140px !important; }
}