/* ============================================================
   CINEMATIC 3D PORTFOLIO CSS - MAXIMUM CLARITY & INTERACTION
   ============================================================ */
:root {
  --primary: #00D4FF;
  --primary-dark: #0088AA;
  --accent: #6C63FF;
  --bg: #020205;
  --text: #ffffff;
  --text-secondary: #E2E8F0; /* Pure hex for perfect clarity, no rgba */
  --card-bg: rgba(8, 8, 14, 0.90); /* Very dark, high opacity for readability */
  --card-border: rgba(255, 255, 255, 0.2);
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.7;
  font-size: 1.05rem; /* Larger base font for readability */
  cursor: none; /* Hide default cursor for custom cursor */
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 30px; height: 30px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
  box-shadow: 0 0 10px var(--primary);
}
.custom-cursor.hovering {
  width: 60px; height: 60px;
  background-color: rgba(0, 212, 255, 0.1);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent);
}
.custom-cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 6px; height: 6px;
  background-color: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
}

/* 3D Canvas Background */
#canvas-container {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6; /* Dim the 3D scene so text pops */
}
#canvas3d { width: 100%; height: 100%; display: block; }

#scroll-content { position: relative; z-index: 2; }

/* Navbar - Floating Pill Design */
#navbar {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  display: flex; justify-content: space-between; align-items: center;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.5);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 10px 24px;
  width: 90%; max-width: 1000px;
  transition: all 0.4s var(--ease);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
