/* ePortfolio 2026 — Design system */
/* Fonts: loaded via fonts.css link in HTML (avoid @import blocking) */

:root {
  --bg-deep: #0a0a0a;
  --bg-surface: #141414;
  --bg-surface-elevated: #1c1c1c;
  --accent: #f5f5f5;
  --accent-hover: #ffffff;
  --accent-muted: #a3a3a3;
  --accent-blue: #93c5fd;
  --text-primary: #fafafa;
  --text-muted: #a3a3a3;
  --border: rgba(255, 255, 255, 0.12);
  --glass: rgba(8, 8, 8, 0.78);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  --max-width: 1200px;
  --space-section: clamp(4rem, 12vw, 6.25rem);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-primary);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: linear-gradient(180deg, #fafafa 0%, #e8e8e8 100%);
  color: var(--bg-deep);
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10000;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Reveal on scroll — content stays visible; only transform animates */
.reveal {
  opacity: 1;
  transform: translateY(28px);
  transition: transform 0.65s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible {
    transform: none;
    transition: none;
  }
}

/* Layout */
.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-section);
}

.section__header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.section__eyebrow::before,
.section__eyebrow::after {
  content: "";
  width: 1rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28));
  flex-shrink: 0;
}

.section__eyebrow::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent);
}

.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.section__title::after {
  content: "";
  display: block;
  width: clamp(2.5rem, 8vw, 3.5rem);
  height: 2px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
}

.section__intro {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 1.15rem auto 0;
  line-height: 1.7;
}

.section__intro a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.section__intro a:hover {
  color: var(--accent-hover);
}

/* Nav */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding-block: 0.75rem;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.18) 100%);
  transition:
    background 0.3s ease,
    backdrop-filter 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.site-nav.is-scrolled {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  gap: 1rem;
}

.site-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.site-nav__logo:hover {
  opacity: 0.88;
}

.site-nav__logo-img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-nav__logo:hover .site-nav__logo-img {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 6px 20px rgba(0, 0, 0, 0.32);
}

.site-nav__links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0.28rem;
  gap: 0.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

@media (min-width: 901px) {
  .site-nav__links {
    display: flex;
  }
}

.site-nav__links a {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  text-decoration: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

@media (min-width: 1100px) {
  .site-nav__links a {
    font-size: 0.8125rem;
    padding: 0.5rem 0.82rem;
  }
}

.site-nav__links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.site-nav__links a.is-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.site-nav__links li:last-child a {
  margin-left: 0.2rem;
  padding: 0.5rem 0.95rem;
  color: var(--bg-deep);
  background: linear-gradient(180deg, #fafafa 0%, #e5e5e5 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.site-nav__links li:last-child a:hover {
  color: var(--bg-deep);
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.12);
}

.site-nav__links li:last-child a.is-active {
  color: var(--bg-deep);
  background: #ffffff;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.14),
    0 6px 20px rgba(255, 255, 255, 0.1);
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

@media (min-width: 901px) {
  .nav-toggle {
    display: none;
  }
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.3s;
}

.nav-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.nav-drawer__backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-drawer.is-open .nav-drawer__backdrop {
  opacity: 1;
}

.nav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: min(20rem, 88vw);
  height: 100%;
  background: linear-gradient(180deg, #1a1a1a 0%, #121212 100%);
  border-left: 1px solid var(--glass-border);
  padding: 5rem 1.25rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
}

.nav-drawer.is-open .nav-drawer__panel {
  transform: translateX(0);
}

.nav-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-drawer__list a {
  display: block;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin-bottom: 0.35rem;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.nav-drawer__list a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-drawer__list a.is-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav-drawer__list li:last-child a {
  margin-top: 0.5rem;
  color: var(--bg-deep);
  background: linear-gradient(180deg, #fafafa 0%, #e5e5e5 100%);
  border-color: rgba(255, 255, 255, 0.18);
}

.nav-drawer__list li:last-child a:hover,
.nav-drawer__list li:last-child a.is-active {
  color: var(--bg-deep);
  background: #ffffff;
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 6rem 1rem 4rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 12% 18%, rgba(96, 165, 250, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 48% 42% at 88% 22%, rgba(192, 132, 252, 0.07) 0%, transparent 52%),
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 255, 255, 0.09) 0%, transparent 55%),
    repeating-linear-gradient(
      -60deg,
      transparent,
      transparent 40px,
      rgba(255, 255, 255, 0.018) 40px,
      rgba(255, 255, 255, 0.018) 41px
    ),
    var(--bg-deep);
  z-index: 0;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 20%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 52rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1.15rem;
  padding: 0.42rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  content: "";
  width: 1rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28));
  flex-shrink: 0;
}

