/* ==========================================================================
   Robin Suda — Portfolio
   ========================================================================== */

/* --- Design tokens --- */
:root {
  --color-bg: #ffffff;
  --color-text: #111111;
  --color-accent: #cc4400;
  --color-muted: #666666;

  --font-display: "Helvetica Neue";
  --font-body: "Helvetica Neue";

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  --max-width: 1100px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.5;
}

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

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

ul, dl {
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0 0 var(--space-sm);
}

/* --- Layout shell --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  max-width: var(--max-width);
  margin: 0 auto;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.site-header.is-hidden {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.site-nav {
  display: flex;
  gap: var(--space-sm);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.skills,
.favorites,
.connect,
.mockups {
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.site-footer {
  text-align: center;
  padding: var(--space-md);
  color: var(--color-muted);
}

/* --- Section rhythm --- */
main > section {
  padding: var(--space-xl) 0;
}

main > section:first-child {
  padding-top: var(--space-lg);
}

main > section + section {
  border-top: 1px solid #0000000f;
}

.hero {
  padding: var(--space-xl) 0;
}

/* --- Scroll snap --- */
.hero-intro,
.hero,
.work-list {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* --- Scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero intro --- */
.hero-name {
  font-size: 64px;
  font-weight: 100;
  margin: 0 0 var(--space-sm);
}

.hero-line {
  display: block;
  overflow: hidden; /* mask for the reveal */
}

.hero-line-inner {
  display: block;
  transform: translateY(115%);
  animation: heroLineIn 0.9s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.hero-name-light {
  font-weight: 300;
}

.hero-line:nth-child(2) .hero-line-inner {
  animation-delay: 0.12s;
}

.hero-sub,
.hero-actions > * {
  opacity: 0;
  animation: heroFadeUp 0.7s ease forwards;
}

.hero-sub { animation-delay: 0.55s; color: rgb(68, 68, 68); }
.hero-actions button { animation-delay: 0.7s; }
.hero-actions .hero-status { animation-delay: 0.82s; }

.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: 24px;
  align-items: center;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 50px;
  background-color: white;
  color: #111111;
  border: 1px solid gray;
  padding: 12px 18px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease,
              border-color 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-cta-arrow {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  transform: translateX(-8px);
  overflow: hidden;
  transition: max-width 0.3s ease, opacity 0.25s ease, transform 0.3s ease, margin-right 0.3s ease;
}

.hero-cta:hover {
  background-color: #111111;
  color: #ffffff;
  border-color: #111111;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.hero-cta:hover .hero-cta-arrow {
  max-width: 20px;
  opacity: 1;
  transform: translateX(0);
  margin-right: 8px;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #03C04A;
  font-weight: 500;
}

.status-dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #03C04A;
  flex-shrink: 0;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #03C04A;
  animation: statusPing 2.2s ease-out infinite;
  animation-delay: 1.6s; /* wait until the entrance animation is done */
}

@keyframes heroLineIn {
  to { transform: translateY(0); }
}

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

@keyframes statusPing {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* --- About swiper --- */
.about-wrap {
  width: 100%;
  max-width: 640px;
}

.about-swiper {
  padding: 8px 8px 0;
}

.about-swiper .swiper-slide {
  min-height: 180px;
}

.about-slide-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.about-swiper p {
  font-size: 1.05rem;
  line-height: 1.6;
}

.about-swiper-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: var(--space-md);
}

.about-nav-btn {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin-top: 0 !important;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.about-nav-btn::after {
  content: none !important;
}

.about-nav-btn:hover {
  background-color: #111111;
  color: #ffffff;
}

.about-nav-btn.swiper-button-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.about-pagination {
  position: static !important;
  display: flex;
  gap: 6px;
  width: auto !important;
}

.about-pagination .swiper-pagination-bullet {
  background-color: rgba(0, 0, 0, 0.2);
  opacity: 1;
  width: 7px;
  height: 7px;
}

.about-pagination .swiper-pagination-bullet-active {
  background-color: #111111;
}

/* --- Mockup gallery --- */
.mockup-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.mockup-img {
  width: 100%;
  display: block;
  margin-bottom: var(--space-sm);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  break-inside: avoid;
}

.mockup-img:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
}

@media (max-width: 900px) {
  .mockup-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(17, 17, 17, 0.92);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .mockup-img,
  .lightbox {
    transition: none;
  }
}

@media (max-width: 640px) {
  .about-swiper .swiper-slide {
    min-height: 220px;
  }
}

/* --- Work cards --- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  align-items: start;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background-color: var(--color-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
  cursor: pointer;
}

.work-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.work-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  padding: 24px;
}

.work-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card-body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.work-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xs);
}

.work-card-top h3 {
  margin: 0;
  font-size: 1.1rem;
}

.tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.tag-shipped {
  background-color: #e3f1e6;
  color: #2e6b3e;
}

.tag-in-progress {
  background-color: #fdf0db;
  color: #a8671a;
}

.tag-side-project {
  background-color: #e6e9f5;
  color: #3e4a8a;
}

.work-card-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.work-card-details {
  max-height: 0;
  overflow: hidden;
  padding: 0 var(--space-sm) var(--space-sm);
  transition: max-height 0.35s ease;
}

.work-card-details dl {
  padding: var(--space-sm) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}

.work-card-details dl > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.work-card-details dt {
  font-size: 0.7rem;
  text-transform: uppercase;
}

.work-card-details dd {
  margin: 0;
  font-size: 0.9rem;
}

.work-card:hover .work-card-details {
  max-height: 220px;
}

.work-card-frame {
  position: relative;
  width: 100%;
  display: block;
  z-index: 2;
  pointer-events: none;
}

.work-card-screen {
  position: absolute;
  /* tune these to match the transparent cutout in laptopempty.png */
  top: 13%;
  left: 15%;
  width: 71%;
  height: 70%;
  overflow: hidden;
  z-index: 1;
}