#navbar.scrolled {
  background: rgba(5, 5, 10, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  padding: 8px 24px;
  box-shadow: 0 15px 40px rgba(0, 212, 255, 0.15);
}
.nav-logo { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: #fff; text-decoration: none; display: flex; align-items: center; transition: 0.3s; }
.nav-logo:hover { color: var(--primary); transform: scale(1.05) rotate(5deg); }

.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-link { color: var(--text-secondary); text-decoration: none; font-family: var(--font-body); font-size: 0.95rem; font-weight: 600; padding: 8px 16px; border-radius: 20px; transition: all 0.3s; cursor: none;}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-link.active { background: var(--primary); color: #000; box-shadow: 0 0 15px rgba(0, 212, 255, 0.4); }

.nav-contact-btn { background: #fff; color: #000; text-decoration: none; padding: 8px 24px; border-radius: 30px; font-weight: 700; font-family: var(--font-heading); transition: all 0.3s; cursor: none;}
.nav-contact-btn:hover { background: var(--primary); box-shadow: 0 0 20px rgba(0, 212, 255, 0.5); transform: translateY(-2px); }

/* Mobile Toggle */
.nav-toggle { display: none; background: none; border: none; cursor: none; flex-direction: column; gap: 6px; z-index: 1001; }
.nav-toggle .line { width: 28px; height: 2px; background: #fff; transition: 0.3s var(--ease); transform-origin: left center;}
.nav-toggle.active .line1 { transform: rotate(45deg); }
.nav-toggle.active .line2 { opacity: 0; width: 0; }
.nav-toggle.active .line3 { transform: rotate(-45deg); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
  background: rgba(5, 5, 10, 0.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 32px;
  opacity: 0; visibility: hidden; transition: all 0.5s var(--ease); transform: translateY(-20px);
}
.mobile-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-link { color: #fff; font-size: 2.5rem; font-family: var(--font-heading); font-weight: 700; text-decoration: none; transition: 0.3s; cursor: none;}
.mobile-link:hover, .mobile-link.accent { color: var(--primary); transform: scale(1.1); }

/* Sections */
.section {
  min-height: 120vh;
  display: flex;
  align-items: center;
  padding: 100px 5%;
  position: relative;
}
#hero { min-height: 100vh; }
#footer { text-align: center; padding: 40px; border-top: 1px solid var(--card-border); background: var(--card-bg); }

/* Layout Alignments */
.section-content { width: 100%; max-width: 1200px; margin: 0 auto; }
.right-align .section-content { display: flex; justify-content: flex-end; }
.left-align .section-content { display: flex; justify-content: flex-start; }
.center-align .section-content { display: flex; flex-direction: column; align-items: center; }
.text-center { text-align: center; }
.max-w-800 { max-width: 800px; }
.max-w-600 { max-width: 600px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-4 { margin-bottom: 24px; }
.mt-4 { margin-top: 24px; }

/* Typography */
.section-title { font-family: var(--font-heading); font-size: clamp(3rem, 5vw, 4.5rem); font-weight: 700; margin-bottom: 40px; letter-spacing: -1.5px; text-shadow: 2px 4px 10px rgba(0,0,0,0.8); }
.accent { background: linear-gradient(to right, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.hero-content { display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: center; height: 100vh;}
.hero-greeting { font-family: var(--font-heading); color: var(--primary); letter-spacing: 6px; text-transform: uppercase; margin-bottom: 16px; font-weight: 700; font-size: 1.2rem; }
.hero-name { font-size: clamp(4rem, 10vw, 8rem); font-family: var(--font-heading); font-weight: 700; line-height: 1; letter-spacing: -3px; margin-bottom: 24px; text-shadow: 0 10px 40px rgba(0,0,0,0.9); }
.hero-tagline { font-family: var(--font-heading); font-size: 1.8rem; color: #fff; margin-bottom: 40px; height: 40px; font-weight: 500;}
.hero-location { display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; font-size: 1.2rem; font-weight: 600; background: rgba(255,255,255,0.1); padding: 12px 24px; border-radius: 30px; border: 1px solid var(--card-border); backdrop-filter: blur(10px); }

/* High-Contrast Interactive Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.glass-card p { font-size: 1.15rem; margin-bottom: 20px; color: var(--text-secondary); font-weight: 400; line-height: 1.8; }
.glass-card strong { color: #fff; font-weight: 700; }

/* Interactive Tech Tags */
.skill-group { margin-bottom: 40px; }
.skill-group h3 { font-size: 1.4rem; margin-bottom: 20px; color: #fff; font-family: var(--font-heading); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 12px; }
.skill-tag { padding: 10px 20px; border-radius: 20px; background: #1a1a24; font-size: 1rem; font-weight: 600; color: #fff; border: 1px solid var(--card-border); transition: all 0.3s var(--ease); box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.skill-tag.highlight { background: rgba(0, 212, 255, 0.15); border-color: var(--primary); color: var(--primary); }
/* Tag Hover Animation */
.skill-tag:hover { transform: translateY(-5px) scale(1.1); background: var(--primary); color: #000; border-color: #fff; box-shadow: 0 15px 25px rgba(0,212,255,0.4); }

.timeline-header { margin-bottom: 24px; border-bottom: 1px solid var(--card-border); padding-bottom: 24px; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px;}
.timeline-role { font-size: 1.8rem; font-weight: 700; font-family: var(--font-heading); color: #fff; }
.timeline-company { color: var(--primary); font-size: 1.2rem; font-weight: 600; margin-top: 8px; }
.timeline-meta { text-align: right; }
.timeline-date { display: block; color: var(--accent); font-weight: 700; font-family: var(--font-heading); font-size: 1.1rem; }
.timeline-location { color: var(--text-secondary); font-size: 1rem; font-weight: 500;}
.timeline-details { padding-left: 20px; color: var(--text-secondary); list-style-type: disc; }
.timeline-details li { margin-bottom: 12px; font-size: 1.15rem; }

/* Conic Gradient Glowing Cards for Projects */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; width: 100%; max-width: 1200px; }
.project-card { 
  position: relative; 
  padding: 40px; 
  display: flex; 
  flex-direction: column; 
  justify-content: space-between;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  overflow: hidden;
}
/* Magic Hover Border */
.project-card::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: conic-gradient(transparent, transparent, transparent, var(--primary), var(--accent), transparent);
  animation: rotate 4s linear infinite;
  opacity: 0; transition: opacity 0.5s var(--ease);
  z-index: 0;
}
.project-card::after {
  content: ''; position: absolute; inset: 2px;
  background: var(--card-bg); border-radius: 22px; z-index: 1;
}
.project-card > * { position: relative; z-index: 2; }

.project-card:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 30px 60px rgba(0,0,0,0.8); border-color: transparent; }
.project-card:hover::before { opacity: 1; }
@keyframes rotate { 100% { transform: rotate(1turn); } }

.project-title { font-family: var(--font-heading); font-size: 1.8rem; margin-bottom: 16px; color: #fff; font-weight: 700; transition: color 0.3s; }
.project-desc { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 32px; line-height: 1.7; }
.project-tech-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }

.achievements-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; width: 100%;}
.achievement-card { padding: 32px; text-align: center; font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; justify-content: center; min-height: 120px; border: 1px solid var(--card-border); background: var(--card-bg); border-radius: 20px; transition: 0.4s; color: #fff; }
.achievement-card:hover { transform: translateY(-8px) scale(1.05); background: #1a1a24; border-color: var(--primary); box-shadow: 0 20px 40px rgba(0,212,255,0.2); color: var(--primary); }

/* Liquid Sweep Buttons */
.contact-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.btn { padding: 18px 40px; border-radius: 50px; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; text-decoration: none; transition: all 0.4s var(--ease); display: inline-block; position: relative; overflow: hidden; z-index: 1; text-transform: uppercase; letter-spacing: 1px;}
.btn-primary { background: #fff; color: #000; }
.btn-primary::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); z-index: -1; }
.btn-primary:hover { color: #fff; box-shadow: 0 15px 40px rgba(108,99,255,0.4); transform: translateY(-5px); }
.btn-primary:hover::before { transform: scaleX(1); transform-origin: left; }

.btn-outline { border: 2px solid var(--card-border); color: #fff; background: transparent; }
.btn-outline:hover { border-color: var(--primary); background: rgba(0,212,255,0.1); transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,212,255,0.2); }

.scroll-indicator { position: absolute; bottom: 40px; text-align: center; color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: 3px; font-weight: 700; animation: float 2s infinite ease-in-out;}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(15px); } }

/* Reveal Animations (Enhanced) */
.reveal { opacity: 0; transform: translateY(80px); transition: opacity 1s var(--ease), transform 1s var(--ease); will-change: opacity, transform; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media(max-width: 900px) {
  .nav-links, .nav-contact-btn { display: none; }
  .nav-toggle { display: flex; }
  #navbar { width: 95%; top: 16px; padding: 12px 24px; }
  
  .section { min-height: 100vh; padding-top: 120px; padding-bottom: 100px; }
  .right-align .section-content, .left-align .section-content { justify-content: center; }
  .content-block { padding: 32px 20px; }
  .section-title { font-size: 3rem; }
  .hero-name { font-size: clamp(3rem, 12vw, 5rem); }
  .custom-cursor, .custom-cursor-dot { display: none; }
  body { cursor: auto; }
}
