/* ============================================================
   Md. Rizvi Ahmed — CV Website
   Design system: dark-first, gold-accented, light theme override
   ============================================================ */

:root {
  /* Dark theme (default) */
  --bg: #090b11;
  --bg-soft: #0e1219;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eceae4;
  --muted: #9aa1af;
  --accent: #e6bd5f;
  --accent-strong: #f0cf7d;
  --accent-deep: #c9973a;
  --accent-soft: rgba(230, 189, 95, 0.13);
  --grad: linear-gradient(120deg, #f2cf7a 0%, #d9a441 100%);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  --glow: 0 0 0 1px var(--border-strong), 0 18px 50px -18px rgba(230, 189, 95, 0.25);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #faf8f4;
  --bg-soft: #f2eee6;
  --surface: rgba(18, 22, 32, 0.03);
  --surface-strong: rgba(18, 22, 32, 0.055);
  --border: rgba(18, 22, 32, 0.11);
  --border-strong: rgba(18, 22, 32, 0.2);
  --text: #181b23;
  --muted: #5c636f;
  --accent: #9a6f1e;
  --accent-strong: #b3822a;
  --accent-deep: #7c5817;
  --accent-soft: rgba(154, 111, 30, 0.12);
  --grad: linear-gradient(120deg, #c08a2c 0%, #9a6f1e 100%);
  --shadow: 0 24px 60px -30px rgba(60, 50, 20, 0.35);
  --glow: 0 0 0 1px var(--border-strong), 0 18px 50px -20px rgba(154, 111, 30, 0.18);
  color-scheme: light;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #0a0c12;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 11px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-strong);
  border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-deep);
}

/* ---------- Layout helpers ---------- */

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent);
  color: #0a0c12;
  font-weight: 600;
  transition: top 0.25s ease;
}
.skip-link:focus {
  top: 16px;
}

/* ---------- Typography ---------- */

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--grad);
  border-radius: 2px;
}

.section {
  padding: clamp(72px, 10vw, 120px) 0;
  position: relative;
}

.section-alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(36px, 6vw, 56px);
}

.section-title {
  font-size: clamp(2rem, 4.6vw, 3rem);
  margin-top: 14px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.btn-primary {
  background: var(--grad);
  color: #171006;
  box-shadow: 0 10px 30px -12px rgba(230, 189, 95, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -12px rgba(230, 189, 95, 0.65);
}
.btn-primary:hover svg {
  transform: translateX(3px);
}

html[data-theme="light"] .btn-primary {
  box-shadow: 0 10px 30px -14px rgba(154, 111, 30, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.85rem;
  border-radius: 11px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}
.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.icon-btn svg {
  width: 19px;
  height: 19px;
}

/* Theme toggle icons */
.icon-sun,
.icon-moon {
  position: absolute;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
html[data-theme="dark"] .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
html[data-theme="dark"] .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
html[data-theme="light"] .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}
html[data-theme="light"] .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
#theme-toggle {
  position: relative;
  overflow: hidden;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--grad);
  color: #171006;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 22px -10px rgba(230, 189, 95, 0.6);
  transition: transform 0.3s ease;
}
.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.05);
}

.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.brand-name em {
  font-style: normal;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s ease, background-color 0.25s ease;
}
.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}
.nav-link.active {
  color: var(--accent);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta-mobile {
  display: none;
}

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.menu-btn span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-btn:hover span {
  background: var(--accent);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 120px 0 96px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 10%, transparent 75%);
  opacity: 0.6;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
html[data-theme="dark"] .orb {
  opacity: 0.5;
}
.orb-1 {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle at 30% 30%, #e6bd5f, transparent 70%);
  animation: float 14s ease-in-out infinite;
}
.orb-2 {
  width: 420px;
  height: 420px;
  bottom: -160px;
  left: -140px;
  background: radial-gradient(circle at 60% 40%, #3b4a63, transparent 70%);
  animation: float 18s ease-in-out infinite reverse;
}
.orb-3 {
  width: 280px;
  height: 280px;
  top: 30%;
  left: 42%;
  background: radial-gradient(circle at 50% 50%, #8a6a2a, transparent 70%);
  animation: float 22s ease-in-out infinite;
}
html[data-theme="light"] .orb-2 {
  background: radial-gradient(circle at 60% 40%, #c9d4e8, transparent 70%);
}
html[data-theme="light"] .orb-3 {
  background: radial-gradient(circle at 50% 50%, #e8d9ae, transparent 70%);
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(30px, -40px, 0) scale(1.06); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 860px;
}

/* Hero entrance animation */
.hero-inner > * {
  opacity: 0;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-inner > *:nth-child(1) { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.15s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.25s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.35s; }
.hero-inner > *:nth-child(5) { animation-delay: 0.45s; }
.hero-inner > *:nth-child(6) { animation-delay: 0.55s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18); }
  50% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0.05); }
}

.hero-name {
  margin-top: 26px;
  font-size: clamp(2.9rem, 8vw, 5.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.hero-role {
  margin: 18px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 500;
  color: var(--accent);
}

.hero-summary {
  margin: 16px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
}
.hero-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}
.hero-contacts a:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-strong);
  transform: translateY(-2px);
}
.hero-contacts svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.scroll-hint:hover {
  opacity: 1;
}
.scroll-mouse {
  display: block;
  width: 26px;
  height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 14px;
  position: relative;
}
.scroll-dot {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--accent);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Cards (shared) ---------- */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}

