/* ==========================================================================
   Avishek Karki - Personal Portfolio Stylesheet
   Pure CSS3 - Modern, Responsive, Accessible, Light & Dark Mode
   ========================================================================== */

/* --- CSS Custom Properties & Theming --- */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  /* Light Theme */
  --bg-primary: #fbfbfd;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f4f5f8;
  --bg-tag: #eef2f6;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-subtle: #eff6ff;
  --accent-border: #bfdbfe;
  
  --border-color: #e5e7eb;
  --border-subtle: #f3f4f6;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.02);
  
  --header-bg: rgba(251, 251, 253, 0.88);
  --code-bg: #f3f4f6;
}

[data-theme="dark"] {
  /* Dark Theme */
  --bg-primary: #0f1117;
  --bg-surface: #171a23;
  --bg-surface-elevated: #1f2330;
  --bg-tag: #252a3a;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-subtle: #172554;
  --accent-border: #1e40af;
  
  --border-color: #272c3d;
  --border-subtle: #1c202d;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.6);
  
  --header-bg: rgba(15, 17, 23, 0.90);
  --code-bg: #1e2230;
}

/* --- Base & Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reduced Motion */
@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;
  }
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Layout Container --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* --- Header & Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.5rem;
  background-color: var(--accent);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.35rem 0;
  transition: color 0.2s ease;
}

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

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent);
  border-radius: 2px;
}

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

.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-surface);
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--bg-surface-elevated);
}

.theme-toggle-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.375rem;
  height: 2.375rem;
  padding: 0.45rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Dropdown Drawer */
.mobile-menu-drawer {
  display: none;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  padding: 1.25rem 1.5rem;
}

.mobile-menu-drawer.open {
  display: block;
  animation: fadeIn 0.2s ease;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-link {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

/* --- Section Structure --- */
section {
  padding: 5rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-header.text-center {
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background-color: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.125rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1.25;
}

.section-lead {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 680px;
  margin-top: 0.65rem;
  line-height: 1.6;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: 0.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.28);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-elevated);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* --- 1. Hero Section --- */
.hero-section {
  padding: 5.5rem 0 4.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-content {
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-greeting {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  display: inline-block;
}

.hero-name {
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.65rem;
}

.hero-role {
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero-bio {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
  max-width: 580px;
}

.hero-sub-learning {
  font-size: 0.9rem;
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  padding-left: 0.75rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

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

/* Avatar / Visual Card */
.hero-visual {
  display: flex;
  justify-content: center;
  animation: fadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.avatar-wrapper {
  position: relative;
  width: 290px;
  height: 310px;
}

.avatar-card {
  width: 100%;
  height: 100%;
  border-radius: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

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

.avatar-image-frame {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  border: 3px solid var(--accent-border);
  box-shadow: var(--shadow-md);
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
  display: none;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
}

.avatar-badge-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.avatar-subtext {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- 2. About Me Section --- */
.about-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.about-paragraph {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-color);
}

.highlight-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.highlight-label {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.highlight-value {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* --- 3. Skills Section --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.skill-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.35rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.skill-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.skill-icon-badge {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

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

.skill-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Skills Subsections (Sharpening & Tools) */
.skills-subsections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.sub-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 0.875rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sub-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-card-title svg {
  color: var(--accent);
}

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

.pill-tag {
  font-size: 0.825rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  background: var(--bg-tag);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.pill-tag:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background-color: var(--accent-subtle);
}

/* --- 4. Projects Section --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 0.875rem;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.project-top {
  margin-bottom: 1.25rem;
}

.project-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.project-tech-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 0.2rem 0.55rem;
  border-radius: 0.375rem;
}

.project-github-icon {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.project-github-icon:hover {
  color: var(--accent);
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s ease;
}

.project-link:hover {
  gap: 0.6rem;
  color: var(--accent-hover);
}

/* Projects Coming Soon Card */
.projects-empty-state {
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: 1rem;
  padding: 3.5rem 2rem;
  text-align: center;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.empty-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background-color: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

.empty-state-badge span.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.empty-state-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--text-secondary);
}

.empty-state-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  letter-spacing: -0.01em;
}

.empty-state-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- 5. Education Section --- */
.education-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.education-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 0.875rem;
  padding: 1.75rem 2rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.education-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.edu-degree {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.edu-period {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 0.2rem 0.65rem;
  border-radius: 0.375rem;
  border: 1px solid var(--accent-border);
}

.edu-institution {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.edu-details {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 0.35rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border-subtle);
}

/* --- 6. Contact Section --- */
.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 3rem 2.25rem;
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: var(--shadow-sm);
}

.contact-lead {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.25rem;
  line-height: 1.65;
}

.contact-links-container {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  max-width: 480px;
  margin: 0 auto;
}

.social-button-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.social-button-row:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.social-button-row svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
  flex-shrink: 0;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  background-color: var(--bg-surface);
  margin-top: 3rem;
}

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

.footer-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-icons {
  display: flex;
  gap: 0.75rem;
}

.footer-icon-link {
  color: var(--text-secondary);
  padding: 0.4rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.footer-icon-link:hover {
  color: var(--accent);
  background-color: var(--accent-subtle);
}

.footer-icon-link svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-visual {
    order: -1;
    justify-content: flex-start;
  }

  .avatar-wrapper {
    width: 220px;
    height: 240px;
  }

  .avatar-image-frame {
    width: 90px;
    height: 90px;
    margin-bottom: 0.75rem;
  }

  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

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

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

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .hamburger-btn {
    display: flex;
  }

  .hero-name {
    font-size: 2.4rem;
  }

  .hero-role {
    font-size: 1.15rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  section {
    padding: 3.75rem 0;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

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

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

  .about-card {
    padding: 1.75rem 1.25rem;
  }

  .education-card {
    padding: 1.5rem 1.25rem;
  }

  .contact-card {
    padding: 2.25rem 1.25rem;
  }
}
