:root {
  --bg-color: #05050f;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --accent-1: #6366f1;
  --accent-2: #a855f7;
  --accent-3: #ec4899;
  --nav-bg: rgba(10, 10, 20, 0.6);
  --card-bg: rgba(255, 255, 255, 0.03);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Custom Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: width 0.3s, height 0.3s;
  mix-blend-mode: screen;
}

/* Glassmorphism utility */
.glass {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Typography */
.text-gradient {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientFlow 5s ease infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.highlight {
  color: var(--accent-1);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-links a:not(.btn-primary)::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-1);
  transition: width 0.3s ease;
}

.nav-links a:not(.btn-primary):hover::after {
  width: 100%;
}

/* Buttons */
button, .btn-primary, .btn-secondary {
  font-family: inherit;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-primary {
  padding: 0.8rem 1.8rem;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  padding: 0.8rem 1.8rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Main Layout */
main {
  padding-top: 100px;
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10%;
  position: relative;
}

.hero-content {
  max-width: 600px;
  z-index: 10;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-2);
  margin-bottom: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.title {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -2px;
}

.description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

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

/* Hero Visuals */
.hero-visual {
  position: relative;
  width: 40vw;
  height: 40vw;
  max-width: 600px;
  max-height: 600px;
  z-index: 1;
}

.abstract-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: var(--accent-1);
  top: 10%;
  right: 20%;
  animation: float 8s ease-in-out infinite;
}

.shape-2 {
  width: 250px;
  height: 250px;
  background: var(--accent-3);
  bottom: 10%;
  left: 10%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

/* Initial Hidden State for Intro Animations */
.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Sections */
.section {
  padding: 100px 10%;
}

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

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

.project-card {
  border-radius: 20px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.4s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.placeholder-img {
  width: 100%;
  height: 250px;
  background: linear-gradient(45deg, #1f2937, #374151);
  position: relative;
  overflow: hidden;
}

.placeholder-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  100% { left: 200%; }
}

.project-info {
  padding: 2rem;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  min-height: 5.5rem; /* Ensures consistent height for 2-line titles to align subtitles */
}

.project-info p {
  color: var(--text-secondary);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

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

/* Responsive */
@media (max-width: 900px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(255,255,255,0.1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 1000;
  }

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

  .mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 120px;
    padding-left: 5%;
    padding-right: 5%;
  }
  
  .title { font-size: 2.8rem; }
  .description { margin: 0 auto 2.5rem; }
  .cta-group { justify-content: center; }
  .social-group { justify-content: center; }
  
  .hero-visual {
    margin-top: 3rem;
    width: 80vw;
    height: 80vw;
  }
  
  .section { padding: 80px 5%; }
  .section-title { font-size: 2.2rem; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .title { font-size: 2.2rem; }
  .subtitle { font-size: 1rem; }
  .hero-visual { width: 90vw; height: 90vw; margin-top: 2rem; }
  .cert-grid { grid-template-columns: 1fr; }
  .cta-group { flex-direction: column; gap: 1rem; width: 100%; }
  .cta-group a { width: 100%; }
}

/* Expandable Card Styles */
.expandable-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.expandable-card .card-header {
  padding: 2rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.expandable-card.expanded .card-header {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
}

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

.chevron {
  transition: transform 0.3s ease;
}

.expandable-card.expanded .chevron {
  transform: rotate(180deg);
}

.card-details {
  max-height: 0;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 2rem;
}

.expandable-card.expanded .card-details {
  max-height: 1200px;
  opacity: 1;
  padding: 2rem;
  padding-top: 0.5rem;
}

.details-section {
  margin-bottom: 1.5rem;
}

.details-section h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.details-section p {
  color: #d1d5db;
  font-size: 0.95rem;
  line-height: 1.6;
}

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

.feature-box {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-box h5 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.feature-box p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid;
  background: rgba(0, 0, 0, 0.2);
}

.outline-orange {
  border-color: #f97316;
  color: #fb923c;
}

.outline-gray {
  border-color: rgba(255, 255, 255, 0.2);
  color: #d1d5db;
}

.ask-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
  margin-top: 1rem;
}

.ask-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Drawings Section */
.drawings-section {
  padding-top: 50px;
}

.drawings-grid {
  column-count: 3;
  column-gap: 1.5rem;
  padding: 1rem 0;
}

@media (max-width: 900px) {
  .drawings-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .drawings-grid {
    column-count: 1;
  }
}

.drawing-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.drawing-item:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  border-color: rgba(168, 85, 247, 0.3);
}

.drawing-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}

.drawing-item:hover img {
  transform: scale(1.05);
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 95%;
  max-height: 95vh;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 2001;
}

.lightbox-close:hover {
  color: var(--accent-1);
}

/* Tech Stack Marquee */
.marquee-container {
  width: 100%;
  padding: 1.5rem 0;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 2rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.marquee-content {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-around;
  gap: 2rem;
  min-width: 100%;
  animation: scroll-marquee 25s linear infinite;
}

.marquee-content span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.marquee-content .dot {
  color: var(--accent-1);
}

@keyframes scroll-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 2rem));
  }
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

/* Certificates Section */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.6rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.filter-btn.active {
  background: var(--accent-1);
  color: white;
  border-color: var(--accent-1);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

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

.cert-item {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
}

.cert-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.cert-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  border-color: rgba(99, 102, 241, 0.3);
}

.cert-item:hover img {
  transform: scale(1.05);
}

.cert-item.hide {
  display: none;
}
