:root {
  --bg: #0f172a;
  --bg-accent: #111827;
  --card: rgba(15, 23, 42, 0.82);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --border: rgba(148, 163, 184, 0.25);
  --scrollbar-track: #020617;
  --scrollbar-thumb: rgba(100, 145, 175, 0.55);
  --scrollbar-thumb-hover: rgba(130, 170, 200, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

html::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

html::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, #1d4ed8 0%, transparent 35%),
    radial-gradient(circle at bottom left, #0ea5e9 0%, transparent 30%),
    linear-gradient(140deg, var(--bg) 0%, var(--bg-accent) 100%);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.page {
  width: min(1140px, 100%);
  display: grid;
  gap: 1.25rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.4);
}

.intro {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: center;
}

.profile-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px;
  border: 2px solid rgba(34, 211, 238, 0.45);
}

.intro-text h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.7rem, 2.2vw, 2.2rem);
}

.intro-text p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.intro-text p + p {
  margin-top: 0.75rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.profile-links__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.profile-links__chip i {
  font-size: 0.95rem;
  color: var(--accent);
  line-height: 1;
}

.profile-links__chip:hover,
.profile-links__chip:focus-visible {
  outline: none;
  border-color: rgba(34, 211, 238, 0.65);
  background: rgba(34, 211, 238, 0.12);
  color: #f8fafc;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.22);
}

.profile-links__chip:hover i,
.profile-links__chip:focus-visible i {
  color: #67e8f9;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
}

.cta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cta-card {
  padding: 1.1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.cta-card--featured {
  border-color: rgba(34, 211, 238, 0.38);
  background:
    linear-gradient(160deg, rgba(8, 145, 178, 0.22) 0%, var(--card) 50%),
    var(--card);
}

.cta-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.cta-card__subtitle {
  margin: 0 0 0.9rem;
  flex-grow: 1;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.btn {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

button.btn {
  cursor: pointer;
  font-family: inherit;
  background: transparent;
}

.btn:hover,
.btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(30, 41, 59, 0.55);
}

.btn--primary {
  color: #ecfeff;
  border-color: rgba(34, 211, 238, 0.7);
  background: linear-gradient(135deg, var(--accent-strong) 0%, #0891b2 100%);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%);
  border-color: rgba(103, 232, 249, 0.8);
}

.video-modal:not([open]) {
  display: none;
}

.video-modal[open] {
  padding: 0;
  border: none;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-modal::backdrop {
  background: rgba(2, 6, 23, 0.75);
}

.video-modal__panel {
  margin: auto;
  width: min(360px, calc(100vw - 2rem));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.5);
  overflow: hidden;
}

.video-modal__panel--vertical {
  width: auto;
  background: transparent;
  border: none;
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.55);
}

.video-modal__panel--wide {
  width: min(960px, calc(100vw - 2rem));
}

.video-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(6px);
  transition:
    opacity 180ms ease,
    color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.video-modal__panel:hover .video-modal__close,
.video-modal__frame:hover .video-modal__close,
.video-modal__close:focus-visible {
  opacity: 1;
}

.video-modal__close:hover,
.video-modal__close:focus-visible {
  outline: none;
  color: #fff;
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

.video-modal__frame {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #000;
  overflow: hidden;
  border-radius: 14px;
}

.video-modal__frame--vertical {
  aspect-ratio: 9 / 16;
  height: min(90vh, calc((100vw - 2rem) * 16 / 9));
  width: min(calc(90vh * 9 / 16), calc(100vw - 2rem));
  max-height: 90vh;
}

.video-modal__frame--wide {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

.video-modal__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.pro-work {
  padding: 1.5rem 1.5rem 1.65rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.4);
}

.pro-work__grid {
  margin-top: 1.35rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.work-card--pro .work-card__media {
  display: block;
  min-height: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.work-card--pro .work-card__media:empty::after {
  content: none;
}

.work {
  padding: 1.5rem 1.5rem 1.65rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.4);
}

.work__header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
}

.work__subtitle {
  margin: 0.65rem 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.work-panel {
  margin-top: 1.35rem;
  position: relative;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.work-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: work-overlay-in 240ms ease;
}

.work-overlay[hidden] {
  display: none !important;
}

body.work-overlay-open {
  overflow: hidden;
}

.work-detail {
  width: min(65vw, calc(100vw - 2.5rem));
  max-width: min(65vw, calc(100vw - 2.5rem));
  height: min(90vh, calc(100vh - 2.5rem));
  max-height: min(90vh, calc(100vh - 2.5rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: 1.15rem 1.25rem 1.3rem;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.97);
  box-shadow:
    0 24px 56px rgba(2, 6, 23, 0.6),
    0 0 0 1px rgba(34, 211, 238, 0.1);
  animation: work-detail-in 280ms ease;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.work-detail::-webkit-scrollbar {
  width: 12px;
}

.work-detail::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 0 18px 18px 0;
}

.work-detail::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
}

.work-detail::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

@keyframes work-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.55);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  padding: 0;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(34, 211, 238, 0.08),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.work-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow:
    0 14px 32px rgba(2, 6, 23, 0.45),
    0 0 0 1px rgba(34, 211, 238, 0.12);
}

.work-card:hover::before {
  opacity: 1;
}

.work-card:hover .work-card__media {
  border-color: rgba(34, 211, 238, 0.35);
}

.work-card:hover .work-card__media img,
.work-card:hover .work-card__media video {
  transform: scale(1.03);
}

.work-card--feature {
  grid-column: 1 / -1;
  border-color: rgba(34, 211, 238, 0.32);
  background:
    linear-gradient(155deg, rgba(8, 145, 178, 0.14) 0%, rgba(15, 23, 42, 0.72) 45%),
    rgba(15, 23, 42, 0.55);
}

.work-card--feature .work-card__media {
  min-height: 200px;
}

.work-card--creative {
  background:
    linear-gradient(160deg, rgba(168, 85, 247, 0.12) 0%, rgba(34, 211, 238, 0.08) 40%, rgba(15, 23, 42, 0.72) 100%),
    rgba(15, 23, 42, 0.55);
}

.work-card--creative .work-card__media {
  background:
    linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(34, 211, 238, 0.15)),
    rgba(2, 6, 23, 0.4);
}

.work-card__media {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(8, 145, 178, 0.1), rgba(15, 23, 42, 0.5)),
    repeating-linear-gradient(
      -45deg,
      rgba(148, 163, 184, 0.04) 0,
      rgba(148, 163, 184, 0.04) 2px,
      transparent 2px,
      transparent 10px
    );
  transition: border-color 180ms ease;
}

.work-card__media:empty::after {
  content: "Media preview";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(148, 163, 184, 0.55);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work-card__media img,
.work-card__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 220ms ease;
}

.work-card--pro .work-card__media img {
  position: static;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: unset;
  vertical-align: middle;
}

.work-card--pro:hover .work-card__media img {
  transform: none;
}

.work-card__media--contain {
  display: block;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.work-card__media--contain img {
  position: static;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  display: block;
  vertical-align: middle;
}

.work-card__media--cover {
  min-height: 180px;
  padding: 0;
  background: #050a14;
}

.work-card__media--cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.work-card--creative .work-card__media--cover {
  min-height: 200px;
}

.work-card:hover .work-card__media--contain img {
  transform: none;
}

.work-card__media--contain + .work-card__body {
  border-top: 1px solid var(--border);
}

.media-gallery {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: 0.25rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #050a14;
}

.media-gallery--images {
  min-height: 280px;
}

.media-gallery__viewport {
  position: relative;
  width: 100%;
  height: clamp(220px, 42vw, 400px);
  min-height: 220px;
  overflow: hidden;
  background: #0b1220;
}

.media-gallery__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.media-gallery__slide > video,
.media-gallery__slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.media-gallery--video .media-gallery__slide {
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.media-gallery--video .media-gallery__slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.media-gallery--images .media-gallery__slide {
  display: none;
  opacity: 1;
  pointer-events: none;
}

.media-gallery--images .media-gallery__slide.is-active {
  display: block;
  z-index: 1;
  pointer-events: auto;
}

.media-gallery__caption {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  z-index: 1;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  background: rgba(8, 12, 24, 0.88);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
  max-width: calc(100% - 5.5rem);
}

.media-gallery__footnote {
  margin: 0.6rem 0 0;
  padding: 0 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: italic;
  text-align: center;
}

.media-gallery--video .media-gallery__viewport {
  height: clamp(200px, 36vw, 380px);
  min-height: 200px;
  aspect-ratio: 16 / 9;
}

.media-gallery--images .media-gallery__viewport {
  aspect-ratio: 16 / 10;
  height: 320px;
  min-height: 320px;
  max-height: min(56vh, 480px);
}

.media-gallery__btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #ecfeff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.media-gallery__btn--prev {
  left: 0.55rem;
}

.media-gallery__btn--next {
  right: 0.55rem;
}

.media-gallery__btn:hover,
.media-gallery__btn:focus-visible {
  outline: none;
  background: rgba(34, 211, 238, 0.22);
  border-color: rgba(34, 211, 238, 0.65);
  transform: translateY(-50%) scale(1.05);
}

.media-gallery__btn--mute {
  left: 0.55rem;
  bottom: 0.55rem;
  top: auto;
  transform: none;
  font-size: 1.1rem;
}

.media-gallery__btn--mute:hover,
.media-gallery__btn--mute:focus-visible {
  transform: scale(1.05);
}

.media-gallery__mute-icon {
  display: none;
  line-height: 1;
}

.media-gallery__btn--mute.is-muted .media-gallery__mute-icon--off {
  display: block;
}

.media-gallery__btn--mute:not(.is-muted) .media-gallery__mute-icon--on {
  display: block;
}

.media-gallery__counter {
  position: absolute;
  right: 0.65rem;
  bottom: 0.55rem;
  z-index: 2;
  margin: 0;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}

.work-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem 1rem;
}

.work-card__title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.work-card__meta {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.work-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.work-card__chips span {
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.08);
  color: #cffafe;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
}

.btn--back {
  justify-self: start;
  margin-bottom: 0.15rem;
}

.work-detail__media {
  min-height: min(42vw, 320px);
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(8, 145, 178, 0.12), rgba(15, 23, 42, 0.6)),
    repeating-linear-gradient(
      -45deg,
      rgba(148, 163, 184, 0.04) 0,
      rgba(148, 163, 184, 0.04) 2px,
      transparent 2px,
      transparent 10px
    );
}

