/* ===== Variables ===== */
:root {
  --bg-dark: #f5f5f7;
  --bg-section: #ffffff;
  --bg-card: #f0f0f2;
  --accent: #e63946;
  --accent-hover: #c1121f;
  --accent-soft: #c97a83;
  --text: #1a1a1a;
  --text-muted: rgba(0, 0, 0, 0.7);
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Loading / first impression intro ===== */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-section);
  animation: introFade 2.2s ease-out forwards;
  pointer-events: auto;
}

.intro-overlay.intro-done {
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.intro-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.intro-name {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--text);
  animation: introNameIn 2.2s ease-out forwards;
}

@keyframes introFade {
  0% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes introNameIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-overlay {
    animation: introFadeShort 1s ease-out forwards;
  }
  .intro-name {
    animation: none;
    opacity: 1;
  }
}

@keyframes introFadeShort {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

/* Scroll hint in hero */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation: scrollHintFadeIn 0.8s ease 2.4s forwards;
  pointer-events: none;
}

.scroll-hint.scroll-hint-hidden {
  opacity: 0;
  animation: none;
  transition: opacity 0.4s ease;
}

.scroll-hint i {
  font-size: 0.75rem;
  animation: scrollHintBounce 2s ease-in-out 3.2s infinite;
}

.scroll-hint.scroll-hint-hidden i {
  animation: none;
}

@keyframes scrollHintFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 0.85;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes scrollHintBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint {
    animation: scrollHintFadeIn 0.5s ease 1.2s forwards;
  }
  .scroll-hint i {
    animation: none;
  }
}

/* ===== Social Bar ===== */
.social-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  padding-top: max(1rem, env(safe-area-inset-top));
  background: transparent;
  transition: background 0.3s;
}

.social-bar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.social-links {
  display: flex;
  justify-content: flex-end;
  gap: 1.25rem;
}

.social-links a {
  color: var(--text);
  font-size: 0.9rem;
  opacity: 0.85;
  transition: color 0.2s, opacity 0.2s, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.social-links a:hover {
  color: var(--accent);
  opacity: 1;
  transform: scale(1.15);
}

.social-links a:active {
  transform: scale(0.95);
}

.social-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.social-bar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

/* Mobile hamburger (hidden on desktop) */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  margin-inline-end: auto;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}

.mobile-nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mobile-nav-toggle-bars {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 22px;
}

.mobile-nav-toggle-line {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.mobile-nav-toggle.is-open .mobile-nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.is-open .mobile-nav-toggle-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-nav-toggle.is-open .mobile-nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.mobile-nav:not([hidden]) {
  display: flex;
}

.mobile-nav.is-open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.mobile-nav-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: min(320px, 88vw);
  max-width: 100%;
  padding: calc(env(safe-area-inset-top, 0px) + 3.75rem) 1.25rem 2rem;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  background: #fff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.is-open .mobile-nav-panel {
  transform: translateX(0);
}

.mobile-nav-close {
  align-self: flex-end;
  width: 44px;
  height: 44px;
  margin: 0 -0.25rem 1rem 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.35rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, background 0.2s ease;
}

.mobile-nav-close:hover {
  color: var(--accent);
  background: rgba(230, 57, 70, 0.08);
}

