/* ============================================================
   style.css — Main Stylesheet
   Sections: Reset · Base · Scrollbar · Focus · Container ·
   Typography · Buttons · Nav · Hero · About · Skills ·
   Projects · Contact · Footer · Animations · Utilities
   ============================================================ */


/* ============================================================
   RESET & BASE
   ============================================================ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-relaxed);
  color: var(--text-2);
  background-color: var(--bg);
  transition: background-color var(--ease-base), color var(--ease-base);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }

/* ============================================================
   FOCUS — Visible for keyboard users
   ============================================================ */

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

/* ============================================================
   SELECTION
   ============================================================ */

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

/* ============================================================
   CONTAINER
   ============================================================ */

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

/* ============================================================
   HEADINGS
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--text-1);
}


/* ============================================================
   SECTION BASE
   ============================================================ */

.section {
  padding: var(--sp-24) 0;
}

.section--alt {
  background-color: var(--bg-alt);
}

.section__header {
  text-align: center;
  margin-bottom: var(--sp-16);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.025em;
  color: var(--text-1);
  margin-bottom: var(--sp-2);
}

/* Accent underline mark */
.section__title::after {
  content: '';
  display: block;
  width: 32px;
  height: 2.5px;
  background: var(--accent);
  border-radius: var(--radius-full);
  margin: var(--sp-3) auto 0;
}

.section__subtitle {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-top: var(--sp-2);
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.6rem 1.25rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  transition: background-color var(--ease-fast),
              border-color var(--ease-fast),
              color var(--ease-fast),
              transform var(--ease-base),
              box-shadow var(--ease-base);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Primary — filled red */
.btn--primary {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.btn--primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Secondary — outlined */
.btn--secondary {
  background-color: transparent;
  color: var(--text-1);
  border-color: var(--border-heavy);
}
.btn--secondary:hover {
  border-color: var(--text-1);
  background-color: var(--surface);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Ghost — text-only */
.btn--ghost {
  background-color: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn--ghost:hover {
  color: var(--text-1);
  background-color: var(--surface-alt);
}

/* Small nav resume button */
.btn--nav {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  padding: 0.45rem 1rem;
  font-size: var(--text-sm);
}
.btn--nav:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
}

/* Full-width */
.btn--full { width: 100%; }


/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-nav);
  background-color: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease-base), box-shadow var(--ease-base);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: var(--sp-8);
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.nav__logo-mark {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav__logo-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-1);
  letter-spacing: -0.01em;
}

/* Nav links */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav__link {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: color var(--ease-fast), background-color var(--ease-fast);
}

.nav__link:hover { color: var(--text-1); background-color: var(--surface-alt); }
.nav__link.active { color: var(--accent); }

/* Nav actions */
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

/* Theme toggle */
.nav__theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  transition: color var(--ease-fast), background-color var(--ease-fast);
}
.nav__theme-toggle:hover { color: var(--text-1); background-color: var(--surface-alt); }

.icon-sun, .icon-moon { width: 18px; height: 18px; }

/* Show sun in dark, moon in light */
.icon-sun  { display: block; }
.icon-moon { display: none;  }
[data-theme="dark"] .icon-sun  { display: none;  }
[data-theme="dark"] .icon-moon { display: block; }

/* Hamburger (hidden on desktop) */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-1);
  cursor: pointer;
}
.nav__hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--ease-base), opacity var(--ease-base);
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile overlay (invisible on desktop) */
.nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: calc(var(--z-nav) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-base);
}
.nav__overlay.active {
  opacity: 1;
  pointer-events: all;
}


/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  position: relative;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
  padding-top: var(--sp-16);
  padding-bottom: var(--sp-16);
}

.hero__content { max-width: 540px; }

.hero__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: var(--weight-bold);
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--text-1);
  margin-bottom: var(--sp-5);
}

.hero__intro {
  font-size: var(--text-lg);
  color: var(--text-2);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--sp-8);
  max-width: 46ch;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: center;
}

/* Image column */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

/*
  SIGNATURE ELEMENT:
  The image frame uses CSS pseudo-elements to create "L-bracket"
  corner accents in the ember red. It is the single deliberate
  aesthetic detail that distinguishes this from a generic portfolio.
*/
.hero__frame {
  position: relative;
  width: 340px;
  height: 340px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background-color: var(--surface-alt);
  box-shadow: var(--shadow-lg);
  flex-shrink: 0;
}

/* Top-right corner bracket */
.hero__frame::before {
  content: '';
  position: absolute;
  top: -5px;
  right: -5px;
  width: 44px;
  height: 44px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  border-radius: 0 var(--radius-lg) 0 0;
  z-index: 2;
  pointer-events: none;
}

/* Bottom-left corner bracket */
.hero__frame::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: -5px;
  width: 44px;
  height: 44px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  border-radius: 0 0 0 var(--radius-lg);
  z-index: 2;
  pointer-events: none;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Decorative dot grid — subtle, behind the frame */
.hero__dots {
  position: absolute;
  bottom: -22px;
  right: -22px;
  width: 90px;
  height: 90px;
  background-image: radial-gradient(circle, var(--accent) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: 0.18;
  z-index: -1;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}
.hero__scroll-line {
  width: 1px;
  height: 52px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.85); }
  50%       { opacity: 0.70; transform: scaleY(1);    }
}


/* ============================================================
   ABOUT
   ============================================================ */

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: start;
}

.about__text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.about__text p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-2);
}

.about__cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* Info card */
.info-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease-base), border-color var(--ease-base);
}
.info-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-heavy); }

.info-card__label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: var(--sp-3);
}
.info-card__label svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
  flex-shrink: 0;
}
.info-card__body {
  font-size: var(--text-sm);
  color: var(--text-2);
}

