/* ========================================
   ARFAMER — Ocean Theme
   Color palette: deep ocean greens & blues
   ======================================== */

:root {
  /* Core ocean palette */
  --ocean-darkest: #040d1a;
  --ocean-dark: #071528;
  --ocean-deep: #0a1e38;
  --ocean-mid: #0d2847;
  --ocean-surface: #134a6e;

  /* Accent colors */
  --sea-green: #0d9373;
  --sea-teal: #12b89e;
  --sea-foam: #4edba8;
  --sea-glow: #6eeec0;
  --sea-bubble: rgba(78, 219, 168, 0.15);

  /* Text */
  --text-primary: #e8f4f0;
  --text-secondary: #93b8ad;
  --text-muted: #5e8a7c;
  --text-dim: #3a5f53;

  /* Functional */
  --danger: #e74c3c;
  --success: #2ecc71;
  --warning: #f39c12;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --container: 1200px;
  --gap: 2rem;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--ocean-darkest);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--sea-teal);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

a:hover {
  color: var(--sea-foam);
}

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

/* ========================================
   Ocean Background Animation
   ======================================== */
.ocean-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    var(--ocean-darkest) 0%,
    var(--ocean-dark) 30%,
    var(--ocean-deep) 60%,
    #082a3a 100%
  );
}

/* Bubbles */
.bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(78, 219, 168, 0.15), rgba(78, 219, 168, 0.03));
  border: 1px solid rgba(78, 219, 168, 0.08);
  animation: bubbleRise linear infinite;
}

.bubble-1 { width: 20px; height: 20px; left: 10%; bottom: -30px; animation-duration: 18s; animation-delay: 0s; }
.bubble-2 { width: 35px; height: 35px; left: 30%; bottom: -40px; animation-duration: 22s; animation-delay: 3s; }
.bubble-3 { width: 15px; height: 15px; left: 55%; bottom: -25px; animation-duration: 16s; animation-delay: 6s; }
.bubble-4 { width: 25px; height: 25px; left: 75%; bottom: -35px; animation-duration: 20s; animation-delay: 2s; }
.bubble-5 { width: 12px; height: 12px; left: 85%; bottom: -20px; animation-duration: 24s; animation-delay: 8s; }
.bubble-6 { width: 30px; height: 30px; left: 45%; bottom: -40px; animation-duration: 19s; animation-delay: 5s; }

@keyframes bubbleRise {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% { opacity: 0.6; }
  50% { transform: translateY(-50vh) translateX(30px) scale(1.1); }
  90% { opacity: 0.3; }
  100% {
    transform: translateY(-110vh) translateX(-20px) scale(0.8);
    opacity: 0;
  }
}

/* Seaweed */
.seaweed {
  position: absolute;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to top, rgba(13, 147, 115, 0.4), transparent);
  border-radius: 2px;
  transform-origin: bottom center;
  animation: seaweedSway 6s ease-in-out infinite;
}

.seaweed-1 { left: 8%; height: 120px; animation-delay: 0s; }
.seaweed-2 { left: 50%; height: 90px; animation-delay: 2s; }
.seaweed-3 { right: 12%; height: 100px; animation-delay: 4s; }