.mobile-nav-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mobile-nav-panel a {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  padding: 0.85rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.mobile-nav-panel a:hover {
  color: var(--accent);
  background: rgba(230, 57, 70, 0.06);
}

.mobile-nav-panel a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

body.mobile-nav-open {
  overflow: hidden;
  touch-action: none;
}

/* Keep header + hamburger above dimmed overlay so toggle still closes the menu */
body.mobile-nav-open .social-bar {
  z-index: 1002;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav,
  .mobile-nav-panel,
  .mobile-nav-toggle-line {
    transition: none;
  }
}

/* ===== Floating / sticky nav ===== */
.floating-nav {
  position: fixed;
  top: 3.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.floating-nav.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.floating-nav a {
  padding: 0.4rem 0.9rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.floating-nav a:hover {
  color: var(--accent);
  background: rgba(230, 57, 70, 0.08);
}

.floating-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .social-bar-inner {
    justify-content: space-between;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  /* Hamburger replaces pill nav on small screens */
  .floating-nav {
    display: none !important;
  }
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  overflow: hidden;
  --parallax-y: 0px;
  /* Layered background: gradient + subtle pattern */
  background-image:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(230, 57, 70, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 70% 40% at 85% 70%, rgba(230, 57, 70, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #fafafa 50%, #f5f5f7 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%) translateY(var(--parallax-y));
  width:  min(90vw, 640px);
  height: min(90vw, 640px);
  background: radial-gradient(circle, rgba(230, 57, 70, 0.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -15%;
  right: -10%;
  width:  min(70vw, 480px);
  height: min(70vw, 480px);
  transform: translateY(calc(var(--parallax-y) * -0.6));
  background: radial-gradient(circle, rgba(230, 57, 70, 0.05) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.hero-content {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.hero-name::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title-glitch {
  position: relative;
  display: inline-block;
}

.hero-title-glitch::before,
.hero-title-glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-title-glitch::before {
  left: 2px;
  text-shadow: -2px 0 var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  animation: glitch-1 2s infinite linear alternate-reverse;
}

.hero-title-glitch::after {
  left: -2px;
  text-shadow: 2px 0 #00f;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 2px); }
  100% { transform: translate(0); }
}

@keyframes glitch-2 {
  0% { transform: translate(0); }
  20% { transform: translate(2px, -2px); }
  40% { transform: translate(-2px, 2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(-2px, -2px); }
  100% { transform: translate(0); }
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s ease, box-shadow 0.2s ease;
  align-self: center;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(230, 57, 70, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.45);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(230, 57, 70, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--text-muted);
  border-radius: 4px;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  align-self: center;
}

.hero-footer {
  margin-top: auto;
  padding-top: 3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ===== About Section ===== */
.about {
  background: var(--bg-section);
  padding: 5rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 4rem;
  align-items: center;
}

.about-image-wrap {
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.about-image-wrap:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
  display: block;
}

.about-content {
  padding-right: 0.5rem;
  min-width: 0;
}

.about .section-title.about-section-title {
  margin-bottom: 0.5rem;
}

.about-title-line {
  border: none;
  border-top: 3px solid var(--accent);
  width: 60px;
  margin: 0 0 1.5rem 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.about-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.highlight {
  color: var(--accent);
  font-weight: 600;
}

.about-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Details card */
.about-details {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  grid-template-rows: repeat(5, auto);
  gap: 0 1.5rem;
  font-size: 0.9rem;
  background: var(--bg-card);
  padding: 1.5rem 1.75rem;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  border-left: 4px solid var(--accent);
  min-width: 0;
}

.details-col {
  min-width: 0;
  display: contents;
}

.details-col li {
  padding: 0.5rem 0;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

/* Place each label/value in same row so "Phone" aligns with phone number */
.details-col:nth-child(1) li:nth-child(1) { grid-column: 1; grid-row: 1; }
.details-col:nth-child(1) li:nth-child(2) { grid-column: 1; grid-row: 2; }
.details-col:nth-child(1) li:nth-child(3) { grid-column: 1; grid-row: 3; }
.details-col:nth-child(1) li:nth-child(4) { grid-column: 1; grid-row: 4; }
.details-col:nth-child(2) li:nth-child(1) { grid-column: 2; grid-row: 1; }
.details-col:nth-child(2) li:nth-child(2) { grid-column: 2; grid-row: 2; }
.details-col:nth-child(2) li:nth-child(3) { grid-column: 2; grid-row: 3; }
.details-col:nth-child(2) li:nth-child(4) { grid-column: 2; grid-row: 4; }
.details-col:nth-child(3) li:nth-child(1) { grid-column: 3; grid-row: 1; }
.details-col:nth-child(3) li:nth-child(2) { grid-column: 3; grid-row: 2; }
.details-col:nth-child(3) li:nth-child(3) { grid-column: 3; grid-row: 3; }
.details-col:nth-child(3) li:nth-child(4) { grid-column: 3; grid-row: 4; }
.details-col:nth-child(3) li:nth-child(5) { grid-column: 3; grid-row: 5; }
.details-col:nth-child(4) li:nth-child(1) { grid-column: 4; grid-row: 1; }
.details-col:nth-child(4) li:nth-child(2) { grid-column: 4; grid-row: 2; }
.details-col:nth-child(4) li:nth-child(3) { grid-column: 4; grid-row: 3; }
.details-col:nth-child(4) li:nth-child(4) { grid-column: 4; grid-row: 4; }
.details-col:nth-child(4) li:nth-child(5) { grid-column: 4; grid-row: 5; }

/* Label columns slightly bolder */
.details-col:nth-child(1) li,
.details-col:nth-child(3) li {
  color: var(--text);
  font-weight: 500;
}

/* Keep phone number and email on same line */
.details-col:nth-child(2) li:nth-child(4),
.details-col:nth-child(4) li:nth-child(4) {
  white-space: nowrap;
}

.details-col li i {
  color: var(--accent);
  font-size: 0.6rem;
  margin-right: 0.5rem;
}

.details-col:nth-child(2) li i,
.details-col:nth-child(4) li i {
  visibility: hidden;
}

/* ===== Skills Section ===== */
.skills {
  background: var(--bg-dark);
  padding: 5rem 0;
}

.skills-main-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 0.75rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.skills-title-line {
  border: none;
  border-top: 3px solid var(--accent);
  margin-bottom: 1.5rem;
  max-width: 120px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Featured skill cloud */
.skills-featured {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem 0;
}

.skill-chip--featured {
  background: rgba(230, 57, 70, 0.12);
  border-color: rgba(230, 57, 70, 0.35);
  font-weight: 600;
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.skill-chip--featured:hover {
  background: rgb(230, 57, 70);
  color: #fff;
  border-color: rgb(200, 47, 58);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(230, 57, 70, 0.35);
}

.skill-chip--featured:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.15);
}

.skill-chip--l {
  font-size: 1rem;
  padding: 0.5rem 1.1rem;
}

.skill-chip--m {
  font-size: 0.95rem;
  padding: 0.45rem 1rem;
}

.skills-by-category-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.skills.skills-visible .skills-by-category-label {
  opacity: 1;
  transition-delay: 0.35s;
}

/* Featured chips reveal (staggered) */
.skills-featured .skill-chip {
  opacity: 0;
  transform: translateY(8px) scale(0.95);
}

.skills.skills-visible .skills-featured .skill-chip:nth-child(1) { opacity: 1; transform: translateY(0) scale(1); transition-delay: 0.32s; }
.skills.skills-visible .skills-featured .skill-chip:nth-child(2) { opacity: 1; transform: translateY(0) scale(1); transition-delay: 0.38s; }
.skills.skills-visible .skills-featured .skill-chip:nth-child(3) { opacity: 1; transform: translateY(0) scale(1); transition-delay: 0.44s; }
.skills.skills-visible .skills-featured .skill-chip:nth-child(4) { opacity: 1; transform: translateY(0) scale(1); transition-delay: 0.5s; }
.skills.skills-visible .skills-featured .skill-chip:nth-child(5) { opacity: 1; transform: translateY(0) scale(1); transition-delay: 0.56s; }
.skills.skills-visible .skills-featured .skill-chip:nth-child(6) { opacity: 1; transform: translateY(0) scale(1); transition-delay: 0.62s; }

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skills-category {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-section);
  border-radius: 10px;
  border-left: 4px solid var(--accent);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.25s ease, background 0.25s ease, border-left-color 0.25s ease;
}

.skills-category:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.95);
  border-left-color: var(--accent-hover);
}

.skills-category:hover .skills-category-title i {
  color: var(--accent-hover);
  transform: scale(1.08);
}

/* When a chip is clicked, remove red accent from this category */
.skills-category.accent-removed {
  border-left-color: rgba(0, 0, 0, 0.12);
  transition: border-left-color 0.25s ease;
}
.skills-category.accent-removed .skills-category-title i {
  color: var(--text-muted);
}
.skills-category.accent-removed:hover {
  border-left-color: rgba(0, 0, 0, 0.2);
}
.skills-category.accent-removed:hover .skills-category-title i {
  color: var(--text);
  transform: scale(1.08);
}

.skills-category-title i {
  transition: color 0.25s ease, transform 0.25s ease;
}

/* Staggered reveal when .skills-visible is added by JS */
.skills.skills-visible .skills-main-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.skills.skills-visible .skills-title-line {
  opacity: 1;
  transform: scaleX(1);
  transition-delay: 0.25s;
}

.skills.skills-visible .skills-list .skills-category:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

.skills.skills-visible .skills-list .skills-category:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.55s;
}

.skills.skills-visible .skills-list .skills-category:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.7s;
}

.skills.skills-visible .skills-list .skills-category:nth-child(4) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.85s;
}

.skills.skills-visible .skills-list .skills-category:nth-child(5) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1s;
}

.skills.skills-visible .skills-list .skills-category:nth-child(6) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1.15s;
}

/* Chips reveal slightly after their category */
.skills.skills-visible .skills-list .skills-category:nth-child(1) .skill-chip {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.55s;
}

.skills.skills-visible .skills-list .skills-category:nth-child(1) .skill-chip:nth-child(1) { transition-delay: 0.55s; }
.skills.skills-visible .skills-list .skills-category:nth-child(1) .skill-chip:nth-child(2) { transition-delay: 0.6s; }
.skills.skills-visible .skills-list .skills-category:nth-child(1) .skill-chip:nth-child(3) { transition-delay: 0.65s; }
.skills.skills-visible .skills-list .skills-category:nth-child(1) .skill-chip:nth-child(4) { transition-delay: 0.7s; }

.skills.skills-visible .skills-list .skills-category:nth-child(2) .skill-chip:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.7s; }
.skills.skills-visible .skills-list .skills-category:nth-child(2) .skill-chip:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.75s; }
.skills.skills-visible .skills-list .skills-category:nth-child(2) .skill-chip:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.8s; }
.skills.skills-visible .skills-list .skills-category:nth-child(2) .skill-chip:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.85s; }
.skills.skills-visible .skills-list .skills-category:nth-child(2) .skill-chip:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.9s; }
.skills.skills-visible .skills-list .skills-category:nth-child(2) .skill-chip:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.95s; }
.skills.skills-visible .skills-list .skills-category:nth-child(2) .skill-chip:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 1s; }
.skills.skills-visible .skills-list .skills-category:nth-child(2) .skill-chip:nth-child(8) { opacity: 1; transform: translateY(0); transition-delay: 1.05s; }