.hero__eyebrow::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent);
}

.hero__name {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 900;
  line-height: 1.04;
  margin: 0 0 0.85rem;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #ffffff 0%, #d4d4d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__role {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 500;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
  min-height: 2.75rem;
}

.hero__role #hero-type-text {
  color: var(--accent-blue);
  font-weight: 600;
}

.hero__role .caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent-blue);
  margin-left: 3px;
  vertical-align: -0.1em;
  border-radius: 1px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__role .caret {
    animation: none;
    opacity: 1;
  }
}

.hero__tagline {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 1.35rem auto 2.15rem;
  line-height: 1.75;
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.4rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
}

.btn > i {
  font-size: 0.85rem;
  opacity: 0.92;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  color: var(--bg-deep);
  background: linear-gradient(180deg, #fafafa 0%, #e8e8e8 100%);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.28);
}

.btn--primary:hover {
  color: var(--bg-deep);
  background: linear-gradient(180deg, #ffffff 0%, #ededed 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 10px 28px rgba(255, 255, 255, 0.1);
}

.btn--primary.is-copied {
  background: linear-gradient(180deg, #bbf7d0 0%, #86efac 100%);
  border-color: rgba(134, 239, 172, 0.45);
  color: #052e16;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.btn--sm {
  padding: 0.58rem 1rem;
  font-size: 0.8125rem;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.hero__scroll:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.hero__scroll-chev {
  animation: bounce 2s ease-in-out infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-chev {
    animation: none;
  }
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* About */
.about__grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 768px) {
  .about__grid {
    grid-template-columns: 280px 1fr;
    gap: 3.5rem;
  }
}

.about__photo-wrap {
  display: flex;
  justify-content: center;
}

@media (min-width: 768px) {
  .about__photo-wrap {
    justify-content: flex-start;
  }
}

.about__photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.22);
  background: var(--bg-surface-elevated);
  box-shadow: var(--shadow);
}

.about__photo--placeholder {
  display: grid;
  place-items: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
}

.about__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
}

.chip {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.38rem 0.875rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.about__body {
  color: var(--text-muted);
  margin: 0;
}

.about__body strong {
  color: var(--text-primary);
}

/* Skills */
.skills__grid {
  display: grid;
  gap: 1.25rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .skills__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .skills__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.skill-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  padding: 1.25rem 1.25rem 1.35rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left-width: 3px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}

.skill-card--ai {
  border-left-color: rgba(192, 132, 252, 0.75);
}

.skill-card--web {
  border-left-color: rgba(96, 165, 250, 0.75);
}

.skill-card--security {
  border-left-color: rgba(245, 158, 11, 0.75);
}

.skill-card--code {
  border-left-color: rgba(52, 211, 153, 0.75);
}

.skill-card--cad {
  border-left-color: rgba(148, 163, 184, 0.85);
}

.skill-card--process {
  border-left-color: rgba(244, 114, 182, 0.65);
}

.skill-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skill-card__icon {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.skill-card--ai .skill-card__icon {
  color: #d8b4fe;
  background: rgba(192, 132, 252, 0.12);
  border-color: rgba(192, 132, 252, 0.25);
}

.skill-card--web .skill-card__icon {
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.25);
}

.skill-card--security .skill-card__icon {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
}

.skill-card--code .skill-card__icon {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.25);
}

.skill-card--cad .skill-card__icon {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
}

.skill-card--process .skill-card__icon {
  color: #f9a8d4;
  background: rgba(244, 114, 182, 0.12);
  border-color: rgba(244, 114, 182, 0.25);
}

.skill-group__title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.3;
}

.skills__grid .pills {
  margin-top: auto;
}

.skills__grid .pill {
  font-size: 0.78rem;
  padding: 0.38rem 0.7rem;
  background: rgba(255, 255, 255, 0.04);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition:
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.pill:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.06);
}

/* Timeline */
.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--accent), transparent);
  opacity: 0.35;
}

@media (min-width: 768px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline__item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 2.5rem;
}

@media (min-width: 768px) {
  .timeline__item {
    width: 50%;
    padding-left: 0;
    padding-right: 2.5rem;
    margin-left: 0;
  }

  .timeline__item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 2.5rem;
  }
}

.timeline__dot {
  position: absolute;
  left: 0.375rem;
  top: 0.35rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
  z-index: 1;
}

