:root {
  --bg-color: #0f172a;
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  --primary-color: #38bdf8;
  --secondary-color: #818cf8;
  --accent-color: #c084fc;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(30, 41, 59, 0.5);
  --font-main: "Outfit", sans-serif;
  --transition: all 0.3s ease;
}

/* Smooth scrolling for browsers that support it (fallback to JS otherwise) */
html {
  scroll-behavior: smooth;
}

/* Light Theme */
[data-theme="light"] {
  --bg-color: #f8fafc;
  --text-color: #0f172a;
  --text-muted: #475569;
  --primary-color: #0ea5e9;
  --secondary-color: #6366f1;
  --accent-color: #a855f7;
  --glass-bg: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(15, 23, 42, 0.1);
  --card-bg: rgba(255, 255, 255, 0.6);
}

/* Ocean Theme */
[data-theme="ocean"] {
  --bg-color: #0a192f;
  --text-color: #ccd6f6;
  --text-muted: #8892b0;
  --primary-color: #64ffda;
  --secondary-color: #00d4ff;
  --accent-color: #57cbff;
  --glass-bg: rgba(16, 32, 54, 0.7);
  --glass-border: rgba(100, 255, 218, 0.1);
  --card-bg: rgba(16, 32, 54, 0.5);
}

/* Sunset Theme */
[data-theme="sunset"] {
  --bg-color: #1a0b2e;
  --text-color: #f5e6d3;
  --text-muted: #c4a57b;
  --primary-color: #ff6b6b;
  --secondary-color: #ffa500;
  --accent-color: #ff1493;
  --glass-bg: rgba(42, 20, 60, 0.7);
  --glass-border: rgba(255, 107, 107, 0.1);
  --card-bg: rgba(42, 20, 60, 0.5);
}

/* Forest Theme */
[data-theme="forest"] {
  --bg-color: #0d1b0d;
  --text-color: #e8f5e9;
  --text-muted: #a5d6a7;
  --primary-color: #4caf50;
  --secondary-color: #66bb6a;
  --accent-color: #81c784;
  --glass-bg: rgba(27, 44, 27, 0.7);
  --glass-border: rgba(76, 175, 80, 0.1);
  --card-bg: rgba(27, 44, 27, 0.5);
}

/* Purple Dream Theme */
[data-theme="purple"] {
  --bg-color: #1a0033;
  --text-color: #f0e6ff;
  --text-muted: #b794f6;
  --primary-color: #9333ea;
  --secondary-color: #c084fc;
  --accent-color: #e879f9;
  --glass-bg: rgba(42, 20, 80, 0.7);
  --glass-border: rgba(147, 51, 234, 0.1);
  --card-bg: rgba(42, 20, 80, 0.5);
}

/* Cyberpunk Theme */
[data-theme="cyberpunk"] {
  --bg-color: #0a0e27;
  --text-color: #00ff9f;
  --text-muted: #00d9ff;
  --primary-color: #ff00ff;
  --secondary-color: #00ffff;
  --accent-color: #ffff00;
  --glass-bg: rgba(20, 25, 60, 0.7);
  --glass-border: rgba(255, 0, 255, 0.22);
  --card-bg: rgba(20, 25, 60, 0.5);
}

/* Dark theme (explicit tweaks for improved contrast) */
[data-theme="dark"] {
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-bg: rgba(16, 20, 32, 0.78);
  --card-bg: rgba(16, 20, 32, 0.6);
  /* slightly boost primary for better visibility */
  --primary-color: #4fd3ff;
}

/* Warm Light Theme */
[data-theme="warm"] {
  --bg-color: #fef6e4;
  --text-color: #2d3142;
  --text-muted: #4f5d75;
  --primary-color: #f77f00;
  --secondary-color: #d62828;
  --accent-color: #fcbf49;
  --glass-bg: rgba(255, 250, 240, 0.8);
  --glass-border: rgba(45, 49, 66, 0.1);
  --card-bg: rgba(255, 250, 240, 0.6);
}

/* Grayscale / Monochrome Theme */
[data-theme="grayscale"] {
  --bg-color: #0b0b0b;
  --text-color: #f5f5f5;
  --text-muted: #bdbdbd;
  --primary-color: #d1d1d1;
  --secondary-color: #8f8f8f;
  --accent-color: #9e9e9e;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
  --card-bg: rgba(255, 255, 255, 0.04);
}

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

/* Visually hidden (screen-reader only) */
.sr-only,
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

