/* =========================================================
   Muhammad Anas · Portfolio
   Design system: clean white editorial base + electric blue
   ========================================================= */

:root {
  --white: #FFFFFF;
  --off-white: #F7F8FC;
  --surface: #EEF2FF;
  --blue-vivid: #2563EB;
  --blue-light: #DBEAFE;
  --blue-mid: #93C5FD;
  --blue-dark: #1D4ED8;
  --ink: #0F172A;
  --ink-soft: #475569;
  --ink-muted: #94A3B8;
  --rule: #E2E8F0;
  --accent-stripe: #2563EB;

  --max-width: 1080px;
  --gutter: clamp(1.5rem, 6vw, 5rem);
  --card-radius: 12px;
  --card-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  --card-hover-shadow: 0 6px 28px rgba(37, 99, 235, 0.12);

  --grid-size: 640px;
  --grid-vignette: radial-gradient(
    ellipse 88% 75% at 50% 42%,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 55%,
    var(--white) 100%
  );
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  font-family: 'Instrument Sans', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--white);
  background-image: var(--grid-vignette), url('assets/grid-pattern.svg');
  background-size: 100% 100%, var(--grid-size) var(--grid-size);
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-primary {
  background: var(--blue-vivid);
  color: #fff;
  border: 2px solid var(--blue-vivid);
}
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-outline {
  background: #fff;
  color: var(--blue-vivid);
  border: 2px solid var(--blue-vivid);
}
.btn-outline:hover { background: var(--blue-light); }

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.navbar.scrolled {
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.04);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--blue-vivid);
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.nav-links a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--blue-vivid); }
.nav-links .hire-btn {
  background: var(--blue-vivid);
  color: #fff;
  font-weight: 500;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
}
.nav-links .hire-btn:hover { background: var(--blue-dark); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   SECTION SHELL + SIGNATURE HEADING
   ========================================================= */
.section {
  padding-top: 7rem;
  padding-bottom: 7rem;
  overflow: visible;
}
.section-alt { background: rgba(247, 248, 252, 0.62); }

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}
.section-heading::before {
  content: '';
  display: block;
  width: 5px;
  height: 2.4rem;
  background: var(--accent-stripe);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 0.35rem;
}
.section-heading h2 {
  margin: 0;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.35;
  color: var(--blue-vivid);
  overflow: visible;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  padding: 4rem 0 4.5rem;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  gap: 2rem;
}
.hero-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.98;
  color: var(--ink);
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}
.hero-name span { display: block; }
.hero-role {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  color: var(--blue-vivid);
  margin: 0 0 1.25rem;
  line-height: 1.2;
}
.hero-tagline {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
  max-width: 34ch;
  line-height: 1.6;
}
.hero-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  background: var(--blue-light);
  color: var(--blue-dark);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  line-height: 1.35;
  text-align: center;
}
.hero-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}
.hero-pill-icon svg {
  display: block;
  width: 14px;
  height: 14px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.hero-social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.social-link:hover { color: var(--blue-vivid); }

.hero-photo-wrap {
  display: flex;
  justify-content: center;
}
.hero-photo {
  width: 340px;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 16px;
  transform: rotate(-2deg);
  border: 3px solid var(--blue-light);
  box-shadow: 8px 12px 40px rgba(37, 99, 235, 0.15);
  transition: transform 0.4s ease;
}
.hero-photo:hover { transform: rotate(0deg) scale(1.02); }

/* =========================================================
   ABOUT
   ========================================================= */
.about-text {
  max-width: 70ch;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.8;
  margin: 0 0 2rem;
}
.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.contact-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1.35;
}
.contact-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.contact-badge-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}
.contact-badge:hover {
  border-color: var(--blue-vivid);
  color: var(--blue-vivid);
  background: var(--blue-light);
}
.contact-badge-cv {
  background: var(--blue-vivid);
  border-color: var(--blue-vivid);
  color: #fff;
  font-weight: 500;
}
.contact-badge-cv:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}

/* =========================================================
   EXPERIENCE
   ========================================================= */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow: visible;
}
.exp-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--blue-vivid);
  border-radius: 12px;
  padding: 1.75rem 2rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  overflow: visible;
}
.exp-card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-2px);
}
.exp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  overflow: visible;
  min-height: min-content;
}
.exp-title {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  overflow: visible;
  min-height: min-content;
  flex: 1 1 auto;
}
.exp-tech {
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  color: var(--blue-vivid);
  white-space: nowrap;
}
.exp-context {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0.25rem 0 0;
}
.exp-date {
  font-size: 0.82rem;
  color: var(--ink-muted);
  white-space: nowrap;
}
.exp-desc {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.8;
}

/* =========================================================
   CERTIFICATIONS
   ========================================================= */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.cert-card {
  background: var(--surface);
  border: 1px solid var(--blue-light);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  overflow: visible;
}
.cert-card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-3px);
}
.cert-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  overflow: visible;
}
.cert-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}
.cert-logo svg,
.cert-logo img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.cert-issuer {
  font-size: 0.75rem;
  color: var(--blue-vivid);
  font-family: 'Fira Code', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.4;
}
.cert-name {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  overflow: visible;
}
.cert-year {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
}

