/* ==========================================================================
   Design System & Variables
   ========================================================================== */
:root {
  /* Colors */
  --bg-primary: #0f172a;
  /* Dark slate */
  --bg-secondary: #1e293b;
  /* Lighter slate */
  --bg-tertiary: #334155;

  --accent-primary: #3b82f6;
  /* Vibrant Blue */
  --accent-secondary: #8b5cf6;
  /* Vibrant Purple */
  --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Glassmorphism */
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(12px);

  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Spacing */
  --section-padding: 6rem 2rem;
  --border-radius: 16px;

  /* Animation */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography Utilities */
.highlight {
  color: var(--accent-primary);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-alt {
  background-color: rgb(11, 17, 32);
  /* Slightly darker for contrast */
}

/* ==========================================================================
     Components
     ========================================================================== */

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--accent-primary);
}

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

/* Glass Panels */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

/* Section Layout */
.section {
  padding: var(--section-padding);
  position: relative;
  z-index: 1;
}

.container {
  max-width: 2200px;
  margin: 0 auto;
  width: 95%;
  /* Use 95% to allow a tiny bit of breathing room on huge monitors */
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
     Navigation
     ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: var(--transition);
  padding: 1.5rem 2rem;
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 2200px;
  width: 95%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-secondary);
}

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

.nav-cta {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: var(--transition);
}

/* ==========================================================================
     Hero Section
     ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 8rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
  z-index: -1;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* Fallback for when container is flex instead of grid in HTML, matching my HTML structure */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 2200px;
  margin: 0 auto;
  gap: 4rem;
  width: 95%;
  padding-left: 2rem;
  padding-right: 2rem;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 90%;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero Visuals (Orbs and floating cards) */
.hero-visual {
  position: relative;
  /* Adjust height to be responsive, but keep a good minimum */
  min-height: 500px;
  height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.glass-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
  opacity: 0.6;
  animation: float 8s ease-in-out infinite alternate;
}

.orb-1 {
  width: 25vw;
  height: 25vw;
  max-width: 400px;
  max-height: 400px;
  background: var(--accent-primary);
  top: 5%;
  right: 5%;
}

.orb-2 {
  width: 20vw;
  height: 20vw;
  max-width: 350px;
  max-height: 350px;
  background: var(--accent-secondary);
  bottom: 5%;
  left: 5%;
  animation-delay: -4s;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  padding: 1.5rem;
  border-radius: 12px;
  width: 280px;
  position: absolute;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.floating {
  animation: floatCard 6s ease-in-out infinite alternate;
}

.delay-1 {
  animation-delay: -3s;
}

.glass-card h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.glass-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.card-icon {
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.1);
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.skill-card {
  text-align: left;
}

.icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.skill-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.skill-card p {
  color: var(--text-secondary);
}

/* Timeline */
.accomplishments {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 3rem;
}

.accomplishments h3 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1.75rem;
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

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

.timeline li {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline li:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-content h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-content p {
  color: var(--text-secondary);
}

/* ==========================================================================
     Media Section
     ========================================================================== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.media-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.yt-icon {
  background: #FF0000;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.in-icon {
  background: #0077B5;
  box-shadow: 0 4px 15px rgba(0, 119, 181, 0.3);
}

.tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  font-weight: 600;
}

.feature-card p:not(.tag) {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.card-link {
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  display: inline-flex;
  align-items: center;
}

.card-link:hover {
  color: var(--accent-primary);
}

.video-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.video-showcase h3 {
  text-align: center;
  font-size: 1.75rem;
}

.video-wrapper {
  aspect-ratio: 16/9;
  padding: 0;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.video-placeholder span {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.video-placeholder p {
  font-size: 0.875rem;
}

/* ==========================================================================
     STAR Projects Section
     ========================================================================== */
.star-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .star-grid {
    grid-template-columns: 1fr;
  }
}

.star-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.star-card h3 {
  font-size: 1.35rem;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.8rem;
}

.star-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.star-content p strong {
  color: var(--accent-primary);
  font-weight: 600;
  display: inline-block;
  margin-right: 0.3rem;
}

.star-content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
     Projects Section
     ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

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

.project-card h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.project-tag {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.project-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

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

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

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  flex-grow: 1;
}

.text-link {
  color: var(--accent-primary);
  font-weight: 600;
}

.text-link:hover {
  color: var(--accent-secondary);
}

/* ==========================================================================
     Footer / Contact CTA
     ========================================================================== */
.contact-box {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.contact-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  z-index: 0;
}

.contact-box>* {
  position: relative;
  z-index: 1;
}

.contact-box p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 1.5rem auto 2.5rem;
  max-width: 600px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-bottom {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-secondary);
}

/* ==========================================================================
     Animations
     ========================================================================== */
@keyframes float {
  0% {
    transform: translate(0, 0);
  }

  100% {
    transform: translate(30px, -30px);
  }
}

@keyframes floatCard {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-15px);
  }
}

/* Fade In Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.fade-delay {
  transition-delay: 0.2s;
}

/* ==========================================================================
     Responsive Design
     ========================================================================== */
@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 7rem;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-visual {
    display: none;
    /* Hide complex visuals on mobile for cleaner look */
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }

  .hamburger {
    display: flex;
    z-index: 101;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    transition: var(--transition);
    z-index: 100;
  }

  .nav-links.active {
    right: 0;
  }

  .accomplishments {
    padding: 2rem 1rem;
  }

  .timeline-dot {
    left: -2.15rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .btn {
    width: 100%;
  }

  .contact-links {
    flex-direction: column;
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}