@media (min-width: 768px) {
  .timeline__item:nth-child(odd) .timeline__dot {
    right: -0.375rem;
    left: auto;
  }

  .timeline__item:nth-child(even) .timeline__dot {
    left: -0.375rem;
  }
}

.exp-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.exp-card__logo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 0.4rem;
}

.exp-card__logo--light {
  background: #fff;
}

.exp-card__logo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.exp-card__meta {
  flex: 1 1 auto;
  min-width: 0;
}

.exp-card__meta h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.exp-card__company {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.exp-card__company-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.exp-testimonial-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.exp-testimonial-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.exp-card__date {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.exp-card__list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.exp-card__list li {
  margin-bottom: 0.5rem;
}

/* Experience tabs (index) */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.exp-tabs-container {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 2rem;
  padding: 0.35rem;
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.exp-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.8rem 0.5rem;
  cursor: pointer;
  text-align: center;
  border-radius: var(--radius-sm);
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  min-width: 0;
  position: relative;
}

.exp-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.06);
}

.exp-tab.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.exp-tab.active::after {
  display: none;
}

.exp-tab-year {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  color: inherit;
  opacity: 0.7;
  line-height: 1.2;
}

.exp-tab-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
}

.exp-panels-container {
  min-height: 27rem;
}

.exp-panel {
  display: none;
  animation: fadeIn 0.35s ease-in-out;
}

.exp-panel.active {
  display: block;
}

.exp-panel__inner {
  max-width: 68rem;
  margin: 0 auto;
}

.exp-card__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 38%);
  gap: 2rem;
  align-items: stretch;
  min-height: 27rem;
}

.exp-card__content {
  min-width: 0;
  align-self: stretch;
}

/* Aside height follows the text column; media is absolutely filled inside. */
.exp-card__aside {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.exp-card.exp-card--uniform {
  min-height: 27rem;
  margin: 0;
}

.exp-media-box {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-surface-elevated);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-sizing: border-box;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.15);
}

.exp-media-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: block;
  font-weight: 600;
  text-align: center;
}

.exp-media-grid {
  display: grid;
  gap: 0.6rem;
  flex: 1;
  min-height: 0;
}

.exp-media-grid--duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exp-media-grid--single {
  grid-template-columns: 1fr;
}

.exp-media-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
  background: #0a0a0a;
}

.exp-media-grid img.exp-media--contain {
  object-fit: contain;
  object-position: center;
}

.exp-media-grid--illustration {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #141414;
  border: 1px solid var(--border);
}

.exp-media-grid--illustration img {
  flex: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
  aspect-ratio: unset;
  object-fit: contain;
  object-position: center;
  border: none;
  border-radius: 0;
  background: transparent;
}

.exp-media-grid__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  min-height: 0;
}

.exp-media-grid__item img {
  flex: 1;
  min-height: 0;
}

.exp-media-grid img.zoomable-image {
  cursor: zoom-in;
}

.exp-media-grid img.zoomable-image:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.25);
}

.exp-media-grid__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: center;
  font-weight: 600;
}

.exp-video-wrapper {
  width: 100%;
  flex: 1;
  min-height: 0;
  max-height: none;
  aspect-ratio: unset;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.exp-video-wrapper iframe,
.exp-video-wrapper video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: contain;
  background: #000;
}

.media-hint {
  text-align: center;
  margin-top: auto;
  padding-top: 0.65rem;
  margin-bottom: 0;
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

.media-hint--video {
  font-style: normal;
}

@media (max-width: 900px) {
  .exp-tabs-container {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0.35rem;
  }

  .exp-tabs-container::-webkit-scrollbar {
    display: none;
  }

  .exp-tab {
    flex: 1 0 8.75rem;
    text-align: left;
  }

  .exp-card__layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .exp-panels-container {
    min-height: 0;
  }

  .exp-card.exp-card--uniform {
    min-height: 0;
  }

  .exp-card__aside {
    position: relative;
    min-height: 14rem;
  }

  .exp-media-box {
    position: relative;
    inset: auto;
    min-height: 14rem;
  }
}

/* Projects */
.projects__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.projects-carousel {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.projects-carousel__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.projects-carousel__track.projects__grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  grid-template-columns: unset;
  overflow: visible;
  padding-bottom: 0.25rem;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.projects-carousel__track.projects__grid.is-resetting {
  transition: none;
}

.projects-carousel__track .project-card {
  flex: 0 0 100%;
  min-width: 0;
}

.projects-carousel__hint {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.projects-carousel__nav {
  flex-shrink: 0;
  align-self: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease,
    transform 0.15s ease;
}

.projects-carousel__nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}


.projects__grid > .projects-archive {
  grid-column: 1 / -1;
}

.projects-archive {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  overflow: hidden;
}

.projects-archive__summary {
  padding: 1.125rem 1.35rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease;
}

.projects-archive__summary::-webkit-details-marker {
  display: none;
}

.projects-archive__summary::after {
  content: " +";
  font-weight: 700;
}

.projects-archive[open] .projects-archive__summary::after {
  content: " −";
}

.projects-archive__summary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.projects-archive__body {
  padding: 1.25rem 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
}

.projects-archive__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .projects-archive__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card__media--brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    var(--bg-surface-elevated) 45%,
    rgba(255, 255, 255, 0.08) 100%
  );
}

