/* CSS Variables for Light/Dark Mode */
:root {
  /* Light Mode Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent-primary: #3b82f6;
  --accent-secondary: #1e40af;
  --accent-tertiary: #dbeafe;
  --border-color: #e2e8f0;
  --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);
}

[data-theme="dark"] {
  /* Dark Mode Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --accent-primary: #60a5fa;
  --accent-secondary: #3b82f6;
  --accent-tertiary: #1e3a8a;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3),
    0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3),
    0 8px 10px -6px rgb(0 0 0 / 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}
h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}
h3 {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
}
h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 2vw, 1rem);
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
  min-height: 70px;
  display: flex;
  align-items: center;
  width: 100%;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 50px;
}

.nav-brand h2 {
  font-weight: 700;
  color: var(--accent-primary);
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  line-height: 1.2;
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

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

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width 0.3s ease;
}

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

/* Mobile Navigation */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
}

.mobile-menu-toggle:hover {
  color: var(--accent-primary);
  background-color: var(--accent-tertiary);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 998;
  max-height: 100vh;
  overflow-y: auto;
  width: 100%;
  visibility: hidden;
  opacity: 0;
}

.mobile-menu.active {
  transform: translateY(0);
  display: block !important;
  visibility: visible;
  opacity: 1;
}

.mobile-menu .nav-links {
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  padding-top: 70px;
}

