/* ============================
   FUTURISTIC PORTFOLIO — PREMIUM UPGRADE
   ============================ */

/* --- Reset & Base --- */
:root {
  --bg-primary: #010205;
  --bg-secondary: #050a14;
  --bg-card: rgba(10, 18, 30, 0.45);
  --border-glow: rgba(0, 240, 255, 0.12);
  --accent-cyan: #00e5ff;
  --accent-emerald: #0df0a3;
  --accent-purple: #9d4edd;
  --accent-blue: #2563eb;
  --text-primary: #f0f2f5;
  --text-secondary: #9aa5b6;
  --text-muted: #5e6b82;
  --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.3), 0 0 60px rgba(0, 229, 255, 0.1);
  --glow-emerald: 0 0 20px rgba(13, 240, 163, 0.3), 0 0 60px rgba(13, 240, 163, 0.1);
  --font-main: 'Inter', -apple-system, system-ui, sans-serif;
  --transition-smooth: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-spring: 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-bg: rgba(5, 10, 20, 0.4);
}

[data-theme="light"] {
  --bg-primary: #f4f6f9;
  --bg-secondary: #eef1f6;
  --bg-card: rgba(255, 255, 255, 0.8);
  --border-glow: rgba(0, 0, 0, 0.08);
  --accent-cyan: #009eb3; /* Darker cyan for contrast */
  --accent-emerald: #08a36f; /* Darker emerald for contrast */
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --glow-cyan: 0 0 20px rgba(0, 158, 179, 0.2), 0 0 60px rgba(0, 158, 179, 0.05);
  --glow-emerald: 0 0 20px rgba(8, 163, 111, 0.2), 0 0 60px rgba(8, 163, 111, 0.05);
  --nav-bg: rgba(255, 255, 255, 0.6);
}

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

html {
  font-size: 16px;
  /* lenis handles scroll-behavior */
}

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(0, 229, 255, 0.25);
  color: #fff;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--accent-cyan), var(--accent-emerald)); border-radius: 4px; }

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

/* --- Global Utilities --- */
.noise-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 9999; opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  background-repeat: repeat; animation: noiseScan 4s linear infinite;
}

@keyframes noiseScan {
  0% { transform: translate(0,0); }
  50% { transform: translate(-5%, 5%); }
  100% { transform: translate(0,0); }
}

#particle-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
}

