/* =========================================
   COMPONENTS.CSS
   - Header & nav (mobile + desktop)
   - Buttons & links
   - Section headers & layouts
   - About / Experience / Skills
   - Project & platform cards
   - Social & footer components
========================================= */

/* ---------------------------------
   GLOBAL SMALL FIX: NO SIDE SCROLL
   --------------------------------- */

body {
  overflow-x: hidden; /* kill extra space on the right on mobile */
}

/* ------------------------------
   HEADER / BRAND / NAVIGATION
   ------------------------------ */

.site-header {
  padding-block: 0.5rem;
}

/* Base header row */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  height: 70px;
}

/* Brand (logo + text) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  white-space: normal;
  max-width: 11.5rem;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  color: var(--color-text);
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Main nav base */

.main-nav {
  display: none; /* mobile default, overlay when is-open */
}

.main-nav .nav-list {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  padding: 0.25rem 0.4rem 0.35rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.25rem;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-text);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 1.8rem;
}

/* Header actions */

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

/* Language toggle */

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  background: rgba(15, 23, 42, 0.35);
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

html[data-theme="light"] .lang-toggle {
  background: rgba(255, 255, 255, 0.9);
}

.lang-option {
  opacity: 0.6;
}

.lang-option--active {
  opacity: 1;
  font-weight: 600;
}

.lang-divider {
  opacity: 0.4;
}

/* Theme toggle */

.theme-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--color-bg-subtle), var(--color-bg-elevated));
  border: 1px solid var(--color-border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  overflow: hidden;
}

.theme-icon {
  font-size: 0.9rem;
  opacity: 0.2;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

html[data-theme="dark"] .theme-icon--moon {
  opacity: 0.9;
}

html[data-theme="dark"] .theme-icon--sun {
  opacity: 0.1;
}

html[data-theme="light"] .theme-icon--sun {
  opacity: 0.9;
}

html[data-theme="light"] .theme-icon--moon {
  opacity: 0.1;
}

/* Header CV button – compact, one line */

.header-actions .btn.btn-sm.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
}

.header-actions .btn.btn-sm.btn-outline i {
  font-size: 0.9em;
}

/* Mobile nav toggle */

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  background: rgba(15, 23, 42, 0.8);
  flex: 0 0 auto;
}

html[data-theme="light"] .nav-toggle {
  background: rgba(255, 255, 255, 0.95);
}

.nav-toggle-bar {
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-text-soft);
  margin-inline: auto;
}

/* Desktop header (>=900px) */

@media (min-width: 900px) {
  .header-inner {
    gap: 1.5rem;
  }

  .brand-text {
    max-width: 12rem;
  }

  .main-nav {
    display: block;
    position: static;
    padding: 0;
    box-shadow: none;
    background: transparent;
    flex: 1 1 auto;
  }

  .main-nav .nav-list {
    justify-content: center; /* keep menu centered on desktop */
  }

  .header-actions {
    justify-content: flex-end;
  }

  .nav-toggle {
    display: none;
  }
}

/* Mobile / tablet header (<900px) */