.project-card__media--brand i {
  font-size: clamp(2rem, 6vw, 2.75rem);
  color: var(--accent);
  opacity: 0.92;
}

.project-card__media--brand-alt {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    var(--bg-surface-elevated) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
}

.project-card__media--muted {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
}

.project-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

a.project-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

a.project-card--link:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

a.project-card--link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a.project-card--link.is-navigating {
  position: relative;
  z-index: 2;
  transform: scale(1.015);
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
  transition:
    transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.38s ease,
    box-shadow 0.38s ease,
    border-color 0.38s ease;
}

a.project-card--link.is-navigating .project-card__media img {
  transform: scale(1.04);
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.projects-carousel.is-transitioning {
  pointer-events: none;
}

.projects-carousel.is-transitioning .project-card:not(.is-navigating) {
  opacity: 0.28;
  transform: scale(0.985);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.project-page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999990;
  background: var(--bg-deep);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-page-transition.is-active {
  pointer-events: auto;
}

.project-page-transition.is-cover,
.project-page-transition.is-reveal {
  opacity: 1;
}

.project-page-transition.is-reveal-out {
  opacity: 0;
}

body.is-project-page-enter .project-detail-hero,
body.is-project-page-enter .project-detail {
  animation: projectPageEnter 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.12s both;
}

@keyframes projectPageEnter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  a.project-card--link.is-navigating,
  a.project-card--link.is-navigating .project-card__media img,
  .projects-carousel.is-transitioning .project-card:not(.is-navigating),
  .project-page-transition,
  body.is-project-page-enter .project-detail-hero,
  body.is-project-page-enter .project-detail {
    animation: none;
    transition: none;
    transform: none;
    opacity: 1;
  }
}

.project-card__link-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
}

.project-card__body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.project-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: var(--bg-surface-elevated);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card__media.project-card__media--brand,
.project-card__media.project-card__media--brand-alt {
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.project-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.project-card__tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--accent);
}

.project-card__desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  flex: 1;
}

.btn-project-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 0.68rem 1rem;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.btn-project-details:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* Modal (CV + project details) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  padding-top: 4.5rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  pointer-events: none;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  cursor: pointer;
  border: none;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: min(90vh, 900px);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal--project .modal__panel {
  width: min(100%, 42rem);
  max-height: min(88vh, 720px);
}

/* CV preview: large viewport-sized panel + iframe fills remaining space */
#cv-modal .modal__panel {
  width: 90vw;
  max-width: 1200px;
  height: 85vh;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

#cv-modal .modal__body--cv {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#cv-modal .modal__iframe {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  outline: none;
  display: block;
  background: #525252;
}

@media (max-width: 768px) {
  #cv-modal .modal__panel {
    width: 95vw;
    height: 90vh;
    max-height: 90vh;
  }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}