/* --- Typographic Elements --- */
.text-gradient {
  background: linear-gradient(135deg, #fff 0%, var(--accent-cyan) 50%, var(--accent-emerald) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; background-size: 200% 200%;
  animation: gradientShift 6s ease-in-out infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* --- Floating Navigation --- */
.nav-futuristic {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  z-index: 1000; display: flex; align-items: center; gap: 8px;
  padding: 8px; background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 50px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: var(--transition-smooth);
}
.nav-futuristic:hover { border-color: rgba(0, 229, 255, 0.2); }
.nav-logo {
  font-weight: 900; font-size: 1.2rem; padding: 6px 18px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.nav-link {
  padding: 8px 20px; font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  border-radius: 50px; transition: var(--transition-smooth);
  position: relative; overflow: hidden;
}
.nav-link::before {
  content: ''; position: absolute; inset: 0; background: var(--border-glow); opacity: 0; transition: 0.3s;
}
.nav-link:hover::before { opacity: 1; }
.nav-link:hover { color: #fff; transform: translateY(-1px); }
.nav-link.active { color: #fff; background: rgba(0, 229, 255, 0.15); box-shadow: 0 0 20px rgba(0, 229, 255, 0.1); }

.theme-toggle-btn {
  position: fixed; top: 24px; right: 24px; z-index: 1001;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--nav-bg); border: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary); cursor: pointer; transition: var(--transition-smooth);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.theme-toggle-btn:hover { border-color: rgba(0, 229, 255, 0.4); transform: scale(1.05); }

/* --- Sections --- */
section { position: relative; z-index: 1; margin: 0; }
.section-container { max-width: 1300px; margin: 0 auto; padding: 0 32px; }

/* --- Hero Section --- */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 80%);
  perspective: 1000px; transform: rotateX(20deg) scale(1.2);
}
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none; mix-blend-mode: screen;
}
.hero-orb-1 { width: 600px; height: 600px; background: rgba(0, 229, 255, 0.12); top: 5%; right: -5%; }
.hero-orb-2 { width: 500px; height: 500px; background: rgba(13, 240, 163, 0.1); bottom: 5%; left: -5%; }

.hero-content {
  text-align: center; position: relative; z-index: 2; padding: 40px 24px; max-width: 900px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 24px;
  background: rgba(0, 229, 255, 0.05); border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 50px; font-size: 0.85rem; font-weight: 600; color: var(--accent-cyan);
  margin-bottom: 30px; letter-spacing: 0.1em; text-transform: uppercase;
  backdrop-filter: blur(8px); box-shadow: var(--glow-cyan);
}
.hero-badge .pulse-dot {
  width: 8px; height: 8px; background: var(--accent-cyan); border-radius: 50%;
  animation: pulse 2s infinite; box-shadow: 0 0 10px var(--accent-cyan);
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero-name {
  font-size: clamp(3.5rem, 9vw, 7.5rem); font-weight: 900; line-height: 1.05;
  letter-spacing: -0.05em; margin-bottom: 24px;
}
/* For split type animation */
.line-wrapper { overflow: hidden; display: block; }

.hero-title {
  font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 400; color: var(--text-secondary);
  margin-bottom: 12px; letter-spacing: 0.01em; max-width: 600px; margin: 0 auto 16px;
}
.hero-title .highlight { color: var(--text-primary); font-weight: 600; }
.hero-location { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.hero-location svg { color: var(--accent-emerald); }

.hero-actions { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }

/* --- Buttons --- */
.magnetic-wrap { display: inline-block; position: relative; }

.btn-glow {
  display: inline-flex; align-items: center; gap: 10px; padding: 18px 40px;
  font-size: 1.05rem; font-weight: 700; color: #000;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
  border-radius: 100px; cursor: pointer; transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow var(--transition-smooth);
  border: none; overflow: hidden; position: relative; z-index: 1; letter-spacing: -0.01em;
}
.btn-glow:hover { box-shadow: 0 10px 40px rgba(0, 229, 255, 0.4), 0 0 60px rgba(13, 240, 163, 0.2); }
.btn-glow::before {
  content: ''; position: absolute; inset: 0; background: #fff;
  opacity: 0; transition: opacity 0.3s; z-index: -1;
}
.btn-glow:hover::before { opacity: 0.2; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px; padding: 18px 40px;
  font-size: 1.05rem; font-weight: 600; color: var(--text-primary);
  background: var(--bg-card); border: 1px solid var(--border-glow);
  border-radius: 100px; cursor: pointer; transition: all 0.3s cubic-bezier(0.2,0,0,1);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  border-color: rgba(0, 229, 255, 0.4); background: rgba(0, 229, 255, 0.08); color: #fff;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.1);
}

/* --- Section Headers --- */
.section-header { text-align: center; margin-bottom: 80px; }
.section-label {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 16px; background: rgba(13, 240, 163, 0.1); border-radius: 30px;
  font-size: 0.85rem; font-weight: 700; color: var(--accent-emerald);
  letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 24px;
}
.section-title { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1.1; }

/* --- Bento Box About Section --- */
.about-section { padding: 160px 0; }
.bento-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(220px, auto); gap: 24px;
}
.bento-card {
  background: var(--bg-card); border: 1px solid var(--border-glow); border-radius: 32px;
  padding: 40px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  transition: border-color var(--transition-smooth), transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.bento-card::before {
  content: ''; position: absolute; inset: 0; background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(0, 229, 255, 0.08), transparent 40%); opacity: 0; transition: opacity 0.5s; z-index: 0; pointer-events: none;
}
.bento-card:hover::before { opacity: 1; }
.bento-card > * { position: relative; z-index: 1; }
.bento-card:hover { border-color: rgba(0, 229, 255, 0.4); box-shadow: 0 30px 60px rgba(0,0,0,0.4); transform: translateY(-4px); }

.bento-large { grid-column: span 3; grid-row: span 2; }
.bento-tall { grid-column: span 1; grid-row: span 2; }
.bento-wide { grid-column: span 2; grid-row: span 1; }
.bento-small { grid-column: span 1; grid-row: span 1; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }

.bento-large .about-bio { font-size: 1.35rem; line-height: 1.7; color: var(--text-secondary); font-weight: 300; }
.bento-large .about-bio p:not(:last-child) { margin-bottom: 24px; }
.bento-large .highlight-text { color: var(--text-primary); font-weight: 600; text-shadow: 0 0 10px rgba(0,0,0,0.05); }

.stat-value { font-size: 3.5rem; font-weight: 900; background: linear-gradient(135deg, #fff, var(--accent-emerald)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 0.95rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }

.bento-card.location-card { background: linear-gradient(to bottom right, var(--bg-card), rgba(0, 229, 255, 0.05)); }
.bento-card.location-card .icon { font-size: 2.5rem; color: var(--accent-cyan); margin-bottom: 16px; }

/* --- Projects Section --- */
.projects-section { padding: 140px 0; }
.project-showcase {
  background: var(--bg-card); border: 1px solid var(--border-glow); border-radius: 40px;
  overflow: hidden; display: flex; flex-direction: column; max-width: 1000px; margin: 0 auto;
  position: relative; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-showcase:hover { border-color: rgba(13, 240, 163, 0.4); box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 50px rgba(13, 240, 163, 0.1); transform: translateY(-8px); }
.project-img-wrap { width: 100%; aspect-ratio: 16/9; overflow: hidden; position: relative; }
.project-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(0.2,0.8,0.2,1); }
.project-showcase:hover .project-img-wrap img { transform: scale(1.03); }
.project-img-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, #030014 100%); pointer-events: none; }
.project-showcase-badge { position: absolute; top: 24px; left: 24px; padding: 10px 20px; background: rgba(13, 240, 163, 0.15); border: 1px solid rgba(13, 240, 163, 0.3); border-radius: 50px; font-weight: 700; color: var(--accent-emerald); backdrop-filter: blur(10px); }
.project-details { padding: 48px; }
.project-details h3 { font-size: 2.8rem; font-weight: 900; margin-bottom: 16px; letter-spacing: -0.03em; }
.project-details p { font-size: 1.15rem; color: var(--text-secondary); max-width: 800px; margin-bottom: 32px; line-height: 1.6; }
.project-tags { display: flex; gap: 12px; margin-bottom: 40px; flex-wrap: wrap; }
.project-tags span { padding: 8px 16px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; font-size: 0.9rem; font-weight: 500; color: #fff; }

/* --- Contact Section --- */
.contact-section { padding: 160px 0; }
.contact-hologram {
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.05) 0%, transparent 100%);
  border: 1px solid var(--border-glow); border-bottom: none; border-radius: 40px 40px 0 0;
  padding: 100px 40px; text-align: center; max-width: 900px; margin: 0 auto; position: relative;
}
.contact-hologram::before { content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent); }
.contact-icon { font-size: 4rem; color: var(--accent-cyan); margin-bottom: 30px; display: inline-block; filter: drop-shadow(0 0 20px rgba(0,229,255,0.4)); animation: floatY 4s ease-in-out infinite; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }
.contact-hologram h3 { font-size: 3rem; font-weight: 900; margin-bottom: 20px; }
.contact-hologram p { font-size: 1.2rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 50px; }

/* --- Footer --- */
.footer-futuristic { padding: 60px 0; text-align: center; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-futuristic p { color: var(--text-muted); font-size: 1rem; }
.footer-accent { color: var(--accent-cyan); font-weight: 600; }

/* --- Responsive --- */
[data-theme="light"] .hero-name .text-gradient { background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 50%, var(--accent-emerald) 100%); -webkit-background-clip: text; }
[data-theme="light"] .bento-card { border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .btn-glow { color: #fff; }

@media (max-width: 1024px) {
  .bento-large { grid-column: span 4; }
  .bento-tall, .bento-wide, .bento-small { grid-column: span 2; grid-row: span 1; margin-bottom: 0;}
  .section-title { font-size: 3rem; }
  .project-details { padding: 32px; }
  .project-details h3 { font-size: 2rem; }
}
@media (max-width: 768px) {
  .hero-name { font-size: 3.5rem; }
  .hero-actions { flex-direction: column; }
  .btn-glow, .btn-ghost { width: 100%; justify-content: center; }
  .bento-grid { display: flex; flex-direction: column; }
  .bento-tall, .bento-wide, .bento-small, .bento-large { width: 100%; }
}

/* --- Project Page Enhancements --- */
.project-hero { padding-top: 160px; min-height: 70vh; display: flex; align-items: center; justify-content: center; position: relative; }
.video-container { border-radius: 32px; overflow: hidden; border: 1px solid rgba(13, 240, 163, 0.3); box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 60px rgba(13, 240, 163, 0.1); background: #000; transition: transform var(--transition-smooth); }
.video-container iframe { width: 100%; aspect-ratio: 16/9; display: block; }
.floating-leaf { position: absolute; background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%230df0a3" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"/></svg>'); width: 60px; height: 60px; filter: blur(4px) opacity(0.3); pointer-events: none; }