/* ============================================================
   Mostafa Fouda — Portfolio (editorial)
   Light is default · Dark via [data-theme="dark"]
   ============================================================ */

[data-theme="light"], :root {
  --bg: #f4f1ec;
  --bg-elev: #faf8f5;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-mute: #8a8a8a;
  --rule: rgba(26, 26, 26, 0.12);
  --rule-soft: rgba(26, 26, 26, 0.06);
  --accent: #2f6f4e;
  --accent-warm: #c4622d;
  --accent-soft: rgba(47, 111, 78, 0.12);
  --contact-bg: #1a1a1a;
  --contact-ink: #f4f1ec;
  --contact-mute: rgba(244, 241, 236, 0.7);
  --contact-rule: rgba(244, 241, 236, 0.14);
  --contact-link-hover: #8fcfa9;
}

[data-theme="dark"] {
  --bg: #14130f;
  --bg-elev: #1d1c17;
  --ink: #f1ede5;
  --ink-soft: #c0bbb1;
  --ink-mute: #8a857c;
  --rule: rgba(241, 237, 229, 0.13);
  --rule-soft: rgba(241, 237, 229, 0.06);
  --accent: #8fcfa9;
  --accent-warm: #e08a52;
  --accent-soft: rgba(143, 207, 169, 0.16);
  --contact-bg: #0d0c09;
  --contact-ink: #f1ede5;
  --contact-mute: rgba(241, 237, 229, 0.7);
  --contact-rule: rgba(241, 237, 229, 0.14);
  --contact-link-hover: #8fcfa9;
}

:root {
  --max: 1200px;
  --pad: clamp(20px, 4vw, 56px);
  --section-pad: clamp(72px, 10vw, 140px);
  --radius: 14px;
  --radius-sm: 8px;
  --t: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s var(--t), color 0.4s var(--t);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--bg); }

/* ============================================================
   Navigation
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--t), background 0.25s var(--t);
}
.nav.scrolled { border-bottom-color: var(--rule); }

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.nav-dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  color: var(--ink-soft);
  transition: color 0.2s var(--t);
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1.5px;
  background: var(--ink);
  transition: width 0.25s var(--t);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { width: 100%; background: var(--accent); }

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

.theme-btn {
  position: relative;
  width: 36px; height: 36px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s var(--t), color 0.2s var(--t), border-color 0.2s var(--t), transform 0.2s var(--t);
  overflow: hidden;
}
.theme-btn:hover {
  color: var(--ink);
  border-color: var(--ink-mute);
  transform: translateY(-1px);
}
.theme-btn .icon-sun, .theme-btn .icon-moon {
  position: absolute;
  transition: transform 0.35s var(--t), opacity 0.25s var(--t);
}
[data-theme="light"] .theme-btn .icon-sun { transform: rotate(0); opacity: 1; }
[data-theme="light"] .theme-btn .icon-moon { transform: rotate(90deg) scale(0.4); opacity: 0; }
[data-theme="dark"] .theme-btn .icon-sun { transform: rotate(-90deg) scale(0.4); opacity: 0; }
[data-theme="dark"] .theme-btn .icon-moon { transform: rotate(0); opacity: 1; }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  transition: transform 0.2s var(--t), background 0.2s var(--t);
}
.nav-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
}
[data-theme="dark"] .nav-cta { color: #14130f; }
[data-theme="dark"] .nav-cta:hover { color: #0d0c09; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 10vw, 120px) var(--pad) 0;
  position: relative;
}

.hero-meta { margin-bottom: 32px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-elev);
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 28px;
}

.hero-tag {
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 720px;
  margin: 0 0 52px;
  font-weight: 400;
}
.hero-tag em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
}

.hero-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 36px;
}
.hero-info > div {
  display: flex; flex-direction: column;
  gap: 6px;
}
.hero-info .label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}
.hero-info .value {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 720px) {
  .hero-info { grid-template-columns: 1fr; gap: 20px; }
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: clamp(60px, 8vw, 96px);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--t), background 0.2s var(--t), color 0.2s var(--t), border-color 0.2s var(--t);
  font-family: inherit;
}
.btn svg { transition: transform 0.25s var(--t); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-primary:hover svg { transform: translateY(2px); }
[data-theme="dark"] .btn-primary { color: #14130f; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.btn-ghost:hover svg { transform: translateX(3px); }

/* Marquee */
.hero-marquee {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
  overflow: hidden;
  margin: 0 calc(-1 * var(--pad));
  background: var(--bg-elev);
}
.marquee-track {
  display: flex;
  gap: 36px;
  white-space: nowrap;
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  animation: marquee 40s linear infinite;
  width: max-content;
}
.marquee-track span:nth-child(even) { color: var(--accent); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   Section scaffolding
   ============================================================ */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-pad) var(--pad);
  position: relative;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 56px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.section-num {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(36px, 6vw, 64px);
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1;
}

/* ============================================================
   About
   ============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.about-lede {
  font-family: 'Fraunces', serif;
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
  max-width: 920px;
}
.about-lede strong {
  font-weight: 500;
  background: linear-gradient(transparent 62%, var(--accent-soft) 62%);
  padding: 0 2px;
}
.about-lede em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.about-body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 760px;
  margin: 0;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 24px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat {
  padding: 28px 24px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.stat-unit {
  font-size: 0.45em;
  color: var(--ink-mute);
  font-weight: 400;
  margin-left: 4px;
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}

@media (max-width: 900px) {
  .about-stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 520px) {
  .stat { padding: 22px 18px; }
}

/* ============================================================
   Experience timeline
   ============================================================ */