@keyframes seaweedSway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* ========================================
   Header
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.site-header.scrolled {
  background: rgba(4, 13, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(78, 219, 168, 0.1);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 3px;
  background: linear-gradient(135deg, var(--sea-teal), var(--sea-foam));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-nav {
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.3s var(--ease);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(78, 219, 168, 0.08);
}

.nav-link.active {
  color: var(--sea-foam);
  background: rgba(78, 219, 168, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.lang-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all 0.3s var(--ease);
}

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

.lang-btn.active {
  color: var(--ocean-darkest);
  background: var(--sea-teal);
}

/* Burger menu */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem 2rem;
  gap: 0.5rem;
}

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

.mobile-nav-link {
  font-size: 1.1rem;
  padding: 0.75rem 0;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-lang {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--sea-green), var(--sea-teal));
  color: white;
  box-shadow: 0 4px 20px rgba(13, 147, 115, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(13, 147, 115, 0.4);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--sea-teal);
  border: 1.5px solid var(--sea-teal);
}

.btn-outline:hover {
  background: rgba(18, 184, 158, 0.1);
  transform: translateY(-2px);
  color: var(--sea-foam);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  font-style: normal;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 0 4rem;
}

.hero-content {
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: 8px;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--sea-teal), var(--sea-foam), var(--sea-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  animation: heroFadeIn 1.2s var(--ease) both;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: heroFadeIn 1.2s var(--ease) 0.3s both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: heroFadeIn 1.2s var(--ease) 0.6s both;
}

.hero-visual {
  margin-top: 3rem;
  width: 100%;
  max-width: none;
}

.waveform-canvas {
  display: block;
  width: 100%;
  height: clamp(72px, 11vw, 140px);
  opacity: 0.6;
}

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

/* Glitch effect on hover */
.glitch-text:hover {
  animation: glitch 0.5s ease both;
}

@keyframes glitch {
  0% { text-shadow: 2px 0 var(--sea-teal), -2px 0 var(--sea-foam); }
  25% { text-shadow: -2px 0 var(--sea-teal), 2px 0 var(--sea-foam); }
  50% { text-shadow: 2px 2px var(--sea-teal), -2px -2px var(--sea-foam); }
  75% { text-shadow: -2px 2px var(--sea-foam), 2px -2px var(--sea-teal); }
  100% { text-shadow: none; }
}

/* ========================================
   Sections
   ======================================== */
.section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  max-width: var(--container);
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--text-primary);
  letter-spacing: 2px;
}

.section-subtitle {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

/* Page Hero */
.page-hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 8rem 2rem 3rem;
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--sea-teal), var(--sea-foam));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ========================================
   Portfolio / Works
   ======================================== */
.portfolio-section {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--gap);
}

.works-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Work Card (grid view) */
.work-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(10, 30, 56, 0.6);
  border: 1px solid rgba(78, 219, 168, 0.08);
  transition: all 0.4s var(--ease);
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(78, 219, 168, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.work-card-media {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--ocean-deep);
}

.work-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.work-card:hover .work-thumbnail {
  transform: scale(1.05);
}

.work-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ocean-deep), var(--ocean-mid));
  color: var(--text-muted);
}

.work-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 13, 26, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

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

.work-card-info {
  padding: 1.25rem;
}

.work-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.work-card-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Work Item (list view — portfolio page) */
.work-item {
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInUp 0.6s var(--ease) both;
}

.work-item:nth-child(2) { animation-delay: 0.1s; }
.work-item:nth-child(3) { animation-delay: 0.2s; }
.work-item:nth-child(4) { animation-delay: 0.3s; }

.work-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 1px;
}

.work-player {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(78, 219, 168, 0.1);
}

.work-player video {
  width: 100%;
  display: block;
}

.work-static-image {
  width: 100%;
  display: block;
}

.work-audio-player {
  margin: 1.5rem 0;
}

.work-cover {
  max-width: 300px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.work-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}

.work-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.work-links-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ext-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  transition: all 0.3s var(--ease);
}

.ext-link:hover {
  background: rgba(78, 219, 168, 0.15);
  color: var(--sea-foam);
  transform: scale(1.1);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}

.empty-state svg {
  margin-bottom: 1rem;
  opacity: 0.3;
}

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

/* ========================================
   Plyr Custom Theme
   ======================================== */
.plyr {
  --plyr-color-main: var(--sea-teal);
  --plyr-video-control-color: #fff;
  --plyr-video-control-background-hover: rgba(78, 219, 168, 0.2);
  --plyr-audio-control-color: var(--text-primary);
  --plyr-audio-controls-background: rgba(10, 30, 56, 0.8);
  --plyr-range-fill-background: var(--sea-teal);
  --plyr-badge-background: var(--sea-green);
  border-radius: var(--radius);
}

.plyr--audio .plyr__controls {
  border-radius: var(--radius);
  border: 1px solid rgba(78, 219, 168, 0.1);
}

/* ========================================
   Video Controls Visibility Behavior
   UI is hidden initially and shown on hover/focus or after first play.
   ======================================== */
@media (hover: hover) and (pointer: fine) {
  .plyr--video.ui-idle .plyr__controls {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(8px);
    pointer-events: none !important;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease);
  }
}

