/* =========================================================
   Divyajeet Swami - Portfolio
   Refined, ATS-friendly, fully responsive
   ========================================================= */

/* ---------- Theme Tokens ---------- */
/* Editorial palette: warm carbon, cream, saffron accent, supporting terracotta */
:root {
  --bg: #0e0d0b;
  --bg-elev: #15140f;
  --surface: rgba(28, 25, 21, 0.7);
  --surface-2: rgba(38, 34, 28, 0.85);
  --surface-solid: #1c1915;
  --border: rgba(244, 235, 219, 0.08);
  --border-strong: rgba(244, 235, 219, 0.16);
  --text: #f4ebdb;
  --text-muted: #8c8478;
  --text-soft: #c8bfae;
  --brand: #e7b16a;          /* warm saffron */
  --brand-2: #b85c3a;        /* terracotta */
  --accent: #7a8a6b;         /* sage */
  --accent-2: #c9b27e;       /* warm sand */
  --brand-grad: linear-gradient(135deg, #e7b16a 0%, #b85c3a 100%);
  --aurora-grad: linear-gradient(135deg, #e7b16a 0%, #b85c3a 100%);
  --success: #7a8a6b;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --container: 1200px;
  --nav-h: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme: cream paper */
:root[data-theme="light"] {
  --bg: #f4ecdf;
  --bg-elev: #fbf6ec;
  --surface: rgba(255, 251, 244, 0.85);
  --surface-2: rgba(238, 228, 210, 0.85);
  --surface-solid: #ffffff;
  --border: rgba(36, 28, 18, 0.1);
  --border-strong: rgba(36, 28, 18, 0.2);
  --text: #1a1612;
  --text-muted: #6b6358;
  --text-soft: #2e2820;
  --brand: #b85c3a;
  --brand-2: #8a3a23;
  --accent: #5d6e4e;
  --accent-2: #9a7e4a;
  --brand-grad: linear-gradient(135deg, #b85c3a 0%, #8a3a23 100%);
  --aurora-grad: linear-gradient(135deg, #b85c3a 0%, #8a3a23 100%);
  --shadow-sm: 0 2px 6px rgba(36, 28, 18, 0.08);
  --shadow-md: 0 10px 30px rgba(36, 28, 18, 0.12);
  --shadow-lg: 0 20px 60px rgba(36, 28, 18, 0.18);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; font-size: 1rem; }

::selection { background: var(--brand); color: #fff; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  /* Mobile-first base gutter; widened at >=480px and >=1280px */
  padding: 0 18px;
}

.text-gradient {
  color: var(--brand);
  font-style: italic;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand);
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  /* A11y: guarantee a 44x44px touch target on every button/link (WCAG 2.5.5) */
  min-height: 44px;
  border-radius: 999px;
  font-weight: 600;
  /* Fluid label size: scales gently between phone and desktop */
  font-size: clamp(0.9rem, 0.85rem + 0.25vw, 0.95rem);
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn--primary:hover {
  transform: translateY(-2px);
  background: var(--brand);
  border-color: var(--brand);
  color: #1a1612;
  box-shadow: 0 12px 28px rgba(231, 177, 106, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--brand);
  color: var(--text);
}

.btn--text {
  background: transparent;
  color: var(--text-muted);
  padding: 14px 18px;
}
.btn--text:hover { color: var(--brand); }

.btn--sm { padding: 10px 18px; font-size: 0.875rem; }
.btn--full { width: 100%; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1100;
  pointer-events: none;
}
.scroll-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--brand-grad);
  transition: width 0.1s linear;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 1000;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition), height var(--transition);
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.18);
  height: 64px;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.nav__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--brand-grad);
  color: #fff;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}
.nav__brand .dot { color: var(--brand); }

.nav__links ul {
  display: flex;
  gap: 6px;
}
/* Mobile-first: primary inline nav is hidden until there is room (>=1024px).
   The hamburger menu carries navigation on phones/tablets. */
.nav__links { display: none; }
.nav__link {
  position: relative;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover { color: var(--text); background: var(--surface); }
.nav__link.active {
  color: var(--text);
}
.nav__link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--brand-grad);
  border-radius: 2px;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Mobile-first: "Hire Me" inline CTA is hidden on phones (the mobile menu + footer carry it), revealed at >=1024px */
.nav__cta { display: none; }

.theme-toggle {
  /* A11y: 44x44 minimum touch target (WCAG 2.5.5) */
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform var(--transition), background var(--transition);
}
.theme-toggle:hover { transform: rotate(15deg); background: var(--surface-2); }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  /* A11y: 44x44 minimum touch target (WCAG 2.5.5) */
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0;
}
/* Mobile-first: hamburger + mobile CTA visible by default, hidden at >=1024px */
.menu-toggle { display: inline-flex; }
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mobile-menu ul {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mobile-menu a {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  transition: color var(--transition);
}
.mobile-menu a:hover { color: var(--brand); }

/* ---------- Sections ---------- */
.section {
  /* Mobile-first base spacing; scaled up via min-width queries below */
  padding: 72px 0;
  position: relative;
}
.section--alt { background: var(--bg-elev); }

.section__header {
  text-align: center;
  /* Fluid header spacing avoids large fixed gaps on small screens */
  margin-bottom: clamp(40px, 6vw, 60px);
}
.section__sub {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
  position: relative;
  padding: 0 30px;
}
.section__sub::before,
.section__sub::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 1px;
  background: var(--brand);
  opacity: 0.5;
}
.section__sub::before { left: 0; }
.section__sub::after { right: 0; }

