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

:root {
  --bg: #0a0a12;
  --bg-alt: #11111c;
  --text: #f4f4f8;
  --text-muted: rgba(244, 244, 248, 0.58);
  --accent: #6ee7b7;
  --accent-dim: rgba(110, 231, 183, 0.14);
  --accent-hover: #a7f3d0;
  --accent-glow: rgba(110, 231, 183, 0.35);
  --border: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(22, 22, 36, 0.72);
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max-width: 960px;
  --reveal-duration: 1.45s;
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --identity-progress: 0;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: 5rem;
}

section[id] {
  scroll-margin-top: 5rem;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  position: relative;
  overflow-x: hidden;
}

.page-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(110, 231, 183, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 183, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}

.page-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
}

.page-glow--hero {
  width: 520px;
  height: 520px;
  top: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(110, 231, 183, 0.18) 0%, transparent 70%);
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 18, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.nav-back-btn {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.nav-back-btn:hover {
  border-color: var(--text-muted);
  background: var(--bg-alt);
}

.nav-logo {
  font-weight: 600;
  color: var(--text);
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-cta {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  white-space: nowrap;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-links a.is-active {
  font-weight: 500;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* Hero */
.hero {
  max-width: 1320px;
  margin: 0 auto;
  min-height: calc(100vh - 4.5rem);
  display: flex;
  align-items: center;
  padding: 4rem 2rem 5rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  width: 100%;
}

.hero-main {
  min-width: 0;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  opacity: calc(1 - var(--identity-progress));
  transform: translateX(calc(var(--identity-progress) * 28px));
  will-change: opacity, transform;
}

.hero-photo-wrap {
  position: relative;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), rgba(110, 231, 183, 0.15));
  box-shadow: 0 0 48px var(--accent-glow);
}

.hero-headshot {
  display: block;
  width: clamp(180px, 22vw, 260px);
  height: clamp(180px, 22vw, 260px);
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid var(--bg);
}

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(220px, 1fr);
  gap: 2rem;
  align-items: start;
}

.work-identity-sidebar {
  position: sticky;
  top: 6rem;
  align-self: start;
}

.work-identity-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  opacity: var(--identity-progress);
  transform: translateX(calc((1 - var(--identity-progress)) * 24px));
  will-change: opacity, transform;
  pointer-events: none;
}

body.identity-sidebar-active .work-identity-inner {
  pointer-events: auto;
}

.work-identity-name {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  max-width: 12ch;
}

.work-identity-photo {
  width: clamp(150px, 16vw, 220px);
  height: clamp(150px, 16vw, 220px);
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
}

.hero-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}

.hero-linkedin:hover {
  color: var(--accent);
}

.hero-linkedin-icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 1rem;
  padding: 0.35em 0.75em;
  border: 1px solid rgba(110, 231, 183, 0.25);
  border-radius: 999px;
  background: var(--accent-dim);
}