/* Skip link (visible on keyboard focus) */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary-color);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 2000;
  border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus {
  left: 1rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  /* Ensure site does not shrink below 350px; allow horizontal scroll if viewport is narrower */
  min-width: 350px;
  overflow-x: auto;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
.theme-option:focus-visible,
.lang-btn:focus-visible,
.contact-email:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

ul {
  list-style: none;
}

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

.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-align: center;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Ensure header does not compress below site min-width */
.header,
.navbar {
  min-width: 350px;
}

[data-theme="light"] .header {
  background: rgba(248, 250, 252, 0.9);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

[data-theme="warm"] .header {
  background: rgba(254, 246, 228, 0.9);
  border-bottom: 1px solid rgba(45, 49, 66, 0.1);
}

[data-theme="ocean"] .header {
  background: rgba(10, 25, 47, 0.9);
  border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

[data-theme="sunset"] .header {
  background: rgba(26, 11, 46, 0.9);
  border-bottom: 1px solid rgba(255, 107, 107, 0.1);
}

[data-theme="forest"] .header {
  background: rgba(13, 27, 13, 0.9);
  border-bottom: 1px solid rgba(76, 175, 80, 0.1);
}

[data-theme="purple"] .header {
  background: rgba(26, 0, 51, 0.9);
  border-bottom: 1px solid rgba(147, 51, 234, 0.1);
}

[data-theme="cyberpunk"] .header {
  background: rgba(10, 14, 39, 0.9);
  border-bottom: 1px solid rgba(255, 0, 255, 0.2);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.logo .dot {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 2rem;
  flex-wrap: nowrap; /* keep header items on a single line when possible */
}

.nav-links > ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  white-space: nowrap; /* prevent links wrapping to next line */
}

/* (Removed hamburger styles — header shows links horizontally) */

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
}

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

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--primary-color);
}

.divider {
  color: var(--glass-border);
}

.theme-selector-wrapper {
  position: relative;
  margin-left: 1rem;
}

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

.theme-toggle:hover {
  color: var(--primary-color);
  background: rgba(56, 189, 248, 0.1);
}

.theme-menu {
  position: absolute;
  top: calc(100% + 1rem);
  right: 0;
  background: var(--bg-color);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.5rem;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 1000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.theme-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.theme-option {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-color);
  padding: 0.7rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-radius: 8px;
  transition: var(--transition);
  font-family: var(--font-main);
  font-size: 0.95rem;
}

.theme-option:hover {
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary-color);
}

.theme-option.active {
  background: rgba(56, 189, 248, 0.2);
  color: var(--primary-color);
}

.theme-preview {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06) inset;
}

.theme-preview-dark {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
}

.theme-preview-light {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
}

