/* Design System Variables */
:root {
  --background: hsl(240, 20%, 7%);
  --foreground: hsl(210, 40%, 98%);
  --card: hsl(240, 15%, 10%);
  --card-foreground: hsl(210, 40%, 98%);
  --primary: hsl(188, 94%, 55%);
  --primary-foreground: hsl(240, 20%, 7%);
  --secondary: hsl(280, 85%, 65%);
  --secondary-foreground: hsl(240, 20%, 7%);
  --muted: hsl(240, 10%, 15%);
  --muted-foreground: hsl(215, 20%, 65%);
  --border: hsl(240, 10%, 20%);
  --gradient-from: hsl(188, 94%, 55%);
  --gradient-to: hsl(280, 85%, 65%);
  --glass-bg: hsla(240, 15%, 10%, 0.7);
  --glass-border: hsla(240, 10%, 25%, 0.3);
  --glow-primary: hsla(188, 94%, 55%, 0.5);
  --glow-secondary: hsla(280, 85%, 65%, 0.5);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Utility Classes */
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 8px 32px var(--glow-primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 48px var(--glow-primary);
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 1.2rem;
  margin-bottom: 4rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  color: var(--primary-foreground);
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 30px var(--glow-primary);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px var(--glow-primary), 0 0 60px var(--glow-primary);
}

.btn-secondary {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--foreground);
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: hsla(188, 94%, 55%, 0.1);
  transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-delay-1 {
  animation: fadeIn 0.6s ease-out 0.2s forwards;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeIn 0.6s ease-out 0.4s forwards;
  opacity: 0;
}

.fade-in-delay-3 {
  animation: fadeIn 0.6s ease-out 0.6s forwards;
  opacity: 0;
}

.fade-in-delay-4 {
  animation: fadeIn 0.6s ease-out 0.8s forwards;
  opacity: 0;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
  background: transparent;
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px var(--glow-primary);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
}

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

.nav-link {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--foreground);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
}

.mobile-menu.active {
  display: flex;
}

.mobile-link {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, hsla(240, 10%, 20%, 0.3) 1px, transparent 1px),
    linear-gradient(to bottom, hsla(240, 10%, 20%, 0.3) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, transparent 0%, black 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 0%, black 70%);
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr auto; /* text | image */
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-content {
  display: flex;
  flex-direction: column;
}

.hero-image-container {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gradient-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(
    from 0deg,
    #00f 0deg,
    #0ff 90deg,
    #00f 180deg,
    #0ff 270deg,
    #00f 360deg
  );
  animation: spin 4s linear infinite;
}

.gradient-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  filter: blur(12px);
  z-index: -1;
}

.hero-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid transparent;
  position: relative; /* fixed while ring rotates */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive layout: tablet / mobile */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;      /* single column */
    justify-items: center;           /* center content */
    text-align: center;
  }

  .hero-content {
    align-items: center;             /* center text and buttons */
  }

  .hero-image-container {
    margin: 2rem 0;                  /* spacing between text and buttons */
  }

  .hero-buttons {
    justify-content: center;
    gap: 1rem;
  }
}

.hero-greeting {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.hero-name {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  line-height: 1.8;
}

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

.hero-3d {
  width: 100%;
  height: 500px;
  position: relative;
}

#hero-canvas {
  width: 100%;
  height: 100%;
}

.scroll-indicator {
  display: flex;
  justify-content: center;
  margin-top: 2rem; /* spacing below buttons */
  animation: float 3s ease-in-out infinite;
  position: relative; /* remove absolute positioning */
}
.scroll-arrow {
  width: 30px;
  height: 50px;
  border: 2px solid var(--primary);
  border-radius: 15px;
  position: relative;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@media (max-width: 768px) {
  .hero-container {
    display: flex;
    flex-direction: column;
    align-items: center; /* centers everything horizontally */
    text-align: center;
  }

  .hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

 .scroll-indicator {
    position: relative;   /* flows naturally */
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 2rem;     /* existing spacing */
  }
}
/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-text {
  color: var(--muted-foreground);
  line-height: 1.8;
}

.qualifications {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: center;
}

.qualification-item {
  text-align: center;
}

.qualification-title {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.qualification-text {
  color: var(--muted-foreground);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.feature-card {
  text-align: center;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.feature-text {
  color: var(--muted-foreground);
}

/* Skills Section */
.skills-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.skills-proficiency {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.skills-subtitle {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.skill-bar {
  height: 8px;
  background: var(--muted);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  border-radius: 4px;
  transition: width 1s ease-out;
}

.skills-categories {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.category-card {
  padding: 1.5rem;
}

.category-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-tag {
  padding: 0.5rem 1rem;
  background: var(--muted);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tech-tag:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  transform: scale(1.05);
}

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

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

.project-image {
  width: 100%;
  height: 100%; /* fixed height for uniformity */
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* hide anything overflowing */
}

.project-image .brand-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fills the container without stretching */
}


.project-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.project-description {
  color: var(--muted-foreground);
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-badge {
  padding: 0.25rem 0.75rem;
  background: var(--muted);
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.project-links {
  display: flex;
  gap: 1.5rem;
  margin-top: auto;
  padding-top: 1rem;
}

.project-link {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

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

/* Contact Section */
.contact-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem;
}

.contact-btn {
  display: inline-block;
  margin: 0 auto 2rem;
  text-align: center;
}

@media (max-width: 600px) {
  .contact-card {
    padding: 2rem 1rem;
  }

  .contact-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 1.5rem;
  }
}


.contact-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.contact-text {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  line-height: 1.8;
}

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

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--foreground);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.social-link:hover {
  color: var(--primary);
  transform: scale(1.1);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--muted-foreground);
}

.contact-location,
.contact-availability {
  font-size: 0.9rem;
}

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-text {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-3d {
    order: -1;
    height: 400px;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-name {
    font-size: 2.5rem;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    text-align: center;
  }
}