@media (max-width: 899px) {
  .header-inner {
    gap: 0.7rem;
    flex-wrap: nowrap;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-text {
    max-width: 9.5rem;
  }

  /* Overlay nav when opened (main.js / contact.js add .is-open) */
  .main-nav {
    position: fixed;
    top: 64px; /* approx mobile header height */
    left: 0;
    right: 0;
    background: rgba(5, 6, 10, 0.98);
    border-bottom: 1px solid var(--color-border-subtle);
    padding: 1.1rem 1.5rem 1.5rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
    display: none;
    z-index: var(--z-overlay);
  }

  html[data-theme="light"] .main-nav {
    background: #f9fafb;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }

  .main-nav .nav-link {
    font-size: 0.9rem;
    padding: 0.3rem 0;
  }

  .nav-link::after {
    bottom: -0.2rem;
  }

  /* Hide "Download" text on very small screens to save space */
  @media (max-width: 480px) {
    .header-actions .btn.btn-sm.btn-outline span {
      display: none;
    }
  }
}

/* Prevent background scroll when nav open */
body.nav-open {
  overflow: hidden;
}

/* ------------------------------
   BUTTONS
   ------------------------------ */

.btn {
  --btn-bg: var(--color-bg-elevated);
  --btn-color: var(--color-text);
  --btn-border: var(--color-border-subtle);
  --btn-bg-hover: var(--color-bg-subtle);

  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

.btn i {
  font-size: 0.9em;
}

.btn:hover,
.btn:focus-visible {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-subtle);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Button sizes */

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.75rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.85rem;
}

/* Primary: pink gradient (your main CTAs) */

.btn-primary,
a.btn-primary {
  background: linear-gradient(135deg, #f30d58, #c30a47) !important;
  color: #ffffff !important;
  border: 1px solid transparent !important;
}

.btn-primary:hover,
.btn-primary:focus-visible,
a.btn-primary:hover,
a.btn-primary:focus-visible {
  background: linear-gradient(135deg, #2b081e, #f30d58) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.btn-primary:focus-visible,
a.btn-primary:focus-visible {
  outline: 2px solid #f30d58;
  outline-offset: 2px;
}

/* Outline & ghost */

.btn-outline {
  --btn-bg: transparent;
  --btn-color: var(--color-text);
  --btn-border: var(--color-border-strong);
  --btn-bg-hover: rgba(148, 163, 184, 0.08);
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-color: var(--color-text-soft);
  --btn-border: transparent;
  --btn-bg-hover: rgba(148, 163, 184, 0.12);
}

/* Inline link buttons */

.link-inline,
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--font-size-sm);
  color: var(--color-link);
  text-decoration: none;
}

.link-inline i {
  font-size: 0.8em;
}

.link-inline:hover,
.link-inline:focus-visible,
.inline-link:hover,
.inline-link:focus-visible {
  color: var(--color-link-hover);
}

/* ------------------------------
   SECTION HEADERS & GENERAL
   ------------------------------ */

.section-header {
  margin-bottom: 2rem;
}

.section-header--inline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.section-header--center {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.section-eyebrow::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.section-title {
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

.section-description {
  max-width: 640px;
  color: var(--color-text-soft);
  font-size: var(--font-size-md);
}

/* Split layout */

.section--split .section-body {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .section--split .section-body {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }
}

/* CTA section */

.section--cta {
  background:
    radial-gradient(circle at top, rgba(44, 59, 255, 0.3), transparent 55%),
    linear-gradient(135deg, var(--color-hero-gradient-start), var(--color-hero-gradient-end));
  color: #e5e7eb;
}

.section--cta .section-title {
  color: #f9fafb;
}

.section--cta .section-description {
  color: #e5e7eb;
}

/* ------------------------------
   ABOUT SNIPPET COMPONENTS
   ------------------------------ */

.about-body {
  display: grid;
  gap: 2rem;
}

.about-photo-wrapper {
  position: relative;
  max-width: 280px;
}

.about-photo {
    width: 500px;
    height: 505px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(148, 163, 184, 0.5);
    margin-bottom: 1.5rem;
    max-width: 1000px;
}
/* remove any old decorative border */
.about-photo-wrapper::before {
  content: none;
}

.about-text p + p {
  margin-top: 0.85rem;
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

/* Desktop: 2 columns */
@media (min-width: 900px) {
  .about-body {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
  }
}

/* Mobile: center image */
@media (max-width: 899px) {
  .about-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-photo-wrapper {
    margin-inline: auto;
  }
}

/* ------------------------------
   EXPERIENCE LAYOUT, TIMELINE & SKILLS
   ------------------------------ */

.experience-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .experience-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
    align-items: flex-start;
  }
}

/* Timeline column (global style) */

.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  border-left: 1px solid var(--color-border-subtle);
  padding-left: 1.2rem;
  margin-left: 0.3rem;
}

.timeline-item {
  position: relative;
  padding-left: 0.4rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.3rem;
  top: 0.25rem;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0%, var(--color-accent), var(--color-primary));
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.28);
}

.timeline-role {
  font-size: 1.02rem;
  margin-bottom: 0.2rem;
}

.timeline-meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: 0.45rem;
}

.timeline-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.timeline-list li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-soft);
}

.timeline-list li + li {
  margin-top: 0.15rem;
}

/* Skills column */

.experience-skills {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.skill-group {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  background:
    radial-gradient(circle at top left, rgba(44, 59, 255, 0.08), transparent 55%),
    var(--color-bg-elevated);
}

html[data-theme="dark"] .skill-group {
  background:
    radial-gradient(circle at top left, rgba(44, 59, 255, 0.3), transparent 60%),
    rgba(15, 23, 42, 0.95);
}

.skill-group-title {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.skill-group-text {
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.skill-tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0.2rem 0 0;
}

.skill-tag {
  font-size: 0.75rem;
  padding: 0.16rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-text);
}

html[data-theme="dark"] .skill-tag {
  background: rgba(148, 163, 184, 0.12);
  color: #e5e7eb;
}

.experience-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
}

/* ------------------------------
   PROJECT GRID & CARDS
   ------------------------------ */

.project-grid {
  display: grid;
  gap: 1.7rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(44, 59, 255, 0.28), transparent 60%),
    var(--color-bg-elevated);
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.22);
  transform: translateY(0);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background-color var(--transition-base);
}

html[data-theme="light"] .project-card {
  background:
    radial-gradient(circle at top, rgba(44, 59, 255, 0.12), transparent 60%),
    #ffffff;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hard);
  border-color: rgba(59, 130, 246, 0.6);
}

.project-card-media {
  position: relative;
  padding: 0.85rem 0.9rem 0;
}

.project-card-label {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.15rem 0.5rem;
  border-radius: 5px 10px 10px 2px;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  z-index: 2;
}

html[data-theme="light"] .project-card-label {
  background: rgba(15, 23, 42, 0.9);
}

.project-card-thumb {
  height: 190px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0% 150%, rgba(119, 255, 0, 0.8), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(37, 99, 235, 0.8), transparent 55%),
    #020617;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0.9;
  overflow: hidden;
}

