/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
  /* Modern Color Palette */
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --bg-card: rgba(26, 26, 46, 0.8);
  --bg-card-hover: rgba(22, 33, 62, 0.95);
  
  --text-primary: #ffffff;
  --text-secondary: #b8b8d4;
  --text-tertiary: #8b8ba7;
  
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #ec4899;
  --accent-glow: rgba(99, 102, 241, 0.3);
  
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  
  /* Spacing */
  --nav-height: 80px;
  --nav-scroll-height: 70px;
  --section-padding: 120px 0;
  
  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px var(--accent-glow);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(48px, 8vw, 96px);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(36px, 6vw, 64px);
}

h3 {
  font-size: clamp(24px, 4vw, 36px);
}

p {
  margin: 0 0 20px 0;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.8;
}

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

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(15, 15, 35, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  height: var(--nav-scroll-height);
  background: rgba(15, 15, 35, 0.95);
  box-shadow: var(--shadow-md);
}

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

.nav-logo a {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 2px solid var(--accent-primary);
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-logo a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent-primary);
  transition: var(--transition);
  z-index: -1;
}

.nav-logo a:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.nav-logo a:hover::before {
  left: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
  align-items: center;
  counter-reset: nav-counter;
}

.nav-menu li {
  counter-increment: nav-counter;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
  position: relative;
  transition: var(--transition);
}

.nav-link::before {
  content: '0' counter(nav-counter) '.';
  margin-right: 8px;
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 600;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
  z-index: 1001;
}

.nav-toggle span {
  width: 28px;
  height: 3px;
  background: var(--accent-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--nav-height) 40px 40px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  z-index: 0;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  top: -300px;
  left: -300px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-tertiary) 0%, transparent 70%);
  bottom: -250px;
  right: -250px;
  animation-delay: 5s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 30px) scale(0.9);
  }
}

.hero-content {
  max-width: 960px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.hero-text {
  animation: fadeInUp 1s ease-out;
}

.hero-greeting {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 500;
  color: var(--accent-primary);
  margin-bottom: 20px;
  animation: fadeIn 0.8s ease-out 0.2s both;
}

.hero-name {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 30px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 50%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.name-line {
  display: block;
}

.hero-description {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 50px;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 1;
  animation: bounce 2s infinite;
}

.mouse {
  width: 28px;
  height: 48px;
  border: 2px solid var(--text-tertiary);
  border-radius: 14px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 10px;
  background: var(--accent-primary);
  border-radius: 2px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll 2s infinite;
}

@keyframes scroll {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

.scroll-indicator .arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.scroll-indicator .arrow span {
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg);
  opacity: 0.7;
  animation: arrow-fade 1.5s infinite;
}

.scroll-indicator .arrow span:nth-child(2) {
  animation-delay: 0.2s;
}

.scroll-indicator .arrow span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes arrow-fade {
  0% {
    opacity: 0;
    transform: rotate(45deg) translateY(-4px);
  }
  50% {
    opacity: 0.8;
    transform: rotate(45deg) translateY(0);
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translateY(4px);
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  transition: var(--transition);
  z-index: -1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.btn-primary::before {
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:hover::before {
  left: 0;
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--text-tertiary);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  transform: translateY(-3px);
}

.btn-large {
  padding: 20px 48px;
  font-size: 18px;
}

/* ============================================
   Sections
   ============================================ */
section {
  padding: var(--section-padding);
  position: relative;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 80px;
}

.section-number {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--accent-primary);
  opacity: 0.8;
}

.section-title {
  font-size: clamp(36px, 6vw, 64px);
  white-space: nowrap;
  color: var(--text-primary);
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-primary), transparent);
  margin-left: 24px;
}

/* ============================================
   About Section
   ============================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}

.about-text p {
  margin-bottom: 24px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.9;
}

.tech-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 220px));
  gap: 12px 24px;
  padding: 0;
  margin: 32px 0 0 0;
  list-style: none;
}

.tech-list li {
  position: relative;
  padding-left: 24px;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 16px;
  transition: var(--transition);
}

.tech-list li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-size: 18px;
}

.tech-list li:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

/* ============================================
   Projects Section
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
  margin-top: 60px;
}

.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.2);
}

.project-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.project-label {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-title {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.project-description {
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.project-description p {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.8;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  list-style: none;
  position: relative;
  z-index: 1;
}

.project-tech li {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  transition: var(--transition);
}

.project-tech li:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.project-links {
  display: flex;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.project-link {
  color: var(--text-secondary);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: var(--transition);
  background: rgba(99, 102, 241, 0.05);
}

.project-link:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.15);
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-glow);
}

/* ============================================
   Skills Section
   ============================================ */
.skills-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin-top: 60px;
}

.skill-category {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 20px;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-category:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.3);
  background: var(--bg-card-hover);
}

.skill-category-title {
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 28px;
  font-family: var(--font-display);
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-item {
  padding: 10px 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: default;
}

.skill-item:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-glow);
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
  text-align: center;
}

.contact-description {
  max-width: 700px;
  margin: 0 auto 60px;
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 60px;
}

.social-link {
  color: var(--text-secondary);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: var(--transition);
  background: rgba(99, 102, 241, 0.05);
}

.social-link:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.15);
  transform: translateY(-5px) scale(1.1);
  box-shadow: var(--shadow-glow);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  text-align: center;
  padding: 60px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 80px;
}

.footer p {
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 15px;
  margin: 8px 0;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.8s ease-out both;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 60px;
    text-align: center;
  }

  .hero-image {
    order: -1;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .about-image {
    order: -1;
  }

  .project-card.featured {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 24px;
  }

  .nav-menu {
  position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
    transform: translateX(100%);
  transition: var(--transition);
    box-shadow: var(--shadow-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  .nav-toggle {
  display: flex;
}

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .hero {
    padding: calc(var(--nav-height) + 20px) 24px 40px;
  }

  .hero-content {
    gap: 40px;
  }

  .image-wrapper {
    width: 280px;
    height: 280px;
  }

  .container {
    padding: 0 24px;
  }

  section {
    padding: 80px 0;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .section-title {
    white-space: normal;
  }

  .section-line {
    display: none;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .skills-content {
    grid-template-columns: 1fr;
  }

  .tech-list {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    justify-content: center;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 42px;
  }

  .section-title {
    font-size: 32px;
  }

  .project-card {
    padding: 28px;
  }

  .skill-category {
    padding: 28px;
  }
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-secondary), var(--accent-tertiary));
}