.skills.skills-visible .skills-list .skills-category:nth-child(3) .skill-chip:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.9s; }
.skills.skills-visible .skills-list .skills-category:nth-child(3) .skill-chip:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.95s; }

.skills.skills-visible .skills-list .skills-category:nth-child(4) .skill-chip:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 1.05s; }
.skills.skills-visible .skills-list .skills-category:nth-child(4) .skill-chip:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 1.1s; }
.skills.skills-visible .skills-list .skills-category:nth-child(4) .skill-chip:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 1.15s; }

.skills.skills-visible .skills-list .skills-category:nth-child(5) .skill-chip:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 1.2s; }
.skills.skills-visible .skills-list .skills-category:nth-child(5) .skill-chip:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 1.25s; }
.skills.skills-visible .skills-list .skills-category:nth-child(5) .skill-chip:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 1.3s; }

.skills.skills-visible .skills-list .skills-category:nth-child(6) .skill-chip:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 1.35s; }
.skills.skills-visible .skills-list .skills-category:nth-child(6) .skill-chip:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 1.4s; }

.skills-category-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.skills-category-title i {
  font-size: 1rem;
  color: var(--accent);
  opacity: 0.95;
}

.skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Slight size variation within categories (cloud feel) */
.skills-list .skill-chip:nth-child(1) {
  font-size: 0.925rem;
  padding: 0.42rem 0.95rem;
}

