:root {
  /* Dark mode colors */
  --bg-primary: #0f0f23;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #16213e;
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent-primary: #4f46e5;
  --accent-secondary: #7c3aed;
  --border-color: rgba(255, 255, 255, 0.1);
  --nav-bg: rgba(15, 15, 35, 0.95);
  --card-bg: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] {
  /* Light mode colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #4f46e5;
  --accent-secondary: #7c3aed;
  --border-color: rgba(0, 0, 0, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.95);
  --card-bg: rgba(0, 0, 0, 0.05);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at 0% 0%, #1d2671 0, transparent 40%),
    radial-gradient(circle at 100% 100%, #0f3460 0, transparent 40%),
    linear-gradient(
      135deg,
      var(--bg-primary) 0%,
      var(--bg-secondary) 50%,
      var(--bg-tertiary) 100%
    );
  background-size: 280% 280%;
  animation: gradientShift 24s ease infinite;
  color: var(--text-primary);
  scroll-behavior: smooth;
  line-height: 1.6;
  transition: background 0.6s ease, color 0.3s ease;
}

/* Smooth theme toggle transitions */
body.theme-transition,
body.theme-transition * {
  transition: background-color 0.35s ease, color 0.35s ease,
    border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Page-specific layout helpers */
body.contact-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Top navigation */
.topnav {
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  font-family: 'Inter', sans-serif;
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 3rem;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
  animation: slideInDown 0.8s ease;
  border-bottom: 1px solid var(--border-color);
}

.topnav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topnav .logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.5px;
}

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

.topnav nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: all 0.3s ease;
  padding: 0.5rem 0;
}

.topnav nav a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  left: 0;
  bottom: 0;
  transition: width 0.3s ease;
}

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

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

.topnav nav a.active {
  color: var(--accent-primary);
}

.topnav nav a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  gap: 0.4rem;
}

.nav-toggle-label {
  font-size: 0.75rem;
}

.nav-toggle i {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}

body.nav-open .nav-toggle {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

body.nav-open .nav-toggle i {
  transform: rotate(-180deg);
}

.theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  font-size: 1.1rem;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--accent-primary);
  color: white;
  transform: scale(1.05);
}

/* Hero (home page) */
.hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 4rem auto;
  padding: 3rem 2rem;
  gap: 4rem;
  flex-wrap: wrap;
  min-height: 80vh;
}

.hero-text {
  flex: 1;
  color: var(--text-primary);
  animation: fadeInUp 1s ease 0.3s both;
}

.hero-text h1 {
  font-size: 3.5rem;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  line-height: 1.1;
}

.hero-text h2 {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.5px;
}

.hero-text h2 span {
  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: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.chip {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: radial-gradient(circle at 0 0, rgba(124, 58, 237, 0.18), transparent 60%);
  color: var(--text-secondary);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.hero-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-weight: 400;
  max-width: 600px;
}

.hero-text .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.hero-text .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.hero-image {
  flex: 1;
  text-align: center;
  position: relative;
  animation: fadeInUp 1s ease 0.6s both;
}

.hero-image::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 50%;
  opacity: 0.1;
  z-index: -1;
}

.hero-image img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 3px solid rgba(79, 70, 229, 0.2);
}

.hero-image img:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/* Social links (home) */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-links a:hover {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.social-links a.linkedin:hover {
  background: linear-gradient(135deg, #0077b5, #00a0dc);
  box-shadow: 0 8px 20px rgba(0, 119, 181, 0.3);
}

.social-links a.github:hover {
  background: linear-gradient(135deg, #333333, #666666);
  box-shadow: 0 8px 20px rgba(51, 51, 51, 0.3);
}

/* Skills section (home) */
.skills-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 24px;
  background: radial-gradient(circle at 0 0, rgba(79, 70, 229, 0.18), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(124, 58, 237, 0.12), transparent 55%),
    rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(18px);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3rem;
  letter-spacing: -0.5px;
}

.section-title i {
  margin-right: 0.6rem;
  color: var(--accent-secondary);
  vertical-align: middle;
}

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

.skill-category {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.skill-name {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.skill-percentage {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 4px;
  width: 0%;
  transition: width 2s ease;
  position: relative;
}

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

/* About page */
.about-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 3rem 2rem;
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-bottom: 4rem;
  animation: fadeInUp 1s ease 0.3s both;
}

.about-text {
  color: var(--text-secondary);
}

.about-text h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.about-text ul {
  list-style: none;
  margin-top: 1.5rem;
}

.about-text li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  position: relative;
  padding-left: 2rem;
}

.about-text li::before {
  content: '▸';
  color: var(--accent-primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.about-image {
  text-align: center;
  position: relative;
}

.about-image::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  opacity: 0.1;
  z-index: -1;
}

.about-image img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 3px solid rgba(79, 70, 229, 0.2);
}

.about-image img:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.experience-section {
  margin-top: 4rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 2.75rem 2.25rem;
  border-radius: 24px;
  background: radial-gradient(circle at 0 0, rgba(79, 70, 229, 0.16), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.12), transparent 55%),
    rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(18px);
}

/* Projects accordion */
.projects-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.project-item {
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.6));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.7);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease,
    background 0.25s ease;
}

.project-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
  border-color: rgba(129, 140, 248, 0.7);
}