.section__title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 400;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.section__title em,
.section__title .text-gradient {
  font-style: italic;
  font-family: "Instrument Serif", Georgia, serif;
}

.section__lead {
  color: var(--text-muted);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
  max-width: 620px;
  margin: 0 auto;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* Mobile-first: let the stacked hero size to its content; full-viewport height added at >=1024px */
  padding-top: calc(var(--nav-h) + 16px);
  padding-bottom: 48px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 70%);
  opacity: 0.6;
}
.hero__glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
}
.hero__glow--1 { background: var(--brand); top: -120px; left: -120px; }
.hero__glow--2 { background: var(--brand-2); bottom: -160px; right: -120px; opacity: 0.35; }

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  /* Mobile-first: single column stack; becomes 2-col at >=1024px */
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.hero__greeting {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 24px;
}
.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
}
.dot-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.4;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hero__title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero__title .text-gradient {
  font-style: italic;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 24px;
  min-height: 1.8em;
}
.typed { color: var(--brand); font-weight: 600; }
.caret {
  display: inline-block;
  color: var(--brand);
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

.hero__desc {
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1rem);
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero__social {
  display: flex;
  gap: 12px;
}
.hero__social a {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}
.hero__social a:hover {
  transform: translateY(-3px);
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Profile card */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  /* Mobile-first: visual leads above the copy; reset to source order at >=1024px */
  order: -1;
}
.profile-card {
  position: relative;
  width: 100%;
  max-width: 420px;
}
.profile-card__inner {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  /* Fluid padding so the card never feels cramped on phones */
  padding: clamp(32px, 5vw, 44px) clamp(22px, 4vw, 32px);
  text-align: center;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.profile-card__inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-grad);
  opacity: 0.06;
  pointer-events: none;
}

.profile-card__avatar {
  width: clamp(90px, 20vw, 110px);
  height: clamp(90px, 20vw, 110px);
  border-radius: 50%;
  background: var(--brand-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.3rem);
  margin: 0 auto 20px;
  box-shadow: 0 14px 36px rgba(231, 177, 106, 0.25);
  position: relative;
}
.profile-card__avatar::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 2px dashed var(--border-strong);
  border-radius: 50%;
  animation: spin 22s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.profile-card__name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.profile-card__role {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.profile-card__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-bottom: 22px;
}
.profile-card__meta i { color: var(--brand); margin-right: 6px; }

.profile-card__stack {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}
.stack-pill {
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.profile-card__float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  animation: floaty 4s ease-in-out infinite;
}
.profile-card__float i { color: var(--brand); font-size: 1.4rem; }
.profile-card__float strong { display: block; font-size: 0.9rem; }
.profile-card__float small { display: block; color: var(--text-muted); font-size: 0.72rem; }

.profile-card__float--1 { top: 20px; left: -50px; animation-delay: 0s; }
.profile-card__float--2 { bottom: 60px; right: -40px; animation-delay: 1.4s; }
.profile-card__float--3 { bottom: -10px; left: -30px; animation-delay: 2.6s; }

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

