:root {
  --bg: #070b14;
  --bg-card: rgba(15, 23, 42, 0.65);
  --fg: #f1f5f9;
  --fg-heading: #ffffff;
  --mut: #94a3b8;
  --bd: rgba(255, 255, 255, 0.1);
  --bd-hover: rgba(34, 211, 238, 0.4);
  --a: #22d3ee;
  --b: #a78bfa;
  --glow: rgba(34, 211, 238, 0.15);
  --accent-card: rgba(34, 211, 238, 0.04);
  --shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.85);
  --fg: #1e293b;
  --fg-heading: #0f172a;
  --mut: #475569;
  --bd: rgba(15, 23, 42, 0.12);
  --bd-hover: rgba(8, 145, 178, 0.5);
  --a: #0891b2;
  --b: #7c3aed;
  --glow: rgba(8, 145, 178, 0.15);
  --accent-card: rgba(8, 145, 178, 0.04);
  --shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Background Canvas */
#bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* Scroll Progress Bar */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--a), var(--b));
  z-index: 100;
  transition: width 0.1s ease-out;
}

/* Header & Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 6vw;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  border-bottom: 1px solid var(--bd);
  transition: border-color 0.3s;
}

.logo {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--fg-heading);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

nav a {
  color: var(--mut);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover,
nav a.act {
  color: var(--a);
  border-color: var(--a);
}

.nav-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem !important;
  border: 1px solid var(--bd) !important;
  border-radius: 99px;
  background: var(--bg-card);
  color: var(--fg) !important;
  font-size: 0.85rem !important;
  transition: all 0.2s ease !important;
}

.nav-resume-btn:hover {
  border-color: var(--a) !important;
  color: var(--a) !important;
  transform: translateY(-1px);
}

#theme {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  color: var(--fg);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: transform 0.2s, border-color 0.2s;
}

#theme:hover {
  border-color: var(--a);
  transform: rotate(30deg);
}

/* Mobile Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--fg);
  border-radius: 2px;
  transition: all 0.3s linear;
}

/* Main Container */
main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 5vw;
}

section {
  padding: 5rem 0 2rem;
}

/* Typography & Headings */
h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--fg-heading);
  letter-spacing: -0.03em;
  margin: 0.8rem 0 0.5rem;
}

h2, h3, h4 {
  color: var(--fg-heading);
  letter-spacing: -0.02em;
}

.grad {
  background: linear-gradient(135deg, var(--a), var(--b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.sec {
  font-size: 2.1rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
}

.sec::after {
  content: "";
  display: block;
  width: 65px;
  height: 4px;
  margin-top: 0.6rem;
  background: linear-gradient(90deg, var(--a), var(--b));
  border-radius: 4px;
}

.sec.sm {
  margin-top: 3.5rem;
  font-size: 1.5rem;
}

.section-desc {
  color: var(--mut);
  margin: 0 0 2rem;
  font-size: 1.05rem;
  max-width: 600px;
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  min-height: min(88vh, 720px);
  padding: 3rem 0 1rem;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 12px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

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

.type {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 500;
  color: var(--mut);
  margin: 0 0 1rem;
  min-height: 2.2rem;
}

.caret {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background: var(--a);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.lead {
  color: var(--mut);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 36em;
  margin-bottom: 1.8rem;
}

.lead strong {
  color: var(--fg);
}

.chip {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--bd);
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--a);
  background: var(--accent-card);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.8rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  border: 1px solid var(--bd);
  color: var(--fg);
  text-decoration: none;
  background: var(--bg-card);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--a);
  box-shadow: 0 8px 20px var(--glow);
  color: var(--fg-heading);
}

.btn.primary {
  background: linear-gradient(135deg, var(--a), var(--b));
  color: #04121c;
  border: 0;
  font-weight: 600;
}

.btn.primary:hover {
  color: #04121c;
  filter: brightness(1.1);
  box-shadow: 0 10px 25px rgba(34, 211, 238, 0.35);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* Hero Socials */
.hero-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  margin: 1.4rem 0 2rem;
}

.hero-socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--mut);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s, transform 0.2s;
}