.skill-chip {
  display: inline-block;
  position: relative;
  padding: 0.4rem 0.9rem;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.skill-chip--bold {
  font-weight: 700;
}

/* Subtle moving animation on hover */
@keyframes skill-chip-hover-move {
  0%, 100% { transform: translateY(-2px) scale(1.05); }
  50% { transform: translateY(-5px) scale(1.08); }
}

.skill-chip:hover {
  background: rgb(230, 57, 70);
  color: #fff;
  border-color: rgb(200, 47, 58);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(230, 57, 70, 0.35);
  animation: skill-chip-hover-move 0.6s ease-in-out infinite;
}

.skill-chip:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.12);
  transition-duration: 0.1s;
}

.skill-chip:focus {
  outline: none;
  background: rgba(230, 57, 70, 0.12);
  border-color: rgba(230, 57, 70, 0.35);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.25), 0 6px 16px rgba(230, 57, 70, 0.15);
}

.skill-chip:focus:not(:focus-visible) {
  box-shadow: 0 6px 16px rgba(230, 57, 70, 0.2);
}

.skill-chip:focus-visible {
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.35), 0 6px 16px rgba(230, 57, 70, 0.15);
}

/* ===== My Project Section (iMac grid) ===== */
.projects {
  background: var(--bg-section);
  padding: 5rem 0;
}

.projects .projects-section-title {
  margin-bottom: 0.5rem;
}

.projects .section-subtitle {
  margin-bottom: 2.5rem;
}

.projects-imac-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
  align-items: start;
  justify-items: center;
  perspective: 1500px;
  perspective-origin: center center;
}

/* ===== Projects slider (6 cards per slide) ===== */
.projects-slider {
  position: relative;
  width: 100%;
}

.projects-viewport {
  overflow: hidden;
}

.projects-track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.projects-slide {
  min-width: 100%;
}

.projects-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  z-index: 3;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.projects-slider-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.04);
}

.projects-slider-prev {
  left: 0.25rem;
}

.projects-slider-next {
  right: 0.25rem;
}

.projects-dots {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1.25rem;
  position: relative;
  z-index: 4;
}