.timeline {
  display: flex;
  flex-direction: column;
}

.job {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: 44px 0;
  border-top: 1px solid var(--rule);
  transition: background 0.3s var(--t);
  position: relative;
}
.job:last-child { border-bottom: 1px solid var(--rule); }
.job::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.45s var(--t);
}
.job:hover::before { width: 60px; }

.job-period {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
}
.job-date {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-transform: uppercase;
}
.job-loc {
  font-size: 13px;
  color: var(--ink-mute);
}

.job-head { margin-bottom: 16px; }
.job-role {
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.job-company {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-soft);
}
.job-type {
  color: var(--ink-mute);
  font-weight: 400;
}

.job-points {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.job-points li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.job-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 1.5px;
  background: var(--accent);
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.job-tags span {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  color: var(--ink-soft);
}

@media (max-width: 820px) {
  .job { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================================================
   Education
   ============================================================ */

.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.edu-card {
  padding: 32px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.3s var(--t), box-shadow 0.3s var(--t), border-color 0.3s var(--t);
}
.edu-card:hover {
  transform: translateY(-3px);
  border-color: rgba(26, 26, 26, 0.2);
  box-shadow: 0 14px 40px -20px rgba(26, 26, 26, 0.18);
}
[data-theme="dark"] .edu-card:hover {
  border-color: rgba(241, 237, 229, 0.25);
  box-shadow: 0 14px 40px -20px rgba(0, 0, 0, 0.6);
}
.edu-feature {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--bg-elev), var(--accent-soft));
  border-color: var(--accent-soft);
}

.edu-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.edu-date {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.edu-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
[data-theme="dark"] .edu-badge { color: #0d0c09; }
.edu-badge-soft {
  background: var(--ink);
  color: var(--bg);
}

.edu-school {
  font-family: 'Fraunces', serif;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}
.edu-degree {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
  margin: 0;
}
.edu-note {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0;
  line-height: 1.55;
}

.edu-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.edu-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.edu-stats span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}
.edu-stats strong {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.edu-courses {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}
.edu-courses .label {
  font-weight: 600;
  color: var(--ink);
}

@media (max-width: 760px) {
  .edu-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Publications
   ============================================================ */

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pub {
  display: block;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  transition: padding 0.3s var(--t);
  position: relative;
}
.pub:last-child { border-bottom: 1px solid var(--rule); }
.pub::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.45s var(--t);
}
.pub:hover::before { width: 80px; }
.pub:hover { padding-left: 18px; }

.pub-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.pub-venue { color: var(--accent); }
.pub-date { color: var(--ink-mute); }

.pub-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 14px;
  max-width: 920px;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.2s var(--t), gap 0.2s var(--t);
}
.pub:hover .pub-link {
  color: var(--accent);
  gap: 10px;
}

/* ============================================================
   Skills
   ============================================================ */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.skill-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 24px;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: transform 0.25s var(--t), border-color 0.25s var(--t);
}
.skill-block:hover {
  transform: translateY(-3px);
  border-color: rgba(26, 26, 26, 0.2);
}
[data-theme="dark"] .skill-block:hover {
  border-color: rgba(241, 237, 229, 0.25);
}
.skill-title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--accent);
}
.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skill-list li {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-soft);
}
.skill-list li:last-child { border-bottom: none; padding-bottom: 0; }
.lang-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lang-list span {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 980px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .skills-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Awards
   ============================================================ */

.awards {
  display: flex;
  flex-direction: column;
}
.award {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}
.award:last-child { border-bottom: 1px solid var(--rule); }
.award-year {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
}
.award h3 {
  font-family: 'Fraunces', serif;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}
.award p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .award { grid-template-columns: 1fr; gap: 8px; }
}

/* ============================================================
   Contact
   ============================================================ */

.section-contact {
  margin-top: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  padding: 48px;
  background: var(--contact-bg);
  color: var(--contact-ink);
  border-radius: 24px;
}
.contact-pitch h3 {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 18px;
}
.contact-pitch p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--contact-mute);
  margin: 0 0 24px;
  max-width: 460px;
}

.btn-contact-cv {
  background: var(--contact-ink);
  color: var(--contact-bg);
}
.btn-contact-cv:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-contact-cv:hover svg { transform: translateY(2px); }
[data-theme="dark"] .btn-contact-cv:hover { color: #0d0c09; }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid var(--contact-rule);
}
.contact-list li:first-child { padding-top: 0; }
.contact-list li:last-child { border-bottom: none; }
.contact-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: color-mix(in srgb, var(--contact-ink) 50%, transparent);
}
.contact-list a, .contact-list span:not(.contact-label) {
  font-size: 16px;
  font-weight: 500;
  color: var(--contact-ink);
  transition: color 0.2s var(--t);
}
.contact-list a:hover { color: var(--contact-link-hover); }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; padding: 36px 28px; }
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  border-top: 1px solid var(--rule);
  margin-top: 80px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-mute);
  flex-wrap: wrap;
  gap: 16px;
}
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s var(--t), gap 0.2s var(--t);
}
.back-top:hover { color: var(--accent); gap: 10px; }

/* ============================================================
   Scroll reveal
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--t), transform 0.7s var(--t);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