.hero-socials a:hover {
  color: var(--a);
  transform: translateY(-1px);
}

/* Stats */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bd);
}

.stats b {
  display: block;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--fg-heading);
}

.stats span {
  color: var(--mut);
  font-size: 0.85rem;
}

/* Hero Photo & Ambient Glow */
.hero-photo-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.photo-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  z-index: 0;
  filter: blur(25px);
  pointer-events: none;
}

.hero-photo {
  position: relative;
  z-index: 1;
  max-width: 380px;
  width: 100%;
  border-radius: 28px;
  overflow: visible;
  transition: transform 0.15s ease-out;
}

.hero-photo picture {
  display: block;
  width: 100%;
  border-radius: 28px;
  padding: 6px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), rgba(167, 139, 250, 0.4));
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 40px -10px var(--glow);
}

.hero-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 24px;
}

/* Floating Tech Badges */
.badge {
  position: absolute;
  padding: 0.45rem 1rem;
  border-radius: 99px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--bd);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-heading);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  animation: float 6s ease-in-out infinite;
}

.b1 { top: 6%; left: -6%; animation-delay: 0s; }
.b2 { top: 44%; right: -6%; animation-delay: -1.5s; }
.b3 { bottom: 12%; left: -4%; animation-delay: -3s; }
.b4 { top: 82%; right: -2%; animation-delay: -4.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Cards & Grids */
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: 20px;
  padding: 1.8rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: var(--bd-hover);
}

.big {
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--fg-heading);
  margin-top: 0;
}

.sub {
  color: var(--a);
  margin: 0.2rem 0 0.8rem;
  font-weight: 500;
}

/* Quick Info List in About */
.info-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.info-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list strong {
  font-size: 0.85rem;
  color: var(--a);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-list span {
  color: var(--fg);
  font-size: 0.95rem;
}

/* Skills Section */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.tabs button,
.project-filters button,
.toggle button {
  padding: 0.5rem 1.15rem;
  border-radius: 99px;
  border: 1px solid var(--bd);
  background: var(--bg-card);
  color: var(--mut);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tabs button:hover,
.project-filters button:hover,
.toggle button:hover {
  color: var(--fg);
  border-color: var(--a);
}

.tabs button.on,
.project-filters button.on,
.toggle button.on {
  background: linear-gradient(135deg, var(--a), var(--b));
  color: #04121c;
  border-color: transparent;
  font-weight: 600;
}

.skillgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-height: 100px;
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--bd);
  background: var(--bg-card);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  animation: pop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-tag:hover {
  transform: translateY(-2px);
  border-color: var(--a);
  color: var(--a);
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tags span {
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  background: var(--accent-card);
  border: 1px solid var(--bd);
  color: var(--a);
  font-weight: 500;
}

/* Projects Section */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-header .section-desc {
  margin-bottom: 0;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.projects-container {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.project {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 2.5rem;
  align-items: stretch;
}

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

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--a);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.project-link:hover {
  text-decoration: underline;
}

.project-date {
  font-size: 0.82rem;
  color: var(--mut);
}

.project h4 {
  font-size: 1.5rem;
  margin: 0.4rem 0 0.8rem;
}

.project p {
  color: var(--mut);
  line-height: 1.6;
}

.project ul {
  color: var(--mut);
  padding-left: 1.2rem;
  margin: 0.8rem 0;
}

.project li {
  margin-bottom: 0.4rem;
  line-height: 1.55;
}

.project strong {
  color: var(--fg);
}

/* Project Interactive Demos */
.demo {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

[data-theme="light"] .demo {
  background: rgba(0, 0, 0, 0.03);
}

.label {
  margin: 0 0 1rem;
  color: var(--a);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.toggle {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.toggle button {
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
}

.stage {
  font-size: 0.95rem;
  color: var(--fg);
  min-height: 3.5em;
  line-height: 1.5;
  background: var(--bg-card);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--bd);
}

.kpi {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--bd);
}

.kpi b {
  font-size: 2.2rem;
  display: block;
  color: var(--a);
}

.kpi span {
  color: var(--mut);
  font-size: 0.85rem;
}

/* Feature Box for other demos */
.feature-box {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.feature-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--fg-heading);
  margin-bottom: 0.2rem;
}

.feature-item p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--mut);
}

/* Interactive Color Demo */
.interactive-color-box {
  background: var(--bg-card);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 1.2rem;
}

.color-palette {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.color-palette button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #ffffff33;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.color-palette button:hover,
.color-palette button.active {
  transform: scale(1.18);
  box-shadow: 0 0 14px currentColor;
}

.color-result {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.color-preview-badge {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--bd);
}

/* Experience & Certifications */
.timeline {
  border-left: 2px solid var(--bd);
  padding-left: 2rem;
  margin-left: 0.8rem;
}

.tl {
  position: relative;
}

.tl i {
  position: absolute;
  left: -2.55rem;
  top: 1.8rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--a);
  box-shadow: 0 0 0 6px var(--glow);
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

.certs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.cert-card {
  text-align: center;
  padding: 1.8rem 1.4rem;
}

.cert-icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.cert-card b {
  display: block;
  font-size: 1.15rem;
  color: var(--fg-heading);
  margin-bottom: 0.3rem;
}

.cert-card span {
  display: block;
  color: var(--a);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.cert-card small {
  color: var(--mut);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* Education */
.edu-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent-card);
  color: var(--a);
  border: 1px solid var(--bd);
  margin-bottom: 0.8rem;
}

.edu-stat {
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--bd);
  color: var(--a);
  font-weight: 600;
  font-size: 1.05rem;
}

/* Contact Section */
.contact-grid {
  align-items: start;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.c-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--accent-card);
  border: 1px solid var(--bd);
  border-radius: 12px;
}