.modal__close {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.modal__body {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.modal__body--cv {
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* Default iframe rules (CV uses #cv-modal overrides above) */
.modal__iframe {
  width: 100%;
  border: 0;
  outline: none;
  display: block;
  background: #525252;
}

.modal__footer {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Tabs (inside project modal) */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.tabs__tab {
  padding: 0.75rem 0.875rem;
  margin-bottom: -1px;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.tabs__tab:hover {
  color: var(--text-primary);
}

.tabs__tab[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tabs__panel {
  display: none;
  padding: 1.25rem;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.tabs__panel.is-active {
  display: block;
}

.project-modal__stack[hidden] {
  display: none !important;
}

.project-card__details {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Education */
.edu__grid {
  display: grid;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 768px) {
  .edu__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.edu-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.35rem;
  min-height: 100%;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.edu-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.edu-card__header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.edu-card__logo {
  flex: 0 0 4.75rem;
  width: 4.75rem;
  height: 4.75rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.45rem;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.edu-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.edu-card__intro {
  flex: 1;
  min-width: 0;
}

.edu-card__period {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  margin: 0 0 0.55rem;
}

.edu-card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.35rem;
}

.edu-card__school {
  color: var(--accent-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  margin: 0;
}

.edu-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.edu-card__detail {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.edu-card__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.edu-card__detail p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 520px) {
  .edu-card__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .edu-card__intro {
    width: 100%;
  }
}

/* Academic page */
.academic-carousel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.academic-carousel.is-detail-open .academic-carousel__nav {
  opacity: 0.35;
  pointer-events: none;
}

.academic-carousel__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.academic-carousel.is-detail-open .academic-carousel__viewport {
  overflow: hidden;
}

.academic-carousel.is-detail-open .academic-carousel__track {
  transform: translate3d(0, 0, 0) !important;
}

.academic-carousel.is-detail-open .academic-flip-card:not(.is-flipped) {
  display: none;
}

.academic-carousel.is-detail-open .academic-flip-card.is-flipped {
  flex: 0 0 100%;
  position: relative;
  z-index: 2;
}

.academic-carousel__track {
  display: flex;
  flex-wrap: nowrap;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.academic-carousel__track.is-resetting {
  transition: none;
}

.academic-carousel__nav {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.academic-carousel__nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
}

.academic-carousel__hint {
  margin: 0 0 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.academic-flip-card {
  flex: 0 0 100%;
  min-width: 0;
}

.academic-flip-card__scene {
  perspective: 1400px;
  width: 100%;
  aspect-ratio: 16 / 9;
  transition: height 0.45s ease, aspect-ratio 0.45s ease;
  overflow: hidden;
  isolation: isolate;
}

.academic-flip-card.is-flipped .academic-flip-card__scene {
  aspect-ratio: auto;
  min-height: 640px;
}

.academic-flip-card.is-flipped .academic-flip-card__face--back {
  display: flex;
}

.academic-flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.academic-flip-card.is-flipped .academic-flip-card__inner {
  transform: rotateY(180deg);
}

.academic-flip-card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
}

.academic-flip-card__face--front {
  border: 1px solid var(--border);
  background: #0f172a;
}

.academic-flip-card__face--back {
  transform: rotateY(180deg);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  overflow: hidden auto;
  display: flex;
  flex-direction: column;
}

.academic-flip-card__cover {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: block;
}

.academic-flip-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.academic-flip-card__cover:hover img {
  transform: scale(1.01);
  opacity: 0.94;
}

.academic-flip-card__cta {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  pointer-events: none;
}

.academic-flip-card__toolbar {
  padding: 0.75rem 1rem 0;
  flex-shrink: 0;
}

.academic-flip-card__close {
  font-size: 0.875rem;
}

.featured-card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  margin-bottom: 0;
  display: block;
}

.featured-card__cover {
  display: none;
}

.featured-card__split {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

@media (min-width: 768px) {
  .featured-card__split {
    flex-direction: row;
    align-items: stretch;
  }

  .featured-card__media {
    width: 42%;
    border-right: 1px solid var(--border);
    min-height: 360px;
  }

  .featured-card__body {
    width: 58%;
  }
}

.featured-card__media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #111;
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.featured-card__media img,
.featured-card__media video,
.featured-card__media iframe {
  width: 100%;
  max-height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  background: #1a1a1a;
  border-radius: var(--radius-sm);
  display: block;
}

.featured-card__media img {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.featured-card__media img:hover {
  opacity: 0.88;
}

.featured-card__media video,
.featured-card__media iframe {
  aspect-ratio: 16 / 9;
  min-height: 180px;
  border: none;
}

.featured-card__body {
  padding: 2rem;
}

.featured-card__title {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.featured-card__meta {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.academic-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.academic-tabs::-webkit-scrollbar {
  display: none;
}

.academic-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  transition: color 0.25s ease;
  position: relative;
}

.academic-tab-btn:hover {
  color: var(--text-primary);
}

.academic-tab-btn.active {
  color: var(--text-primary);
}

.academic-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.academic-tab-content {
  display: none;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.academic-tab-content p {
  margin-bottom: 0.75rem;
}

.academic-tab-content.active {
  display: block;
  animation: academicTabFade 0.3s ease-in;
}

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

#custom-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000000;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.95);
}

#custom-lightbox.is-active {
  display: flex !important;
}

#custom-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  background: transparent;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10000001;
}

.lightbox-close:hover {
  color: #ccc;
}

/* Achievements */
.ach__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.ach-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 22rem;
}

.ach-badge i {
  font-size: 1.5rem;
  color: var(--accent);
  flex-shrink: 0;
}

.ach-badge strong {
  display: block;
  font-size: 0.9375rem;
}

.ach-badge span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Contact — closing CTA band */
.section--contact {
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 2.75rem);
}

.section--contact::before {
  content: "";
  display: block;
  height: 1px;
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.14) 50%,
    transparent
  );
}

.contact-band {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.5rem);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.012) 55%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
}

@media (min-width: 900px) {
  .contact-band {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: stretch;
    gap: 0;
    padding: 0;
  }

  .contact-band__intro {
    padding: clamp(1.75rem, 3vw, 2.5rem);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }

  .contact-band__aside {
    padding: clamp(1.75rem, 3vw, 2.5rem);
    background: rgba(0, 0, 0, 0.22);
  }
}

.contact-band__intro .section__eyebrow {
  text-align: left;
  display: inline-flex;
}

.contact-band__title {
  font-size: clamp(1.625rem, 3.5vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
  line-height: 1.15;
}

.contact-band__title::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  margin-top: 0.85rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.42), transparent);
}

.contact-band__lede {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
  max-width: 28rem;
}

.contact-band__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.contact-channels {
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 520px) and (max-width: 899px) {
  .contact-channels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.contact-channel:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(3px);
}

.contact-channel__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-channel--email .contact-channel__icon {
  color: #93c5fd;
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.25);
}

.contact-channel--linkedin .contact-channel__icon {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.25);
}

.contact-channel--github .contact-channel__icon {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.25);
}

.contact-channel--phone .contact-channel__icon {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.25);
}