.work-detail__media--compact {
  min-height: 120px;
}

.work-detail__media--video {
  aspect-ratio: 16 / 9;
  min-height: auto;
  padding: 0;
  overflow: hidden;
  background: #000;
}

.work-detail__media--video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.work-detail__section .work-detail__media--inline {
  margin-top: 0.35rem;
  border-radius: 12px;
}

.work-detail__section .media-gallery {
  margin-top: 0.35rem;
}

.work-detail__figure {
  margin: 0;
  padding: 0.35rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0b1220;
  line-height: 0;
}

.work-detail__figure img {
  display: block;
  max-width: 100%;
  max-height: min(42vh, 480px);
  width: auto;
  height: auto;
}

.work-detail__media:empty::after {
  content: "Media preview";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(148, 163, 184, 0.55);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work-detail__media {
  position: relative;
}

.work-detail__header {
  display: grid;
  gap: 0.15rem;
}

.work-detail__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
}

.work-detail__meta {
  margin: 0.35rem 0 0;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.work-detail__description {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.98rem;
}

.work-detail__section h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  color: var(--accent);
}

.work-detail__section ul {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.55;
}

.work-detail__section li + li {
  margin-top: 0.4rem;
}

.work-detail__section ul ul {
  margin-top: 0.35rem;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.work-detail__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.work-detail__chips span {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.08);
  color: #cffafe;
  font-size: 0.75rem;
  font-weight: 600;
}

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

