/* ==== Root Variables for Colors and Fonts ==== */
:root {
  /* Solid Professional Accent Colors */
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #2563eb;
  --secondary-hover: #1d4ed8;
  --highlight-color: #0284c7;
  --badge-bg: rgba(79, 70, 229, 0.08);
  --bg-hover: rgba(79, 70, 229, 0.03);

  /* Light Theme Surfaces & Typography */
  --nav-bg: rgba(255, 255, 255, 0.92);
  --footer-bg: #f8fafc;
  --text-light: #0f172a;
  --text-color: #0f172a;
  --text-muted: #475569;
  --background: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --font-stack: "Inter", "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 12px 24px -4px rgba(79, 70, 229, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --glass-backdrop: blur(12px);
}

/* ==== Dark Theme (Midnight Slate Studio) ==== */
html[data-theme="dark"] {
  --primary-color: #818cf8;
  --primary-hover: #93c5fd;
  --secondary-color: #60a5fa;
  --secondary-hover: #93c5fd;
  --highlight-color: #38bdf8;
  --badge-bg: rgba(129, 140, 248, 0.14);
  --bg-hover: rgba(255, 255, 255, 0.03);

  /* Dark Theme Surfaces & Typography */
  --nav-bg: rgba(15, 23, 42, 0.92);
  --footer-bg: #0b1120;
  --text-light: #f8fafc;
  --text-color: #f8fafc;
  --text-muted: #94a3b8;
  --background: #0b0f19;
  --card-bg: #111827;
  --card-border: #1f2937;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 14px 28px -4px rgba(0, 0, 0, 0.6), 0 0 20px rgba(129, 140, 248, 0.15);
  --glass-backdrop: blur(16px);
}

/* ==== Global Box-Sizing & Reset ==== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  position: relative;
}

html {
  scroll-behavior: smooth;
}

/* Accessible Anchor Scroll Offsets (Prevents Sticky Nav Overlap) */
section[id],
header[id],
#home,
#about,
#services,
#projects,
#skills,
#experience,
#education,
#contact {
  scroll-margin-top: 96px;
}
@media (max-width: 768px) {
  section[id],
  header[id],
  #home,
  #about,
  #services,
  #projects,
  #skills,
  #experience,
  #education,
  #contact {
    scroll-margin-top: 76px;
  }
}

body {
  background-color: var(--background);
  color: var(--text-light);
  font-family: var(--font-stack);
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

hr {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 40px auto;
  max-width: 1140px;
  width: 100%;
}

/* ==== Header & Navigation ==== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 12px 0 0 0;
  transition: padding 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  max-width: 1140px;
  margin: 0 auto;
  background-color: var(--nav-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 0 28px;
  color: var(--text-light);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, height 0.3s ease, margin 0.3s ease;
  box-sizing: border-box;
  position: relative;
}

nav.scrolled {
  height: 58px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
  border-color: rgba(79, 70, 229, 0.25);
}

/* Branded Logo */
nav .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.3px;
  color: var(--text-light);
  transition: transform 0.2s ease;
  z-index: 2;
}
nav .logo:hover {
  transform: translateY(-1px);
}
.logo-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--primary-color);
  color: #ffffff;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.logo-text {
  color: var(--text-light);
}
.logo-accent {
  color: var(--primary-color);
}

/* Nav Actions (Theme, Desktop CTA & Mobile Menu Toggle) */
nav .nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.theme-toggle {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  color: var(--primary-color);
  font-size: 1.2rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  background-color: var(--badge-bg);
}
.theme-toggle:active,
.theme-toggle:focus {
  transform: translateY(0);
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 9px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.22);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-cta-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}