.contact-channel__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.contact-channel__text strong {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.contact-channel__text span {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-channel__arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-channel:hover .contact-channel__arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.contact-aside__label {
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #86efac;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.22);
}

.contact-status__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45);
  animation: contact-pulse 2.4s ease-out infinite;
}

@keyframes contact-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(74, 222, 128, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-status__dot {
    animation: none;
  }
}

.contact-aside__list {
  margin: 0 0 1.5rem;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.contact-aside__list li + li {
  margin-top: 0.45rem;
}

.contact-aside__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.contact-aside__actions .btn {
  width: 100%;
}

.contact-aside__meta {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.contact-aside__meta li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.contact-aside__meta i {
  width: 1rem;
  color: var(--accent-muted);
  text-align: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

/* Footer */
.site-footer {
  padding: 1.5rem 1rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer a {
  font-weight: 600;
}

/* Back to top */
.back-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  z-index: 900;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

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

.back-top:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
}

/* Project detail pages */
.project-detail-hero {
  padding-block: clamp(3rem, 8vw, 4.5rem) 2rem;
  border-bottom: 1px solid var(--glass-border);
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.project-detail-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  padding: 0.52rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.project-detail-hero__back:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.project-detail-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.project-detail-hero__intro {
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 0 1.25rem;
  line-height: 1.7;
}

.project-detail {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 900px) {
  .project-detail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: start;
  }
}

.project-detail__media-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project-detail__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.project-detail__video iframe,
.project-detail__video video,
.project-detail__video img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
  background: var(--bg-surface-elevated);
}

.project-detail__video--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: var(--bg-surface);
}

.project-detail__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.project-detail__gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.project-detail__content {
  min-width: 0;
}

.project-detail .tab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.project-detail .tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  position: relative;
  font-family: var(--font);
}

.project-detail .tab-btn:hover {
  color: var(--text-primary);
}

.project-detail .tab-btn.active {
  color: var(--accent);
}

.project-detail .tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.project-detail .tab-content {
  display: none;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.project-detail .tab-content.active {
  display: block;
}

.project-detail .tab-content p {
  margin: 0 0 0.85rem;
}

.project-detail .tab-content ul {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
}

.architecture-diagram {
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.architecture-diagram img,
.architecture-diagram svg {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
}

.architecture-diagram img:hover {
  opacity: 0.92;
}

.architecture-diagram__hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.showcase-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.showcase-panel__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 200, 80, 0.15);
  color: #e8c547;
  margin-bottom: 0.75rem;
}

.showcase-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.showcase-panel__status {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  min-height: 1.25rem;
}

.showcase-visual {
  margin-bottom: 1rem;
}