.work-detail__loading,
.work-detail__error,
.work-grid__error {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.work-detail__error,
.work-grid__error {
  color: #fca5a5;
}

.work-detail__media-note {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.work-detail:has(.visual-experiments) {
  width: min(80vw, calc(100vw - 2.5rem));
  max-width: min(80vw, calc(100vw - 2.5rem));
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.work-detail:has(.painting-page),
.work-detail:has(.video-card--inline) {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.work-detail--game-cv,
.work-detail:has(.game-cv-embed) {
  gap: 0.75rem;
  padding: 1rem 1.15rem 1.2rem;
  overflow: hidden;
  align-content: stretch;
  grid-template-rows: auto 1fr;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.97);
  box-shadow:
    0 24px 56px rgba(2, 6, 23, 0.6),
    0 0 0 1px rgba(34, 211, 238, 0.1);
}

.work-detail--game-cv .btn--back {
  justify-self: start;
}

.game-cv-embed {
  position: relative;
  width: 100%;
  min-height: 0;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: #0a0f18;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35);
}

.game-cv-embed__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-card--inline {
  margin-top: 0.5rem;
}

.video-card--inline .video-card__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--accent);
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35);
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.visual-experiments {
  display: grid;
  gap: 1.25rem;
}

.visual-experiments__videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1rem;
  margin-top: 0.5rem;
}

.visual-experiments .video-card {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.45rem;
  align-content: start;
  min-height: 0;
}

.visual-experiments .video-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  min-height: calc(1rem * 1.3 * 2);
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.visual-experiments .video-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
  min-height: calc(0.86rem * 1.5 * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 720px) {
  .visual-experiments__videos {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .visual-experiments .video-card__title {
    font-size: 1.05rem;
    min-height: calc(1.05rem * 1.3 * 2);
  }

  .visual-experiments .video-card__desc {
    font-size: 0.92rem;
    min-height: calc(0.92rem * 1.5 * 2);
  }
}

.painting-page {
  display: grid;
  gap: 1.15rem;
}

.painting-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.5vw, 1rem);
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.painting-gallery__item {
  position: relative;
  margin: 0;
  width: 100%;
  min-width: 0;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
}

