/* =====================================================
   MAHMOUD ELBEDEWY — Portfolio CSS
   Theme: Living Terminal / CS Engineer
   ===================================================== */

:root {
  --bg: #0a0a10;
  --bg-2: #0f0f1a;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-bright: rgba(0, 210, 255, 0.3);
  --primary: #00d2ff;
  --primary-dim: rgba(0, 210, 255, 0.15);
  --secondary: #3a7bd5;
  --green: #00ff88;
  --text: #ffffff; 
  --text-dim: rgba(255, 255, 255, 0.85); 
  --text-dimmer: rgba(255, 255, 255, 0.70); 
  --font: 'Outfit', sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow-glow: 0 0 40px rgba(0, 210, 255, 0.12);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* =====================================================
   RESET & BASE
   ===================================================== */
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg);
}

*, *::before, *::after {
  margin: 0; padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  overflow-x: hidden;
  line-height: 1.6;
}

.mono { font-family: var(--mono); }

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

strong { color: var(--primary); font-weight: 500; }

/* =====================================================
   SCROLL PROGRESS BAR
   ===================================================== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  z-index: 9999;
  transition: width 0.1s linear;
}

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

/* =====================================================
   CUSTOM CURSOR
   ===================================================== */
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  z-index: 9998;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: screen;
}

.cursor-ring {
  width: 36px; height: 36px;
  border: 1px solid rgba(0, 210, 255, 0.5);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  z-index: 9997;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s, transform 0.08s ease;
}

body:hover .cursor-dot { opacity: 1; }

/* =====================================================
   VANTA BACKGROUND
   ===================================================== */
#vanta-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  z-index: -2;
}

/* =====================================================
   NAVIGATION
   ===================================================== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 6%;
  position: fixed;
  width: 100%; top: 0;
  z-index: 1000;
  background: rgba(10, 10, 16, 0.8);
  backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 12px 6%;
  background: rgba(10, 10, 16, 0.95);
}

.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 3px;
  color: var(--primary);
  z-index: 1001;
}

.logo-dot {
  color: var(--green);
  animation: blink 1.4s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Hamburger */
.menu-icon {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 5px;
}

.menu-icon span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-icon.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-icon.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-icon.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu */
.menu {
  display: flex;
  gap: 6px;
  list-style: none;
  align-items: center;
}

.nav-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-dim);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--primary) !important;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-left: 8px;
}

.nav-cta:hover {
  background: var(--primary);
  color: #000 !important;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.4);
}

.cta-status {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(0, 255, 136, 0); }
}

/* =====================================================
   SECTION SHARED
   ===================================================== */
section {
  position: relative;
  z-index: 2;
}

.section-header {
  margin-bottom: 60px;
}

.section-index {
  font-size: 0.75rem;
  color: var(--primary);
  letter-spacing: 3px;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  color: var(--text);
  border-left: 3px solid var(--primary);
  padding-left: 20px;
}

.highlight { color: var(--primary); }

/* =====================================================
   HERO
   ===================================================== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 100px 6% 60px;
  position: relative;
}

/* Subtle radial glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: 20%; left: 5%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,210,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-left { z-index: 3; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 28px;
  backdrop-filter: blur(10px);
}

.tag-dot {
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.hero-greeting {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 300;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.glitch {
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 900;
  background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 50%, #00ff88 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
  margin-bottom: 28px;
  position: relative;
  letter-spacing: -2px;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  background: inherit;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glitch::before {
  animation: glitch-1 4s infinite linear;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  opacity: 0.7;
}

.glitch::after {
  animation: glitch-2 4s infinite linear;
  clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
  opacity: 0.7;
}

@keyframes glitch-1 {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-3px, 1px); }
  94% { transform: translate(3px, -1px); }
  96% { transform: translate(-2px, 2px); }
  98% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(3px, -1px); }
  94% { transform: translate(-3px, 1px); }
  96% { transform: translate(2px, -2px); }
  98% { transform: translate(-2px, 2px); }
}

.hero-desc {
  color: var(--text-dim);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 36px;
}

/* Buttons */
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn-neon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 32px;
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.btn-neon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-neon:hover {
  color: #000;
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.5), 0 0 60px rgba(0, 210, 255, 0.2);
  transform: translateY(-2px);
}

.btn-neon:hover::before { opacity: 1; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 32px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 400;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: var(--glass-hover);
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: 0;
  align-items: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 24px;
}

.stat-item:first-child { padding-left: 0; }

.stat-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-dimmer);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-divider {
  width: 1px; height: 40px;
  background: var(--border);
}

/* ===== TERMINAL CARD ===== */
.hero-right {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
}