/* =========================================================
   PROJECTS
   ========================================================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  transition: all 0.2s ease;
}
.project-card:hover {
  border-color: var(--blue-mid);
  box-shadow: 0 6px 28px rgba(37, 99, 235, 0.1);
  transform: translateY(-3px);
}
.project-title {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  overflow: visible;
}
.project-description {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}
.project-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}
.lang-badge {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--blue-light);
  color: var(--blue-vivid);
  white-space: nowrap;
}
.lang-python   { background: #DBEAFE; color: #2563EB; }
.lang-java     { background: #FEF3C7; color: #92400E; }
.lang-kotlin   { background: #F3E8FF; color: #7E22CE; }
.lang-js       { background: #FEF9C3; color: #854D0E; }
.lang-jupyter  { background: #FEE2E2; color: #991B1B; }
.lang-react    { background: #E0F2FE; color: #0369A1; }
.lang-node     { background: #DCFCE7; color: #166534; }
.lang-mongo    { background: #D1FAE5; color: #047857; }
.lang-android  { background: #DCFCE7; color: #15803D; }
.lang-jetpack  { background: #EDE9FE; color: #6D28D9; }
.lang-pandas   { background: #DBEAFE; color: #1D4ED8; }
.lang-streamlit { background: #FFEDD5; color: #C2410C; }
.lang-javafx   { background: #FEF3C7; color: #B45309; }
.lang-nlp      { background: #FCE7F3; color: #BE185D; }
.lang-sklearn  { background: #E0E7FF; color: #4338CA; }
.lang-pytorch  { background: #FEE2E2; color: #B91C1C; }
.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.4rem 0.85rem;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-vivid);
  background: #fff;
  border: 1.5px solid var(--blue-vivid);
  border-radius: 6px;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.project-card:hover .github-link {
  background: var(--blue-vivid);
  color: #fff;
  border-color: var(--blue-vivid);
}
.github-link svg {
  display: block;
  flex-shrink: 0;
}
.project-card:hover .github-link svg {
  fill: currentColor;
}
.projects-cta {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}
.projects-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  padding: 0.7rem 1.6rem;
}
.projects-all-btn svg {
  display: block;
  flex-shrink: 0;
}

/* =========================================================
   SKILLS
   ========================================================= */
.skill-grid {
  columns: 1;
  column-gap: 1.5rem;
}
.skill-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  display: inline-block;
  width: 100%;
  margin-bottom: 1.5rem;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  overflow: visible;
}
.skill-card:hover {
  border-color: var(--blue-mid);
  box-shadow: 0 6px 28px rgba(37, 99, 235, 0.1);
}
.skill-card-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.skill-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--blue-light);
  border-radius: 10px;
  color: var(--blue-vivid);
}
.skill-card-icon svg {
  display: block;
  width: 22px;
  height: 22px;
}
.skill-card-icon-img {
  background: transparent;
  border: none;
  width: 38px;
  height: 38px;
}
.skill-card-icon-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.skill-card-title {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
  overflow: visible;
}
.skill-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.25rem -0.25rem;
}
.skill-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--blue-light);
  border-radius: 6px;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: 0.25rem;
  line-height: 1.35;
  transition: all 0.15s ease;
}
.skill-pill:hover {
  background: var(--blue-light);
  border-color: var(--blue-mid);
  color: var(--blue-dark);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.contact-form-card,
.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--blue-light);
  border-radius: var(--card-radius);
  padding: 1.75rem;
}
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.45rem; }
.form-label {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}
.form-input, .form-textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input::placeholder, .form-textarea::placeholder {
  color: var(--ink-muted);
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--blue-vivid);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-textarea { min-height: 140px; resize: vertical; }
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.9rem;
  background: var(--blue-vivid);
  color: #fff;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.submit-btn:hover { background: var(--blue-dark); }
.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.contact-info-title {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 1rem;
}
.contact-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--blue-vivid);
  text-decoration: none;
  word-break: break-all;
  transition: color 0.2s ease;
}
.contact-email-link:hover { color: var(--blue-dark); }
.contact-social-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.contact-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.contact-social-linkedin {
  color: var(--blue-vivid);
  border: 1.5px solid var(--blue-vivid);
  background: #fff;
}
.contact-social-linkedin:hover {
  background: var(--blue-light);
  color: var(--blue-dark);
  border-color: var(--blue-dark);
}
.contact-social-github {
  color: var(--ink);
  border: 1.5px solid var(--rule);
  background: #fff;
}
.contact-social-github:hover {
  border-color: var(--ink-soft);
  background: var(--off-white);
}
.contact-availability p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  background: var(--off-white);
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0;
  margin-top: 2rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--blue-vivid);
  font-size: 1rem;
  margin: 0;
}
.footer-role {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 0.15rem 0 0;
}
.footer-social {
  display: flex;
  gap: 1rem;
}
.footer-social a {
  color: var(--ink-muted);
  transition: color 0.15s ease;
}
.footer-social a:hover { color: var(--blue-vivid); }
.footer-copy {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin-top: 0.75rem;
}

/* =========================================================
   MOTION
   ========================================================= */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  overflow: visible;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 640px) {
  .skill-grid { columns: 2; }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .hero-photo-wrap { order: -1; justify-content: flex-start; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    padding: 0.5rem var(--gutter) 1.25rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
  }
  .nav-links.open {
    max-height: 420px;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a {
    width: 100%;
    padding: 0.75rem 0;
  }
  .nav-links .hire-btn {
    margin-top: 0.5rem;
    text-align: center;
    width: 100%;
  }
  .nav-toggle { display: flex; }

  .hero { padding: 2.5rem 0 3rem; }
  .hero-photo-wrap { justify-content: center; }
  .hero-photo {
    width: 200px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    transform: rotate(0deg);
  }
  .hero-photo:hover { transform: scale(1.02); }
  .hero-tagline { max-width: none; }

  .section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .exp-card { padding: 1.4rem 1.4rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }

  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-up, * {
    transition: none !important;
    animation: none !important;
  }
  .fade-up { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
