/* ============================================
   PORTFOLIO — Design System & Styles
   Muted Blue Elegant Theme with Dark/Light Mode
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

/* ---- Dark Mode (default) ---- */
:root {
  --bg-primary: #0c1017;
  --bg-secondary: #121620;
  --bg-card: #181d2a;
  --bg-card-hover: #1f2535;
  --bg-glass: rgba(12, 16, 23, 0.85);
  --border: rgba(120, 140, 175, 0.08);
  --border-hover: rgba(120, 140, 175, 0.15);

  --text-primary: #dde1ea;
  --text-secondary: #8794b2;
  --text-tertiary: #505d78;

  --accent: #3d5aad;
  --accent-hover: #4d6bbf;
  --accent-soft: rgba(61, 90, 173, 0.12);
  --accent-glow: rgba(61, 90, 173, 0.22);
  --accent-2: #6b8ad4;
  --accent-gradient: linear-gradient(135deg, #3d5aad 0%, #5a79c8 50%, #7b9adf 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(61,90,173,0.12) 0%, rgba(90,121,200,0.06) 100%);

  --success: #5b9e8f;
  --warning: #c4a254;
  --danger: #c47070;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.45);
  --shadow-accent: 0 4px 20px rgba(61, 90, 173, 0.2);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --max-width: 1200px;
  --nav-height: 72px;

  color-scheme: dark;
}

/* ---- Light Mode ---- */
[data-theme="light"] {
  --bg-primary: #f4f5f9;
  --bg-secondary: #fafbfe;
  --bg-card: #ffffff;
  --bg-card-hover: #eef0f6;
  --bg-glass: rgba(244, 245, 249, 0.88);
  --border: rgba(90, 110, 155, 0.1);
  --border-hover: rgba(90, 110, 155, 0.18);

  --text-primary: #1e2844;
  --text-secondary: #4f5a78;
  --text-tertiary: #8e96ac;

  --accent: #3552a0;
  --accent-hover: #4463b2;
  --accent-soft: rgba(53, 82, 160, 0.08);
  --accent-glow: rgba(53, 82, 160, 0.14);
  --accent-2: #5470bf;
  --accent-gradient: linear-gradient(135deg, #3552a0 0%, #4d6db8 50%, #6d8dd5 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(53,82,160,0.07) 0%, rgba(77,109,184,0.03) 100%);

  --shadow-sm: 0 1px 3px rgba(30, 45, 80, 0.06);
  --shadow-md: 0 4px 20px rgba(30, 45, 80, 0.08);
  --shadow-lg: 0 8px 40px rgba(30, 45, 80, 0.1);
  --shadow-accent: 0 4px 20px rgba(53, 82, 160, 0.15);

  color-scheme: light;
}

/* ---- View Transitions for Theme Ripple ---- */
::view-transition-group(root) {
  animation: none;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

/* Elegant Mesh Grid Background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 20%, transparent 80%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---- Background Ambient ---- */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-ambient::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.2;
  animation: float1 20s ease-in-out infinite;
}

.bg-ambient::after {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(90, 112, 160, 0.1) 0%, transparent 70%);
  opacity: 0.15;
  animation: float2 25s ease-in-out infinite;
}

[data-theme="light"] .bg-ambient::before { opacity: 0.08; }
[data-theme="light"] .bg-ambient::after { opacity: 0.06; }

@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(80px, 60px); }
  66% { transform: translate(-40px, 30px); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-60px, -40px); }
  66% { transform: translate(30px, -60px); }
}

/* ---- Navigation ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

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

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.85);
}

.nav-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.nav-logo span { color: var(--accent); }

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

/* ---- Theme Toggle ---- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: rotate(20deg);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ---- Hamburger ---- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-hamburger span {
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---- Sections ---- */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 2rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-label::before {
  content: "";
  width: 24px; height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

/* ---- Hero Section ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--accent-gradient-subtle);
  border: 1px solid rgba(79, 109, 199, 0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-2);
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out;
}

[data-theme="light"] .hero-badge {
  color: var(--accent);
  border-color: rgba(59, 91, 186, 0.15);
}

.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-name {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-name .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--accent-glow);
  filter: brightness(1.1);
}

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

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ---- Hero Socials ---- */
.hero-socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 3rem;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-3px);
}

.social-link svg { width: 20px; height: 20px; }

/* ---- About Section ---- */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

.about-photo-wrapper { 
  position: relative; 
  perspective: 1200px;
  --tiltX: 0deg;
  --tiltY: 0deg;
  --mouseX: 50%;
  --mouseY: 50%;
  z-index: 5;
}

.about-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  transition: transform 0.15s ease-out, border-color var(--transition);
  transform: rotateX(var(--tiltX)) rotateY(var(--tiltY));
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-md);
}

/* Elegant Reactive Outline */
.about-photo-wrapper::before,
.about-photo-wrapper::after {
  content: "";
  position: absolute;
  inset: -15px;
  border-radius: calc(var(--radius-lg) + 15px);
  opacity: 0;
  transition: opacity 0.4s ease, inset 0.4s ease, transform 0.15s ease-out;
  pointer-events: none;
  z-index: 1;
}