/* Centered Navigation Menu Links on Desktop */
.Right {
  display: flex;
  align-items: center;
}
@media (min-width: 769px) {
  .Right {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}
@media (min-width: 769px) and (max-width: 960px) {
  .Right {
    position: static;
    transform: none;
  }
}
nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
  align-items: center;
}
nav ul li {
  margin: 0;
}
nav ul li a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  transition: color 0.25s ease, background-color 0.25s ease, transform 0.2s ease;
}
nav ul li a:hover {
  color: var(--primary-color);
  background-color: var(--badge-bg);
}
nav ul li a.active {
  color: #ffffff;
  background: var(--primary-color);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

/* Mobile Hamburger Menu Button */
.menu-toggle {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  margin-left: 0;
  padding: 0;
}
.menu-toggle .menu-icon,
.menu-toggle .menu-icon::before,
.menu-toggle .menu-icon::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
  position: absolute;
  transition: all 0.3s ease;
}
.menu-toggle .menu-icon {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.menu-toggle .menu-icon::before {
  top: -6px;
}
.menu-toggle .menu-icon::after {
  bottom: -6px;
}
.menu-toggle.open .menu-icon {
  background: transparent;
}
.menu-toggle.open .menu-icon::before {
  transform: rotate(45deg);
  top: 0;
}
.menu-toggle.open .menu-icon::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* ==== Hero Section ==== */
.firstsection {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 48px 36px;
  background-color: var(--card-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--card-border);
  margin-top: 40px;
  margin-left: auto;
  margin-right: auto;
  max-width: 1140px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.firstsection:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.25);
}
.firstsection > div {
  flex: 1;
  min-width: 0;
  margin: 10px;
}
.leftsection {
  font-size: 1.5rem;
  line-height: 1.7;
  padding-right: 24px;
}
.leftsection .highlight-text {
  color: var(--primary-color);
  font-weight: 800;
}
#element {
  color: var(--primary-color);
  font-weight: 700;
  display: inline;
}
.typed-cursor {
  color: var(--primary-color);
  font-weight: 300;
  animation: typed-blink 0.7s infinite;
}
@keyframes typed-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.hero-role-line {
  min-height: 2.2em;
  margin: 6px 0;
}
.status-badge-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--badge-bg);
  color: var(--primary-color);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  display: inline-block;
  animation: pulse-dot 2s infinite ease-in-out;
}
@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.hero-subtext {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 12px 0 20px;
  max-width: 580px;
}

/* ==== About Section Dedicated Styles ==== */
.about-section {
  align-items: center;
}
.about-section h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
}
.about-headline {
  color: var(--primary-color);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  line-height: 1.5;
}
.about-section p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 14px 0;
}
.about-section strong {
  color: var(--text-color);
}
.about-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.about-highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--badge-bg);
  color: var(--primary-color);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--primary-color);
}
.about-photo-wrapper {
  display: inline-block;
  text-align: center;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
}
.leftsection .btn,
.buttons .btn {
  background: var(--primary-color);
  color: #ffffff;
  padding: 0 24px;
  height: 46px;
  border-radius: 10px;
  text-decoration: none;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.98rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
  line-height: 1;
}
.leftsection .btn:hover,
.buttons .btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}
.leftsection .btn-secondary,
.buttons .btn-secondary {
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: var(--shadow) !important;
}
.leftsection .btn-secondary:hover,
.buttons .btn-secondary:hover {
  background: var(--card-border) !important;
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

/* Unified Segmented Resume Button Group */
.btn-group {
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
  border-radius: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 46px;
  box-sizing: border-box;
}
.btn-group:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}
.btn-group-left {
  background: var(--primary-color);
  color: #ffffff;
  padding: 0 20px;
  height: 46px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border: none;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  text-decoration: none;
  transition: background-color 0.25s ease;
  line-height: 1;
  font-family: inherit;
}
.btn-group-right {
  background: var(--primary-color);
  color: #ffffff;
  padding: 0 14px;
  height: 46px;
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  text-decoration: none;
  transition: background-color 0.25s ease;
  line-height: 1;
}
.btn-group-left:hover,
.btn-group-right:hover {
  background: var(--primary-hover);
}
.rightsection {
  text-align: center;
}
.rightsection img {
  max-width: 320px;
  border-radius: 20px;
  box-shadow: var(--shadow-hover);
  border: 2px solid var(--card-border);
  transition: transform 0.3s ease;
}
.rightsection img:hover {
  transform: scale(1.02);
}