.plyr--video .plyr__controls {
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease);
}

/* Keep timeline dominant in compact cards:
   volume slider is hidden by default and appears as vertical popover on hover. */
.plyr .plyr__controls .plyr__volume {
  width: auto;
  min-width: auto;
  position: relative;
  overflow: visible;
}

/* Bridge zone to keep hover active while moving from mute button to popup slider */
.plyr .plyr__controls .plyr__volume::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 40px;
  height: 20px;
  transform: translateX(-50%);
  background: transparent;
  z-index: 9;
}

.plyr .plyr__controls .plyr__volume input[type='range'] {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  width: 92px;
  height: 110px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) rotate(-90deg);
  transform-origin: center;
  transition: opacity 0.2s var(--ease);
  z-index: 15;
}

.plyr .plyr__controls .plyr__volume::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  width: 36px;
  height: 120px;
  background: rgba(7, 21, 40, 0.9);
  border: 1px solid rgba(78, 219, 168, 0.2);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.2s var(--ease);
  z-index: 10;
}

.plyr .plyr__controls .plyr__volume:hover input[type='range'],
.plyr .plyr__controls .plyr__volume:focus-within input[type='range'],
.plyr .plyr__controls .plyr__volume input[type='range']:hover,
.plyr .plyr__controls .plyr__volume input[type='range']:focus,
.plyr .plyr__controls .plyr__volume.volume-open input[type='range'] {
  opacity: 1;
  pointer-events: auto;
}

.plyr .plyr__controls .plyr__volume:hover::after,
.plyr .plyr__controls .plyr__volume:focus-within::after,
.plyr .plyr__controls .plyr__volume.volume-open::after {
  opacity: 1;
}

/* When Plyr settings menu is open (quality/speed), force-hide volume popover */
.plyr.plyr--menu-open .plyr__controls .plyr__volume input[type='range'] {
  opacity: 0 !important;
  pointer-events: none !important;
}

.plyr.plyr--menu-open .plyr__controls .plyr__volume::after {
  opacity: 0 !important;
}

/* Fullscreen safety: keep player above site UI and avoid vertical crop */
.plyr--fullscreen-enabled,
.plyr--fullscreen-fallback {
  z-index: 2147483647 !important;
  background: #000 !important;
}

.plyr--fullscreen-enabled video,
.plyr--fullscreen-fallback video,
.plyr:fullscreen video,
.plyr:-webkit-full-screen video,
video:fullscreen,
video:-webkit-full-screen {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000 !important;
}

.plyr--fullscreen-fallback {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
}

/* Mobile/touch: do not rely on hover-only volume popup */
@media (max-width: 900px), (hover: none), (pointer: coarse) {
  .plyr .plyr__controls .plyr__volume::before,
  .plyr .plyr__controls .plyr__volume::after {
    display: none;
  }

  .plyr .plyr__controls .plyr__volume input[type='range'] {
    position: static;
    left: auto;
    bottom: auto;
    width: 72px;
    height: auto;
    margin-left: 0.35rem;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transform-origin: initial;
    z-index: auto;
  }
}

/* ========================================
   About Page
   ======================================== */
.about-section {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.about-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(78, 219, 168, 0.1);
}

.about-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.about-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.about-socials {
  margin-top: 3rem;
  text-align: center;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(78, 219, 168, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: all 0.3s var(--ease);
}

.social-link:hover {
  background: rgba(78, 219, 168, 0.1);
  border-color: rgba(78, 219, 168, 0.25);
  color: var(--sea-foam);
  transform: translateY(-2px);
}

/* ========================================
   Contact Page
   ======================================== */
.contact-section {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
}

.contact-item svg {
  color: var(--sea-teal);
  flex-shrink: 0;
}

.contact-item a {
  font-size: 1rem;
}

.contact-email-copy.is-copied {
  color: var(--sea-foam);
}

.contact-copy-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 0.35rem;
}

.contact-socials h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Contact page: social links should start under heading, top-to-bottom */
.contact-socials .social-links {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 0.7rem;
  margin-top: 0.35rem;
}