.project-toggle {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem 1.1rem 1.4rem;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  gap: 1.25rem;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.project-toggle:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

.project-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-tech {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.project-chevron {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.25s ease;
}

.project-item.open .project-chevron {
  transform: rotate(-180deg);
  color: var(--accent-secondary);
}

.project-details {
  padding: 0 1.4rem 0.4rem 1.4rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
}

.project-item.open .project-details {
  max-height: 260px;
  opacity: 1;
  transform: translateY(0);
}

.project-details ul {
  list-style: disc;
  margin: 0.4rem 0 0.9rem 1.1rem;
  padding-left: 0.2rem;
  font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.96rem;
  color: var(--text-secondary);
}

.project-details li + li {
  margin-top: 0.25rem;
}

/* Make section titles a bit larger on About/Experience blocks */
.about-section .section-title,
.experience-section .section-title {
  font-size: 3rem;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 1s ease 0.6s both;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  width: 45%;
}

.timeline-item:nth-child(odd) {
  left: 0;
}

.timeline-item:nth-child(even) {
  left: 55%;
}

.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
}

.timeline-content::before {
  content: '';
  position: absolute;
  top: 20px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
  right: -20px;
  border-left-color: var(--card-bg);
}

.timeline-item:nth-child(even) .timeline-content::before {
  left: -20px;
  border-right-color: var(--card-bg);
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

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

.timeline-title {
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-company {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.timeline-description {
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-dot {
  position: absolute;
  top: 20px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 0 4px var(--accent-primary);
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -60px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -60px;
}

/* Contact page */
.contact-section {
  max-width: 900px;
  margin: 4rem auto;
  padding: 3rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: flex-start;
  justify-content: center;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  min-width: 320px;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 1s;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0.08;
  border-radius: 50%;
  z-index: 0;
}

.contact-card h2 {
  color: var(--accent-primary);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  z-index: 1;
}

.contact-card h2 i {
  margin-right: 0.6rem;
}

.contact-details {
  width: 100%;
  z-index: 1;
}

.contact-details li {
  list-style: none;
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.contact-details li strong {
  color: var(--text-primary);
  min-width: 80px;
  display: inline-block;
}

.contact-social {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.5rem;
  z-index: 1;
  justify-content: center;
}

.contact-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--accent-primary);
  font-size: 1.5rem;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.08);
}

.contact-social a:hover {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border-color: transparent;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.18);
}

.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  min-width: 320px;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  animation: fadeInUp 1.2s;
  z-index: 1;
}

.contact-form h3 {
  color: var(--accent-primary);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.contact-form .contact-helper {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.6rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border 0.2s;
  resize: none;
}

.contact-input-wrapper {
  position: relative;
}

.contact-input-wrapper i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-input-wrapper.textarea i {
  top: 1.2rem;
  transform: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border: 1.5px solid var(--accent-primary);
  outline: none;
}

.contact-form button {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 1rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  margin-top: 0.5rem;
}

.contact-form button:hover {
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  transform: translateY(-2px) scale(1.03);
}

/* Footer */
footer {
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

/* Animations */
@keyframes slideInDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .contact-section {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .topnav {
    padding: 0.7rem 1.1rem;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
  }

  .topnav nav {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
    padding-top: 0;
    border-top: 1px solid transparent;
  }

  .topnav nav a {
    width: 100%;
    font-size: 0.9rem;
    padding: 0.35rem 0;
  }

  .nav-toggle {
    display: flex;
  }

  body.nav-open .topnav nav {
    max-height: 260px;
    opacity: 1;
    pointer-events: auto;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top-color: var(--border-color);
  }

  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1rem;
    gap: 2rem;
  }

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

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

  .hero-text p {
    font-size: 1rem;
  }

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

  .hero-image::before {
    width: 280px;
    height: 280px;
  }

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

  .about-text h3 {
    font-size: 1.5rem;
  }

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

  .about-image img {
    width: 240px;
    height: 240px;
  }

  .about-image::before {
    width: 280px;
    height: 280px;
  }

  .about-section {
    margin: 3rem 1.25rem;
    padding: 2.5rem 1.5rem;
  }

  .skills-section {
    margin: 3rem 1.25rem;
    padding: 3rem 1.5rem;
  }

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

  .experience-section {
    margin: 3rem 1.25rem;
    padding: 2.25rem 1.5rem;
  }

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

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 50px;
  }

  .timeline-dot {
    left: 10px !important;
  }

  .timeline-content::before {
    left: -20px !important;
    border-right-color: var(--card-bg) !important;
    border-left-color: transparent !important;
  }
}

@media (max-width: 600px) {
  .topnav {
    padding: 1rem 1rem;
  }

  .contact-section {
    margin: 3rem 1rem;
    padding: 2.5rem 1rem;
  }

  .contact-card,
  .contact-form {
    min-width: 90vw;
    max-width: 98vw;
    padding: 1.5rem 0.7rem;
  }
}

@media (max-width: 480px) {
  .topnav .logo {
    font-size: 1.5rem;
  }

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

  .hero-text h2 {
    font-size: 1.5rem;
  }

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

  .hero-image::before {
    width: 240px;
    height: 240px;
  }

  .social-links {
    justify-content: center;
    margin-top: 1.5rem;
  }

  .social-links a {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

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

  .about-image::before {
    width: 240px;
    height: 240px;
  }

  .section-subtitle {
    padding: 0 1rem;
  }

  .skills-section {
    margin: 2.5rem 1rem;
    padding: 2.5rem 1.25rem;
    border-radius: 20px;
  }

  .experience-section {
    margin: 2.5rem 1rem;
    padding: 2.25rem 1.25rem;
    border-radius: 20px;
  }
}