/* ==== Section Cards (Education, Skills, Projects) ==== */
.services-container {
  background-color: var(--card-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--card-border);
  padding: 36px 32px;
  margin: 36px auto;
  border-radius: 20px;
  max-width: 1140px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.services-container:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.25);
}
.services-container h2 {
  color: var(--primary-color);
  font-size: 1.6rem;
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.services-container ul {
  padding-left: 20px;
}
.services-container ul li {
  margin: 12px 0;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.6;
}
.services-container ul li a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}
.services-container ul li a:hover {
  color: var(--highlight-color);
  text-decoration: underline;
}

/* ==== Interactive & Focus States ==== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

/* ==== Section Introduction ==== */
.section-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: -8px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ==== Services Grid & Cards ==== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  margin-bottom: 28px;
  width: 100%;
  box-sizing: border-box;
}
.service-card {
  background: var(--bg-hover);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--badge-bg);
  border: 1px solid var(--card-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  margin-bottom: 16px;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
.service-card:hover .service-icon {
  transform: scale(1.08) translateY(-2px);
  background-color: var(--bg-hover);
  border-color: var(--primary-color);
}
.service-icon svg {
  width: 24px;
  height: 24px;
}
.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 10px 0;
  letter-spacing: -0.2px;
}
.service-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 16px 0;
  flex-grow: 1;
}
.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.service-tags span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  background-color: var(--badge-bg);
  color: var(--text-color);
  border: 1px solid var(--card-border);
  padding: 3px 10px;
  border-radius: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.service-tags span:hover {
  border-color: var(--primary-color);
}
.service-tags span svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.hire-cta-banner {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(37, 99, 235, 0.04) 100%);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.hire-cta-content h3 {
  margin: 0 0 6px 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color);
}
.hire-cta-content p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.btn-hire {
  background: var(--primary-color);
  color: #ffffff !important;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 10px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-hire:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

/* ==== Project Cards & Action Links ==== */
.project-list {
  list-style: none !important;
  padding-left: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px;
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
}
.project-item {
  background: var(--bg-hover);
  border: 1px solid var(--card-border);
  padding: 24px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.project-item:hover {
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
  transform: translateY(-3px);
}
.project-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.project-title {
  font-weight: 700;
  font-size: 1.22rem;
  color: var(--text-color);
  margin-bottom: 0;
  letter-spacing: -0.2px;
  word-break: break-word;
}
.project-cat-badge {
  font-size: 0.76rem;
  font-weight: 600;
  background-color: var(--badge-bg);
  color: var(--primary-color);
  border: 1px solid var(--card-border);
  padding: 3px 10px;
  border-radius: 12px;
  white-space: normal;
  text-align: center;
  align-self: flex-start;
}
.case-study-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  flex-grow: 1;
}
.case-row {
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.case-row strong {
  color: var(--text-color);
  font-weight: 600;
}
.project-tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 600;
  background-color: var(--card-bg);
  color: var(--text-color);
  border: 1px solid var(--card-border);
  padding: 3px 8px;
  border-radius: 6px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.tech-tag:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
}
.tech-tag svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.project-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.project-link.github-link {
  background-color: var(--card-bg);
  color: var(--text-color) !important;
  border: 1px solid var(--card-border);
}
.project-link.github-link:hover {
  background-color: var(--card-border);
  color: var(--primary-color) !important;
}
.project-link.live-link {
  background-color: var(--primary-color);
  color: #ffffff !important;
  border: 1px solid var(--primary-color);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.25);
}
.project-link.live-link:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

/* ==== Section Heading Icons ==== */
.heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background-color: var(--badge-bg);
  border: 1px solid var(--card-border);
  color: var(--primary-color);
  margin-right: 10px;
  vertical-align: middle;
  flex-shrink: 0;
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}
h2:hover .heading-icon {
  transform: scale(1.08) rotate(-3deg);
  border-color: var(--primary-color);
}
.heading-icon svg {
  width: 20px;
  height: 20px;
}