.theme-preview-ocean {
  background: linear-gradient(135deg, #64ffda, #00d4ff);
}

.theme-preview-sunset {
  background: linear-gradient(135deg, #ff6b6b, #ffa500);
}

.theme-preview-forest {
  background: linear-gradient(135deg, #4caf50, #66bb6a);
}

.theme-preview-purple {
  background: linear-gradient(135deg, #9333ea, #c084fc);
}

.theme-preview-cyberpunk {
  background: linear-gradient(135deg, #ff00ff, #00ffff);
}

.theme-preview-warm {
  background: linear-gradient(135deg, #f77f00, #fcbf49);
}

.theme-preview-grayscale {
  background: linear-gradient(135deg, #ffffff, #6b6b6b);
}

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color);
  color: var(--bg-color);
  border: none;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.35);
  cursor: pointer;
  z-index: 1200;
  opacity: 0;
  transform: translateY(18px) scale(0.95);
  transition: opacity 300ms cubic-bezier(0.2, 0.9, 0.2, 1),
    transform 300ms cubic-bezier(0.2, 0.9, 0.2, 1);
}
.back-to-top.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.back-to-top:focus {
  outline: 3px solid rgba(255, 255, 255, 0.12);
}

/* Make theme labels slightly more legible on top of gradients */
.theme-option span:last-child {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* Grayscale theme specific tweaks for header and contact */
[data-theme="grayscale"] .header {
  background: rgba(11, 11, 11, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="grayscale"] .contact-content {
  background: linear-gradient(
    135deg,
    rgba(28, 28, 28, 0.92),
    rgba(12, 12, 12, 0.96)
  );
  border: 1px solid rgba(255, 255, 255, 0.04);
}

[data-theme="grayscale"] .contact-email {
  border: 2px solid rgba(255, 255, 255, 0.06);
}

[data-theme="grayscale"] .contact-email:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--primary-color);
}

/* Improve visibility of active language button in grayscale */
[data-theme="grayscale"] .lang-btn {
  color: var(--text-muted);
}

[data-theme="grayscale"] .lang-btn.active,
[data-theme="grayscale"] .lang-btn:hover {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35) inset;
}

/* Make back-to-top circular and add hover effect */
.back-to-top {
  border-radius: 50%;
  width: 48px;
  height: 48px;
  padding: 0;
}
.back-to-top:hover {
  transform: translateY(-6px) scale(1.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  filter: brightness(0.96);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 80px; /* Header height */
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  opacity: 0.1;
  filter: blur(80px);
  z-index: -1;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .hero::before,
[data-theme="warm"] .hero::before {
  opacity: 0.15;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    var(--secondary-color) 0%,
    transparent 70%
  );
  opacity: 0.1;
  filter: blur(80px);
  z-index: -1;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .hero::after,
[data-theme="warm"] .hero::after {
  opacity: 0.15;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-visual {
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.blob {
  width: 500px;
  height: 500px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: pulse 4s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.5;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.3;
  }
}

.hero-text {
  max-width: 800px;
  margin: 0 auto;
}

.greeting {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.name {
  font-size: 5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .name {
  background: linear-gradient(to right, #0f172a, #475569);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="warm"] .name {
  background: linear-gradient(to right, #2d3142, #4f5d75);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.description {
  color: var(--text-muted);
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: #fff;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

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

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

/* About Section */
.about-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 3rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.about-content p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.about-content strong {
  color: var(--primary-color);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: 16px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  background: rgba(30, 41, 59, 0.8);
}

[data-theme="light"] .skill-category:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--primary-color);
}

[data-theme="warm"] .skill-category:hover {
  background: rgba(255, 250, 240, 0.9);
  border-color: var(--primary-color);
}

.skill-category h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-color);
}

.skill-category h3 i {
  color: var(--secondary-color);
}

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

.tags span {
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary-color);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
}

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

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background: var(--glass-border);
}

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

.timeline-dot {
  position: absolute;
  left: -6px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
}

.timeline-date {
  color: var(--secondary-color);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: 16px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.timeline-content:hover {
  border-color: var(--secondary-color);
}

[data-theme="light"] .timeline-content:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--secondary-color);
}

[data-theme="warm"] .timeline-content:hover {
  background: rgba(255, 250, 240, 0.9);
  border-color: var(--secondary-color);
}

.timeline-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.2rem;
}

.timeline-content h4 {
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.timeline-content p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-stack span {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

/* Education Section */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.education-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  padding: 2rem;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.education-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
}

[data-theme="light"] .education-card:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--accent-color);
}

[data-theme="warm"] .education-card:hover {
  background: rgba(255, 250, 240, 0.9);
  border-color: var(--accent-color);
}

.education-card .icon {
  font-size: 2rem;
  color: var(--accent-color);
  background: rgba(192, 132, 252, 0.1);
  padding: 1rem;
  border-radius: 12px;
}

.education-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.education-card p {
  color: var(--text-muted);
}

/* Contact Section */
.contact-content {
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.8),
    rgba(15, 23, 42, 0.9)
  );
  padding: 4rem 2rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  max-width: 600px;
  margin: 0 auto;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Contact form styles */
.contact-form {
  margin-top: 1.5rem;
  text-align: left;
}
.contact-form .form-group {
  margin-bottom: 1rem;
}
.contact-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-color);
}
.contact-form textarea {
  resize: vertical;
}
.contact-form .form-error {
  color: #ffb4b4;
  font-size: 0.9rem;
  min-height: 1.1rem;
  margin-top: 0.25rem;
}
.contact-form .form-status {
  margin-top: 1rem;
  font-weight: 600;
}
.hp-field {
  display: none !important;
}
.alt-contact {
  margin-top: 1rem;
  color: var(--text-muted);
}

/* Thank-you / success panel */
.contact-success {
  max-width: 540px;
  margin: 1.5rem auto 0;
  text-align: center;
}
.contact-success .success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem 1.4rem;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.08),
    rgba(129, 140, 248, 0.06)
  );
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.5);
}
.contact-success .success-graphic {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: #fff;
  font-weight: 700;
  font-size: 1.6rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.contact-success h3 {
  margin: 0;
  font-size: 1.25rem;
}
.contact-success p {
  margin: 0;
  color: var(--text-muted);
}
.contact-success .btn {
  margin-top: 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: #fff;
  border: none;
  cursor: pointer;
}

[data-theme="light"] .contact-content {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9),
    rgba(248, 250, 252, 0.95)
  );
  border: 1px solid rgba(15, 23, 42, 0.15);
}

[data-theme="warm"] .contact-content {
  background: linear-gradient(
    135deg,
    rgba(255, 250, 240, 0.9),
    rgba(254, 246, 228, 0.95)
  );
  border: 1px solid rgba(45, 49, 66, 0.15);
}

[data-theme="ocean"] .contact-content {
  background: linear-gradient(
    135deg,
    rgba(16, 32, 54, 0.9),
    rgba(10, 25, 47, 0.95)
  );
  border: 1px solid rgba(100, 255, 218, 0.2);
}