.work-card-static,
.work-card-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card-video {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.work-card.is-in-view .work-card-video {
  opacity: 1;
}

.visit-site-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  border-radius: 6px;
  background-color: #2b2b2b;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.visit-site-btn span,
.visit-site-btn i {
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.25s ease 0.15s;
}

.visit-site-btn span {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.visit-site-btn i {
  font-size: 0.75rem;
}

.work-card:hover .visit-site-btn {
  transform: scaleX(1);
}

.work-card:hover .visit-site-btn span,
.work-card:hover .visit-site-btn i {
  opacity: 1;
}

/* --- Work swiper --- */
.work-swiper {
  padding: 8px 8px 0;
  overflow: visible;
}

.work-swiper .swiper-slide {
  height: auto;
  display: flex;
}

.work-swiper {
  padding: 8px 8px 0;
  overflow: visible;
}

.work-swiper-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: var(--space-md);
}

.work-nav-btn {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin-top: 0 !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.work-nav-btn::after {
  content: none !important;
}

.work-nav-btn:hover {
  background-color: #111111;
  color: #ffffff;
}

.work-nav-btn.swiper-button-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.work-swiper .work-card {
  width: 100%;
}


.work-swiper .swiper-button-prev {
  left: calc(50% - 52px);
}

.work-swiper .swiper-button-next {
  left: calc(50% + 12px);
  right: auto;
}

.work-swiper .swiper-button-prev::after,
.work-swiper .swiper-button-next::after {
  font-size: 14px !important;
}

.work-swiper .swiper-button-disabled {
  opacity: 0.3;
}

@media (max-width: 900px) {
  .work-swiper {
    padding-bottom: 56px;
  }
}

/* --- Hover logo tags --- */
.logo-hover {
  position: relative;
  cursor: default;
  border-bottom: 1px dotted var(--color-muted);
}

.logo-hover::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 100%;
  transform: translateY(-50%) translateX(8px) scale(0.95);
  width: 120px;
  height: 80px;
  background-color: #ffffff;
  background-image: var(--logo-img);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  padding: var(--space-xs);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.logo-hover:hover::after,
.logo-hover:focus::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(4px) scale(1);
}

/* --- Skills & Tools --- */
.skills-group {
  margin-bottom: var(--space-md);
}

.skills-group:last-child {
  margin-bottom: 0;
}

.skills-group-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}

.skills-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-badge {
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.85rem;
  background-color: rgba(0, 0, 0, 0.02);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.skill-badge:hover {
  background-color: #111111;
  border-color: #111111;
  color: #ffffff;
  transform: translateY(-2px);
}

/* --- About photo collage --- */
.about-collage-wrap {
  width: 100%;
}

.photo-collage {
  display: flex;
  gap: var(--space-sm);
  width: 100%;
}

.collage-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}

