/* Stitch Handepp Portfolio Redesign - supplemental styles */

body {
  background-color: #0e1417;
  color: #e2e8f0;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.06);
  }
}

@keyframes gridDrift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 48px 48px;
  }
}

@keyframes badgePulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.08);
  }
}

@keyframes floatY {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes floatYPortrait {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes floatYPortraitMobile {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.hero-animate {
  opacity: 0;
  animation: fadeInUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-animate-left {
  animation-name: fadeInLeft;
}

.hero-animate-right {
  animation-name: fadeInRight;
  animation-delay: 0.15s;
}

.hero-bg-glow {
  animation: glowPulse 8s ease-in-out infinite;
}

.hero-grid-pattern {
  animation: gridDrift 24s linear infinite;
}

.hero-photo-badge-dot {
  animation: badgePulse 2.4s ease-in-out infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-left {
  transform: translateX(-32px);
}

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

.reveal-right {
  transform: translateX(32px);
}

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

.reveal-scale {
  transform: scale(0.96);
}

.reveal-scale.is-visible {
  transform: scale(1);
}

.reveal-left.reveal-scale {
  transform: translateX(-32px) scale(0.96);
}

.reveal-left.reveal-scale.is-visible {
  transform: translateX(0) scale(1);
}

.reveal-right.reveal-scale {
  transform: translateX(32px) scale(0.96);
}

.reveal-right.reveal-scale.is-visible {
  transform: translateX(0) scale(1);
}

.nav-scrolled {
  background: rgba(9, 15, 18, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.glass-card,
.project-card {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.glass-card:hover,
.project-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.22);
}

.timeline-item {
  opacity: 0;
  transform: translateX(-24px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-item.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Section background decorations */
section.reveal-section,
footer.reveal-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

section.reveal-section > .max-w-7xl,
section.reveal-section > .max-w-4xl,
footer.reveal-section > .max-w-7xl {
  position: relative;
  z-index: 1;
}

.section-deco-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.section-bg-glow {
  position: absolute;
  inset: 0;
  animation: glowPulse 10s ease-in-out infinite;
}

.section-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridDrift 32s linear infinite;
  mask-image: radial-gradient(ellipse at center, black 15%, transparent 72%);
}

.section-vectors {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.section-deco-layer .hero-deco {
  opacity: 0.6;
}

.section-deco-layer .hero-deco-dot,
.section-deco-layer .hero-deco-plus {
  opacity: 0.75;
}

.section-deco-layer--v0 .section-bg-glow {
  background:
    radial-gradient(circle at 14% 42%, rgba(0, 209, 255, 0.09), transparent 40%),
    radial-gradient(circle at 88% 58%, rgba(0, 209, 255, 0.05), transparent 36%);
}

.section-deco-layer--v0 .hero-deco--blob-a {
  right: 3%;
  top: 10%;
  left: auto;
  bottom: auto;
  width: min(20vw, 210px);
}

.section-deco-layer--v0 .hero-deco--accent {
  left: 6%;
  bottom: 14%;
  right: auto;
  top: auto;
  width: min(16vw, 160px);
}

.section-deco-layer--v0 .hero-deco-dot--1 {
  top: 18%;
  right: 22%;
  left: auto;
}

.section-deco-layer--v0 .hero-deco-dot--3 {
  bottom: 20%;
  left: 38%;
}

.section-deco-layer--v0 .hero-deco-plus--1 {
  top: 28%;
  left: 12%;
  right: auto;
}

.section-deco-layer--v1 .section-bg-glow {
  background:
    radial-gradient(circle at 86% 35%, rgba(0, 209, 255, 0.1), transparent 38%),
    radial-gradient(circle at 10% 72%, rgba(148, 163, 184, 0.06), transparent 34%);
}

.section-deco-layer--v1 .hero-deco--blob-b {
  left: 2%;
  bottom: 10%;
  right: auto;
  top: auto;
  width: min(18vw, 190px);
}

.section-deco-layer--v1 .hero-deco-dot--2 {
  top: 22%;
  right: 10%;
}

.section-deco-layer--v1 .hero-deco-plus--1 {
  top: 14%;
  left: 18%;
  right: auto;
}

.section-deco-layer--v1 .hero-deco-plus--2 {
  bottom: 22%;
  right: 20%;
  left: auto;
}

.section-deco-layer--v2 .section-bg-glow {
  background:
    radial-gradient(circle at 50% 20%, rgba(0, 209, 255, 0.08), transparent 42%),
    radial-gradient(circle at 20% 80%, rgba(0, 209, 255, 0.06), transparent 35%),
    radial-gradient(circle at 82% 75%, rgba(148, 163, 184, 0.05), transparent 32%);
}

.section-deco-layer--v2 .hero-deco--blob-a {
  right: 5%;
  top: 8%;
  left: auto;
  width: min(19vw, 200px);
}

.section-deco-layer--v2 .hero-deco--blob-b {
  left: 4%;
  bottom: 8%;
  right: auto;
  width: min(16vw, 170px);
}

.section-deco-layer--v2 .hero-deco--accent {
  right: 12%;
  bottom: 18%;
  left: auto;
  top: auto;
  width: min(14vw, 140px);
}

.section-deco-layer--v2 .hero-deco-dot--1 {
  top: 30%;
  left: 46%;
}

.section-deco-layer--v2 .hero-deco-dot--2 {
  bottom: 26%;
  right: 32%;
}

.section-deco-layer--footer {
  opacity: 0.7;
}

.section-deco-layer--footer .section-bg-glow {
  background: radial-gradient(circle at 50% 50%, rgba(0, 209, 255, 0.06), transparent 55%);
  animation-duration: 14s;
}

.section-deco-layer--footer .section-grid-pattern {
  opacity: 0.12;
  mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.section-deco-layer--footer .hero-deco-dot--2 {
  top: 50%;
  right: 8%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
}

@media (max-width: 767.98px) {
  .section-deco-layer .hero-deco {
    opacity: 0.45;
  }

  .section-deco-layer .hero-deco--blob-a,
  .section-deco-layer .hero-deco--blob-b {
    width: 140px !important;
  }

  .section-deco-layer .hero-deco--accent {
    width: 110px !important;
  }

  .section-grid-pattern {
    opacity: 0.14;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-animate,
  .hero-bg-glow,
  .hero-grid-pattern,
  .hero-portrait,
  .hero-photo-badge-dot,
  .hero-deco,
  .hero-deco-blob,
  .hero-deco-ring,
  .hero-deco-spark,
  .hero-deco-dot,
  .hero-deco-plus,
  .section-bg-glow,
  .section-grid-pattern,
  .section-deco-layer .hero-deco,
  .section-deco-layer .hero-deco-dot,
  .section-deco-layer .hero-deco-plus {
    animation: none !important;
  }

  .hero-animate,
  .reveal,
  .timeline-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@keyframes decoDriftA {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(14px, -20px) rotate(10deg) scale(1.05);
  }
  66% {
    transform: translate(-10px, 12px) rotate(-6deg) scale(0.97);
  }
}

@keyframes decoDriftB {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate(-16px, -14px) rotate(-12deg) scale(1.07);
  }
}

@keyframes decoSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes decoBob {
  0%, 100% {
    transform: translateY(0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-18px) scale(1.2);
    opacity: 1;
  }
}

@keyframes decoTwinkle {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.85) rotate(0deg);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.15) rotate(90deg);
  }
}

.hero-vectors {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-deco {
  position: absolute;
  pointer-events: none;
}

.hero-deco--blob-a {
  right: 6%;
  top: 14%;
  width: min(30vw, 300px);
  animation: decoDriftA 11s ease-in-out infinite;
}

.hero-deco--blob-b {
  left: 4%;
  bottom: 12%;
  width: min(24vw, 240px);
  animation: decoDriftB 13s ease-in-out infinite;
}

.hero-deco--accent {
  right: 18%;
  bottom: 18%;
  width: min(22vw, 200px);
  animation: decoDriftA 15s ease-in-out infinite reverse;
}

.hero-deco-blob {
  fill: rgba(0, 209, 255, 0.07);
  stroke: rgba(0, 209, 255, 0.28);
  stroke-width: 1.5;
}

.hero-deco-blob--soft {
  fill: rgba(148, 163, 184, 0.05);
  stroke: rgba(148, 163, 184, 0.22);
}

.hero-deco-ring {
  stroke: rgba(0, 209, 255, 0.3);
  stroke-width: 1.25;
  fill: none;
  transform-origin: 90px 90px;
  animation: decoSpin 40s linear infinite;
}

.hero-deco-ring--inner {
  stroke-dasharray: 4 10;
  stroke-opacity: 0.65;
  animation-direction: reverse;
  animation-duration: 28s;
}

.hero-deco-spark {
  stroke: rgba(0, 209, 255, 0.35);
  stroke-width: 1.5;
  stroke-linecap: round;
  animation: decoTwinkle 4s ease-in-out infinite;
}

.hero-deco-dot {
  position: absolute;
  border-radius: 999px;
  background: #00d1ff;
  box-shadow: 0 0 18px rgba(0, 209, 255, 0.45);
  animation: decoBob 5s ease-in-out infinite;
}

.hero-deco-dot--1 {
  top: 22%;
  left: 14%;
  width: 8px;
  height: 8px;
}

.hero-deco-dot--2 {
  top: 58%;
  right: 12%;
  width: 10px;
  height: 10px;
  animation-delay: 1.1s;
  animation-duration: 6s;
}

.hero-deco-dot--3 {
  bottom: 24%;
  left: 42%;
  width: 6px;
  height: 6px;
  animation-delay: 2s;
  animation-duration: 4.5s;
}

.hero-deco-plus {
  position: absolute;
  color: rgba(0, 209, 255, 0.45);
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
  animation: decoTwinkle 6s ease-in-out infinite;
}

.hero-deco-plus--1 {
  top: 30%;
  right: 28%;
  animation-delay: 0.6s;
}

.hero-deco-plus--2 {
  bottom: 30%;
  left: 22%;
  font-size: 1.1rem;
  animation-delay: 1.8s;
}

@media (max-width: 1023.98px) {
  .hero-deco--blob-a {
    right: -10%;
    top: 6%;
    width: 200px;
    opacity: 0.65;
  }

  .hero-deco--blob-b {
    left: -12%;
    bottom: 22%;
    width: 170px;
    opacity: 0.5;
  }

  .hero-deco--accent {
    right: -6%;
    bottom: 10%;
    width: 150px;
    opacity: 0.45;
  }

  .hero-deco-plus {
    opacity: 0.6;
  }
}

/* Hero */
.hero-section {
  position: relative;
  min-height: 100dvh;
}

@media (max-width: 1023.98px) {
  .hero-section {
    display: flex;
    flex-direction: column;
    height: 100svh;
    max-height: 100svh;
    min-height: 0;
    overflow: hidden;
    padding-top: max(5.25rem, calc(4.75rem + env(safe-area-inset-top, 0px)));
  }

  .hero-layout {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    align-content: stretch;
    grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 0.25rem;
    padding-bottom: 0.5rem;
    overflow: hidden;
  }

  .hero-visual {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    flex-shrink: 0;
    padding-top: 2rem;
    margin-top: 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
  }

  .hero-portrait-wrap {
    width: 100%;
    height: 100%;
    max-height: none;
    padding-top: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }

  .hero-portrait {
    width: auto;
    height: auto;
    max-height: min(38svh, 340px);
    max-width: min(82vw, 360px);
    margin-inline: auto;
    object-position: center bottom;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
  }

  .hero-portrait-glow {
    width: min(70%, 300px);
    height: 38%;
    bottom: 5%;
  }

  .hero-portrait-shadow {
    width: min(58%, 280px);
    bottom: 0;
  }

  .hero-photo-badge {
    position: absolute;
    top: 0;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.4rem 0.7rem;
    font-size: 0.65rem;
    white-space: nowrap;
    z-index: 4;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
    padding-top: 0.15rem;
    padding-bottom: 0.25rem;
  }

  .hero-content-inner > .inline-block {
    margin-bottom: 0.45rem;
    font-size: 0.62rem;
    padding: 0.3rem 0.65rem;
  }

  .hero-content-inner > p.text-brand {
    margin-bottom: 0.2rem;
    font-size: 0.92rem;
  }

  .hero-content-inner h1 {
    font-size: clamp(1.65rem, 8vw, 2.2rem);
    margin-bottom: 0.25rem;
    line-height: 1.08;
  }

  .hero-content-inner h2 {
    font-size: 0.92rem;
    margin-bottom: 0.45rem;
    line-height: 1.3;
  }

  .hero-content-inner > p.text-slate-400 {
    font-size: 0.8rem;
    line-height: 1.45;
    margin-bottom: 0.55rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-content-inner > .flex.flex-wrap.gap-4 {
    gap: 0.5rem;
    margin-bottom: 0.55rem;
  }

  .hero-content-inner > .flex.flex-wrap.gap-4 a {
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
  }

  .hero-social-link {
    width: 2.25rem;
    height: 2.25rem;
  }

  .hero-content-inner > .flex.flex-wrap.gap-3 {
    gap: 0.45rem;
  }
}

@media (max-width: 1023.98px) and (max-height: 700px) {
  .hero-portrait {
    max-height: min(32svh, 270px);
    max-width: min(78vw, 300px);
  }

  .hero-content-inner > p.text-slate-400 {
    -webkit-line-clamp: 2;
  }
}

@media (min-width: 1024px) {
  .hero-section {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding-top: 5rem;
  }

  .hero-layout {
    height: 100%;
    min-height: 0;
  }
}

.hero-layout {
  position: relative;
  z-index: 1;
}

.hero-visual {
  isolation: isolate;
}

.hero-portrait-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding-top: 0.5rem;
}

.hero-portrait-glow {
  position: absolute;
  bottom: 8%;
  left: 50%;
  z-index: 0;
  width: min(72%, 420px);
  height: 42%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 209, 255, 0.14) 0%, transparent 72%);
  pointer-events: none;
}

.hero-portrait-shadow {
  position: absolute;
  bottom: -0.35rem;
  left: 50%;
  z-index: 1;
  width: min(58%, 340px);
  height: 1.25rem;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-portrait {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  height: 100%;
  max-height: 100%;
  max-width: min(100%, 580px);
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.28));
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 82%, transparent 100%);
}

@media (min-width: 1024px) {
  .hero-portrait {
    max-width: min(110%, 680px);
    height: 100%;
  }

  .hero-portrait-wrap {
    padding-top: 0;
  }

  .hero-portrait-glow {
    width: min(80%, 480px);
    height: 48%;
  }

  .hero-portrait-shadow {
    width: min(64%, 400px);
  }
}

.hero-content-inner {
  width: 100%;
  max-width: 36rem;
}

@media (max-width: 1023.98px) {
  .hero-content-inner {
    max-width: none;
    margin-inline: auto;
  }
}

.hero-bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 38% 55%, rgba(0, 209, 255, 0.14), transparent 42%),
    radial-gradient(circle at 72% 45%, rgba(0, 209, 255, 0.08), transparent 35%);
}

.hero-grid-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  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: linear-gradient(to bottom, black 20%, transparent 95%);
}