.hero-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  max-width: 22ch;
  color: var(--text);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  margin: 1.75rem 0 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero-stat-value {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-title-rotator {
  display: inline-block;
  vertical-align: bottom;
  text-align: left;
}

.hero-title-rotator-viewport {
  display: block;
  position: relative;
  overflow: hidden;
  height: 1.08em;
  transition: min-width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-title-phrase {
  display: block;
  white-space: nowrap;
}

.hero-title-phrase.is-current {
  position: relative;
}

.hero-title-phrase.is-next {
  position: absolute;
  left: 0;
  top: 0;
  width: max-content;
  transform: translateY(110%);
  opacity: 0;
}

.hero-title-rotator.is-animating .hero-title-phrase.is-current {
  animation: hero-rotate-out 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-title-rotator.is-animating .hero-title-phrase.is-next {
  animation: hero-rotate-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes hero-rotate-out {
  to {
    transform: translateY(-110%);
    opacity: 0;
  }
}

@keyframes hero-rotate-in {
  from {
    transform: translateY(110%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 42ch;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.hero-work-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 52ch;
}

.hero-work-type {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.38em 0.8em;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-work-type:hover {
  border-color: rgba(110, 231, 183, 0.45);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(110, 231, 183, 0.08);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

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

.hero-links .btn:hover {
  animation: btn-hover-bounce 0.5s ease-in-out infinite;
}

.contact-link:hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .hero-links .btn:hover,
  .contact-link:hover {
    animation: none;
    transform: translateY(-2px);
  }

  .hero-title-rotator.is-animating .hero-title-phrase.is-current,
  .hero-title-rotator.is-animating .hero-title-phrase.is-next {
    animation: none;
  }

  .hero-title-phrase.is-next {
    transform: none;
  }
}

.btn-primary {
  background: var(--accent);
  color: #0a0a12;
  box-shadow: 0 0 24px rgba(110, 231, 183, 0.2);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0a0a12;
  box-shadow: 0 0 32px rgba(110, 231, 183, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  border-color: rgba(110, 231, 183, 0.35);
  color: var(--accent);
}

/* Sections */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

#timeline.section,
.section-timeline {
  max-width: 900px;
  padding: 3rem 2rem 4rem;
}

#timeline .section-title {
  margin-bottom: 0.5rem;
}

.timeline-layout {
  width: 100%;
}

.timeline-list {
  margin-top: 0.5rem;
}

.timeline-track {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.timeline-item {
  position: relative;
  padding-left: 2.25rem;
  padding-bottom: 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.65rem;
  bottom: -0.35rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(110, 231, 183, 0.12));
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.12);
  z-index: 1;
}

.timeline-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  backdrop-filter: blur(12px);
  transition:
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s ease;
}

.timeline-card--clickable {
  cursor: pointer;
}

.timeline-card--clickable:hover,
.timeline-card--clickable:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(110, 231, 183, 0.12);
  border-color: rgba(110, 231, 183, 0.35);
  outline: none;
}

.timeline-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.timeline-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.timeline-category {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.25em 0.65em;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.timeline-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.timeline-card-org {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.timeline-card-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.65rem;
}

.timeline-card-impact {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 0;
}

.timeline-card-impact strong {
  color: var(--accent);
  font-weight: 600;
}

.timeline-card-media {
  margin-top: 1rem;
}

.timeline-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.timeline-card-actions .btn {
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
}

/* Optional reveal animations (cards stay visible — animation is motion only) */
body.reveal-soft-rise.work-revealed #work.section {
  animation: work-section-rise var(--reveal-duration) var(--reveal-ease) both;
}

body.reveal-blur-in.work-revealed #work.section {
  animation: work-section-blur var(--reveal-duration) var(--reveal-ease) both;
}

body.reveal-scale-settle.work-revealed #work.section {
  animation: work-section-scale var(--reveal-duration) var(--reveal-ease) both;
}

body.reveal-clip-up.work-revealed #work.section {
  animation: work-section-clip var(--reveal-duration) var(--reveal-ease) both;
}

body.reveal-stagger.work-revealed .work-card {
  animation: work-card-rise 0.65s var(--reveal-ease) both;
}

body.reveal-stagger.work-revealed .work-card[data-project-index="0"] {
  animation-delay: 0.05s;
}

body.reveal-stagger.work-revealed .work-card[data-project-index="1"] {
  animation-delay: 0.15s;
}

body.reveal-stagger.work-revealed .work-card[data-project-index="2"] {
  animation-delay: 0.25s;
}

body.reveal-stagger.work-revealed .work-card[data-project-index="3"] {
  animation-delay: 0.35s;
}

@keyframes work-section-rise {
  from {
    opacity: 0.4;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes work-section-blur {
  from {
    opacity: 0.5;
    filter: blur(10px);
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes work-section-scale {
  from {
    opacity: 0.6;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes work-section-clip {
  from {
    clip-path: inset(100% 0 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes work-card-rise {
  from {
    opacity: 0.35;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Work grid + hover + detail */
.work-section {
  position: relative;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 0.85rem 1rem;
  max-width: 700px;
  margin: 0;
}

.work-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.25s ease;
}

.work-section.is-previewing .work-card.is-dimmed {
  opacity: 0.38;
  filter: grayscale(0.35);
}

.work-card.is-hovered {
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  transform: scale(1.04);
  z-index: 2;
}

.work-card-media {
  overflow: hidden;
  background: var(--bg-alt);
  cursor: pointer;
}

.work-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.35s ease;
  background: var(--bg-alt);
  pointer-events: none;
}

.work-card-image,
.work-card-image-placeholder {
  min-height: 0;
}

.work-card.is-hovered .work-card-image {
  transform: scale(1.02);
}

.work-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  color: var(--text-muted);
  font-size: 0.78rem;
  background: linear-gradient(135deg, #1e1d38 0%, #121126 100%);
}

.work-card-info {
  padding: 0.65rem 0.85rem 0.75rem;
}

.work-title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.15rem;
  color: var(--text);
  transition: color 0.2s;
}

.work-card.is-hovered .work-title {
  color: var(--accent);
}

.work-context {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.work-hover-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.work-hover-panel--mid {
  grid-column: 1 / -1;
}

.work-hover-panel--bottom {
  max-width: 700px;
  margin: 0 auto;
}

.work-hover-panel.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
}

.work-hover-panel-inner {
  overflow: hidden;
  padding: 0.85rem 0 0.25rem;
}

.work-hover-blurb {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.85rem;
}

.work-hover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.work-hover-btn {
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
}

/* Project detail view */
body.work-showing-detail .site-header,
body.work-showing-detail .timeline-layout,
body.work-showing-detail #timeline .section-title,
body.work-showing-detail #timeline .section-desc,
body.work-showing-detail #hero,
body.work-showing-detail #about,
body.work-showing-detail #skills,
body.work-showing-detail #contact,
body.work-showing-detail .site-footer {
  display: none;
}

body.work-showing-detail #timeline.section {
  max-width: none;
  padding: 0;
  min-height: 100vh;
  opacity: 1;
  transform: none;
}

.work-detail-view {
  animation: work-detail-in 0.35s ease;
}

@keyframes work-detail-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.work-detail-back {
  position: fixed;
  top: 1.25rem;
  left: 1.5rem;
  z-index: 10;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.work-detail-back:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.work-detail-card {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem 2rem 3rem;
  background: var(--bg-alt);
  border-radius: 20px;
  min-height: calc(100vh - 2rem);
}

.work-detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.work-detail-preview {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
}

.work-detail-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: var(--card-bg);
  pointer-events: none;
}

.work-detail-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--card-bg);
}

.live-preview-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--card-bg);
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.live-preview-wrap--detail {
  border-radius: 12px;
}

.live-preview-iframe {
  display: block;
  width: 200%;
  height: 200%;
  border: 0;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
  background: var(--bg-alt);
}

.live-preview-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(10, 10, 18, 0.92));
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  transition: color 0.15s;
  z-index: 2;
}

.live-preview-overlay:hover {
  color: var(--accent-hover);
}

.live-preview-fallback {
  position: absolute;
  inset: 0;
}

.live-preview-fallback[hidden],
.live-preview-iframe[hidden] {
  display: none;
}

.live-preview-fallback-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.live-preview-fallback-image-placeholder,
.live-preview-static {
  aspect-ratio: 16 / 10;
}

.live-preview-fallback-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  background: var(--bg-alt);
}

.live-preview-wrap.is-fallback .live-preview-overlay {
  background: linear-gradient(transparent, rgba(10, 10, 18, 0.85));
}

.live-preview-static {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Preview modal */
body.modal-open {
  overflow: hidden;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.preview-modal[hidden] {
  display: none !important;
}

.preview-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.preview-modal-dialog {
  position: relative;
  width: min(960px, 100%);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: work-detail-in 0.3s ease;
}

.preview-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}

.preview-modal-close:hover {
  color: var(--text);
}

.preview-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  padding-right: 2rem;
}

.preview-modal-video {
  display: block;
  width: 100%;
  border-radius: 8px;
  background: #000;
}

.work-detail-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.work-detail-bottom {
  padding-top: 0.5rem;
}

.work-detail-summary {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.work-detail-note {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  line-height: 1.5;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(110, 231, 183, 0.25);
  border-radius: 8px;
  background: var(--accent-dim);
}

.work-detail-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.presentation-slideshow {
  margin-bottom: 1.75rem;
}

.presentation-slideshow-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.presentation-slideshow-title {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.presentation-slideshow-counter {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.presentation-slideshow-frame {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.presentation-slideshow-viewport {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f7f4ef;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  touch-action: pan-y;
}

.presentation-slideshow-track {
  position: relative;
  aspect-ratio: 16 / 9;
}

.presentation-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.presentation-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.presentation-slide-image,
.presentation-slide-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f7f4ef;
}

.presentation-slide-video {
  pointer-events: auto;
}

.presentation-arrow {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}

.presentation-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}

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

.work-detail-story {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

.work-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.work-detail-dots {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  padding-top: 0.5rem;
}

.work-detail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.work-detail-dot.is-active,
.work-detail-dot:hover {
  border-color: var(--accent);
  background: var(--accent);
  transform: scale(1.1);
}

.work-meta-field {
  margin: 0;
}

.work-meta-field dt {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.work-meta-field dd {
  font-size: 0.88rem;
  color: var(--text);
  margin: 0;
  line-height: 1.45;
}

.work-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.work-meta-list li + li {
  margin-top: 0.1rem;
}

.work-story-block {
  display: grid;
  grid-template-columns: minmax(90px, 120px) minmax(0, 1fr);
  gap: 1rem 1.5rem;
  align-items: start;
}

.work-story-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.work-story-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .timeline-card,
  .live-preview-iframe,
  .hero-work-type,
  .hero-aside,
  .hero-status-dot,
  .about-carousel-image,
  .work-detail-view,
  #timeline.section,
  .preview-modal-dialog {
    animation: none !important;
    transition: none !important;
  }

  .timeline-card--clickable:hover {
    transform: none;
  }
}

.section-alt {
  background: var(--bg-alt);
  max-width: none;
}

.section-alt .about-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

#about.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  width: 100%;
}

.about-carousel {
  width: 100%;
  max-width: 340px;
  justify-self: center;
}

.about-carousel-track {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.about-carousel-image.is-active {
  opacity: 1;
}

.about-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.about-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--text-muted);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.about-carousel-dot:hover {
  border-color: var(--accent);
}

.about-carousel-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.15);
}

.about-content {
  min-width: 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.section-title {
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.section-desc code {
  font-size: 0.85em;
  background: var(--bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.work-tag {
  display: inline-block;
  padding: 0.45em 0.9em;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.work-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

@media (max-width: 1024px) {
  .work-detail-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  #timeline.section,
  .section-timeline {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .timeline-item {
    padding-left: 1.75rem;
  }

  .hero {
    min-height: calc(100vh - 4rem);
    padding: 2.5rem 1.25rem 3rem;
    align-items: flex-start;
    padding-top: 3rem;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-aside {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 1.25rem;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-carousel {
    max-width: 280px;
  }

  .work-layout {
    grid-template-columns: 1fr;
  }

  .work-identity-sidebar {
    display: none;
  }

  .hero-aside {
    opacity: 1;
    transform: none;
  }

  .work-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .work-hover-panel--bottom {
    max-width: none;
  }

  .work-story-block {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .work-detail-card {
    padding: 4rem 1.25rem 2rem;
    border-radius: 0;
    min-height: 100vh;
  }

  .work-detail-back {
    left: 1rem;
  }

  .presentation-slideshow-frame {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .presentation-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(18, 18, 20, 0.72);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
  }

  .presentation-arrow:hover {
    transform: translateY(-50%) scale(1.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
  }

  .presentation-arrow-prev {
    left: 0.65rem;
  }

  .presentation-arrow-next {
    right: 0.65rem;
  }

  .presentation-slideshow-viewport {
    grid-column: 1;
  }
}

@media (max-width: 480px) {
  .nav-logo {
    font-size: 0.95rem;
  }
}

/* About */
.about-text {
  color: var(--text-muted);
  max-width: 55ch;
  margin-bottom: 0;
  line-height: 1.7;
  font-size: 1.05rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), rgba(110, 231, 183, 0.2));
}

.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.skill-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.skill-pills li {
  font-size: 0.85rem;
  padding: 0.4em 0.85em;
  background: var(--bg-alt);
  border-radius: 999px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.skill-card:hover .skill-pills li {
  background: rgba(255, 255, 255, 0.1);
}

.skill-pills li:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

/* Contact */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}

.contact-link-copy.copied,
.contact-link-highlight {
  border-color: rgba(110, 231, 183, 0.45);
  color: var(--accent);
  background: var(--accent-dim);
}

.contact-link-highlight:hover {
  box-shadow: 0 0 24px rgba(110, 231, 183, 0.15);
}

.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

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

/* Mobile */
@media (max-width: 640px) {
  .nav-cta {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 0.75rem 1.5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