.mobile-menu .nav-link {
  width: 100%;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.mobile-menu .nav-link:last-child {
  border-bottom: none;
}

.mobile-menu .nav-link:hover {
  color: var(--accent-primary);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
}

.theme-toggle:hover {
  color: var(--accent-primary);
  background-color: var(--accent-tertiary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: clamp(0.9rem, 2vw, 1rem);
  min-height: 44px;
  min-width: 44px;
  gap: 0.5rem;
}

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

.btn-primary:hover {
  background-color: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  background-color: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
  padding: clamp(6rem, 10vw, 8rem) 0 clamp(2rem, 5vw, 4rem);
  min-height: 100vh;
  display: flex;
  align-items: center;
  margin-top: 70px;
}

.hero-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-title {
  margin-bottom: 1.5rem;
}

.greeting {
  display: block;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.name {
  display: block;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stat {
  text-align: center;
  padding: clamp(1rem, 3vw, 1.5rem);
  background-color: var(--bg-secondary);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-header p {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  color: var(--text-secondary);
}

/* About Section */
.about {
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.about-text p {
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.skills h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.skill-tag {
  padding: 0.5rem 1rem;
  background-color: var(--accent-tertiary);
  color: var(--accent-primary);
  border-radius: 2rem;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.skill-tag:hover {
  background-color: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
}

/* Experience Section */
.experience {
  padding: clamp(2rem, 5vw, 4rem) 0;
  background-color: var(--bg-secondary);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 4rem;
}

.timeline-marker {
  position: absolute;
  left: 1.5rem;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  background-color: var(--accent-primary);
  border-radius: 50%;
  border: 3px solid var(--bg-secondary);
}

.timeline-content {
  background-color: var(--bg-primary);
  padding: clamp(1.5rem, 4vw, 2rem);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.timeline-header h3 {
  color: var(--text-primary);
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.company {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.period {
  color: var(--text-muted);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.location {
  color: var(--text-secondary);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  margin-bottom: 1rem;
}

.achievements {
  list-style: none;
}

.achievements li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.achievements li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

/* Projects Section */
.projects {
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.5rem, 4vw, 2rem);
}

.project-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: clamp(1.5rem, 4vw, 2rem);
  transition: all 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.project-header {
  margin-bottom: 1rem;
}

.project-header h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.project-type {
  color: var(--accent-primary);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  font-weight: 500;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

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

.highlight {
  background-color: var(--accent-tertiary);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: clamp(0.7rem, 1.5vw, 0.8rem);
  font-weight: 500;
}

.project-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}

.project-link:hover {
  color: var(--accent-secondary);
}

/* Publications Section */
.publications {
  padding: clamp(2rem, 5vw, 4rem) 0;
  background-color: var(--bg-primary);
}

.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 3rem;
}

.publication-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: clamp(1.5rem, 4vw, 2rem);
  transition: all 0.3s ease;
}

.publication-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.publication-header {
  margin-bottom: 1rem;
}

.publication-header h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.publication-type {
  background-color: var(--accent-tertiary);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: clamp(0.7rem, 1.5vw, 0.8rem);
  font-weight: 500;
}

.publication-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.publication-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.publication-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}

.publication-link:hover {
  color: var(--accent-secondary);
}

/* Resume Section */
.resume {
  padding: clamp(2rem, 5vw, 4rem) 0;
  background-color: var(--bg-secondary);
}

.resume-content {
  max-width: 800px;
  margin: 0 auto;
}

.resume-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 2rem);
  transition: all 0.3s ease;
}

.resume-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.resume-icon {
  flex-shrink: 0;
  width: clamp(60px, 15vw, 80px);
  height: clamp(60px, 15vw, 80px);
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-secondary)
  );
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.resume-info {
  flex: 1;
}

.resume-info h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.resume-info p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.resume-details {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.resume-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.resume-detail i {
  color: var(--accent-primary);
}

.resume-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
}

.resume-actions .btn {
  min-width: 140px;
  justify-content: center;
}

/* Contact Section */
.contact {
  padding: clamp(2rem, 5vw, 4rem) 0;
  background-color: var(--bg-secondary);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--bg-primary);
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  min-height: 44px;
}

.contact-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.contact-item i {
  color: var(--accent-primary);
  font-size: 1.25rem;
  width: 1.5rem;
  flex-shrink: 0;
}

.contact-item a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

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

.contact-form {
  background-color: var(--bg-primary);
  padding: clamp(1.5rem, 4vw, 2rem);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-size: clamp(0.9rem, 2vw, 1rem);
  transition: all 0.3s ease;
  min-height: 44px;
}

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-tertiary);
}

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

/* Footer */
.footer {
  background-color: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  padding: clamp(1.5rem, 4vw, 2rem) 0;
  margin-top: clamp(2rem, 5vw, 4rem);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-content p {
  color: var(--text-secondary);
  margin: 0;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  min-height: 44px;
  display: flex;
  align-items: center;
}

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

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

  /* Header adjustments for mobile */
  .header {
    min-height: 60px;
  }

  .nav {
    padding: 0.75rem 1rem;
    min-height: 44px;
  }

  /* Mobile Navigation */
  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .mobile-menu.active {
    transform: translateY(0);
    display: block !important;
  }

  .mobile-menu .nav-links {
    padding-top: 60px;
  }

  /* Hero Section */
  .hero {
    margin-top: 60px;
  }

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

  .hero-stats {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  .stat {
    flex: 1;
    min-width: 120px;
  }

  /* About Section */
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Contact Section */
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Timeline Adjustments */
  .timeline::before {
    left: 1rem;
  }

  .timeline-item {
    padding-left: 2.5rem;
  }

  .timeline-marker {
    left: 0.5rem;
  }

  /* Grid Adjustments */
  .projects-grid {
    grid-template-columns: 1fr;
  }

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

  /* Resume Card */
  .resume-card {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .resume-actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  /* Button Adjustments */
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }

  .header {
    min-height: 56px;
  }

  .nav {
    padding: 0.5rem 0.75rem;
    min-height: 40px;
  }

  .mobile-menu .nav-links {
    padding-top: 56px;
  }

  .hero {
    padding: 5rem 0 2rem;
    margin-top: 56px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .btn {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .timeline::before {
    left: 0.75rem;
  }

  .timeline-item {
    padding-left: 2rem;
  }

  .timeline-marker {
    left: 0.25rem;
    width: 0.75rem;
    height: 0.75rem;
  }

  .stat {
    min-width: 100px;
    padding: 1rem 0.5rem;
  }

  .skill-tags {
    gap: 0.5rem;
  }

  .skill-tag {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  .project-highlights,
  .publication-highlights {
    gap: 0.25rem;
  }

  .highlight {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }

  .contact-item {
    padding: 0.75rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.75rem;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
  }

  .project-card:hover,
  .publication-card:hover,
  .timeline-content:hover,
  .contact-item:hover,
  .stat:hover,
  .skill-tag:hover {
    transform: none;
  }

  .btn:active,
  .project-card:active,
  .publication-card:active,
  .timeline-content:active,
  .contact-item:active,
  .stat:active,
  .skill-tag:active {
    transform: scale(0.98);
  }

  /* Increase touch targets for mobile */
  .nav-link,
  .project-link,
  .publication-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Better spacing for mobile touch */
  .hero-actions {
    gap: 1rem;
  }

  .skill-tags {
    gap: 0.75rem;
  }

  .project-highlights,
  .publication-highlights {
    gap: 0.5rem;
  }
}

/* Prevent zoom on input focus for iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  input[type="text"],
  input[type="email"],
  textarea {
    font-size: 16px;
  }
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
  /* Reduce animations on mobile for better performance */
  .project-card,
  .publication-card,
  .timeline-content,
  .contact-item,
  .stat,
  .skill-tag {
    transition: all 0.2s ease;
  }

  /* Optimize images for mobile */
  .project-screenshot,
  .publication-screenshot {
    will-change: transform;
  }

  /* Better text rendering on mobile */
  body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 4rem 0 2rem;
  }

  .hero-stats {
    flex-direction: row;
    gap: 1rem;
  }

  .stat {
    flex: 1;
    min-width: 100px;
  }
}

/* Smooth transitions for theme switching */
* {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
a:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Loading animation for theme toggle */
.theme-toggle.loading {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Image Styles */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-image {
  width: 300px;
  height: 400px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.about-image {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.workspace-image {
  width: 100%;
  max-width: 500px;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease;
}

.workspace-image:hover {
  transform: scale(1.02);
}

.company-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.company-logo {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.project-image {
  margin-bottom: 1.5rem;
}

.project-screenshot {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.project-screenshot:hover {
  transform: scale(1.05);
}

.publication-image {
  margin-bottom: 1.5rem;
}

.publication-screenshot {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.publication-screenshot:hover {
  transform: scale(1.05);
}

/* Responsive adjustments for images */
@media (max-width: 768px) {
  .hero-image {
    order: -1;
    margin-bottom: 1.5rem;
  }

  .profile-image {
    width: 250px;
    height: 350px;
  }

  .workspace-image {
    height: 250px;
  }

  .company-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .company-logo {
    width: 40px;
    height: 40px;
  }

  .project-screenshot,
  .publication-screenshot {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .profile-image {
    width: 200px;
    height: 280px;
  }

  .workspace-image {
    height: 200px;
  }

  .project-screenshot,
  .publication-screenshot {
    height: 150px;
  }
}
