/**
 * Custom Main CSS - Complete Modern Design
 * Replaces Kards Theme Completely
 */

:root {
  /* Colors */
  --color-primary: #5C4EDB;
  --color-primary-dark: #4A3CC7;
  --color-secondary: #FF6B6B;
  --color-text: #2C3E50;
  --color-text-light: #6C757D;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8F9FA;
  --color-border: #E9ECEF;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;
  
  /* Other */
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --color-text: #E4E4E7;
  --color-text-light: #A1A1AA;
  --color-bg: #18181B;
  --color-bg-alt: #27272A;
  --color-border: #3F3F46;
}

/* Base Styles */
html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

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

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

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--space-xs) var(--space-md);
  text-decoration: none;
  z-index: 10000;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--space-md);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(3.2rem, 5vw, 4.8rem); }
h2 { font-size: clamp(2.4rem, 4vw, 3.6rem); }
h3 { font-size: clamp(2rem, 3vw, 2.8rem); }
h4 { font-size: clamp(1.8rem, 2.5vw, 2.4rem); }
h5 { font-size: clamp(1.6rem, 2vw, 2rem); }
h6 { font-size: 1.6rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-light);
}

/* Navigation */
.navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
  padding: var(--space-sm) 0;
  transition: var(--transition);
}

.navigation.scrolled {
  box-shadow: var(--shadow);
}

.navigation .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-primary);
}

.nav-menu {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-link {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--color-primary);
  transition: var(--transition);
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  padding: 10px;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-toggle span:nth-child(1) {
  transform-origin: left center;
}

.nav-toggle span:nth-child(3) {
  transform-origin: left center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--color-border);
  color: var(--color-text);
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--color-bg-alt);
  transform: translateY(-2px);
}

[data-theme="dark"] .theme-toggle {
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .navigation {
  background: rgba(24, 24, 27, 0.95);
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #4C3A9E 0%, #5A3E7A 100%);
}

[data-theme="dark"] .contact {
  background: #1a1a1a;
}

[data-theme="dark"] .footer {
  background: #1a1a1a;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content h1 {
  color: white;
  margin-bottom: var(--space-md);
  font-size: clamp(4rem, 8vw, 7.2rem);
}

.hero-content .subtitle {
  font-size: 2rem;
  opacity: 1;
  margin-bottom: var(--space-lg);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
}

.hero-roles {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.hero-roles span {
  font-size: 1.8rem;
  opacity: 0.9;
}

.hero-social {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-lg);
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: white;
  font-size: 1.8rem;
  transition: var(--transition);
}

.hero-social a:hover {
  background: white;
  color: var(--color-primary);
  transform: translateY(-3px);
  border-color: white;
}

/* Sections */
.section {
  padding: var(--space-3xl) 0;
}

.section:nth-child(even):not(#contact) {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: 1.8rem;
  max-width: 600px;
  margin: 0 auto;
}

/* About Section */
.about-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-xl);
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image-placeholder {
  width: 300px;
  height: 300px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  border: 2px solid var(--color-border);
}

