/* Modern Cyber-Minimalism Portfolio */
:root {
  --bg: #050505;
  --accent: #00f0ff;
  --accent-glow: rgba(0, 240, 255, 0.4);
  --accent2: #b026ff;
  --muted: #a1a1aa;
  --glass: rgba(10, 10, 12, 0.6);
  --glass-border: rgba(255, 255, 255, 0.05);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-main: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-bio: 'Outfit', sans-serif;
}

/* Global Reset */
html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

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

body {
  background-color: var(--bg);
  color: #fff;
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.5;
}

/* Cybernetic Backbone */
.cyber-spine {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 100vh;
  z-index: -1;
  opacity: 0.15;
  background:
    linear-gradient(to right, transparent 28px, var(--accent) 29px, var(--accent) 31px, transparent 32px),
    repeating-linear-gradient(to bottom, transparent 0, transparent 60px, var(--accent) 60px, var(--accent) 62px);
  pointer-events: none;
  animation: pulseSpine 4s infinite alternate ease-in-out;
  mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

@keyframes pulseSpine {
  0% { opacity: 0.05; filter: drop-shadow(0 0 5px var(--accent)); }
  100% { opacity: 0.25; filter: drop-shadow(0 0 20px var(--accent2)); }
}

/* Three.js Canvas */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Top Bar for Drawer Toggle and Visitor Counter */
.top-bar {
  position: fixed;
  top: 20px;
  right: 20px;
  left: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  pointer-events: none; /* Let clicks pass through empty space */
}

.top-bar > * {
  pointer-events: auto; /* Enable clicks on child elements */
}

.drawer-toggle {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--accent);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}
.drawer-toggle:hover {
  background: rgba(34, 211, 238, 0.1);
  transform: scale(1.05);
}



/* Drawer Menu */
.drawer {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100vh;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 20px 0 50px rgba(0,0,0,0.5);
}
.drawer.open {
  left: 0;
}

.drawer-header {
  padding: 20px;
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px solid var(--glass-border);
}

.drawer-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  transition: 0.3s;
}
.drawer-close:hover {
  color: var(--accent);
}

.drawer-nav { 
  display: flex; 
  flex-direction: column; 
  padding: 20px; 
  gap: 10px; 
  overflow-y: auto;
}
.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 15px 20px;
  border-radius: 12px;
  transition: 0.3s;
  text-align: left;
}
.nav-link:hover, .nav-link.active { 
  color: var(--accent); 
  background: rgba(34, 211, 238, 0.1); 
  padding-left: 30px;
}

/* Full Screen Sections */
.section {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 10%;
  position: relative;
  overflow: hidden;
}

.content-wrap {
  width: 100%;
  max-width: 1200px;
  z-index: 10;
  opacity: 0;
  transform: translateY(50px);
  transition: 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.content-wrap::-webkit-scrollbar { width: 4px; }
.content-wrap::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

.section.visible .content-wrap {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Styles */
.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: 60px;
  position: relative;
}
.hero-text { text-align: left; }
.hero-image { display: flex; justify-content: center; }
.hero-btns { display: flex; justify-content: flex-start; gap: 20px; }
h1 {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.05em;
  color: #fff;
  text-shadow: 0 0 40px var(--accent-glow);
}
.hero-lead {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 50px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* About / Info Asymmetrical Layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: flex-start;
}
.huge-number {
  font-family: var(--font-heading);
  font-size: 8rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
  line-height: 0.8;
  margin-bottom: 20px;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}
.section-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: #fff;
  line-height: 1.1;
}
.about-text {
  font-family: var(--font-bio);
  font-size: 1.15rem;
  font-weight: 300;
  color: #e2e8f0;
  line-height: 1.8;
  background: rgba(10, 10, 15, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-left: 4px solid var(--accent);
  position: relative;
}
.about-text p:last-child { margin-bottom: 0 !important; }

/* Tech Marquee */
.tech-marquee-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(2, 6, 23, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 45px;
  z-index: 20;
}

.tech-marquee-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee 120s linear infinite;
  min-width: max-content;
}

.tech-marquee-content span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
}

.tech-marquee-content .dot {
  width: 4px;
  height: 4px;
  background-color: var(--accent);
  border-radius: 50%;
  margin: 0 40px;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  width: 100%;
}
.skill-cat h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.p-tags { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 2;}
.tag {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent);
  transition: 0.3s;
}
.tag:hover { background: var(--accent); color: var(--bg); transform: scale(1.05); box-shadow: 0 0 15px var(--accent-glow); }

