/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  /* Colors */
  --bg-color: #050810;
  --bg-secondary: #0a0f1d;
  --panel-bg: rgba(14, 21, 37, 0.65);
  --panel-border: rgba(0, 255, 204, 0.15);
  --accent-primary: #00ffcc;     /* Neon hacker green */
  --accent-secondary: #0088ff;   /* Electric blue */
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;

  /* Typography */
  --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, monospace;

  /* Other */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 8px;
  --nav-height: 80px;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

/* Grid Background Effect (The Road) */
.cyber-grid {
  position: fixed;
  top: 40%;
  left: -50%;
  width: 200vw;
  height: 100vh;
  background-image: 
    linear-gradient(rgba(0, 255, 204, 0.15) 2px, transparent 2px),
    linear-gradient(90deg, rgba(0, 255, 204, 0.1) 2px, transparent 2px);
  background-size: 60px 60px;
  z-index: -2;
  pointer-events: none;
  transform-origin: top center;
  transform: perspective(600px) rotateX(75deg);
  mask-image: linear-gradient(to top, black 10%, transparent 90%);
  -webkit-mask-image: linear-gradient(to top, black 10%, transparent 90%);
}

/* 3D Code Clouds Environment */
#road-container {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  perspective: 1200px;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

#camera {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
}

.code-cloud {
  position: absolute;
  top: 50%; left: 50%;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.3;
  opacity: 0.15;
  white-space: pre;
  text-shadow: 0 0 10px var(--accent-primary);
  pointer-events: none;
  transform-style: preserve-3d;
  filter: blur(1px);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 100px 0;
  min-height: 60vh;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
.mono-text { font-family: var(--font-mono); }
.text-accent { color: var(--accent-primary); }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.85rem; }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: flex-start; }
.justify-center { justify-content: center; }

h1, h2, h3, h4, h5 { font-weight: 600; color: #fff; line-height: 1.3; }

.section-title {
  display: flex;
  align-items: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  white-space: nowrap;
}

.section-title::after {
  content: "";
  display: block;
  height: 1px;
  width: 300px;
  max-width: 100%;
  background-color: var(--panel-border);
  margin-left: 1.5rem;
}

.subsection-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
  color: var(--text-main);
  border-left: 3px solid var(--accent-primary);
  padding-left: 10px;
}

.nav-num {
  font-family: var(--font-mono);
  color: var(--accent-primary);
  font-size: 0.8em;
  font-weight: 400;
  margin-right: 10px;
}

/* ==========================================================================
   Components (Buttons, Panels)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--panel-bg);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(0, 255, 204, 0.1);
}

.btn-primary:hover {
  background-color: rgba(0, 255, 204, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: var(--text-muted);
  color: var(--text-main);
}

.btn-outline:hover {
  border-color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-panel:hover {
  border-color: rgba(0, 255, 204, 0.4);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 204, 0.1);
  transform: translateY(-5px);
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.glass-panel:hover::before {
  transform: translateX(100%);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--panel-border);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  background-color: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  height: 70px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
  border-bottom-color: var(--panel-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
}

.blink {
  animation: blink-anim 1s step-end infinite;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--accent-primary);
}

.menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--accent-primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero-title {
  font-size: clamp(40px, 8vw, 80px);
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.hero-subtitle {
  font-size: clamp(30px, 6vw, 60px);
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-desc {
  max-width: 600px;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.edu-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.edu-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tags span {
  background-color: rgba(0, 255, 204, 0.05);
  color: var(--accent-primary);
  border: 1px solid rgba(0, 255, 204, 0.2);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  transition: var(--transition);
  cursor: default;
}

.skill-tags span:hover {
  background-color: rgba(0, 255, 204, 0.15);
  transform: translateY(-2px);
}

/* ==========================================================================
   Experience Timeline
   ========================================================================== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30px;
  height: 100%;
  width: 2px;
  background: var(--panel-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 80px;
  background: transparent;
  border: none;
}

.timeline-item:hover {
  transform: none;
  box-shadow: none;
}

.timeline-content {
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  transition: var(--transition);
}

.timeline-content:hover {
  border-color: rgba(0, 255, 204, 0.4);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.timeline-marker {
  position: absolute;
  top: 25px;
  left: 23px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  z-index: 1;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--accent-primary);
  background: rgba(0, 255, 204, 0.1);
  padding: 4px 10px;
  border-radius: 15px;
}

.timeline-list {
  margin-top: 1rem;
  padding-left: 1rem;
  color: var(--text-muted);
}

.timeline-list li {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Projects & Certs
   ========================================================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-links a {
  color: var(--text-main);
  font-size: 1.2rem;
  transition: var(--transition);
}

.project-links a:hover {
  color: var(--accent-primary);
}

.project-card p {
  color: var(--text-muted);
  flex-grow: 1;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.cert-card {
  align-items: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--panel-border);
  background-color: var(--bg-secondary);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.social-links a {
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--accent-primary);
  transform: translateY(-3px);
}

/* ==========================================================================
   Animations & Responsive
   ========================================================================== */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .section-title::after {
    width: 100px;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .menu-btn {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    right: -100%;
    flex-direction: column;
    background: var(--bg-color);
    width: 100%;
    height: calc(100vh - var(--nav-height));
    padding: 3rem;
    transition: 0.4s ease-in-out;
    border-top: 1px solid var(--panel-border);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li {
    margin: 1.5rem 0;
    text-align: center;
    font-size: 1.2rem;
  }
  
  .timeline::before {
    left: 15px;
  }
  .timeline-marker {
    left: 8px;
  }
  .timeline-item {
    padding-left: 45px;
  }
  
  .flex-between {
    flex-direction: column;
    gap: 10px;
  }
}
