:root {
  /* Light Theme Palette */
  --md-primary: #6200ee;
  --md-primary-variant: #3700b3;
  --md-secondary: #03dac6;
  --md-background: #ffffff;
  --md-surface: #f5f5f5;
  --md-error: #b00020;
  --md-on-primary: #ffffff;
  --md-on-secondary: #000000;
  --md-on-background: #000000;
  --md-on-surface: #000000;
  --md-type: #000000;
  --shadow-1: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-2: 0 4px 8px rgba(0,0,0,0.2);

  /* Transitions */
  --transition: all 0.3s ease;
}

[data-theme="dark"] {
  --md-primary: #bb86fc;
  --md-primary-variant: #9965f4;
  --md-secondary: #03dac6;
  --md-background: #121212;
  --md-surface: #1f1f1f;
  --md-error: #cf6e8b;
  --md-on-primary: #ffffff;
  --md-on-secondary: #000000;
  --md-on-background: #ffffff;
  --md-on-surface: #ffffff;
  --md-type: #ffffff;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', 'Helvetica', sans-serif;
  background-color: var(--md-background);
  color: var(--md-on-background);
  transition: var(--transition);
}

header, footer {
  background-color: var(--md-surface);
  padding: 1rem;
  box-shadow: var(--shadow-1);
}

.btn {
  padding: 10px 24px;
  border-radius: 4px;
  border: none;
  background-color: var(--md-primary);
  color: var(--md-on-primary);
  font-weight: bold;
  cursor: pointer;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 60px 0;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 30px;
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--md-surface);
  padding: 24px 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--md-on-surface);
}

.project-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.project-info {
  flex: 1;
  margin-right: 24px;
}

.project-info h3 {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
  font-weight: 500;
}

.project-info p {
  margin: 0;
  line-height: 1.6;
  color: var(--md-on-surface);
  opacity: 0.8;
}

.project-image-placeholder {
  width: 80px;
  height: 80px;
  min-width: 80px;
  border-radius: 12px;
  border: 2px dashed var(--md-primary);
  opacity: 0.4;
}

.project-image {
  width: 80px;
  height: 80px;
  min-width: 80px;
  border-radius: 12px;
  object-fit: cover;
}

.card {
  background: var(--md-surface);
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.badge {
  padding: 6px 12px;
  background: var(--md-primary);
  color: var(--md-on-primary);
  border-radius: 20px;
  font-size: 0.9rem;
}

.gallery img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1);
}

/* ===== Header ===== */

header {
  background-color: var(--md-surface);
  padding: 20px 0;
  box-shadow: var(--shadow-1);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: inherit;
  flex-wrap: wrap;
  gap: 12px;
}

header nav a {
  color: var(--md-on-surface);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

header nav a:hover {
  color: var(--md-primary);
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--md-on-surface);
}

/* ===== Nav Links ===== */

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 24px;
}

.nav-links a {
  text-decoration: none;
  color: var(--md-on-surface);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}

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

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

/* ===== Theme Switch ===== */

.theme-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 8px;
}

.theme-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--md-on-surface);
  opacity: 0.75;
  white-space: nowrap;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  display: block;
  width: 48px;
  height: 26px;
  border-radius: 26px;
  background-color: var(--md-on-surface);
  opacity: 0.3;
  transition: var(--transition);
  position: relative;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #ffffff;
  transition: var(--transition);
}

.theme-switch input:checked + .toggle-track {
  background-color: var(--md-primary);
  opacity: 1;
}

.theme-switch input:checked + .toggle-track::after {
  transform: translateX(22px);
}

.theme-switch:hover .toggle-track {
  filter: brightness(1.1);
}

/* ===== Hero Section (Two-column with photo) ===== */

.hero {
  gap: 0;
}

.hero h2.section-title {
  margin-top: 0;
  margin-bottom: 16px;
}

.hero-body {
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-photo-placeholder {
  width: 150px;
  height: 150px;
  min-width: 150px;
  border-radius: 50%;
  border: 3px dashed var(--md-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
  color: var(--md-primary);
  background-color: var(--md-surface);
}

.hero-photo {
  width: 150px;
  height: 150px;
  min-width: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--md-primary);
}

.hero-text {
  flex: 1;
}

.hero h2.section-title {
  margin-top: 0;
}

.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--md-primary);
  margin: 8px 0 16px;
}

.hero-text > p {
  line-height: 1.7;
  max-width: 640px;
}

/* ===== Section Title ===== */

.section-title {
  font-size: 1.8rem;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--md-primary);
  display: inline-block;
}

/* ===== Timeline (Experience) ===== */

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--md-primary);
  opacity: 0.3;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -32px;
  top: 28px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--md-primary);
  border: 3px solid var(--md-background);
  box-shadow: 0 0 0 2px var(--md-primary);
}

.timeline-item h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 600;
}

.timeline-item .date {
  font-size: 0.9rem;
  opacity: 0.6;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-item ul {
  margin: 0;
  padding-left: 20px;
}

.timeline-item li {
  line-height: 1.6;
  margin-bottom: 4px;
}

/* ===== Footer with Social Links ===== */

footer {
  text-align: center;
  padding: 32px 0;
  margin-top: 60px;
  opacity: 0.7;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
}

.social-links a {
  color: var(--md-on-surface);
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
}

.social-links a:hover {
  opacity: 1;
  color: var(--md-primary);
  transform: translateY(-2px);
}

/* ===== Hero Project (project pages) ===== */

.hero-project {
  background: linear-gradient(135deg, var(--md-primary), var(--md-primary-variant));
  color: var(--md-on-primary);
  text-align: center;
  padding: 60px 20px;
  border-radius: 16px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.hero-project-icon {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 0 auto 20px;
}

.hero-project-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 20px;
}

.hero-project h1 {
  font-size: 2.4rem;
  margin: 0 0 12px;
  font-weight: 700;
}

.hero-project-slogan {
  font-size: 1.15rem;
  opacity: 0.9;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Info Card (Google Play Style) ===== */

.info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  background: var(--md-surface);
  padding: 24px 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  margin: 40px 0;
}

.info-card-item {
  text-align: center;
  min-width: 100px;
}

.info-card-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--md-primary);
  margin-bottom: 4px;
}

.info-card-label {
  font-size: 0.85rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Gallery Grid ===== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.gallery-grid img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-grid img:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

/* ===== Project Description Card ===== */

.project-about {
  line-height: 1.7;
  font-size: 1.05rem;
}

/* ===== Scroll Animations ===== */

.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

@media (max-width: 700px) {
  header .container {
    justify-content: center;
  }

  .nav-links {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    gap: 24px;
  }

  .hero-body {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline::before {
    left: 3px;
  }

  .timeline-item::before {
    left: -28px;
    width: 12px;
    height: 12px;
  }
}