/* ==== Technical Skills & Architecture Matrix ==== */
.skills-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
  width: 100%;
}
@media (max-width: 900px) {
  .skills-categories-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.skills-cat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.skills-cat-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
  transform: translateY(-2px);
}
.skills-cat-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--card-border);
}
.skills-cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--badge-bg);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  flex-shrink: 0;
}
.skills-cat-icon svg {
  width: 22px;
  height: 22px;
}
.skills-cat-header h3 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 3px 0;
  letter-spacing: -0.2px;
}
.skills-cat-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}
.skills-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 155px), 1fr));
  gap: 10px;
}
.skill-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background-color: var(--bg-hover);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}
.skill-badge:hover {
  transform: translateY(-2px);
  border-color: var(--brand-color, var(--primary-color));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.skill-badge-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.skill-badge-icon svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}
.skill-badge:hover .skill-badge-icon svg {
  transform: scale(1.12);
}
.skill-badge-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.skill-badge-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skill-badge-sub {
  font-size: 0.71rem;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==== Timeline ==== */
.secondsection {
  background-color: var(--card-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--card-border);
  padding: 52px 32px;
  text-align: left;
  max-width: 1140px;
  width: 100%;
  margin: 36px auto;
  border-radius: 20px;
  box-sizing: border-box;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.secondsection:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.25);
}
.section-heading {
  text-align: center;
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 8px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.section-subheading {
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 44px;
  color: var(--text-muted);
}
.timeline {
  border-left: 3px solid var(--primary-color);
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  padding-left: 24px;
}
.timeline-item {
  padding-left: 24px;
  position: relative;
  margin-bottom: 10px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 6px;
  width: 14px;
  height: 14px;
  background: var(--primary-color);
  border-radius: 50%;
  border: 3px solid var(--card-bg);
  box-shadow: 0 0 12px rgba(79, 70, 229, 0.3);
}
.timeline-badge-role {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}
.timeline-date {
  display: inline-block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary-color);
  background: var(--badge-bg);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
  border: 1px solid var(--card-border);
}
.timeline-content h3 {
  margin: 0;
  color: var(--text-light);
  font-size: 1.2rem;
  font-weight: 600;
}
.timeline-content p {
  color: var(--text-muted);
  margin: 5px 0 0;
  font-size: 0.98rem;
}

/* ==== Contact Section ==== */
#contact {
  max-width: 1140px;
  width: 100%;
  margin: 60px auto;
  padding: 44px 36px;
  background-color: var(--card-bg);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  color: var(--text-light);
  font-family: var(--font-stack);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
#contact:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.25);
}
#contact h2 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 8px;
  font-weight: 800;
  font-size: 1.8rem;
}
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 36px;
  width: 100%;
  margin-top: 16px;
}
.contact-info-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}
.contact-intro {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.contact-channel-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-channel-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background-color: var(--bg-hover);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  text-decoration: none !important;
  color: var(--text-color) !important;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.contact-channel-item:hover {
  transform: translateX(4px);
  border-color: var(--primary-color);
  background-color: var(--card-border);
}
.contact-channel-gmail:hover {
  border-color: #EA4335;
  background-color: rgba(234, 67, 53, 0.08);
}
.contact-channel-linkedin:hover {
  border-color: #0A66C2;
  background-color: rgba(10, 102, 194, 0.08);
}
.contact-channel-whatsapp:hover {
  border-color: #25D366;
  background-color: rgba(37, 211, 102, 0.08);
}
.contact-channel-github:hover {
  border-color: var(--primary-color);
  background-color: rgba(121, 40, 202, 0.08);
}
.contact-channel-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.contact-channel-item:hover .contact-channel-icon {
  transform: scale(1.08);
  border-color: inherit;
}
.contact-channel-icon svg {
  width: 22px;
  height: 22px;
}
.contact-channel-details {
  display: flex;
  flex-direction: column;
}
.contact-channel-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}
.contact-channel-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-color);
  word-break: break-all;
}
.contact-availability-box {
  background-color: var(--badge-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.contact-availability-box strong {
  color: var(--text-color);
}
.contact-form-panel {
  display: flex;
  flex-direction: column;
}
#contact form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  text-align: left;
}
.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
}
.label-optional {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}
#contact input,
#contact textarea {
  padding: 14px 18px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background-color: var(--background);
  color: var(--text-light);
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  font-family: inherit;
  box-sizing: border-box;
  width: 100%;
}
#contact textarea {
  min-height: 120px;
}
#contact input:focus,
#contact textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}
#contact button.btn {
  background: var(--primary-color);
  color: #fff;
  padding: 14px 24px;
  min-height: 48px;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  margin-top: 4px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