/* Hero scroll cue */
.hero__scroll {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.mouse {
  display: block;
  width: 24px;
  height: 38px;
  border: 2px solid var(--border-strong);
  border-radius: 14px;
  position: relative;
}
.wheel {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--brand);
  border-radius: 2px;
  animation: scrollWheel 1.6s ease-in-out infinite;
}
@keyframes scrollWheel {
  0% { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 22px; }
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  /* Mobile-first: stacked; 2-col at >=1024px */
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
.about__copy h3 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}
.about__copy p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about__info {
  display: grid;
  /* Mobile-first: single column; 2-col at >=560px */
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 28px 0 32px;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.info-item i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-size: 0.95rem;
  flex-shrink: 0;
}
.info-item strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
}
.info-item span {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  word-break: break-word;
}

/* Stats */
.about__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  /* Fluid padding: compact on phones, roomy on desktop */
  padding: clamp(22px, 4vw, 28px) clamp(14px, 3vw, 20px);
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.stat:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.stat__num {
  font-size: clamp(2rem, 1.6rem + 2vw, 2.8rem);
  font-weight: 800;
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.stat__label {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
}
.stat__suffix { color: var(--text-soft); }

/* ---------- Skills ---------- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--brand-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}
.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
}
.skill-card:hover::before { transform: scaleX(1); }

.skill-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.skill-card:hover .skill-card__icon {
  background: var(--brand-grad);
  color: #fff;
  transform: scale(1.05) rotate(-6deg);
}
.skill-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.skill-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.skill-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.skill-bar__fill {
  height: 100%;
  width: 0;
  background: var(--brand-grad);
  border-radius: 999px;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.skill-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
}

.tech-stack__title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-soft);
}
.tech-stack__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: transform var(--transition), border-color var(--transition), color var(--transition);
}
.tech-pill i { font-size: 1.1rem; color: var(--brand); }
.tech-pill:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  color: var(--text);
}

/* ---------- Projects ---------- */
.projects__filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}
.filter-btn {
  /* A11y: min 44px tap height for mobile filter chips */
  padding: 11px 18px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}
.filter-btn:hover { color: var(--text); border-color: var(--brand); }
.filter-btn.active {
  background: var(--brand-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(231, 177, 106, 0.25);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.project-card.is-hidden {
  display: none;
}
.project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.project-card__placeholder {
  font-size: 4rem;
  color: var(--brand);
  opacity: 0.4;
  transition: transform var(--transition), opacity var(--transition);
}
.project-card:hover .project-card__placeholder {
  transform: scale(1.1);
  opacity: 0.6;
}
.project-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: color-mix(in srgb, var(--brand) 80%, transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.project-card:hover .project-card__overlay { opacity: 1; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  font-size: 1rem;
  transition: transform var(--transition);
}
.icon-btn:hover { transform: scale(1.1); }

.project-card__body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.project-card__tag {
  align-self: flex-start;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-radius: 6px;
}
.project-card__body h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.project-card__body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
}
.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-card__stack li {
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--surface-2);
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
}

/* ---------- Education ---------- */
.education__grid {
  display: grid;
  /* Mobile-first: stacked; 2-col at >=992px */
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.timeline {
  position: relative;
  padding-left: clamp(18px, 3vw, 22px);
}
.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 2px;
  background: var(--border-strong);
}
.timeline__item {
  position: relative;
  padding-bottom: 32px;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: calc(-1 * clamp(18px, 3vw, 22px));
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand-grad);
  box-shadow: 0 0 0 4px var(--bg);
}
.timeline__date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.timeline__content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.timeline__sub {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.timeline__content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cert-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.cert-list__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cert-list__title i { color: var(--brand); }
.cert-list__title--mt { margin-top: 24px; }
.cert-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  margin-bottom: 10px;
}
.cert-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-grad);
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cert-item strong { display: block; font-size: 0.95rem; }
.cert-item span { display: block; color: var(--text-muted); font-size: 0.82rem; }

.strengths li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.strengths li i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--success) 18%, transparent);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--bg-elev);
}
.contact__grid {
  display: grid;
  /* Mobile-first: stacked; 2-col at >=992px */
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
.contact__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--transition), border-color var(--transition);
}
a.contact-item:hover {
  transform: translateX(4px);
  border-color: var(--brand);
}
.contact-item__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.contact-item strong { display: block; font-size: 0.92rem; }
.contact-item span { display: block; color: var(--text-muted); font-size: 0.85rem; word-break: break-word; }

