/* ===== Variables ===== */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary-color: #64748b;
  --text-color: #1e293b;
  --text-light: #64748b;
  --bg-color: #ffffff;
  --bg-secondary: #f8fafc;
  --border-color: #e2e8f0;
  --success-color: #10b981;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --header-height: 70px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Container ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-menu a {
  color: var(--text-color);
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.2s ease;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-color);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text-color);
  left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* ===== Hero Section ===== */
.hero {
  padding: 160px 0 100px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-color) 100%);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
  align-items: center;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-text .tagline {
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-text .description {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 32px;
  max-width: 500px;
}

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

.hero-image {
  text-align: center;
}

.hero-image img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-color);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
}

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

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

/* ===== Section Styles ===== */
section {
  padding: 80px 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 48px;
  text-align: center;
}

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

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

.project-card {
  background: var(--bg-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.project-card-image {
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-image .placeholder-icon {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.8);
}

.project-card-content {
  padding: 24px;
}

.project-card-content h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.project-card-content h3 a {
  color: var(--text-color);
}

.project-card-content h3 a:hover {
  color: var(--primary-color);
}

.project-card-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-secondary);
  color: var(--text-light);
  font-size: 0.85rem;
  border-radius: 20px;
}

.skill-tag {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 25px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.about-text h2 {
  font-size: 1.75rem;
  margin-bottom: 24px;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.education {
  margin-top: 32px;
}

.education h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.education-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-light);
}

.education-item i {
  color: var(--primary-color);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-item {
  background: var(--bg-secondary);
  padding: 16px 20px;
  border-radius: 8px;
}

.skill-item .skill-name {
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

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

.skill-bar .fill {
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
}

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

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

.contact-content p {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: var(--bg-color);
  border-radius: 8px;
  color: var(--text-color);
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.contact-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: var(--primary-color);
}

.contact-link i {
  font-size: 1.25rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--text-color);
  color: white;
  padding: 60px 0 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.footer-info p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-info .location {
  margin-top: 8px;
}

.footer-info .location i {
  margin-right: 8px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  transition: all 0.2s ease;
}

.footer-social a:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.footer-bottom {
  padding-top: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* ===== Project Detail Page ===== */
.project-detail {
  padding-top: 120px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  margin-bottom: 32px;
}

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

.project-header {
  margin-bottom: 32px;
}

.project-header h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.project-tagline {
  font-size: 1.25rem;
  color: var(--text-light);
}

.project-image {
  margin-bottom: 32px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.project-meta .tech-stack {
  flex: 1;
}

.project-content {
  max-width: 800px;
}

.project-content h2 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
}

.project-content ul {
  margin-left: 24px;
  margin-bottom: 16px;
}

.project-content li {
  margin-bottom: 8px;
  color: var(--text-light);
}

/* ===== Page Content ===== */
.page-content {
  padding-top: 120px;
  min-height: 60vh;
}

.page-title {
  font-size: 2.5rem;
  margin-bottom: 32px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-color);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    display: none;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image {
    order: -1;
  }

  .hero-image img {
    width: 200px;
    height: 200px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text .description {
    max-width: none;
  }

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

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

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

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .contact-links {
    flex-direction: column;
  }
}