.about-photo-wrapper::before {
  border: 1px solid var(--accent);
  background: radial-gradient(
    circle 150px at var(--mouseX) var(--mouseY),
    var(--accent-glow) 0%,
    transparent 100%
  );
  transform: rotateX(calc(var(--tiltX) * 0.8)) rotateY(calc(var(--tiltY) * 0.8)) translateZ(-10px);
}

.about-photo-wrapper::after {
  inset: -30px;
  border-radius: calc(var(--radius-lg) + 30px);
  border: 1px dashed var(--accent-2);
  transform: translateZ(-20px);
  animation: spinDashed 20s linear infinite;
  animation-play-state: paused;
}

@keyframes spinDashed {
  0% { transform: translateZ(-20px) rotate(0deg); }
  100% { transform: translateZ(-20px) rotate(360deg); }
}

.about-photo-wrapper.active .about-photo {
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

[data-theme="light"] .about-photo-wrapper.active .about-photo {
  box-shadow: 0 20px 40px rgba(30,45,80,0.15);
}

.about-photo-wrapper.active::before {
  opacity: 1;
  inset: -10px;
}

.about-photo-wrapper.active::after {
  opacity: 0.4;
  inset: -20px;
  animation-play-state: running;
}

.about-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 2rem;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

.chip:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

[data-theme="light"] .chip {
  box-shadow: var(--shadow-sm);
}

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

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

[data-theme="light"] .project-card {
  box-shadow: var(--shadow-sm);
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Elegant Spotlight and Border Glow */
.project-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.04),
    transparent 40%
  );
  z-index: 10;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

[data-theme="light"] .project-card::before {
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--accent-glow),
    transparent 40%
  );
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(
    400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--accent) 0%,
    transparent 40%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 10;
}

.project-card:hover::before,
.project-card:hover::after {
  opacity: 1;
}

.project-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.project-image {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.project-card:hover .project-image { transform: scale(1.05); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 15, 26, 0.9) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  gap: 0.75rem;
}

[data-theme="light"] .project-overlay {
  background: linear-gradient(to top, rgba(26, 33, 64, 0.85) 0%, transparent 60%);
}

.project-card:hover .project-overlay { opacity: 1; }
.project-overlay .btn { padding: 0.6rem 1.2rem; font-size: 0.8rem; }

.project-body { padding: 1.5rem; }

.project-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.3px;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.project-tag {
  padding: 0.25rem 0.6rem;
  background: var(--accent-soft);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}

/* ---- Projects Toggle (Show More/Less) ---- */
.project-card-hidden {
  display: none;
  opacity: 0;
  transform: translateY(20px);
}

.project-card-hidden.project-card-visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.4s ease-out;
}

.projects-toggle-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.projects-toggle-btn {
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-size: 0.9rem;
  border-radius: 100px;
}

.projects-toggle-btn .toggle-count {
  font-size: 0.8rem;
  opacity: 0.7;
  font-weight: 400;
}

.projects-toggle-btn .toggle-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.projects-toggle-btn.expanded .toggle-arrow {
  transform: rotate(180deg);
}

.projects-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---- Timeline (Experience & Education) ---- */
.timeline {
  margin-top: 3rem;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

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

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -5px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 3px var(--accent-soft);
  transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
  box-shadow: 0 0 0 6px var(--accent-soft), 0 0 20px var(--accent-glow);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
}

[data-theme="light"] .timeline-card {
  box-shadow: var(--shadow-sm);
}

.timeline-item:hover .timeline-card {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

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

.timeline-role {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.3px;
}

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

.timeline-desc {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  line-height: 1.8;
}

.exp-edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

/* ---- Contact Form ---- */
.contact-form {
  margin-top: 2.5rem;
  max-width: 700px;
}

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.contact-form .form-input,
.contact-form .form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.925rem;
  transition: var(--transition);
  outline: none;
}

.contact-form .form-input:focus,
.contact-form .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.contact-form .form-textarea {
  resize: vertical;
  min-height: 120px;
}

[data-theme="light"] .contact-form .form-input,
[data-theme="light"] .contact-form .form-textarea {
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.contact-form .btn-primary {
  margin-top: 0.5rem;
}

.contact-form .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Page Toast ---- */
.page-toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.page-toast {
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  animation: fadeInUp 0.3s ease-out;
  box-shadow: var(--shadow-md);
}

.page-toast.success { background: #059669; }
.page-toast.error { background: #dc2626; }

@media (max-width: 640px) {
  .contact-form-row { grid-template-columns: 1fr; }
}

/* ---- Contact / Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

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

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo-wrapper { max-width: 240px; }
  .projects-grid { grid-template-columns: 1fr; }
  .exp-edu-grid { grid-template-columns: 1fr; gap: 3rem; }
  .section-title { font-size: 2rem; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
  }
  .nav-links.active { display: flex; }
  .nav-hamburger { display: flex; }
  .nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
  .nav-hamburger.active span:nth-child(2) { opacity: 0; }
  .nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
  .section { padding: 4rem 1.25rem; }
  .hero-content { padding: 0 1.25rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--bg-card); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