.contact-socials .social-link {
  width: auto;
  min-width: 220px;
  max-width: 100%;
  justify-content: flex-start;
}

/* ========================================
   Forms
   ======================================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(78, 219, 168, 0.12);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.3s var(--ease);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--sea-teal);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(18, 184, 158, 0.1);
}

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

.form-group select {
  cursor: pointer;
}

.form-group select option {
  background: var(--ocean-dark);
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(78, 219, 168, 0.08);
  padding: 2rem;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-tagline {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ========================================
   Error Pages
   ======================================== */
.error-page {
  position: relative;
  z-index: 1;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-family: var(--font-heading);
  font-size: 8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--sea-teal), var(--sea-foam));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(78, 219, 168, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(78, 219, 168, 0.35);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .works-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .burger {
    display: flex;
  }

  .site-header.has-mobile-nav {
    background: rgba(4, 13, 26, 0.95);
    backdrop-filter: blur(20px);
  }

  .hero-title {
    letter-spacing: 4px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-photo {
    max-width: 250px;
    margin: 0 auto;
  }

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

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

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

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

@media (max-width: 480px) {
  .site-header {
    padding: 0.75rem 1rem;
  }

  .section {
    padding: 3rem 1rem;
  }

  .page-hero {
    padding: 6rem 1rem 2rem;
  }

  .portfolio-section {
    padding: 0 1rem 3rem;
  }
}

/* ========================================
   Utility / Animations
   ======================================== */
.fade-in {
  animation: fadeInUp 0.6s var(--ease) both;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }

/* Highlight target work after deep-link scroll */
.work-item.work-highlight {
  animation: workPulse 2s ease;
}

@keyframes workPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(78, 219, 168, 0.0);
  }
  20% {
    box-shadow: 0 0 0 4px rgba(78, 219, 168, 0.30);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(78, 219, 168, 0.0);
  }
}

/* Selection style */
::selection {
  background: rgba(78, 219, 168, 0.3);
  color: var(--text-primary);
}

/* ========================================
   Layout Modes (Portfolio)
   ======================================== */
.works-container {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Grid-1: Single column, centered (default) */
.layout-grid-1 .work-item {
  max-width: 900px;
  margin: 0 auto;
}

/* Grid-2: Two columns */
.layout-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.layout-grid-2 .work-item {
  max-width: none;
}

.layout-grid-2 .work-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Grid-3: Three columns */
.layout-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.layout-grid-3 .work-item {
  max-width: none;
}

.layout-grid-3 .work-title {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* List: horizontal layout */
.layout-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.layout-list .work-item {
  display: flex;
  gap: 1.5rem;
  max-width: none;
  width: 100%;
  margin: 0;
  align-items: stretch;
  position: relative;
  min-height: 260px;
  height: 260px;
  overflow: hidden;
  background: rgba(10, 30, 56, 0.4);
  border: 1px solid rgba(78, 219, 168, 0.06);
  border-radius: var(--radius);
  padding: 1rem 1rem 3.2rem;
  transition: border-color 0.3s var(--ease);
}

.layout-list .work-item:hover {
  border-color: rgba(78, 219, 168, 0.15);
}

.layout-list .work-media {
  flex: 0 0 360px;
  max-width: 360px;
  width: 360px;
  position: static;
}

.layout-list .work-title {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  text-align: left;
}

.layout-list .work-info-side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-right: 0.5rem;
  overflow: hidden;
}

.layout-list .work-player {
  height: 100%;
  margin-bottom: 0;
}

.layout-list .work-player video,
.layout-list .work-player .plyr,
.layout-list .work-static-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.layout-list .work-item.no-video .work-media {
  flex: 0 0 220px;
  width: 220px;
  max-width: 220px;
}

.layout-list .work-item.no-video .work-player {
  height: 220px;
}

.layout-list .work-item.no-video .work-static-image {
  border-radius: var(--radius-sm);
}

.work-side-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: none; /* Hidden in non-list layouts */
}

.layout-list .work-title {
  display: none; /* Hide the inline title in list mode */
}

.layout-list .work-side-title {
  display: block;
}

.work-side-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
}

.work-side-desc::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(transparent, rgba(10, 30, 56, 0.9));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Show gradient fade only if text overflows */
.layout-list .work-side-desc {
  max-height: none;
}