.projects-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.projects-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), 0 8px 22px rgba(255, 255, 255, 0.08);
}

@media (max-width: 576px) {
  .projects-slider-btn {
    width: 38px;
    height: 38px;
  }
}

.project-imac {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
  opacity: 0;
  transform-style: preserve-3d;
  animation: fadeIn3D 0.6s ease forwards;
  cursor: pointer;
}

/* Staggered rotation: alternate left/right tilt */
.project-imac:nth-child(odd) {
  transform: rotateY(-3deg) rotateX(2deg);
}

.project-imac:nth-child(even) {
  transform: rotateY(3deg) rotateX(-2deg);
}

/* Staggered animation delay for each iMac */
.project-imac:nth-child(1) { animation-delay: 0.1s; }
.project-imac:nth-child(2) { animation-delay: 0.2s; }
.project-imac:nth-child(3) { animation-delay: 0.3s; }
.project-imac:nth-child(4) { animation-delay: 0.4s; }
.project-imac:nth-child(5) { animation-delay: 0.5s; }
.project-imac:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeIn3D {
  from {
    opacity: 0;
    transform: translateY(30px) translateZ(-30px) rotateY(0deg) rotateX(0deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateZ(0);
  }
}

/* Hover: scale up, 3D rotation, lift, soft shadow */
.project-imac:nth-child(odd):hover {
  transform: rotateY(-8deg) rotateX(4deg) translateY(-12px) translateZ(24px) scale(1.03);
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.2));
}

.project-imac:nth-child(even):hover {
  transform: rotateY(8deg) rotateX(-4deg) translateY(-12px) translateZ(24px) scale(1.03);
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.2));
}

.project-imac:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 4px;
}

/* iMac frame: screen + chin */
.imac-frame {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  position: relative;
  transform-style: preserve-3d;
}

.imac-screen {
  background: #2d2d2d;
  border: 8px solid #3a3a3a;
  border-radius: 12px 12px 0 0;
  overflow: visible;
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.15),
    inset 0 0 20px rgba(0, 0, 0, 0.3),
    0 15px 40px rgba(0, 0, 0, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.12);
  transition: border-color 0.3s ease, box-shadow 0.4s ease;
  position: relative;
  transform-style: preserve-3d;
}

/* Softer accent border and glow on hover */
.project-imac:hover .imac-screen {
  border-color: rgba(201, 122, 131, 0.45);
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.4),
    0 0 32px rgba(201, 122, 131, 0.22),
    0 0 64px rgba(201, 122, 131, 0.12),
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 12px 30px rgba(0, 0, 0, 0.4),
    0 0 0 rgba(0, 0, 0, 0);
}

.imac-screen-inner {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #1a1a1a;
  position: relative;
  transition: transform 0.3s ease, filter 0.3s ease;
}

/* Screen content scale and brightness on hover */
.project-imac:hover .imac-screen-inner {
  transform: scale(1.04);
  filter: brightness(1.12);
}

.imac-screen-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

/* Image zoom on hover */
.project-imac:hover .imac-screen-inner img {
  transform: scale(1.08);
}

/* Subtle screen glow overlay (soft accent) */
.imac-screen-inner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(201, 122, 131, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.project-imac:hover .imac-screen-inner::after {
  opacity: 1;
}

.imac-chin {
  height: 28px;
  background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 50%, #2d2d2d 100%);
  border-radius: 0 0 24px 24px;
  margin: 0 4px;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

/* Chin glow on hover - enhanced depth */
.project-imac:hover .imac-chin {
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(230, 57, 70, 0.25),
    0 12px 30px rgba(0, 0, 0, 0.5),
    0 6px 15px rgba(0, 0, 0, 0.3);
}

.project-imac-info {
  margin-top: 1.25rem;
  text-align: center;
  padding: 0 0.5rem;
  transition: transform 0.4s ease, opacity 0.3s ease;
  transform-style: preserve-3d;
}

/* Title softer color on hover */
.project-imac:hover .project-imac-title {
  color: var(--accent-soft);
}
.project-imac .project-imac-title {
  transition: color 0.25s ease;
}

/* Slight tilt on info to match iMac rotation */
.project-imac:nth-child(odd) .project-imac-info {
  transform: rotateY(3deg);
}

.project-imac:nth-child(even) .project-imac-info {
  transform: rotateY(-3deg);
}

.project-imac:hover .project-imac-info {
  opacity: 1;
}

.project-imac-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.project-imac-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 992px) {
  .projects-imac-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
    perspective: 1200px;
  }

  /* Reduced tilt on tablet */
  .project-imac:nth-child(odd) {
    transform: rotateY(-2deg) rotateX(1deg);
  }

  .project-imac:nth-child(even) {
    transform: rotateY(2deg) rotateX(-1deg);
  }

  .project-imac:nth-child(odd):hover {
    transform: rotateY(-6deg) rotateX(3deg) translateY(-8px) translateZ(15px) scale(1.02);
    filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.18));
  }

  .project-imac:nth-child(even):hover {
    transform: rotateY(6deg) rotateX(-3deg) translateY(-8px) translateZ(15px) scale(1.02);
    filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.18));
  }

  .project-imac:nth-child(odd) .project-imac-info {
    transform: rotateY(2deg);
  }

  .project-imac:nth-child(even) .project-imac-info {
    transform: rotateY(-2deg);
  }

  .imac-frame {
    max-width: 280px;
  }
}