.contact__form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.form-row {
  display: grid;
  /* Mobile-first: stacked fields; side-by-side at >=560px */
  grid-template-columns: 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  /* A11y: comfortable 44px+ tap height on inputs */
  padding: 13px 14px;
  min-height: 44px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  /* 16px font-size prevents iOS Safari auto-zoom on focus */
  font-size: 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);
}
.form-group textarea { resize: vertical; min-height: 120px; }
/* Honeypot anti-spam field: visually & semantically hidden, but not display:none
   (some bots skip display:none). Real users never see or fill it. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  margin-top: 14px;
  font-size: 0.88rem;
  text-align: center;
  min-height: 1.4em;
}
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: #ef4444; }

/* ---------- Footer ---------- */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.footer__copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer__social {
  display: flex;
  gap: 10px;
}
.footer__social a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.footer__social a:hover {
  background: var(--brand);
  color: #fff;
  transform: translateY(-3px);
}

/* Back to top */
.back-to-top {
  position: fixed;
  /* Fluid offsets: tucks tighter into phone corners, roomier on desktop */
  right: clamp(16px, 3vw, 24px);
  bottom: clamp(16px, 3vw, 24px);
  /* A11y: 44x44 minimum touch target (WCAG 2.5.5) */
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(231, 177, 106, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 900;
  /* Respect iOS safe-area insets so the button never hides under the home bar */
  margin-right: env(safe-area-inset-right, 0px);
  margin-bottom: env(safe-area-inset-bottom, 0px);
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover { transform: translateY(-3px); }

/* =========================================================
   Responsive — MOBILE-FIRST
   Base rules above target the smallest viewport. Each min-width
   query below progressively enhances the layout for larger screens.
   ========================================================= */

/* ---- Small-screen base overrides (apply to phones by default) ---- */
.hero__greeting { font-size: clamp(0.74rem, 0.7rem + 0.3vw, 0.85rem); }
/* Center + constrain the profile card on phones; widened on bigger screens */
.profile-card { max-width: 320px; margin: 0 auto; }
/* Floating badges have no room on phones — revealed once we hit >=768px */
.profile-card__float { display: none; }
/* Resume text-button is space-saving-hidden on the smallest screens */
.hero__cta .btn--text { display: none; }
.hero__cta { gap: 8px; }

/* ---- >=480px : small tablets / large phones ---- */
@media (min-width: 480px) {
  .container { padding: 0 24px; }
  .section { padding: 84px 0; }
  .hero__cta .btn--text { display: inline-flex; }
}

/* ---- >=560px : two-up info & form fields ---- */
@media (min-width: 560px) {
  .about__info { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr 1fr; }
}

/* ---- >=768px : tablets — reveal floating profile badges, row footer ---- */
@media (min-width: 768px) {
  .section { padding: 96px 0; }
  .profile-card { max-width: 360px; }
  .contact__form { padding: 32px; }
  .footer__inner { flex-direction: row; text-align: left; }

  .profile-card__float { display: flex; padding: 10px 12px; font-size: 0.78rem; }
  .profile-card__float i { font-size: 1.1rem; }
  .profile-card__float--1 { left: -10px; }
  .profile-card__float--2 { right: -10px; }
  .profile-card__float--3 { left: -10px; }
}

/* ---- >=992px : split Education & Contact into two columns ---- */
@media (min-width: 992px) {
  .education__grid { grid-template-columns: 1.4fr 1fr; gap: 50px; }
  .contact__grid { grid-template-columns: 1fr 1.3fr; gap: 40px; }
  .profile-card__float { left: -50px; }
  .profile-card__float--1 { top: 20px; left: -50px; }
  .profile-card__float--2 { right: -40px; left: auto; }
  .profile-card__float--3 { left: -30px; }
}

/* ---- >=1024px : desktop — inline nav, full-height 2-col hero ---- */
@media (min-width: 1024px) {
  .nav__links { display: block; }
  .nav__cta { display: inline-flex; }
  .menu-toggle { display: none; }

  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: var(--nav-h);
    padding-bottom: 60px;
  }
  .hero__inner { grid-template-columns: 1.15fr 1fr; gap: 60px; }
  .hero__visual { order: 0; }
  .profile-card { max-width: 420px; }

  .about__grid { grid-template-columns: 1.15fr 1fr; gap: 60px; }
  .section { padding: 110px 0; }
}

/* ---- >=1280px : widen container gutters on large desktops ---- */
@media (min-width: 1280px) {
  .container { padding: 0 32px; }
}