.work-side-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.work-inline-audio {
  margin: 0.25rem 0 0.75rem;
}

.layout-list .work-inline-audio .plyr {
  border-radius: var(--radius-sm);
}

.ext-link-mini {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: rgba(78, 219, 168, 0.08);
  color: var(--sea-teal);
  border: 1px solid rgba(78, 219, 168, 0.15);
  transition: all 0.2s var(--ease);
}

.ext-link-mini:hover {
  background: rgba(78, 219, 168, 0.15);
  color: var(--sea-foam);
}

/* Layout responsive overrides */
@media (max-width: 1024px) {
  .layout-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .layout-grid-2,
  .layout-grid-3 {
    grid-template-columns: 1fr;
  }

  .layout-list .work-item {
    flex-direction: column;
    min-height: 0;
    height: auto;
    padding-bottom: 1rem;
    align-items: center;
    text-align: center;
  }

  .layout-list .work-media {
    flex: none;
    max-width: 100%;
    width: 100%;
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .layout-list .work-info-side {
    order: 2;
    width: 100%;
    align-items: center;
    text-align: center;
    padding-right: 0;
  }

  .layout-list .work-title {
    display: block;
    text-align: center;
  }

  .layout-list .work-side-title {
    display: none;
  }

  .layout-list .work-side-desc {
    text-align: center;
  }

  .layout-list .work-side-links {
    justify-content: center;
  }

  .layout-list .work-player-wrap,
  .layout-list .work-player,
  .layout-list .work-inline-audio {
    width: 100%;
  }
}

/* ========================================
   "More Details" Button
   ======================================== */
.work-bottom-bar {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 0 0;
}

.layout-list .work-bottom-bar {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0;
  margin: 0;
  z-index: 3;
}

@media (max-width: 768px) {
  .layout-list .work-bottom-bar {
    position: static;
    margin-top: 0.5rem;
    justify-content: center;
    width: 100%;
    padding-top: 0.2rem;
  }
}

.btn-details {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.25s var(--ease);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-details:hover {
  color: var(--sea-foam);
  background: rgba(78, 219, 168, 0.08);
}

.btn-details svg {
  opacity: 0.7;
  transition: opacity 0.25s;
}

.btn-details:hover svg {
  opacity: 1;
}

/* ========================================
   Player wrappers
   ======================================== */
.work-player-wrap {
  position: relative;
}

/* Music in grid modes: album-card behavior */
.layout-grid-1 .work-item.no-video .work-player,
.layout-grid-2 .work-item.no-video .work-player,
.layout-grid-3 .work-item.no-video .work-player {
  aspect-ratio: 1 / 1;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.layout-grid-1 .work-item.no-video .work-static-image,
.layout-grid-2 .work-item.no-video .work-static-image,
.layout-grid-3 .work-item.no-video .work-static-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-audio {
  margin-top: 0.8rem;
}

.grid-audio .plyr {
  border-radius: var(--radius-sm);
}

/* ========================================
   Detail Modal
   ======================================== */
.detail-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.detail-modal.open {
  display: flex;
}

.detail-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 13, 26, 0.85);
  backdrop-filter: blur(12px);
  animation: modalFadeIn 0.3s var(--ease);
}

.detail-modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  background: linear-gradient(135deg, var(--ocean-dark), var(--ocean-deep));
  border: 1px solid rgba(78, 219, 168, 0.15);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  animation: modalSlideIn 0.35s var(--ease);
}

.detail-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.detail-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.detail-modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-right: 2rem;
  background: linear-gradient(135deg, var(--sea-teal), var(--sea-foam));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.detail-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.detail-modal-desc {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.detail-section-title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.75rem;
}

.detail-modal-audio {
  padding-top: 0.5rem;
}

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

.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.25s var(--ease);
}

.detail-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--link-color, var(--sea-teal));
  color: var(--link-color, var(--sea-foam));
  transform: translateY(-1px);
}

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

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

/* Detail modal: full screen on mobile */
@media (max-width: 768px) {
  .detail-modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    padding: 2rem 1.5rem;
  }

  .detail-modal-close {
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
  }
}