@media (max-width: 576px) {
  .projects-imac-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    perspective: 1000px;
  }

  /* Minimal tilt on mobile */
  .project-imac:nth-child(odd),
  .project-imac:nth-child(even) {
    transform: rotateY(0deg) rotateX(0deg);
  }

  .project-imac:nth-child(odd):hover,
  .project-imac:nth-child(even):hover {
    transform: rotateY(-4deg) rotateX(2deg) translateY(-8px) translateZ(10px) scale(1.02);
    filter: drop-shadow(0 14px 36px rgba(0, 0, 0, 0.16));
  }

  .project-imac-info {
    transform: rotateY(0deg) !important;
  }

  .imac-frame {
    max-width: 100%;
  }
}

/* ===== Project detail modal (centered) ===== */
.project-imac {
  cursor: pointer;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.project-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.project-modal[hidden] {
  display: flex !important;
}

.project-modal.is-open[hidden] {
  opacity: 1;
  visibility: visible;
}

.project-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.project-modal-box {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  background: var(--bg-section);
  border-radius: 12px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.project-modal.is-open .project-modal-box {
  transform: scale(1);
}

.project-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.project-modal-close:hover {
  background: var(--accent);
  transform: scale(1.08);
}

.project-modal-close:active {
  transform: scale(0.92);
}

.project-modal-image-wrap {
  width: 100%;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #1a1a1a;
}

.project-modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-modal-image-wrap .project-modal-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.project-modal-image-wrap.is-video .project-modal-video {
  display: block;
}

.project-modal-image-wrap.is-video img {
  display: none;
}

.project-modal-body {
  padding: 1.5rem 1.75rem 1.75rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.project-modal-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.project-modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 1rem;
}

.project-modal-details-heading {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.project-modal-details {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.55;
  margin: 0;
  white-space: pre-line;
}

.project-modal-step-wrap {
  margin: 0.75rem 0 1rem;
}

.project-modal-step-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.35;
}

.project-modal-steps-img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  cursor: zoom-in;
}

.project-modal-steps-img:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.project-modal-step2-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 1rem 0 0;
  line-height: 1.4;
}

.project-modal-step3-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 1rem 0 0;
  line-height: 1.4;
}

.project-modal-step4-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 1rem 0 0;
  line-height: 1.4;
}

.project-modal-step5-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 1rem 0 0;
  line-height: 1.4;
}

#project-modal-steps2-img {
  margin-top: 0.75rem;
}

#project-modal-steps3-img {
  margin-top: 0.75rem;
}

#project-modal-steps4-img {
  margin-top: 0.75rem;
}

#project-modal-steps5-img {
  margin-top: 0.75rem;
}

/* ----- Step image lightbox (full screen preview) ----- */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.image-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.image-lightbox[hidden] {
  display: none !important;
}

.image-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}

.image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.image-lightbox-close:hover {
  background: var(--accent);
  transform: scale(1.06);
}

.image-lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-inner img {
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#project-modal-tech-stack {
  white-space: pre-line;
}

.project-modal-tech-heading {
  margin-top: 1.25rem;
}

@media (max-width: 576px) {
  .project-modal-box {
    max-height: 85vh;
  }
  .project-modal-body {
    padding: 1.25rem 1.25rem 1.5rem;
  }
}