.card-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}
.card-icon svg {
  width: 26px;
  height: 26px;
}

.card-title {
  font-size: 1.18rem;
  font-weight: 600;
}
.card-sub {
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.card-sub a {
  color: var(--accent);
  border-bottom: 1px dashed transparent;
  transition: border-color 0.25s ease;
}
.card-sub a:hover {
  border-bottom-color: var(--accent);
}

.card-loc {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.card-loc svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.chip-period {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.about-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.02rem;
}
.about-copy p:last-child {
  margin-bottom: 0;
}
.about-copy p:first-child {
  font-size: 1.12rem;
  color: var(--text);
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.stat {
  padding: 22px 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.stat:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.stat dt {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat dd {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Timeline (Experience) ---------- */

.timeline {
  position: relative;
  max-width: 820px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--accent-strong), var(--border));
}

.timeline-item {
  position: relative;
  padding-left: 44px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 34px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.timeline-item:hover::before {
  box-shadow: 0 0 0 8px var(--accent-soft);
  transform: scale(1.08);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.card-top .card-head {
  flex: 1;
  min-width: 180px;
}
.card-top .chip-period {
  margin-top: 6px;
}

.card-points {
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}
.card-points li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 0.95rem;
}
.card-points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.card-points strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Cards grid (Education / Activities) ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 22px;
}

.edu-card .chip-period,
.act-head .chip-period {
  position: absolute;
  top: 22px;
  right: 22px;
}
.edu-card {
  padding-top: 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.edu-card .card-title {
  font-size: 1.28rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.text-link svg {
  width: 15px;
  height: 15px;
  transition: transform 0.25s ease;
}
.text-link:hover svg {
  transform: translate(2px, -2px);
}

.act-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-right: 110px;
}
.act-head .card-icon {
  width: 46px;
  height: 46px;
}
.act-head .card-icon svg {
  width: 23px;
  height: 23px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: 10px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tag-note {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 18px;
}

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

.skill-name {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.skill-name svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ---------- Contact ---------- */

.contact-panel {
  position: relative;
  text-align: center;
  padding: clamp(48px, 7vw, 80px) clamp(24px, 5vw, 64px);
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  overflow: hidden;
}
.contact-panel .kicker {
  justify-content: center;
}
.contact-panel .kicker::after {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--grad);
  border-radius: 2px;
}
.contact-panel .section-title {
  margin-top: 16px;
}
.contact-text {
  max-width: 520px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.contact-glow {
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 380px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  pointer-events: none;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}
.contact-actions .btn svg {
  width: 17px;
  height: 17px;
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.social-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}
.social-btn svg {
  width: 21px;
  height: 21px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: var(--bg-soft);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 22px;
}
.footer-links a {
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.25s ease;
}
.footer-links a:hover {
  color: var(--accent);
}

.footer-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- Back to top ---------- */

.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, color 0.25s ease, border-color 0.25s ease;
}
.to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.to-top svg {
  width: 20px;
  height: 20px;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Mobile menu ---------- */

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

  .nav-download {
    display: none;
  }

  .nav-cta-mobile {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 18px 24px 26px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }
  body.nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links .nav-link {
    padding: 13px 16px;
    font-size: 1rem;
  }
  .nav-link.active::after {
    left: 16px;
    right: auto;
    width: 32px;
  }

  .menu-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .menu-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

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

@media (max-width: 560px) {
  .brand-name {
    display: none;
  }
  .act-head {
    padding-right: 0;
    flex-wrap: wrap;
  }
  .act-head .chip-period {
    position: static;
    order: 3;
    margin-top: 6px;
  }
  .edu-card .chip-period {
    position: static;
    margin-bottom: 12px;
    align-self: flex-start;
  }
  .edu-card {
    padding-top: 28px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .hero-inner > *,
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .hero-bg,
  .scroll-hint,
  .to-top,
  .social-row,
  .site-footer {
    display: none !important;
  }
  body {
    background: #fff;
    color: #111;
  }
  .hero {
    min-height: auto;
    padding: 40px 0;
  }
  .section {
    padding: 32px 0;
    page-break-inside: avoid;
  }
  .card,
  .stat,
  .tag {
    box-shadow: none;
    border-color: #ccc;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