/* offset the middle column so the three columns don't line up in a grid */
.collage-col-mid {
  margin-top: var(--space-lg);
}

.collage-img {
  width: 100%;
  display: block;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  opacity: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: collage-fade-in 0.7s ease forwards;
}

.collage-img:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
}

/* left/right columns: simple fade-in, staggered */
.collage-col-left .collage-img:nth-child(1) { animation-delay: 0s; }
.collage-col-left .collage-img:nth-child(2) { animation-delay: 0.15s; }
.collage-col-right .collage-img:nth-child(1) { animation-delay: 0.15s; }
.collage-col-right .collage-img:nth-child(2) { animation-delay: 0.3s; }

/* middle column: drops in from above, then settles into place */
.collage-img-drop {
  animation-name: collage-drop-in;
  animation-duration: 0.9s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.collage-col-mid .collage-img:nth-child(1) { animation-delay: 0.3s; }
.collage-col-mid .collage-img:nth-child(2) { animation-delay: 0.45s; }

@keyframes collage-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes collage-drop-in {
  from {
    opacity: 0;
    transform: translateY(-90px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Let's Connect closing section --- */
.connect-thanks {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin: 0 0 var(--space-sm);
}

/* --- Cursor tooltip --- */
.cursor-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-9999px, -9999px);
  max-width: 220px;
  padding: 6px 12px;
  border-radius: 6px;
  background-color: #2b2b2b;
  color: #ffffff;
  font-size: 0.8rem;
  line-height: 1.35;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.15s ease;
  will-change: transform;
}

.cursor-tooltip.is-visible {
  opacity: 1;
}

@media (hover: none) {
  .cursor-tooltip {
    display: none;
  }
}

/* --- Favorites swiper --- */
.favorites-swiper {
  padding: var(--space-md) 0 var(--space-lg);
}

.favorites-swiper .swiper-slide {
  text-align: center;
}

.favorites-swiper h3 {
  margin-bottom: var(--space-md);
}

.favorites-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.favorites-grid li {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  transform: scale(0.96);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: var(--space-sm);
}

.favorites-grid li:hover {
  transform: translateY(-6px) rotate(-2deg) scale(1.05);
}

.favorites-grid img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
}

.favorites-grid li::before {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 80%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  transition: left 0.65s ease;
  z-index: 1;
}

.favorites-grid li:hover::before {
  left: 150%;
}

.favorites-grid p {
  font-size: 0.875rem;
  margin: 0;
}

/* --- Favorites external links --- */
.favorites-slide-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: var(--space-md);
  flex-direction:row;
}

.favorites-slide-header h3 {
  margin: 0;
}

.favorites-external-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--color-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.favorites-external-link i {
  font-size: 16px;
}

.favorites-external-link:hover {
  color: var(--color-text);
}

.swiper-button-prev,
.swiper-button-next {
  background-color: white;
  color: var(--color-text) !important;
  width: 12px !important;
  height: 12px !important;
  padding: 16px !important;
}

.swiper-button-prev::after,
.swiper-button-next::after {
  content: none !important;
}

.swiper-pagination-bullet-active {
  background-color: var(--color-accent);
}

/* --- Case study pages --- */
.case-study-header {
  padding: var(--space-lg) 0;
}

.spec-list {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.spec-list > div {
  display: flex;
  flex-direction: column;
}

.spec-list dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--color-muted);
}

.case-study-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
}

.case-study-pagination {
  padding: var(--space-md) 0 var(--space-xl);
  display: flex;
  justify-content: space-between;
}

/* --- Let's Connect --- */
.connect-sub {
  color: var(--color-muted);
  margin: 0 0 var(--space-md);
  max-width: 40ch;
}

.connect-links {
  display: flex;
  gap: var(--space-sm);
}

.connect-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  font-size: 1.1rem;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.connect-icon:hover {
  background-color: #111111;
  border-color: #111111;
  color: #ffffff;
  transform: translateY(-3px);
}

/* --- Floating action button --- */
.site-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 50px;
  border: none;
  background-color: #111111;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: "Inter", var(--font-body), sans-serif;
  text-transform: none;
  letter-spacing: normal;
  padding: 14px 20px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, box-shadow 0.25s ease;
  z-index: 500;
}

.site-fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.site-fab-arrow {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  transform: translateX(-8px);
  overflow: hidden;
  transition: max-width 0.3s ease, opacity 0.25s ease, transform 0.3s ease, margin-right 0.3s ease;
}