/* ----- Mobile interface: phones ----- */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-content {
    padding: 1.75rem 1rem 2rem;
  }

  .hero-name {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
  }

  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    margin-bottom: 1rem;
  }

  .hero-desc {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    gap: 0.75rem;
  }

  .hero-buttons .btn {
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1.5rem;
    font-size: 0.8rem;
  }

  .section-title,
  .skills-main-title,
  .volunteer-title {
    font-size: clamp(1.5rem, 6vw, 1.85rem);
  }

  .about-section-title {
    font-size: clamp(1.5rem, 6vw, 1.85rem);
  }

  .social-bar {
    padding: 0.75rem 0;
  }

  .social-links a {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
  }

  .project-modal {
    padding: 0.5rem;
    align-items: flex-start;
  }

  .project-modal-box {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 10px;
  }

  .project-modal-close {
    width: 2.75rem;
    height: 2.75rem;
    top: 0.5rem;
    right: 0.5rem;
    min-width: 44px;
    min-height: 44px;
  }

  .project-modal-title {
    font-size: 1.15rem;
  }

  .project-modal-desc,
  .project-modal-details {
    font-size: 0.85rem;
  }

  .about-details {
    padding: 1rem 0.875rem;
    gap: 0.4rem 0.75rem;
  }

  .about-content {
    padding-right: 0;
  }

  .skills-category {
    padding: 1rem 1.25rem;
  }

  .skill-chip {
    min-height: 44px;
    padding: 0.5rem 1rem;
  }

  .volunteer {
    padding: 3rem 0;
  }

  .volunteer-grid {
    gap: 1.25rem;
  }

  .projects,
  .volunteer,
  .portfolio-footer {
    padding: 3rem 0 2rem;
  }

  .footer-tagline {
    font-size: 0.9rem;
  }
}

/* ===== Volunteer activities Section ===== */
.volunteer {
  background: var(--bg-section);
  padding: 5rem 0;
}

.volunteer-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.volunteer-title {
  text-align: left;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
  color: var(--text);
}

.volunteer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Space between volunteer cards and graphic design block */
.graphic-design-heading {
  margin-top: 3rem;
}

.volunteer-card {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.volunteer-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.volunteer-card:active {
  transform: translateY(-2px) scale(0.99);
}

.volunteer-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.volunteer-card:hover .volunteer-play {
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%) scale(1.05);
}

.volunteer-card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-dark);
}

.volunteer-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.volunteer-card:hover .volunteer-card-image img {
  transform: scale(1.05);
}

/* Volunteer card image slider (hkpc / hkpc2 / hkpc3) */
.volunteer-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.volunteer-slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.volunteer-slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.volunteer-slider-slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.volunteer-slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.volunteer-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s ease;
  touch-action: manipulation;
}

.volunteer-slider-btn:hover {
  background: #fff;
  color: var(--accent);
  transform: translateY(-50%) scale(1.12);
}

.volunteer-slider-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.volunteer-slider-prev {
  left: 8px;
}

.volunteer-slider-next {
  right: 8px;
}

.volunteer-slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.volunteer-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s ease;
  touch-action: manipulation;
}

.volunteer-slider-dot:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.35);
}

.volunteer-slider-dot:active {
  transform: scale(0.9);
}

.volunteer-slider-dot.active {
  background: #fff;
  transform: scale(1.2);
}

.volunteer-card-with-slider .volunteer-play {
  z-index: 2;
}

.volunteer-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  padding-left: 4px;
  transition: background 0.2s, transform 0.2s ease;
  z-index: 2;
}

.volunteer-card:active .volunteer-play {
  transform: translate(-50%, -50%) scale(0.95);
}

.volunteer-play i {
  color: #1a1a1a;
}

.volunteer-card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  z-index: 1;
}

.volunteer-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.volunteer-card-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
}

.graphic-design-slider {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
}

/* Framed stage: image area + caption strip as one card */
.graphic-design-stage {
  flex: 0 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  background: var(--bg-section);
}

.graphic-design-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: var(--graphic-ratio, 4 / 5);
  overflow: hidden;
  background: var(--bg-section);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.graphic-design-frame-inner {
  width: 100%;
  height: 100%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.graphic-design-track {
  height: 100%;
  display: flex;
  transition: transform 0.55s ease;
}

.graphic-design-slide {
  min-width: 100%;
  height: 100%;
}

.graphic-design-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  -webkit-user-drag: none;
}

.graphic-design-caption {
  margin: 0;
  padding: 0.7rem 1rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .graphic-design-stage {
    max-width: 100%;
  }

  .graphic-design-caption {
    font-size: 0.78rem;
    padding: 0.6rem 0.75rem 0.7rem;
  }
}

.graphic-design-dots {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0.85rem;
}

.graphic-design-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.graphic-design-dot:hover {
  background: rgba(0, 0, 0, 0.32);
}

.graphic-design-dot.active {
  background: var(--accent);
  transform: scale(1.15);
}

/* Prev / next on the image (visible on dark viewport) */
.graphic-design-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.graphic-design-nav-btn:hover {
  background: rgba(230, 57, 70, 0.88);
  color: #fff;
}

