/* ===== CSS Variables ===== */
:root {
  /* Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-bg: #eef2ff;
  
  --secondary: #ec4899;
  --secondary-dark: #db2777;
  --secondary-light: #f472b6;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* Neutral Colors */
  --black: #000000;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
}

p {
  color: var(--gray-600);
}

strong {
  color: var(--gray-800);
  font-weight: 600;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  background: transparent;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar.scrolled .nav-brand {
  -webkit-text-fill-color: var(--primary);
  background-clip: unset;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-700);
  position: relative;
  padding: 4px 0;
}

.navbar.scrolled .nav-links a {
  color: var(--gray-800);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-base);
}

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

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 80px;
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 700px;
}

.hero-greeting {
  font-size: 18px;
  color: var(--primary-light);
  margin-bottom: 16px;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--white), var(--gray-200));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 600;
  color: var(--gray-300);
  margin-bottom: 24px;
  line-height: 1.4;
}

.hero-description {
  font-size: 18px;
  color: var(--gray-400);
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

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

.hero-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-300);
  font-size: 15px;
}

.contact-item a {
  color: var(--gray-300);
  transition: color var(--transition-fast);
}

.contact-item a:hover {
  color: var(--primary-light);
}

.contact-icon {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray-400);
  font-size: 13px;
  animation: bounce 2s infinite;
}

.hero-scroll svg {
  width: 24px;
  height: 24px;
}

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

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

.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: var(--gray-900);
}

/* ===== About Section ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-text p {
  font-size: 18px;
  color: var(--gray-600);
}

.about-education {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.about-education h3 {
  font-size: 20px;
  margin-bottom: 24px;
  color: var(--gray-800);
}

.education-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-200);
}

.education-item:last-child {
  border-bottom: none;
}

.education-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.education-header h4 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-800);
}

.education-degree {
  font-size: 15px;
  color: var(--gray-500);
  font-weight: 400;
}

.education-meta {
  display: flex;
  gap: 20px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--gray-500);
}

/* ===== Experience Section ===== */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.experience-card {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-200);
}

.experience-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.experience-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.experience-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 18px;
}

.experience-info h3 {
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--gray-800);
}

.experience-info p {
  font-size: 15px;
  color: var(--gray-500);
  font-weight: 500;
}

.experience-period {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.experience-description {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
}

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

.project-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-200);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.project-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.project-badge {
  padding: 4px 10px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

.project-header h3 {
  font-size: 18px;
  color: var(--gray-800);
}

.project-description {
  font-size: 15px;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.project-awards {
  margin-bottom: 12px;
}

.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray-500);
}

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

.skill-category {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.skill-category h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--gray-800);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-tag {
  padding: 8px 16px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.languages-section {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  margin-bottom: 40px;
}

.languages-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--gray-800);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--secondary-light);
}

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

.language-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.language-name {
  font-weight: 600;
  color: var(--gray-800);
}

.language-level {
  font-size: 14px;
  color: var(--gray-500);
}

.hobbies-section {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
}

.hobbies-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--gray-800);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--success);
}

.hobbies-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hobby-tag {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--primary-bg), var(--secondary-bg));
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.hobby-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== Contact Section ===== */
.contact-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-intro {
  font-size: 18px;
  color: var(--gray-600);
  margin-bottom: 48px;
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-base);
  text-align: left;
}

.contact-method:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.contact-icon-wrapper {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon-wrapper svg {
  width: 28px;
  height: 28px;
  stroke: var(--white);
}

.contact-info h4 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--gray-800);
}

.contact-info a,
.contact-info span {
  font-size: 15px;
  color: var(--gray-600);
}

.contact-info a:hover {
  color: var(--primary);
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 60px 0 0;
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  border-bottom: 1px solid var(--gray-700);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand .nav-brand {
  font-size: 28px;
  -webkit-text-fill-color: var(--white);
}

.footer-brand p {
  color: var(--gray-400);
  font-size: 15px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-column h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 8px;
}

.footer-column a {
  color: var(--gray-400);
  font-size: 15px;
  transition: color var(--transition-fast);
}

.footer-column a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
}

/* ===== Scroll to Top ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  z-index: 1000;
}

.scroll-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.scroll-top svg {
  width: 24px;
  height: 24px;
  stroke: var(--white);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-contact {
    align-items: flex-start;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }
  
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 150px 0 60px;
  }
  
  .hero-description {
    font-size: 16px;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-cta .btn {
    width: 100%;
  }
  
  .hero-scroll {
    display: none;
  }
  
  .section-header {
    margin-bottom: 40px;
  }
  
  .experience-card {
    padding: 20px;
  }
  
  .project-card {
    padding: 20px;
  }
  
  .contact-methods {
    grid-template-columns: 1fr;
  }
  
  .contact-method {
    padding: 20px;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  :root {
    --section-padding: 60px 0;
  }
  
  .hero {
    padding: 120px 0 40px;
  }
  
  .hero-greeting {
    font-size: 16px;
  }
  
  .hero-subtitle {
    font-size: 20px;
  }
  
  .hero-description {
    font-size: 15px;
  }
  
  .section-title {
    font-size: 32px;
  }
  
  .experience-grid {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .language-grid {
    grid-template-columns: 1fr;
  }
  
  .hobbies-tags {
    justify-content: center;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Add animation classes to elements via JavaScript */
/* This would be handled by a separate Intersection Observer script */
