/* ============================================
   CSS Custom Properties & Dark Theme
   ============================================ */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a24;
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1aa;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --border: rgba(255, 255, 255, 0.08);
  --gradient-start: #0a0a0f;
  --gradient-end: #1a1a2e;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

::selection {
  background: var(--accent);
  color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

/* ============================================
   Typography
   ============================================ */
h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

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

section {
  min-height: 100vh;
  padding: 6rem 0;
  position: relative;
}

/* ============================================
   Header & Navigation
   ============================================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo span {
  color: var(--accent);
}

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

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

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

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
  will-change: transform;
}

.hero-content {
  text-align: center;
  z-index: 1;
}

.hero-text {
  max-width: 800px;
  margin: 0 auto;
}

.hero-name {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-title .accent {
  color: var(--text-secondary);
}

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

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.hero-social {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.hero-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.hero-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-indicator svg {
  animation: bounce 2s infinite;
}

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

/* ============================================
   Buttons
   ============================================ */
.btn {
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--accent-glow);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.section-header h2 {
  margin-top: 0.5rem;
}

/* ============================================
   About Section
   ============================================ */
.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-bio {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.about-focus h3,
.about-courses h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.tag {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.about-courses ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.about-courses li {
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding-left: 1.5rem;
  position: relative;
}

.about-courses li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-heading);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ============================================
   Experience Section
   ============================================ */
.experience {
  background: var(--bg-primary);
}

.experience-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.experience-item {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.experience-item:hover {
  border-color: var(--accent);
  transform: translateX(8px);
}

.experience-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  color: var(--accent);
}

.experience-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.experience-date {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.experience-content p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ============================================
   Projects Section
   ============================================ */
.projects {
  background: var(--bg-secondary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 60px var(--accent-glow);
}

.project-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

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

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

.project-tech span {
  padding: 0.25rem 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  font-size: 0.75rem;
  border-radius: 4px;
  font-weight: 500;
}

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

.project-link:hover {
  color: var(--accent);
  gap: 1rem;
}

/* ============================================
   Skills Section
   ============================================ */
.skills {
  background: var(--bg-primary);
}

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

.skill-category {
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.skill-icon {
  font-size: 1.5rem;
}

.skill-category-header h3 {
  font-size: 1.125rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.skill-item span {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.skill-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.skill-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 3px;
  transition: width 1s ease 0.3s;
}

.skill-bar.animate::after {
  width: var(--level);
}

/* ============================================
   Awards Section
   ============================================ */
.awards {
  background: var(--bg-secondary);
}

.awards-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.award-item {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.award-item:hover {
  border-color: var(--accent);
  transform: scale(1.02);
}

.award-rank {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  flex-shrink: 0;
}

.award-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.award-date {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.award-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
  background: var(--bg-primary);
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-intro {
  text-align: center;
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.contact-item:hover {
  border-color: var(--accent);
  transform: translateX(8px);
}

.contact-icon {
  font-size: 1.5rem;
}

.contact-label {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  min-width: 80px;
}

.contact-value {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

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

.footer p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.footer-social {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.footer-social a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: var(--accent);
}

/* ============================================
   Animations
   ============================================ */
.fade-target {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

  .hero-name {
    font-size: 3rem;
  }

  .about-grid {
    gap: 2rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Mobile */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  header {
    padding: 0.75rem 1rem;
  }

  .hamburger {
    display: flex;
  }

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

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

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .hero-content {
    padding-top: 4rem;
  }

  .hero-name {
    font-size: 2.25rem;
  }

  .hero-bio {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: row;
    justify-content: space-around;
  }

  .about-courses ul {
    grid-template-columns: 1fr;
  }

  .experience-item {
    flex-direction: column;
  }

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

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

  .award-item {
    flex-direction: column;
    text-align: center;
  }

  .award-rank {
    margin: 0 auto 1rem;
  }

  .contact-item {
    flex-wrap: wrap;
  }

  .contact-form {
    padding: 0 0.5rem;
  }

  .contact-label {
    min-width: auto;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-name {
    font-size: 1.875rem;
  }

  .hero-title {
    font-size: 1rem;
  }

  .hero-social {
    gap: 1rem;
  }

  .projects-grid {
    gap: 1rem;
  }

  .project-card {
    padding: 1.5rem;
  }
}

/* ============================================
   Performance
   ============================================ */
img {
  max-width: 100%;
  height: auto;
}

@font-face {
  font-display: swap;
}

/* ============================================
   Contact Form
   ============================================ */
.contact-form {
  max-width: 500px;
  margin: 0 auto 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn {
  width: 100%;
  justify-content: center;
}

.contact-divider {
  text-align: center;
  margin: 2rem 0;
  position: relative;
}

.contact-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}

.contact-divider span {
  position: relative;
  background: var(--bg-secondary);
  padding: 0 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}