.c-item > div {
  flex: 1;
}

.c-item small {
  display: block;
  font-size: 0.75rem;
  color: var(--mut);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.c-item a, .c-item span {
  color: var(--fg-heading);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-all;
}

.c-item a:hover {
  color: var(--a);
}

.c-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--a);
  border: 1px solid var(--bd);
  flex-shrink: 0;
}

/* Contact Form */
.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--mut);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--bd);
  color: var(--fg);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--a);
  box-shadow: 0 0 0 3px var(--glow);
}

.form-feedback {
  font-size: 0.85rem;
  margin-top: 0.8rem;
  text-align: center;
  min-height: 1.2em;
}

/* Footer */
footer {
  border-top: 1px solid var(--bd);
  padding: 3rem 5vw;
  margin-top: 5rem;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}

.footer-content {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--mut);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--mut);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--fg-heading);
  color: var(--bg);
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  z-index: 200;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* 3D Tilt Card */
.tilt {
  transition: transform 0.15s ease-out;
  will-change: transform;
}

/* Responsive Styles */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-top: 1rem;
    text-align: center;
  }

  .hero-status {
    justify-content: center;
  }

  .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .cta, .hero-socials {
    justify-content: center;
  }

  .stats {
    justify-content: center;
    gap: 1.5rem;
  }

  .hero-photo-wrapper {
    order: -1;
  }

  .hero-photo {
    max-width: 300px;
  }

  .b1 { left: 0%; }
  .b2 { right: 0%; }
  .b3 { left: 4%; }
  .b4 { right: 4%; }

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

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

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

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

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: color-mix(in srgb, var(--bg) 95%, transparent);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--bd);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    align-items: stretch;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
  }

  nav.open {
    display: flex;
  }

  nav a {
    padding: 0.5rem 0;
    font-size: 1.05rem;
  }

  .nav-resume-btn {
    text-align: center;
    justify-content: center;
    padding: 0.6rem 1rem !important;
  }

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

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}