/* Projects */
.project-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  padding: 20px 0;
}
.project-item {
  background: rgba(10, 10, 15, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  padding: 40px;
  border-radius: 20px;
  transition: 0.4s ease-out;
  position: relative;
  overflow: hidden;
}
.project-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.15), transparent 70%);
  opacity: 0;
  transition: 0.4s;
  pointer-events: none;
}
.project-item:hover::before { opacity: 1; }
.project-item:hover { 
  border-color: var(--accent); 
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
}
.project-item h4 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 15px; color: #fff; position: relative; z-index: 2;}
.project-item p { color: var(--muted); font-size: 0.95rem; margin-bottom: 20px; position: relative; z-index: 2;}

/* Profile Pic */
.profile-container {
  width: 220px; height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  margin: 0 auto 40px;
  transition: 0.5s;
}
.profile-container:hover {
  transform: scale(1.05);
  box-shadow: 0 0 60px var(--accent2);
  border-color: var(--accent2);
}
.profile-container img { width: 100%; height: 100%; object-fit: cover; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 32px; border-radius: 100px;
  font-weight: 600; text-decoration: none; transition: 0.3s;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #fff; box-shadow: 0 0 30px var(--accent-glow); transform: scale(1.05); }

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}
.timeline-item {
  position: relative;
  margin-bottom: 30px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -37px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: 0.3s;
}
.timeline-item:hover::before {
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent2);
  margin-bottom: 5px;
  letter-spacing: 0.1em;
}
.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 10px;
}

/* Footer-like */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }

/* Responsive */
@media (max-width: 900px) {
  .section { padding: 80px 5%; }
  .cyber-spine { 
    left: 20px; 
    transform: none; 
    width: 20px; 
    background:
      linear-gradient(to right, transparent 8px, var(--accent) 9px, var(--accent) 11px, transparent 12px),
      repeating-linear-gradient(to bottom, transparent 0, transparent 40px, var(--accent) 40px, var(--accent) 42px);
  }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 20px;}
  .hero-text { text-align: center; }
  .hero-btns { justify-content: center; }
  h1 { font-size: 4rem; }
  .project-item { min-width: 300px; }
  .drawer { width: 100%; left: -100%; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .huge-number { font-size: 5rem; }
}

/* Admin Dashboard - Modern Dark UI */
.modal { 
  position: fixed; 
  inset: 0; 
  background: rgba(2, 6, 23, 0.95); 
  backdrop-filter: blur(20px); 
  z-index: 9999; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  opacity: 0; 
  pointer-events: none; 
  transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
}
.modal.show { opacity: 1; pointer-events: all; }

.dashboard-content { 
  background: #0f172a; 
  width: 90%; 
  max-width: 1000px; 
  height: 80vh; 
  border: 1px solid var(--glass-border); 
  border-radius: 32px; 
  display: flex; 
  overflow: hidden; 
  box-shadow: 0 50px 100px rgba(0,0,0,0.8);
}

.dashboard-sidebar { 
  width: 240px; 
  border-right: 1px solid var(--glass-border); 
  background: rgba(0,0,0,0.2); 
  display: flex;
  flex-direction: column;
}

.sidebar-header { 
  padding: 30px; 
  font-family: var(--font-heading);
  font-weight: 800; 
  color: var(--accent); 
  border-bottom: 1px solid var(--glass-border); 
}

.sidebar-nav { display: flex; flex-direction: column; padding: 20px; gap: 8px; }
.tab-btn { 
  background: none; border: none; color: var(--muted); 
  padding: 14px 20px; text-align: left; border-radius: 14px; 
  cursor: pointer; transition: 0.3s; font-family: inherit;
  font-weight: 500;
}
.tab-btn.active { background: rgba(34, 211, 238, 0.1); color: var(--accent); }
.tab-btn:hover:not(.active) { background: rgba(255,255,255,0.05); color: #fff; }

.dashboard-main { flex: 1; display: flex; flex-direction: column; }
.modal-header { 
  padding: 25px 40px; 
  border-bottom: 1px solid var(--glass-border); 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}
.modal-body { padding: 40px; overflow-y: auto; flex: 1; color: var(--muted); }
.dashboard-footer { 
  padding: 25px 40px; 
  border-top: 1px solid var(--glass-border); 
  display: flex; gap: 15px; 
  justify-content: flex-end; 
}

.close-btn { background: none; border: none; color: #fff; font-size: 2.5rem; cursor: pointer; line-height: 1; }
.close-btn:hover { color: var(--accent); }

/* Hidden Trigger */
.admin-shield { display: none; }