.about-image-placeholder i {
  font-size: 8rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.about-image-placeholder p {
  color: var(--color-text);
  font-weight: 500;
  margin: 0;
}

.about-text h3 {
  margin-bottom: var(--space-md);
}

.about-text p {
  font-size: 1.8rem;
}

.profile-info {
  margin-top: var(--space-lg);
}

.profile-info h4 {
  margin-bottom: var(--space-md);
}

.profile-info ul {
  list-style: none;
  padding: 0;
}

.profile-info li {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.profile-info li:last-child {
  border-bottom: none;
}

.profile-info strong {
  color: var(--color-text);
  font-weight: 600;
  flex-shrink: 0;
  min-width: 180px;
}

.profile-info span {
  color: var(--color-text-light);
  flex: 1;
  word-wrap: break-word;
}

/* Skills */
.skills-section {
  margin-top: var(--space-2xl);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.skill-item {
  margin-bottom: var(--space-sm);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
}

.skill-name {
  font-weight: 600;
  color: var(--color-text);
}

.skill-percent {
  font-weight: 600;
  color: var(--color-primary);
}

.skill-bar {
  background: #E9ECEF;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  background: var(--color-primary);
  border-radius: 5px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.skill-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Resume */
.resume-section {
  margin-bottom: var(--space-2xl);
}

.resume-section h3 {
  margin-bottom: var(--space-lg);
  position: relative;
  padding-left: 3rem;
}

.resume-section h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 3px;
  background: var(--color-primary);
}

.resume-item {
  background: var(--color-bg);
  padding: var(--space-lg);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: var(--space-lg);
  border-left: 3px solid var(--color-primary);
  transition: var(--transition);
}

[data-theme="dark"] .resume-item {
  background: var(--color-bg-alt);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.resume-item:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .resume-item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.resume-header h4 {
  margin-bottom: var(--space-xs);
  color: var(--color-text);
  font-size: 2rem;
}

.resume-header .company {
  color: var(--color-primary);
  font-weight: 600;
  margin: 0;
}

.resume-date {
  color: var(--color-text-light);
  font-size: 1.4rem;
  font-weight: 500;
  background: var(--color-bg-alt);
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
}

.resume-item p {
  margin-bottom: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

.resume-item p:last-child {
  margin-bottom: 0;
}

/* Hobbies */
.hobbies-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.hobbies-table {
  background: var(--color-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  padding: var(--space-lg);
}

[data-theme="dark"] .hobbies-table {
  background: var(--color-bg-alt);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hobbies-table h3 {
  margin-bottom: var(--space-md);
  color: var(--color-primary);
  font-size: 2.2rem;
}

.hobbies-table table {
  width: 100%;
  border-collapse: collapse;
}

.hobbies-table th,
.hobbies-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.hobbies-table th {
  background: var(--color-bg-alt);
  font-weight: 600;
  color: var(--color-text);
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .hobbies-table th {
  background: #1a1a1a;
  color: var(--color-text);
}

.hobbies-table td {
  color: var(--color-text-light);
}

[data-theme="dark"] .hobbies-table td {
  color: var(--color-text-light);
}

.hobbies-table td:first-child {
  font-weight: 500;
  color: var(--color-text);
}

[data-theme="dark"] .hobbies-table td:first-child {
  color: var(--color-text);
}

.hobbies-table tr:last-child td {
  border-bottom: none;
}

.hobbies-table tbody tr {
  transition: var(--transition);
}

.hobbies-table tbody tr:hover {
  background: var(--color-bg-alt);
  transform: translateX(5px);
}

[data-theme="dark"] .hobbies-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.hobbies-table a {
  color: var(--color-primary);
  text-decoration: underline;
}

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

/* Contact */
#contact,
.contact {
  background: #2C3E50 !important;
  color: white !important;
}

#contact h2,
.contact h2,
.contact .section-header h2 {
  color: white !important;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#contact .section-header p,
#contact .lead,
#contact p,
.contact .section-header p,
.contact p {
  color: rgba(255, 255, 255, 0.9) !important;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.contact-item {
  text-align: center;
}

#contact h4,
.contact-item h4 {
  margin-bottom: var(--space-xs);
  color: white !important;
  font-weight: 600;
}

.contact-icon {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

/* Footer */
.footer {
  background: var(--color-text);
  color: white;
  padding: var(--space-lg) 0;
  text-align: center;
}

.footer-social {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-bottom: var(--space-md);
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  list-style: none;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

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

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  box-shadow: var(--shadow);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-primary);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
}

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

.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}

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

/* Mobile menu overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* Responsive - Tablets and larger phones */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--color-bg);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: var(--space-3xl) var(--space-lg) var(--space-lg);
    flex-direction: column;
    align-items: flex-start;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow-y: auto;
  }
  
  [data-theme="dark"] .nav-menu {
    background: var(--color-bg-alt);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-menu li {
    width: 100%;
    margin-bottom: var(--space-xs);
  }
  
  .nav-menu a {
    display: block;
    padding: var(--space-lg) var(--space-md);
    font-size: 1.8rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-radius: var(--radius);
    transition: background-color 0.2s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: rgba(106, 90, 203, 0.1);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    position: relative;
    z-index: 10;
    touch-action: manipulation;
    -webkit-touch-callout: none;
  }
  
  .nav-menu a:active {
    background-color: rgba(106, 90, 203, 0.1);
    transform: scale(0.98);
  }
  
  .nav-menu a.active {
    background-color: rgba(106, 90, 203, 0.15);
    font-weight: 600;
  }
  
  [data-theme="dark"] .nav-menu a:active {
    background-color: rgba(106, 90, 203, 0.2);
  }
  
  [data-theme="dark"] .nav-menu a.active {
    background-color: rgba(106, 90, 203, 0.25);
  }
  
  .nav-toggle {
    display: flex;
    z-index: 1002;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    width: 20px;
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    width: 20px;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .about-image-placeholder {
    margin: 0 auto;
  }
  
  .hero-roles {
    flex-direction: column;
  }
  
  .hobbies-content {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  /* Reduce font sizes for mobile */
  h1 { font-size: clamp(2.8rem, 6vw, 3.6rem); }
  h2 { font-size: clamp(2.2rem, 5vw, 2.8rem); }
  h3 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
  h4 { font-size: clamp(1.6rem, 3vw, 2rem); }
  
  .section {
    padding: var(--space-2xl) 0;
  }
}

/* Small phones and medium phones */
@media (max-width: 480px) {
  /* Typography adjustments */
  html {
    font-size: 55%;
  }
  
  body {
    font-size: 1.4rem;
  }
  
  /* Mobile menu improvements for small screens */
  .nav-menu {
    width: 85%;
    max-width: none;
    padding: var(--space-2xl) var(--space-md);
  }
  
  .nav-menu a {
    font-size: 1.6rem;
    padding: var(--space-md) var(--space-sm);
    min-height: 48px;
  }
  
  /* Hero section mobile optimizations */
  .hero {
    min-height: 100vh;
    padding: var(--space-xl) var(--space-sm);
  }
  
  .hero-content h1 {
    font-size: clamp(2.8rem, 10vw, 4rem);
    line-height: 1.2;
    margin-bottom: var(--space-sm);
  }
  
  .hero-content .subtitle {
    font-size: 1.6rem;
    margin-bottom: var(--space-md);
  }
  
  .hero-roles {
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
  }
  
  .hero-roles span {
    font-size: 1.4rem;
  }
  
  /* Hide bullet points in hero roles on mobile */
  .hero-roles span:nth-child(2),
  .hero-roles span:nth-child(4) {
    display: none;
  }
  
  /* Navigation improvements */
  .navigation {
    padding: var(--space-xs) 0;
  }
  
  .nav-logo {
    font-size: 1.8rem;
  }
  
  .nav-menu {
    width: 85%;
    max-width: none;
    padding: var(--space-2xl) var(--space-md);
  }
  
  .nav-menu a {
    font-size: 1.6rem;
    padding: var(--space-md) 0;
  }
  
  /* Buttons - make them full width on mobile */
  .btn {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
    font-size: 1.6rem;
  }
  
  /* Touch targets - minimum 44px */
  .hero-social a {
    width: 48px;
    height: 48px;
    font-size: 2rem;
  }
  
  .theme-toggle {
    width: 44px;
    height: 44px;
  }
  
  /* Resume section */
  .resume-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .resume-header h4 {
    font-size: 1.8rem;
  }
  
  .resume-date {
    font-size: 1.2rem;
    margin-top: var(--space-xs);
  }
  
  .resume-item {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }
  
  /* Profile info adjustments */
  .profile-info strong {
    min-width: 120px;
    font-size: 1.4rem;
  }
  
  .profile-info span {
    font-size: 1.4rem;
  }
  
  /* Section spacing */
  .section {
    padding: var(--space-xl) 0;
  }
  
  .section-header {
    margin-bottom: var(--space-xl);
  }
  
  .section-header p {
    font-size: 1.6rem;
  }
  
  /* Contact section */
  .contact-grid {
    gap: var(--space-lg);
  }
  
  .contact-icon {
    font-size: 2.4rem;
  }
  
  /* About section */
  .about-image-placeholder {
    width: 250px;
    height: 250px;
  }
  
  .about-image-placeholder i {
    font-size: 6rem;
  }
  
  /* Skills */
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  /* Hobbies tables */
  .hobbies-content {
    grid-template-columns: 1fr;
  }
  
  .hobbies-table {
    padding: var(--space-md);
    overflow-x: auto;
  }
  
  .hobbies-table table {
    min-width: 300px;
  }
  
  .hobbies-table th,
  .hobbies-table td {
    padding: var(--space-xs) var(--space-sm);
    font-size: 1.3rem;
  }
  
  /* Footer */
  .footer {
    padding: var(--space-md) 0;
  }
  
  .footer-social {
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
  }
}

/* Very small phones */
@media (max-width: 375px) {
  /* Further reduce font sizes */
  html {
    font-size: 52%;
  }
  
  .hero-content h1 {
    font-size: 2.4rem;
  }
  
  .hero-content .subtitle {
    font-size: 1.4rem;
  }
  
  /* Navigation adjustments */
  .nav-menu {
    width: 90%;
  }
  
  .nav-logo {
    font-size: 1.6rem;
  }
  
  /* Compact language switcher */
  .lang-switcher {
    gap: 4px;
    margin-right: var(--space-sm);
  }
  
  .lang-link {
    font-size: 1.2rem;
  }
  
  /* Reduce padding on mobile */
  .container {
    padding: 0 var(--space-sm);
  }
  
  /* Resume items */
  .resume-item {
    padding: var(--space-sm);
  }
  
  /* Profile info - stack on very small screens */
  .profile-info li {
    flex-direction: column;
    gap: var(--space-xs);
  }
  
  .profile-info strong {
    min-width: auto;
  }
  
  /* About placeholder */
  .about-image-placeholder {
    width: 200px;
    height: 200px;
  }
  
  .about-image-placeholder i {
    font-size: 5rem;
  }
  
  /* Back to top button positioning */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }
}

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-container {
  text-align: center;
}

.loader-spinner {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.loader-dot {
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: loaderDot 1.4s ease-in-out infinite;
}

.loader-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loader-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loaderDot {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.loader-text {
  color: var(--color-text);
  font-size: 1.4rem;
  margin: 0;
  opacity: 0.7;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: var(--space-md);
}

.lang-link {
  color: var(--color-text);
  font-size: 1.4rem;
  font-weight: 500;
  opacity: 0.6;
  transition: var(--transition);
}

.lang-link:hover,
.lang-link.active {
  color: var(--color-primary);
  opacity: 1;
}

.lang-divider {
  color: var(--color-text);
  opacity: 0.3;
}