#contact button.btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}
#contact button.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
#form-status {
  margin-top: 6px;
  font-size: 0.95rem;
  text-align: center;
  min-height: 24px;
  border-radius: 8px;
  transition: all 0.25s ease;
  line-height: 1.5;
}
#form-status.status-loading {
  color: var(--primary-color);
  padding: 8px;
}
#form-status.status-success {
  color: #10b981;
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 12px 16px;
}
#form-status.status-error {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 12px 16px;
}
#form-status a {
  color: inherit;
  text-decoration: underline;
}

/* Responsive for contact section */
@media (max-width: 600px) {
  #contact {
    padding: 24px 16px;
    max-width: 100%;
  }
  #contact h2 {
    font-size: 1.35rem;
  }
  #contact input,
  #contact textarea {
    font-size: 1rem;
    padding: 12px 14px;
  }
  #contact button.btn {
    font-size: 1rem;
    padding: 12px 16px;
  }
}

/* ==== Modal ==== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pdf-modal-content {
  margin: 2% auto;
  width: 90%;
  max-width: 960px;
  height: 92vh;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow-hover);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.25s ease-out;
}
@keyframes modalPop {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.pdf-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--card-border);
  background-color: var(--card-bg);
}
.pdf-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}
.pdf-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-light);
  background: var(--background);
  border: 1px solid var(--card-border);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.modal-icon-btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.modal-close-btn:hover {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.1);
}
.pdf-modal-body {
  flex: 1;
  width: 100%;
  height: 100%;
  background-color: var(--background);
}
.pdf-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==== Footer ==== */
footer {
  background-color: var(--footer-bg);
  color: var(--text-muted);
  padding: 40px 20px 24px 20px;
  text-align: center;
  font-family: var(--font-stack);
  border-top: 1px solid var(--card-border);
  transition: background-color 0.3s ease;
}
.footer {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-first {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.footer-tagline {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 20px 0;
  font-weight: 500;
}
.footer-social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 10px;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.social-btn:hover {
  transform: translateY(-2px);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.25);
}
.social-btn svg {
  transition: transform 0.25s ease;
}
.social-btn:hover svg {
  transform: scale(1.1);
}
.social-btn-github:hover {
  background-color: #24292e !important;
  border-color: #24292e !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(36, 41, 46, 0.3) !important;
}
.social-btn-linkedin:hover {
  background-color: #0A66C2 !important;
  border-color: #0A66C2 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(10, 102, 194, 0.3) !important;
}
.social-btn-whatsapp:hover {
  background-color: #25D366 !important;
  border-color: #25D366 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3) !important;
}
.social-btn-x:hover {
  background-color: #000000 !important;
  border-color: #333333 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4) !important;
}
.social-btn-instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(225, 48, 108, 0.3) !important;
}
.social-btn-email:hover {
  background-color: #EA4335 !important;
  border-color: #EA4335 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(234, 67, 53, 0.3) !important;
}
.footer-rights {
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.footer-rights ul {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-rights ul li a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-rights ul li a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}
.copyright-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==== Scroll-to-Top Button ==== */
.scroll-to-top {
  display: none;
  position: fixed;
  bottom: 40px;
  right: 40px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 28px;
  cursor: pointer;
  z-index: 1002;
  box-shadow: 0 2px 12px rgba(91, 105, 232, 0.18);
  transition: background 0.3s, box-shadow 0.3s;
}
.scroll-to-top:hover {
  background-color: var(--highlight-color);
  box-shadow: 0 4px 24px rgba(91, 105, 232, 0.24);
}
.scroll-to-top.show {
  display: block;
}

/* ==== Responsive ==== */
@media (max-width: 900px) {
  .firstsection,
  .services-container,
  .secondsection,
  #contact {
    padding: 28px 20px;
    max-width: 100%;
    width: 100%;
    margin: 24px auto;
    box-sizing: border-box;
  }
  nav {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0;
  }
  nav {
    padding: 0 16px;
    height: 60px;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
  }
  .nav-cta-btn {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
    z-index: 1001;
  }
  .Right {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    transform: none;
    background: var(--nav-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    padding: 14px 16px;
    z-index: 1000;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid var(--card-border);
    border-radius: 0 0 16px 16px;
    box-sizing: border-box;
  }
  .Right.active {
    display: block;
    animation: fadeInDown 0.25s ease-out;
  }
  .Right ul {
    flex-direction: column;
    width: 100%;
    gap: 6px;
  }
  .Right ul li {
    margin: 0;
    text-align: center;
    width: 100%;
  }
  .Right ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    box-sizing: border-box;
    font-size: 1rem;
  }
  .firstsection {
    flex-direction: column;
    margin-top: 20px;
    padding: 24px 18px;
    text-align: center;
  }
  .firstsection > div {
    margin: 0 0 16px 0;
    width: 100%;
    box-sizing: border-box;
  }
  .leftsection {
    font-size: 1.15rem;
    padding-right: 0;
    width: 100%;
  }
  .leftsection h1 {
    font-size: 1.8rem;
    margin-top: 0;
  }
  .buttons {
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-top: 20px;
  }
  .btn-group {
    width: 100%;
    height: 44px;
    display: flex;
  }
  .btn-group-left {
    flex: 1;
    justify-content: center;
    height: 44px;
    font-size: 0.95rem;
  }
  .btn-group-right {
    width: 46px;
    justify-content: center;
    height: 44px;
  }
  .leftsection .btn,
  .buttons .btn {
    width: 100%;
    justify-content: center;
    height: 44px;
    min-height: 44px;
    font-size: 0.95rem;
    box-sizing: border-box;
  }
  .rightsection {
    margin-top: 20px;
    width: 100%;
  }
  .rightsection img {
    max-width: 240px;
    margin: 0 auto;
  }
  .secondsection {
    padding: 28px 18px;
  }
  .section-heading {
    font-size: 1.7rem;
  }
  .section-subheading {
    font-size: 0.95rem;
    margin-bottom: 28px;
  }
  .timeline {
    margin-left: 8px;
    padding-left: 18px;
  }
  .timeline-item::before {
    left: -26px;
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .project-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hire-cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .btn-hire {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
  .footer ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .firstsection,
  .services-container,
  .secondsection,
  #contact {
    padding: 20px 14px;
    margin-top: 16px;
    border-radius: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .leftsection h1 {
    font-size: 1.5rem;
  }
  .leftsection {
    font-size: 0.98rem;
  }
  .hero-role-line {
    min-height: 2.6em;
  }
  .buttons {
    gap: 10px;
    margin-top: 16px;
  }
  .btn-group,
  .btn-group-left,
  .btn-group-right,
  .leftsection .btn,
  .buttons .btn {
    height: 44px;
    min-height: 44px;
    font-size: 0.9rem;
  }
  .btn-group-right {
    width: 44px;
  }
  .project-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .project-item {
    padding: 18px 14px;
  }
  .project-links {
    width: 100%;
  }
  .project-link {
    flex: 1;
    justify-content: center;
    padding: 10px 12px;
    min-height: 44px;
    box-sizing: border-box;
  }
  .timeline {
    margin-left: 4px;
    padding-left: 14px;
  }
  .timeline-item {
    padding-left: 14px;
  }
  .timeline-item::before {
    left: -22px;
  }
  .pdf-modal-content {
    width: 96%;
    height: 88vh;
    margin: 6% auto;
    border-radius: 12px;
  }
  .pdf-modal-header {
    padding: 10px 14px;
  }
  .pdf-modal-title {
    font-size: 1rem;
  }
  .scroll-to-top {
    width: 42px;
    height: 42px;
    font-size: 20px;
    bottom: 16px;
    right: 16px;
  }
}

/* ==== Reduced Motion Preferences ==== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