[data-theme="sunset"] .contact-content {
  background: linear-gradient(
    135deg,
    rgba(42, 20, 60, 0.9),
    rgba(26, 11, 46, 0.95)
  );
  border: 1px solid rgba(255, 107, 107, 0.2);
}

[data-theme="forest"] .contact-content {
  background: linear-gradient(
    135deg,
    rgba(27, 44, 27, 0.9),
    rgba(13, 27, 13, 0.95)
  );
  border: 1px solid rgba(76, 175, 80, 0.2);
}

[data-theme="purple"] .contact-content {
  background: linear-gradient(
    135deg,
    rgba(42, 20, 80, 0.9),
    rgba(26, 0, 51, 0.95)
  );
  border: 1px solid rgba(147, 51, 234, 0.2);
}

[data-theme="cyberpunk"] .contact-content {
  background: linear-gradient(
    135deg,
    rgba(20, 25, 60, 0.9),
    rgba(10, 14, 39, 0.95)
  );
  border: 1px solid rgba(255, 0, 255, 0.3);
}

.contact-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.5rem;
  color: var(--primary-color);
  font-weight: 600;
  padding: 1rem 2rem;
  border: 2px solid var(--glass-border);
  border-radius: 50px;
  transition: var(--transition);
}

.contact-email:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--primary-color);
}

[data-theme="light"] .contact-email {
  border: 2px solid rgba(14, 165, 233, 0.3);
}

[data-theme="light"] .contact-email:hover {
  background: rgba(14, 165, 233, 0.1);
  border-color: var(--primary-color);
}

[data-theme="warm"] .contact-email {
  border: 2px solid rgba(247, 127, 0, 0.3);
}

[data-theme="warm"] .contact-email:hover {
  background: rgba(247, 127, 0, 0.1);
  border-color: var(--primary-color);
}

[data-theme="ocean"] .contact-email {
  border: 2px solid rgba(100, 255, 218, 0.3);
}

[data-theme="ocean"] .contact-email:hover {
  background: rgba(100, 255, 218, 0.1);
  border-color: var(--primary-color);
}

[data-theme="sunset"] .contact-email {
  border: 2px solid rgba(255, 107, 107, 0.3);
}

[data-theme="sunset"] .contact-email:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: var(--primary-color);
}

[data-theme="forest"] .contact-email {
  border: 2px solid rgba(76, 175, 80, 0.3);
}

[data-theme="forest"] .contact-email:hover {
  background: rgba(76, 175, 80, 0.1);
  border-color: var(--primary-color);
}

[data-theme="purple"] .contact-email {
  border: 2px solid rgba(147, 51, 234, 0.3);
}

[data-theme="purple"] .contact-email:hover {
  background: rgba(147, 51, 234, 0.1);
  border-color: var(--primary-color);
}

[data-theme="cyberpunk"] .contact-email {
  border: 2px solid rgba(255, 0, 255, 0.4);
}

[data-theme="cyberpunk"] .contact-email:hover {
  background: rgba(255, 0, 255, 0.1);
  border-color: var(--primary-color);
}

/* Footer */
.footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  margin-top: 4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .name {
    font-size: 2.5rem;
  }

  .title {
    font-size: 1.5rem;
  }

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

  .hero-text {
    margin-bottom: 3rem;
  }

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

  /* Keep header links horizontal on all sizes */
  .nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-links > ul {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
  }

  .timeline::before {
    left: 0;
  }

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

  .theme-selector-wrapper {
    margin-left: 0.5rem;
  }

  .theme-menu {
    right: -1rem;
  }
}

/* Small screens: show only language switch and theme selector in header */
@media (max-width: 450px) {
  /* Hide all nav items except language and theme */
  .nav-links > ul > li:not(.lang-switch):not(.theme-selector-wrapper) {
    display: none;
  }

  /* Reduce gaps so header fits better */
  .nav-links {
    gap: 0.5rem;
  }

  .nav-links > ul {
    gap: 0.5rem;
  }

  .lang-switch {
    margin-left: 0;
  }

  .theme-selector-wrapper {
    margin-left: 0;
  }

  /* Make contact email button smaller on narrow screens */
  .contact-email {
    font-size: 1rem;
    padding: 0.5rem 0.8rem;
  }

  /* Reduce hero name size further if needed on very small screens */
  .name {
    font-size: 2rem;
  }
}

/* Section Dividers */
.section-divider {
  width: 100%;
  max-width: 800px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-color) 30%,
    var(--secondary-color) 70%,
    transparent
  );
  margin: 0 auto;
  opacity: 0;
  transform: scaleX(0);
  transition: transform 1.2s ease-out, opacity 1.2s ease-out;
  position: relative;
  z-index: 10;
}

.section-divider.expand {
  transform: scaleX(1);
  opacity: 0.6;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