.showcase-visual__inner {
  animation: showcaseFadeIn 0.35s ease;
}

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

.showcase-visual__card {
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface-elevated);
}

.showcase-visual__card--transport {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(145deg, rgba(63, 63, 70, 0.45), rgba(24, 24, 27, 0.92));
}

.showcase-visual__card--events {
  border-color: rgba(192, 132, 252, 0.35);
  background: linear-gradient(145deg, rgba(76, 29, 149, 0.25), rgba(20, 20, 28, 0.92));
}

.showcase-visual__card--dfma {
  border-color: rgba(45, 212, 191, 0.35);
  background: linear-gradient(145deg, rgba(15, 118, 110, 0.22), rgba(20, 24, 28, 0.92));
}

.showcase-scanner__payload-link a {
  color: var(--accent);
  text-decoration: underline;
}

.showcase-scanner__sample a {
  display: inline-block;
  line-height: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.showcase-scanner__sample a:hover {
  outline: 2px solid rgba(192, 132, 252, 0.5);
  outline-offset: 2px;
}

.showcase-visual__card--stamping {
  border-color: rgba(156, 163, 175, 0.4);
  background: linear-gradient(145deg, rgba(107, 114, 128, 0.18), rgba(20, 20, 24, 0.92));
}

.showcase-visual__card--pass {
  position: relative;
  overflow: hidden;
}

.showcase-visual__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.showcase-visual__meta {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.showcase-visual__message {
  margin: 0 0 0.75rem;
}

.showcase-visual__caption {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.showcase-visual__badge {
  display: inline-block;
  margin-bottom: 0.65rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.showcase-visual__badge--success {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.showcase-visual__pill {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem;
}

.showcase-visual__prize {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 0.75rem;
}

.showcase-visual__prize-tier {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4b5fd;
}

.showcase-visual__list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.showcase-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.showcase-stat-grid--pass {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.showcase-stat {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.showcase-stat__label {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.showcase-stat__value {
  font-size: 1.05rem;
}

.showcase-api-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.showcase-result {
  width: 100%;
  min-height: 8rem;
  max-height: 16rem;
  overflow: auto;
  padding: 0.75rem 1rem;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #c8e6c9;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  word-break: break-word;
}

.prize-wheel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0 0.5rem;
}

.prize-wheel__stage {
  position: relative;
  width: 220px;
  height: 238px;
}

.prize-wheel__pointer {
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 20px solid #ec4899;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.prize-wheel__disk {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 220px;
  height: 220px;
  margin-left: -110px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15);
  background: conic-gradient(
    #f472b6 0deg 45deg,
    #818cf8 45deg 90deg,
    #c084fc 90deg 135deg,
    #f9a8d4 135deg 180deg,
    #a855f7 180deg 225deg,
    #fbcfe8 225deg 270deg,
    #ddd6fe 270deg 315deg,
    #f5d0fe 315deg 360deg
  );
  transform: rotate(0deg);
}

.prize-wheel__labels {
  position: absolute;
  inset: 0;
}

.prize-wheel__label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  margin-left: -27px;
  font-size: 0.5625rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  color: #111827;
  transform: rotate(calc(var(--i) * 45deg + 22.5deg)) translateY(-78px)
    rotate(calc(var(--i) * -45deg - 22.5deg));
}

.prize-wheel__spin {
  min-width: 10rem;
}

.prize-wheel__result {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(192, 132, 252, 0.35);
  background: rgba(76, 29, 149, 0.22);
  text-align: center;
}

.prize-wheel__result strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.prize-wheel__result span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.showcase-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
}

.showcase-modal.is-active {
  display: flex;
}

.showcase-modal__panel {
  position: relative;
  width: min(100%, 720px);
  max-height: min(92vh, 760px);
  overflow: auto;
  padding: 1.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow);
}

.showcase-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.showcase-modal__title {
  margin: 0 2rem 0.35rem 0;
  font-size: 1.15rem;
}

.showcase-modal__intro,
.showcase-modal__status,
.showcase-modal__error {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.showcase-modal__error {
  color: #fca5a5;
  min-height: 1rem;
}

.showcase-scanner {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}

@media (min-width: 640px) {
  .showcase-scanner {
    grid-template-columns: 1.4fr 0.8fr;
    align-items: start;
  }
}

.showcase-scanner__viewport {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
}

.showcase-scanner__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-scanner__reticle {
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(236, 72, 153, 0.85);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.showcase-scanner__side {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.showcase-scanner__label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.showcase-scanner__sample {
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: #fff;
}

.showcase-scanner__payload {
  margin: 0;
  font-size: 0.8125rem;
}

.showcase-scanner__demo {
  width: 100%;
  justify-content: center;
  font-size: 0.8125rem;
  padding: 0.5rem 0.75rem;
}

.stamp-simulator__page {
  position: relative;
  min-height: 220px;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #f9fafb;
  color: #111827;
  transition: box-shadow 0.35s ease;
}

.stamp-simulator__page.is-baked {
  box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.45);
}

.stamp-simulator__doc-title {
  margin: 0 0 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.stamp-simulator__doc-line {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: #4b5563;
}

.stamp-simulator__stamp {
  position: absolute;
  top: 42%;
  left: 58%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 0.45rem 0.75rem;
  border: 3px solid #6b7280;
  border-radius: 4px;
  background: rgba(229, 231, 235, 0.95);
  color: #111827;
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  touch-action: none;
  user-select: none;
}

.stamp-simulator__stamp.is-draggable {
  cursor: grab;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.stamp-simulator__stamp.is-dragging {
  cursor: grabbing;
  z-index: 2;
}

.stamp-simulator__stamp.is-placed {
  animation: stampDrop 0.35s ease;
}

@keyframes stampDrop {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-8deg) scale(1.2);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-8deg) scale(1);
  }
}

.stamp-simulator__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.stamp-simulator__progress {
  margin-top: 0.75rem;
}

.stamp-simulator__progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.stamp-simulator__progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9ca3af, #e5e7eb);
  transition: width 0.25s ease;
}

.stamp-simulator__status {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.dfma-simulator {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dfma-simulator__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.dfma-simulator__row label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-width: 4.5rem;
}

.dfma-simulator__row select {
  flex: 1;
  min-width: 8rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-deep);
  color: var(--text-primary);
  font: inherit;
}

.dfma-simulator__pulse {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(45, 212, 191, 0.45);
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.55;
  transition: opacity 0.3s ease, border-color 0.3s ease;
}

.dfma-simulator__pulse.is-active {
  opacity: 1;
  border-color: rgba(45, 212, 191, 0.85);
  animation: webhookPulse 0.9s ease;
}

@keyframes webhookPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.dfma-simulator__pulse span {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5eead4;
}

.dfma-simulator__log {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.dfma-simulator__stage-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dfma-simulator__stage-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, #5eead4);
  transition: width 0.35s ease;
}

.dfma-simulator__stage-bar.is-complete {
  background: linear-gradient(90deg, #15803d, #86efac);
}

.dfma-simulator [data-advance-stage].is-complete {
  border-color: rgba(134, 239, 172, 0.45);
  color: #86efac;
}

.dfma-simulator__signoff {
  margin-top: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(15, 118, 110, 0.12);
}

.dfma-simulator__signoff-name {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dfma-simulator__signoff-sig {
  display: block;
  width: 100%;
  max-width: 220px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.35rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  border: 1px dashed rgba(15, 118, 110, 0.35);
}

.dfma-simulator__signoff-date {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.showcase-sign-modal__panel {
  width: min(100%, 420px);
}

.showcase-sign-modal__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.showcase-sign-modal__role {
  margin: 0.15rem 0 0.85rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.showcase-sign-modal__pad-wrap {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
}

.showcase-sign-modal__pad {
  display: block;
  width: 100%;
  height: 140px;
  touch-action: none;
  cursor: crosshair;
}

.showcase-sign-modal__pad.is-signing {
  cursor: crosshair;
}

.showcase-sign-modal__hint {
  position: absolute;
  left: 0.75rem;
  bottom: 0.55rem;
  font-size: 0.75rem;
  color: rgba(15, 118, 110, 0.45);
  pointer-events: none;
}

.showcase-sign-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.showcase-visual__signature img {
  display: block;
  max-width: 220px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
  margin: 0.5rem 0;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  border: 1px dashed rgba(15, 118, 110, 0.35);
}

.dfma-simulator__stage-label {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
}

.showcase-visual__inner > .showcase-visual__card + .showcase-visual__card {
  margin-top: 1rem;
}

.project-detail__disclaimer {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
}

.project-card__cta {
  margin-top: 0.75rem;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.project-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

#custom-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999999;
}

#custom-lightbox.is-active {
  display: block;
}

#custom-lightbox img {
  max-width: 95%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  background: transparent;
  border: none;
  font-size: 3rem;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10000000;
}

.lightbox-close:hover {
  color: #ccc;
}