.painting-gallery__item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 280ms ease;
}

.painting-gallery__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0;
  padding: 1rem 0.75rem;
  color: #f8fafc;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  background: rgba(2, 6, 23, 0);
  opacity: 0;
  transition:
    opacity 220ms ease,
    background 220ms ease;
}

.painting-gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0);
  transition: background 220ms ease;
  pointer-events: none;
}

.painting-gallery__item:hover img,
.painting-gallery__item:focus-within img {
  transform: scale(1.03);
}

.painting-gallery__item:hover::after,
.painting-gallery__item:focus-within::after {
  background: rgba(2, 6, 23, 0.55);
}

.painting-gallery__item:hover .painting-gallery__label,
.painting-gallery__item:focus-within .painting-gallery__label {
  opacity: 1;
  color: #ffffff;
}

.painting-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: work-overlay-in 240ms ease;
}

.painting-lightbox[hidden] {
  display: none !important;
}

body.painting-lightbox-open {
  overflow: hidden;
}

.painting-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(6px);
  transition:
    opacity 180ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.painting-lightbox:hover .painting-lightbox__close,
.painting-lightbox__close:focus-visible {
  opacity: 1;
}

.painting-lightbox__close:hover,
.painting-lightbox__close:focus-visible {
  outline: none;
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

.painting-lightbox__figure {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  max-width: min(90vw, calc(90vh * 3 / 4));
  max-height: 90vh;
}

.painting-lightbox__img {
  width: auto;
  height: auto;
  max-width: min(90vw, calc(90vh * 3 / 4));
  max-height: calc(90vh - 2.5rem);
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.6);
}

.painting-lightbox__caption {
  margin: 0;
  text-align: center;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: work-overlay-in 240ms ease;
}

.video-lightbox[hidden] {
  display: none !important;
}

body.video-lightbox-open {
  overflow: hidden;
}

.video-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(6px);
  transition:
    opacity 180ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.video-lightbox:hover .video-lightbox__close,
.video-lightbox__close:focus-visible {
  opacity: 1;
}

.video-lightbox__close:hover,
.video-lightbox__close:focus-visible {
  outline: none;
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

.video-lightbox__stage {
  position: relative;
  display: grid;
  gap: 0.65rem;
  max-width: min(92vw, calc((90vh - 3rem) * 16 / 9));
  max-height: 90vh;
}

.video-lightbox__viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.6);
  background: #000;
}

.video-lightbox__video {
  display: block;
  width: 100%;
  height: auto;
  max-width: min(92vw, calc((90vh - 3rem) * 16 / 9));
  max-height: calc(90vh - 3rem);
  object-fit: contain;
  vertical-align: middle;
}

.video-lightbox__viewport .media-gallery__btn--prev {
  left: 0.75rem;
}

.video-lightbox__viewport .media-gallery__btn--next {
  right: 0.75rem;
}

.video-lightbox__viewport .media-gallery__btn--mute {
  left: 0.75rem;
  bottom: 0.75rem;
}

.video-lightbox__viewport .media-gallery__counter {
  right: 0.75rem;
  bottom: 0.75rem;
}

.video-lightbox__caption {
  margin: 0;
  text-align: center;
  color: #f8fafc;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.media-gallery--video .media-gallery__viewport--expandable {
  cursor: zoom-in;
}

.media-gallery--video .media-gallery__viewport--expandable::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(2, 6, 23, 0.18);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.media-gallery--video .media-gallery__viewport--expandable:hover::after,
.media-gallery--video .media-gallery__viewport--expandable:focus-within::after {
  opacity: 1;
}

@media (max-width: 900px) {
  .painting-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .painting-gallery {
    grid-template-columns: minmax(0, 1fr);
    max-width: min(100%, 420px);
    justify-self: center;
  }
}

.sub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
}

.sub-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.sub-card:hover,
.sub-card:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
}

.sub-card__title {
  margin: 0;
  font-size: 1rem;
}

.sub-card__meta {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.sub-card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.sub-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.15rem;
}

.sub-card__chips span {
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.8);
  color: #cbd5e1;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.68rem;
}

.contact {
  padding: 1.4rem 1.5rem 1.6rem;
}

.contact h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
}

.contact__text {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.5;
}

.contact .profile-links {
  margin: 0;
}

@media (max-width: 900px) {
  .pro-work__grid {
    grid-template-columns: 1fr;
  }

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

  .work-card--feature {
    grid-column: 1 / -1;
  }

  .sub-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  body {
    padding: 1.25rem 0.85rem;
  }

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

  .work-card--feature {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .intro {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-image {
    max-width: 270px;
    margin: 0 auto;
  }

  .profile-links {
    justify-content: center;
  }

  .cta-row {
    grid-template-columns: 1fr;
  }
}