.hero-photo-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(9, 15, 18, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e2e8f0;
}

@media (min-width: 1024px) {
  .hero-photo-badge {
    left: 1.5rem;
    bottom: 2rem;
  }
}

.hero-photo-badge-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.hero-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  color: #94a3b8;
  background: rgba(22, 29, 31, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.hero-social-link:hover {
  color: #00d1ff;
  border-color: rgba(0, 209, 255, 0.35);
  background: rgba(0, 209, 255, 0.08);
  transform: translateY(-2px);
}

.glass-card {
  background: rgba(51, 58, 61, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-gradient {
  background: linear-gradient(135deg, rgba(0, 209, 255, 0.1) 0%, rgba(14, 20, 23, 0) 100%);
}

.skill-tag {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  background: #090f12;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.tech-tag {
  font-size: 10px;
  text-transform: uppercase;
  color: rgba(0, 209, 255, 0.7);
  border: 1px solid rgba(0, 209, 255, 0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 0.125rem;
}

.timeline-dot {
  position: absolute;
  left: -37px;
  top: 0;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: #00d1ff;
  border: 4px solid #0e1417;
}

.timeline-dot-dim {
  background: rgba(0, 209, 255, 0.5);
}

.project-card img {
  filter: grayscale(20%);
  transition: filter 0.3s ease, transform 0.5s ease;
}

.project-card:hover img {
  filter: grayscale(0%);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0e1417;
}

::-webkit-scrollbar-thumb {
  background: #333a3d;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00d1ff;
}

/* Project Modal */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.project-modal.hidden {
  display: none;
}

.project-modal.is-open {
  display: flex;
}

.project-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  animation: modalFadeIn 0.25s ease;
}

.project-modal-dialog {
  position: relative;
  width: min(100%, 1100px);
  max-height: 92vh;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0e1417;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: modalSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 15, 18, 0.9);
  color: #e2e8f0;
  transition: background 0.2s ease, color 0.2s ease;
}

.project-modal-close:hover {
  background: #00d1ff;
  color: #0e1417;
}

.project-modal-body {
  max-height: 92vh;
  overflow-y: auto;
}

.project-modal-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
  .project-modal-hero {
    grid-template-columns: 1.1fr 1fr;
    padding: 2rem;
    gap: 2rem;
  }
}

.project-modal-hero-image-wrap {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #161d1f;
  min-height: 220px;
}

.project-modal-hero-image {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

/* Image slider */
.project-modal-slider {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #161d1f;
}

.slider-viewport {
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.slider-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.slider-slide img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .slider-slide img {
    height: 300px;
  }
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(9, 15, 18, 0.85);
  color: #e2e8f0;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.slider-btn:hover {
  background: #00d1ff;
  color: #0e1417;
}

.slider-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.slider-prev {
  left: 0.75rem;
}

.slider-next {
  right: 0.75rem;
}

.slider-counter {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(9, 15, 18, 0.8);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
}

.slider-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.4rem;
}

.slider-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.slider-dot.is-active {
  background: #00d1ff;
  transform: scale(1.15);
}

.project-modal-slider.is-single .slider-btn,
.project-modal-slider.is-single .slider-dots,
.project-modal-slider.is-single .slider-counter {
  display: none;
}

.project-modal-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: rgba(0, 209, 255, 0.12);
  color: #00d1ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-modal-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: #f8fafc;
}