.graphic-design-nav-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.graphic-design-nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.graphic-design-prev {
  left: 0.65rem;
}

.graphic-design-next {
  right: 0.65rem;
}

@media (max-width: 576px) {
  .graphic-design-viewport {
    /* Keep a stable canvas on phones so full design remains visible */
    aspect-ratio: 1 / 1;
    min-height: 280px;
  }

  .graphic-design-slide img {
    object-fit: contain;
    object-position: center;
  }

  .graphic-design-nav-btn {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }

  .graphic-design-prev {
    left: 0.65rem;
  }

  .graphic-design-next {
    right: 0.65rem;
  }
}

@media (max-width: 992px) {
  .volunteer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .volunteer-grid {
    grid-template-columns: 1fr;
  }

  .graphic-design-heading {
    margin-top: 2rem;
  }

  .volunteer-play {
    width: 56px;
    height: 56px;
    font-size: 1rem;
  }
}

/* ===== Footer: Get in Touch + Contact cards (dark theme) ===== */
.portfolio-footer {
  background: #1a1a1d;
  padding: 4rem 0 2.5rem;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.footer-left {
  max-width: 420px;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.footer-tagline {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.65;
  margin: 0 0 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 1.1rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.footer-social-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--accent);
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.footer-contact-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.footer-contact-card i {
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0.95;
}

.footer-contact-card span {
  font-size: 0.9rem;
  text-align: center;
  word-break: break-word;
}

.footer-copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-left {
    max-width: none;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-right {
    max-width: 320px;
    margin: 0 auto;
  }
}

/* ===== Section subtitle (skills) ===== */
.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .hero-content {
    padding: 4rem 2rem 3rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image-wrap {
    max-height: 400px;
  }

  .about-image {
    min-height: 300px;
  }

}

@media (max-width: 576px) {
  .hero-content {
    padding: 2rem 1.5rem;
  }

  .about-details {
    grid-template-columns: auto 1fr;
    grid-template-rows: repeat(9, auto);
    gap: 0.5rem 1rem;
    padding: 1.25rem 1rem;
    font-size: 0.85rem;
  }

  .details-col:nth-child(1) li:nth-child(1) { grid-column: 1; grid-row: 1; }
  .details-col:nth-child(2) li:nth-child(1) { grid-column: 2; grid-row: 1; }
  .details-col:nth-child(1) li:nth-child(2) { grid-column: 1; grid-row: 2; }
  .details-col:nth-child(2) li:nth-child(2) { grid-column: 2; grid-row: 2; }
  .details-col:nth-child(1) li:nth-child(3) { grid-column: 1; grid-row: 3; }
  .details-col:nth-child(2) li:nth-child(3) { grid-column: 2; grid-row: 3; }
  .details-col:nth-child(1) li:nth-child(4) { grid-column: 1; grid-row: 4; }
  .details-col:nth-child(2) li:nth-child(4) { grid-column: 2; grid-row: 4; }
  .details-col:nth-child(3) li:nth-child(1) { grid-column: 1; grid-row: 5; }
  .details-col:nth-child(4) li:nth-child(1) { grid-column: 2; grid-row: 5; }
  .details-col:nth-child(3) li:nth-child(2) { grid-column: 1; grid-row: 6; }
  .details-col:nth-child(4) li:nth-child(2) { grid-column: 2; grid-row: 6; }
  .details-col:nth-child(3) li:nth-child(3) { grid-column: 1; grid-row: 7; }
  .details-col:nth-child(4) li:nth-child(3) { grid-column: 2; grid-row: 7; }
  .details-col:nth-child(3) li:nth-child(4) { grid-column: 1; grid-row: 8; }
  .details-col:nth-child(4) li:nth-child(4) { grid-column: 2; grid-row: 8; }
  .details-col:nth-child(3) li:nth-child(5) { grid-column: 1; grid-row: 9; }
  .details-col:nth-child(4) li:nth-child(5) { grid-column: 2; grid-row: 9; }

  .details-col:nth-child(2) li,
  .details-col:nth-child(4) li {
    word-break: break-word;
    overflow-wrap: break-word;
    min-width: 0;
  }

  .details-col:nth-child(2) li:nth-child(4),
  .details-col:nth-child(4) li:nth-child(4) {
    white-space: normal;
  }

  .details-col:nth-child(3),
  .details-col:nth-child(4) {
    margin-top: 0;
  }

  .social-links {
    gap: 1rem;
  }
}

/* ===== Scroll-triggered reveal animations ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .scroll-reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