.site-fab:hover .site-fab-arrow {
  max-width: 20px;
  opacity: 1;
  transform: translateX(0);
  margin-right: 8px;
}

/* --- Mobile next-section button --- */
.next-section-btn {
  display: none;
}

/* --- Skills swiper --- */
.skills-swiper {
  width: 100%;
  padding: 8px 8px 0;
}

.skills-swiper .swiper-slide {
  min-height: 140px;
}

/* --- Shared swiper navigation --- */
.swiper-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: var(--space-md);
}

.swiper-nav-btn {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  margin-top: 0 !important;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.swiper-nav-btn::after {
  content: none !important;
}

.swiper-nav-btn:hover {
  background-color: #111111;
  color: #ffffff !important;
}

.swiper-nav-btn.swiper-button-disabled {
  opacity: 0.3;
  pointer-events: none;
}

.swiper-nav-dots {
  position: static !important;
  display: flex;
  gap: 6px;
  width: auto !important;
}

.swiper-nav-dots .swiper-pagination-bullet {
  background-color: rgba(0, 0, 0, 0.2);
  opacity: 1;
  width: 7px;
  height: 7px;
  margin: 0 !important;
}

.swiper-nav-dots .swiper-pagination-bullet-active {
  background-color: #111111;
}

/* --- Side section nav (desktop only) --- */
.side-nav {
  display: none;
}

/* --- Mobile section menu --- */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: #111111;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    z-index: 600;
  }
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.97);
  z-index: 700;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  height: 100%;
}

.mobile-menu-item {
  font-size: 1.4rem;
  font-family: var(--font-display);
  color: #111111;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.mobile-menu-item.is-active {
  opacity: 1;
  font-weight: 600;
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background-color: transparent;
  color: #111111;
  font-size: 1.2rem;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-overlay,
  .mobile-menu-item {
    transition: none;
  }
}

@media (min-width: 1100px) {
  .side-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: fixed;
    top: 50%;
    left: 32px;
    transform: translateY(-50%);
    z-index: 200;
  }

  .side-nav a.side-nav-item,
  .side-nav a.side-nav-item:link,
  .side-nav a.side-nav-item:visited {
    color: #111111;
  }

  .side-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
  }

  .side-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #111111;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

  .side-nav-label {
    font-size: 0.8rem;
    color: rgba(17, 17, 17, 0.5);
    font-weight: 400;
    white-space: nowrap;
    transition: color 0.2s ease, font-weight 0.2s ease;
  }

  .side-nav-item.is-active .side-nav-dot {
  opacity: 1;
  transform: scale(1);
}

  .side-nav-item.is-active .side-nav-label {
    color: #111111;
    font-weight: 600;
  }
}

@media (prefers-reduced-motion: reduce) {
  .side-nav-dot,
  .side-nav-label {
    transition: none;
  }

  .side-nav-dot {
  transition: none;
}
}

@keyframes nextBtnBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .next-section-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background-color: #111111;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    z-index: 400;
    animation: nextBtnBounce 2s ease-in-out infinite;
  }

  .next-section-btn.is-hidden {
    opacity: 0;
    pointer-events: none;
  }

   .work-card-details {
    max-height: 220px;
  }

  .work-card .visit-site-btn {
    transform: scaleX(1);
  }

  .work-card .visit-site-btn span,
  .work-card .visit-site-btn i {
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .hero-actions {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .photo-collage {
    gap: var(--space-xs);
  }

  .collage-col {
    gap: var(--space-xs);
  }

  .collage-col-mid {
    margin-top: var(--space-md);
  }

  .favorites-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .connect-links {
    flex-direction: row;
  }

  .site-fab {
    bottom: 20px;
    right: 20px;
    padding: 12px 16px;
    font-size: 0.85rem;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-line-inner,
  .hero-sub,
  .hero-actions > * {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .status-dot::after {
    animation: none;
  }

  .hero-cta,
  .hero-cta-arrow,
  .site-fab,
  .site-fab-arrow,
  .visit-site-btn,
  .visit-site-btn span,
  .visit-site-btn i,
  .work-card,
  .work-card-details,
  .logo-hover::after,
  .cursor-tooltip,
  .skill-badge,
  .connect-icon,
  .collage-img,
  .next-section-btn {
    transition: none;
    animation: none;
  }
}