.project-modal-summary {
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

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

.project-modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.project-modal-btn-primary {
  background: #00d1ff;
  color: #0e1417;
}

.project-modal-btn-primary:hover {
  opacity: 0.9;
}

.project-modal-btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  background: transparent;
}

.project-modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

.project-modal-section {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 768px) {
  .project-modal-section {
    padding: 2rem;
  }
}

.project-modal-section:last-child {
  border-bottom: none;
}

.project-modal-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #f8fafc;
}

.project-modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.project-modal-gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-modal-video-wrap {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #000;
  min-height: 200px;
}

.project-modal-video-wrap.is-portrait {
  width: min(100%, 320px);
  margin-left: auto;
  margin-right: auto;
  min-height: auto;
}

@media (min-width: 768px) {
  .project-modal-video-wrap.is-portrait {
    width: min(100%, 360px);
  }
}

.project-modal-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.project-modal-video.hidden {
  display: none;
}

.project-modal-video.is-portrait {
  padding-top: 177.78%;
}

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

.project-modal-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 200px;
  padding: 2rem;
  background: rgba(22, 29, 31, 0.65);
  color: #64748b;
  text-align: center;
  font-size: 0.9rem;
}

.project-modal-video-placeholder.hidden {
  display: none;
}

.project-modal-section.hidden {
  display: none;
}

.project-modal-video-wrap.is-portrait .project-modal-video-placeholder {
  min-height: 420px;
}

.project-modal-about-text {
  color: #94a3b8;
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.project-modal-highlights {
  margin-top: 0.5rem;
}

.project-modal-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.7;
}

.project-modal-list li {
  margin-bottom: 0.35rem;
}

.project-card-trigger {
  cursor: pointer;
}

.project-card-trigger:focus-visible {
  outline: 2px solid #00d1ff;
  outline-offset: 2px;
}

body.modal-open {
  overflow: hidden;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