.project-card-thumb span {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.project-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.project-card-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.project-card-title {
  font-size: 1rem;
}

.project-card-text {
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0.4rem;
}

.project-card-tags li {
  font-size: 0.75rem;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(148, 163, 184, 0.18);
  color: var(--color-text);
}

.project-card-actions {
  margin-top: auto;
}

/* ------------------------------
   PERSONAL PLATFORMS GRID & CARDS
   ------------------------------ */

.platform-grid {
  display: grid;
  gap: 1.6rem;
}

@media (min-width: 900px) {
  .platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.platform-card {
  position: relative;
  border-radius: 1.6rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(
      145deg,
      rgba(15, 23, 42, 0.95),
      rgba(15, 23, 42, 0.9)
    );
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.8);
  transform: translateY(0) translateZ(0);
  transform-origin: center;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background var(--transition-base);
}

.platform-card--channel {
  background:
    radial-gradient(circle at top, rgba(220, 38, 38, 0.5), transparent 55%),
    rgba(15, 23, 42, 0.98);
}

.platform-card--site {
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.45), transparent 55%),
    rgba(15, 23, 42, 0.98);
}

.platform-card:hover {
  transform: translateY(-8px) rotate3d(1, -1, 0, 6deg);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.95);
  border-color: rgba(59, 130, 246, 0.75);
}

/* "Live screenshot" area */

.platform-media {
  position: relative;
  padding: 0.8rem 0.9rem 0;
}

.platform-screenshot {
  position: relative;
  height: 140px;
  border-radius: 1.1rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 0 0, rgba(248, 250, 252, 0.2), transparent 60%),
    #020617;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
  transform-origin: center;
  transform: perspective(900px) rotateX(14deg) rotateY(-6deg) translateY(0);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    filter var(--transition-base),
    opacity var(--transition-base);
}

.platform-screenshot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(56, 189, 248, 0.25), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.platform-screenshot::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 10% 0, rgba(255, 255, 255, 0.16), transparent 55%);
  opacity: 0.6;
}

.platform-screenshot-label {
  position: absolute;
  left: 0.85rem;
  bottom: 0.75rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #e5e7eb;
}

.platform-card:hover .platform-screenshot {
  transform: perspective(900px) rotateX(6deg) rotateY(-2deg) translateY(-3px) scale(1.02);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.95);
  filter: saturate(1.15) contrast(1.05);
}

/* Platform type label */

.platform-type {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.platform-type i {
  font-size: 0.75rem;
}

/* Body */

.platform-body {
  padding: 0.85rem 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.platform-title {
  font-size: 1rem;
  color: #f9fafb;
}

.platform-text {
  font-size: 0.9rem;
  color: #e5e7eb;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0.4rem;
}

.platform-tags li {
  font-size: 0.75rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.platform-actions {
  margin-top: auto;
}

.platform-footnote {
  margin-top: 1.8rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

/* ------------------------------
   SOCIAL LINKS
   ------------------------------ */

.social-links {
  margin-top: 1.5rem;
}

.social-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  display: inline-block;
  margin-bottom: 0.25rem;
}

.social-icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.6);
  color: #e5e7eb;
  font-size: 0.8rem;
  text-decoration: none;
  transition:
    border-color var(--transition-base),
    background-color var(--transition-base),
    transform var(--transition-fast),
    box-shadow var(--transition-base),
    color var(--transition-base);
}

html[data-theme="light"] .social-link {
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text);
}

.social-link i {
  font-size: 0.9rem;
}

.social-link-text {
  font-size: 0.78rem;
}

.social-link:hover,
.social-link:focus-visible {
  border-color: rgba(59, 130, 246, 0.9);
  background: linear-gradient(135deg, rgba(44, 59, 255, 0.9), rgba(119, 255, 0, 0.9));
  color: #020617;
  box-shadow: var(--shadow-subtle);
  transform: translateY(-1px);
}

/* ------------------------------
   FOOTER LINKS & ICONS
   ------------------------------ */

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
  text-decoration: none;
}

.footer-link i {
  font-size: 0.85rem;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--color-link-hover);
}

.footer-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.footer-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

/* Icon base */
.footer-icon {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease,
    background 0.2s ease;
}

.footer-icon i {
  font-size: 16px;
  pointer-events: none;
}

.footer-icon:hover,
.footer-icon:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  opacity: 0.95;
}

/* Tooltip */
.footer-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

/* Small arrow under tooltip */
.footer-icon::before {
  content: "";
  position: absolute;
  bottom: 128%;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #111827;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 19;
}

.footer-icon:hover::after,
.footer-icon:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-3px);
}

.footer-icon:hover::before,
.footer-icon:focus-visible::before {
  opacity: 1;
}

/* Mobile footer alignment */
@media (max-width: 768px) {
  .footer-right {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .footer-icons {
    justify-content: flex-start;
  }
}

/* ------------------------------
   FLOATING "BACK TO TOP" BUTTON
   ------------------------------ */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: #111827;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  z-index: 9999;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.back-to-top:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.back-to-top i {
  pointer-events: none;
}

/* Smaller on mobile */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}