/* Education details */
.edu__degree {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-1);
  margin-bottom: var(--sp-1);
}
.edu__school {
  font-size: var(--text-sm);
  color: var(--text-2);
  margin-bottom: var(--sp-1);
}
.edu__meta {
  font-size: var(--text-xs);
  color: var(--text-3);
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.tag {
  padding: 3px var(--sp-3);
  background-color: var(--accent-tint);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
}


/* ============================================================
   SKILLS
   ============================================================ */

.skills__group {
  margin-bottom: var(--sp-12);
}
.skills__group:last-child { margin-bottom: 0; }

.skills__group-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-6);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: var(--sp-4);
}

.skills__grid--narrow {
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  max-width: 380px;
}

/* Skill card */
.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-4);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease-base), box-shadow var(--ease-base), border-color var(--ease-base);
  cursor: default;
  user-select: none;
}
.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-heavy);
}

.skill-card i {
  font-size: 2.1rem;
  line-height: 1;
}

/* Flask & other single-color icons — invert in dark mode */
[data-theme="dark"] .devicon-flask-original,
[data-theme="dark"] .skill-icon--mono {
  filter: invert(0.85);
}

.skill-card__svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}

.skill-card__name {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-2);
  text-align: center;
  letter-spacing: 0.02em;
}


/* ============================================================
   PROJECTS
   ============================================================ */

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

/* Project card */
.project-card {
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease-base), box-shadow var(--ease-base);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--surface-alt);
  flex-shrink: 0;
}

.project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ease-slow);
}
.project-card:hover .project-card__img { transform: scale(1.04); }

.project-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  background: linear-gradient(140deg, var(--surface-alt) 0%, var(--bg-alt) 100%);
}
.project-card__placeholder svg {
  width: 28px;
  height: 28px;
  color: var(--text-3);
  opacity: 0.6;
}
.project-card__placeholder span {
  font-size: var(--text-xs);
  color: var(--text-3);
}

.project-card__body {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-1);
  margin-bottom: var(--sp-2);
}

.project-card__desc {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--sp-4);
  flex: 1;
}

.project-card__tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-2);
  margin-bottom: var(--sp-5);
}
.project-card__tech-tag {
  padding: 2px var(--sp-2);
  background-color: var(--surface-alt);
  color: var(--text-3);
  font-size: 11px;
  font-weight: var(--weight-medium);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.project-card__actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: auto;
}
.project-card__actions .btn {
  flex: 1;
  padding: 0.45rem var(--sp-3);
  font-size: var(--text-xs);
}


/* ============================================================
   CONTACT
   ============================================================ */

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: start;
}

.contact__intro {
  font-size: var(--text-base);
  color: var(--text-2);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--sp-8);
}

.contact__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* Contact row */
.contact-row__link {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--ease-fast),
              box-shadow var(--ease-fast),
              transform var(--ease-base);
}
.contact-row__link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.contact-row__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: var(--accent-tint);
  flex-shrink: 0;
}
.contact-row__icon svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}

.contact-row__text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.contact-row__label {
  font-size: 10px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
}
.contact-row__value {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Form */
.contact__form-panel {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-md);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-1);
}

.form-control {
  padding: 0.6rem var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background-color: var(--bg);
  color: var(--text-1);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  width: 100%;
  outline: none;
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
}
.form-control::placeholder { color: var(--text-3); }
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.form-control.is-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error-msg {
  font-size: var(--text-xs);
  color: #dc2626;
  font-weight: var(--weight-medium);
  min-height: 1em;
}

.form-status {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  text-align: center;
  display: none;
}
.form-status.success {
  display: block;
  color: #166534;
  background: rgba(22, 101, 52, 0.08);
  border: 1px solid rgba(22, 101, 52, 0.2);
}
.form-status.error {
  display: block;
  color: #991b1b;
  background: rgba(153, 27, 27, 0.08);
  border: 1px solid rgba(153, 27, 27, 0.2);
}


/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: var(--sp-12) 0 var(--sp-8);
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--sp-12);
  align-items: start;
  padding-bottom: var(--sp-8);
  margin-bottom: var(--sp-8);
  border-bottom: 1px solid var(--border);
}

.footer__brand {}
.footer__brand-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.footer__tagline {
  font-size: var(--text-sm);
  color: var(--text-3);
}

.footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.footer__nav-list a {
  font-size: var(--text-sm);
  color: var(--text-2);
  transition: color var(--ease-fast);
}
.footer__nav-list a:hover { color: var(--accent); }

.footer__socials {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: color var(--ease-fast),
              border-color var(--ease-fast),
              background-color var(--ease-fast);
}
.social-icon svg { width: 15px; height: 15px; }
.social-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--accent-tint);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copy {
  font-size: var(--text-sm);
  color: var(--text-3);
}

.footer__back-top {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-2);
  transition: color var(--ease-fast);
}
.footer__back-top:hover { color: var(--accent); }
.footer__back-top svg { width: 14px; height: 14px; }


/* ============================================================
   SCROLL-TRIGGERED ANIMATIONS
   Triggered by IntersectionObserver in animations.js
   ============================================================ */

.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger siblings */
.fade-up:nth-child(2) { transition-delay: 80ms;  }
.fade-up:nth-child(3) { transition-delay: 160ms; }
.fade-up:nth-child(4) { transition-delay: 240ms; }
.fade-up:nth-child(5) { transition-delay: 320ms; }
.fade-up:nth-child(6) { transition-delay: 400ms; }
.fade-up:nth-child(7) { transition-delay: 480ms; }
.fade-up:nth-child(8) { transition-delay: 560ms; }


/* ============================================================
   UTILITIES
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion — respect user preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