.terminal-card {
  background: rgba(10, 10, 20, 0.85);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-glow), var(--shadow-card);
  backdrop-filter: blur(20px);
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid var(--border);
}

.t-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}

.t-red { background: #ff5f56; }
.t-yellow { background: #ffbd2e; }
.t-green { background: #27c93f; }

.t-title {
  font-size: 0.72rem;
  color: var(--text-dimmer);
  margin-left: auto;
}

.terminal-body {
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.8;
}

.t-line { margin-bottom: 4px; }

.t-prompt { color: var(--green); margin-right: 8px; }
.t-cmd { color: var(--primary); }
.t-brace { color: rgba(255,255,255,0.6); }
.t-key { color: #7dd3fc; }
.t-str { color: #86efac; }
.t-bool { color: #fb923c; }

.t-output {
  color: var(--text-dim);
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 8px 0;
}

.t-cursor-bar {
  display: inline-block;
  width: 2px; height: 14px;
  background: var(--primary);
  animation: cursor-blink 1.2s step-end infinite;
  vertical-align: middle;
}

@keyframes cursor-blink {
  50% { opacity: 0; }
}

/* Floating Tags */
.floating-tags {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  pointer-events: none;
}

.ftag {
  position: absolute;
  background: var(--glass);
  border: 1px solid var(--border-bright);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 7px 14px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.ftag i { color: var(--primary); }

.ftag-1 { top: 8%; right: 0%; animation: float-tag 5s 0s ease-in-out infinite; }
.ftag-2 { top: 40%; right: -8%; animation: float-tag 5s 1s ease-in-out infinite; }
.ftag-3 { bottom: 30%; right: 2%; animation: float-tag 5s 2s ease-in-out infinite; }
.ftag-4 { bottom: 5%; right: -4%; animation: float-tag 5s 0.5s ease-in-out infinite; }

@keyframes float-tag {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

/* Scroll Hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dimmer);
  font-size: 0.65rem;
  letter-spacing: 2px;
  animation: bounce-down 2.5s ease-in-out infinite;
}

.scroll-mouse {
  width: 22px; height: 36px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 11px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-wheel {
  width: 3px; height: 8px;
  background: var(--primary);
  border-radius: 3px;
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(12px); }
}

@keyframes bounce-down {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* =====================================================
   ABOUT SECTION
   ===================================================== */
.about-section {
  padding: 120px 6%;
  max-width: 1400px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
  align-items: start;
}

.about-lead {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 24px;
  color: var(--text);
}

.about-body {
  color: var(--text-dim);
  line-height: 1.85;
  margin-bottom: 18px;
  font-size: 0.97rem;
}

.about-body em {
  color: var(--primary);
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.88rem;
}

.about-traits {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.trait-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.trait-item:hover {
  background: var(--glass-hover);
  border-color: var(--border-bright);
  transform: translateX(6px);
}

.trait-item > i {
  font-size: 1.3rem;
  color: var(--primary);
  margin-top: 2px;
  min-width: 24px;
}

.trait-item > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trait-item strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  display: block;
}

.trait-item span {
  font-size: 0.82rem;
  color: var(--text-dimmer);
}

/* About Right */
.about-card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  backdrop-filter: blur(20px);
  position: sticky;
  top: 100px;
}

.about-avatar-wrap {
  position: relative;
  width: 110px; height: 110px;
  margin: 0 auto 32px;
}

.about-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dim), rgba(58,123,213,0.15));
  border: 2px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: var(--primary);
  position: relative;
  z-index: 1;
}

.avatar-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(0,210,255,0.15);
  animation: ring-rotate 8s linear infinite;
}

.ring-2 {
  inset: -18px;
  border-color: rgba(0,210,255,0.08);
  animation-duration: 12s;
  animation-direction: reverse;
}

@keyframes ring-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.about-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: right;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.meta-label {
  font-size: 0.65rem;
  color: var(--text-dimmer);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta-val {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}

.green-dot::before {
  content: '● ';
  color: var(--green);
  font-size: 0.7rem;
}

/* =====================================================
   SKILLS SECTION
   ===================================================== */
.skills-section {
  padding: 120px 6%;
  max-width: 1400px;
  margin: 0 auto;
}

.skills-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 40px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  width: fit-content;
}

.skill-tab {
  padding: 9px 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.05em;
}

.skill-tab:hover { color: var(--text); }

.skill-tab.active {
  background: var(--primary);
  color: #000;
  font-weight: 700;
}

.skills-panel {
  display: none;
  animation: fade-up 0.4s ease;
}

.skills-panel.active { display: block; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.skills-container {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 14px;
}

.skill-box {
  background: var(--glass);
  border: 1px solid var(--border);
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.skill-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skill-box:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 8px 32px rgba(0, 210, 255, 0.2);
  color: #000;
}

.skill-box:hover::before { opacity: 1; }
.skill-box:hover i { color: #000; }

.skill-box i,
.skill-box span {
  position: relative;
  z-index: 1;
}

.skill-box i {
  font-size: 1.6rem;
  color: var(--primary);
  transition: color 0.3s ease;
}

.skill-box.next-step {
  border-color: rgba(97, 218, 251, 0.4);
  border-style: dashed;
}

.skill-box.next-step:hover {
  border-style: solid;
}

.skill-box.next-step::before {
  background: linear-gradient(135deg, #61dafb, #3a7bd5);
}

.skill-box.next-step i {
  color: #61dafb;
}

.status-badge {
  font-size: 0.65rem;
  font-family: var(--mono);
  background: rgba(97, 218, 251, 0.1);
  color: #61dafb;
  padding: 3px 8px;
  border-radius: 50px;
  margin-left: 4px;
  border: 1px solid rgba(97, 218, 251, 0.3);
  animation: pulse-badge 1.5s infinite alternate;
  position: relative;
  z-index: 1;
}

@keyframes pulse-badge {
  from { opacity: 0.7; }
  to { opacity: 1; text-shadow: 0 0 8px #61dafb; }
}

.skill-box:hover .status-badge {
  background: rgba(0,0,0,0.15);
  color: #000;
  border-color: rgba(0,0,0,0.2);
  animation: none;
  font-weight: 700;
}

/* =====================================================
   WORK / CARDS
   ===================================================== */
.work-section {
  padding: 120px 6%;
  max-width: 1400px;
  margin: 0 auto;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 28px;
}

/* Card */
.card {
  background: rgba(12, 12, 22, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.card:hover {
  border-color: rgba(0, 210, 255, 0.4);
  box-shadow: 0 20px 60px rgba(0, 210, 255, 0.12), 0 0 0 1px rgba(0,210,255,0.1);
}

/* Card Preview Area — ready for image/video */
.card-preview {
  height: 200px;
  position: relative;
  overflow: hidden;
  background: #0c0c18;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(0,210,255,0.04) 28px,
      rgba(0,210,255,0.04) 29px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 28px,
      rgba(0,210,255,0.04) 28px,
      rgba(0,210,255,0.04) 29px
    );
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  from { transform: translateY(0); }
  to { transform: translateY(29px); }
}

.card-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0,210,255,0.08) 0%, transparent 70%);
}

.preview-icon {
  font-size: 3.5rem;
  color: rgba(0, 210, 255, 0.3);
  position: relative;
  z-index: 1;
  transition: all 0.4s ease;
}

.card:hover .preview-icon {
  color: rgba(0, 210, 255, 0.65);
  transform: scale(1.1);
  text-shadow: 0 0 40px rgba(0,210,255,0.4);
}

/* When you add an img or video inside .card-preview, it will fill this area */
.card-preview img,
.card-preview video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* Status Badge */
.card-status {
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 50px;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.card-status.live {
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.3);
  color: var(--green);
}

.card-status.wip {
  background: rgba(255, 189, 46, 0.1);
  border: 1px solid rgba(255, 189, 46, 0.3);
  color: #ffbd2e;
}

/* Card Content */
.card-content {
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-num {
  font-size: 0.7rem;
  color: var(--text-dimmer);
  letter-spacing: 0.1em;
}

.card-links-top {
  display: flex;
  gap: 10px;
}

.card-links-top a {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.card-links-top a:hover {
  background: var(--primary-dim);
  border-color: var(--border-bright);
  color: var(--primary);
  transform: translateY(-2px);
}

.card-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.2;
}

.card-content p {
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* Tags */
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tags span {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 4px 10px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--primary);
  letter-spacing: 0.03em;
}

/* Card CTA */
.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 4px;
  transition: gap 0.2s ease;
}

.card-cta:hover { gap: 14px; }

/* Work Note */
.work-note {
  text-align: center;
  color: var(--text-dimmer);
  font-size: 0.78rem;
  margin-top: 50px;
  letter-spacing: 0.05em;
}

/* =====================================================
   JOURNEY / TIMELINE
   ===================================================== */
.journey-section {
  padding: 120px 6%;
  max-width: 1400px;
  margin: 0 auto;
}

.timeline {
  position: relative;
  padding-left: 36px;
  max-width: 700px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 1px;
  height: calc(100% - 16px);
  background: linear-gradient(to bottom, var(--primary), transparent);
}

.tl-item {
  position: relative;
  margin-bottom: 52px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px;
  align-items: start;
}

.tl-dot {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
  position: relative;
  left: -58px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.active-dot {
  background: var(--primary-dim);
  border-color: var(--border-bright);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
  animation: active-pulse 2.5s infinite;
}

@keyframes active-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,210,255,0.3); }
  50% { box-shadow: 0 0 40px rgba(0,210,255,0.6); }
}

.tl-content {
  padding: 22px 26px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  margin-left: -48px;
}

.tl-item:hover .tl-content {
  background: var(--glass-hover);
  border-color: var(--border-bright);
  transform: translateX(4px);
}

.tl-item.tl-active .tl-content {
  border-color: rgba(0,210,255,0.25);
  background: rgba(0,210,255,0.04);
}

.tl-date {
  font-size: 0.7rem;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
}

.tl-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.tl-content p {
  color: var(--text-dim);
  font-size: 0.87rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.tl-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tl-tags span {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 3px 9px;
  background: rgba(0,210,255,0.08);
  border: 1px solid rgba(0,210,255,0.15);
  border-radius: 4px;
  color: var(--primary);
}

.tl-tags span.learning {
  background: rgba(97, 218, 251, 0.08);
  border-color: rgba(97,218,251,0.25);
  color: #61dafb;
}

/* =====================================================
   CONTACT
   ===================================================== */
.contact {
  padding: 120px 6% 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 70vh;
  position: relative;
  overflow: hidden;
}

.contact-bg-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(6rem, 18vw, 16rem);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,210,255,0.04);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: -4px;
}

.contact-container {
  max-width: 640px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.contact-container .section-index {
  text-align: center;
  margin-bottom: 16px;
}

.contact h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
}

.contact-text {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 50px;
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-btn i { font-size: 1.05rem; }

.social-btn:hover {
  background: var(--primary-dim);
  border-color: var(--border-bright);
  color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,210,255,0.15);
}

.contact-main-btn {
  font-size: 1.05rem;
  padding: 16px 48px;
}

/* Footer */
footer {
  margin-top: auto;
  padding: 50px 0 30px;
  border-top: 1px solid var(--border);
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

footer p {
  font-size: 0.85rem;
  color: var(--text-dimmer);
}

.footer-stack {
  font-size: 0.7rem;
  color: var(--text-dimmer);
  opacity: 0.5;
}

/* =====================================================
   SCROLL TO TOP
   ===================================================== */
.scroll-btn {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  background: var(--glass);
  border: 1px solid var(--border-bright);
  color: var(--primary);
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.scroll-btn:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.5);
  transform: translateY(-4px);
}

/* =====================================================
   SCROLLBAR
   ===================================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* =====================================================
   KEYFRAMES
   ===================================================== */
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes pulse {
  from { opacity: 0.6; }
  to { opacity: 1; text-shadow: 0 0 10px #61dafb; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .about-card {
    position: static;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-bottom: 80px;
  }
  .hero-left {
    order: 1;
  }
  .hero-right {
    order: 0;
    margin-bottom: 20px;
  }
  .hero-tag,
  .hero-buttons,
  .hero-stats {
    justify-content: center;
  }
  .hero-desc {
    margin: 0 auto 36px;
    text-align: center;
  }
  .glitch { text-align: center; }
  .floating-tags { display: none; }
  .terminal-card { max-width: 380px; }
  .hero-scroll-hint { display: none; }
}

@media (max-width: 768px) {
  .menu-icon { display: flex; }

  .menu {
    position: fixed;
    top: 0; right: -100%;
    width: 100%; height: 100vh;
    background: rgba(10, 10, 16, 0.97);
    backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid var(--border);
  }

  .menu.active { right: 0; }

  .nav-link { font-size: 1.1rem; }

  .cards-container {
    grid-template-columns: 1fr;
  }

  .skills-tabs {
    flex-wrap: wrap;
  }

  .section-title { font-size: 2rem; }

  .hero-stats {
    gap: 0;
  }

  .stat-item { padding: 0 16px; }

  .tl-content { margin-left: -38px; }
  .tl-item { gap: 16px; }

  .contact h2 { font-size: 2.2rem; }

  .cursor-dot, .cursor-ring { display: none; }
}

@media (max-width: 480px) {
  nav { padding: 14px 5%; }
  .about-meta-grid { grid-template-columns: 1fr; }
  .hero { padding: 90px 5% 60px; }
  .about-section,
  .skills-section,
  .work-section,
  .journey-section { padding: 80px 5%; }
  .stat-num { font-size: 1.6rem; }
}

#vanta-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  z-index: -2;
  opacity: 0.3; 
}