/* Tema: Minimalist Professional Portfolio
   - Clean lines, ample whitespace, thin borders.
   - Elegant dark theme.
   - Smooth, subtle transitions.
*/

:root {
  --bg: #050505;
  --surface: #0a0a0a;
  --surface-hover: #121212;
  --text: #f0f0f0;
  --text-muted: #888888;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.3);
  --header-bg: rgba(5, 5, 5, 0.85);
  --header-h: 80px;
  --font-main: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --card-bg: rgba(255, 255, 255, 0.02);
  --card-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

body.light-theme {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-hover: #f0f0f0;
  --text: #111111;
  --text-muted: #666666;
  --border-color: rgba(0, 0, 0, 0.1);
  --border-hover: rgba(0, 0, 0, 0.2);
  --header-bg: rgba(250, 250, 250, 0.85);
  --card-bg: rgba(0, 0, 0, 0.02);
  --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  -webkit-font-smoothing: antialiased;
  font-weight: 300;
  transition: background-color 0.5s ease, color 0.5s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 4px;
}

/* ---------------- HEADER ---------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background-color: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.5s ease, border-color 0.5s ease;
}

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover {
  color: var(--text);
  background-color: var(--border-color);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.brand {
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  font-weight: 800;
  color: var(--text);
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.brand:hover {
  opacity: 0.7;
}

/* ---------------- LAYOUT ---------------- */
.viewport {
  position: relative;
  z-index: 10;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--header-h);
  overflow: hidden;
}

.slides {
  display: flex;
  height: 100%;
  width: 200vw;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.slides[data-active="1"] {
  transform: translateX(-100vw);
}

.slide {
  width: 100vw;
  height: 100%;
  overflow-y: auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* ---------------- HERO SECTION ---------------- */
.hero__card {
  text-align: left;
  max-width: 650px;
  width: 100%;
  padding: clamp(32px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.2;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 40px;
  font-weight: 300;
}

/* Button Minimalist */
.cta {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-color);
  padding: 16px 36px;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta:hover {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

/* ---------------- CONTACT SECTION ---------------- */
.contact__card {
  max-width: 650px;
  width: 100%;
  padding: clamp(32px, 5vw, 48px);
  display: flex;
  flex-direction: column;
}

.section-head {
  text-align: left;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 300;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.channels {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Channel List Items */
.channel-card {
  display: flex;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: padding 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
  group: channel;
}

.channel-card:first-child {
  border-top: 1px solid var(--border-color);
}

.channel-card:hover {
  padding-left: 12px;
  padding-right: 12px;
  border-bottom-color: var(--border-hover);
}

.channel-card__icon {
  width: 24px;
  height: 24px;
  margin-right: 24px;
  color: var(--text-muted);
  transition: color 0.4s ease;
}

.channel-card:hover .channel-card__icon {
  color: var(--text);
}

.channel-card__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.channel-card__name {
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.channel-card__handle {
  display: none;
}

.channel-card__action {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.channel-card:hover .channel-card__action {
  opacity: 1;
  transform: translateX(0);
}

/* Back Button */
.back-link {
  margin-top: 40px;
  align-self: flex-start;
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--text);
}

/* ---------------- DIALOG / MODAL ---------------- */
.dialog {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text);
  padding: 40px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.dialog__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.dialog__icon {
  width: 24px;
  height: 24px;
  color: var(--text);
}

.dialog__title {
  font-size: 1.25rem;
  font-weight: 400;
  margin: 0;
}

.dialog__desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.dialog__url {
  display: none;
}

.dialog__url a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.dialog__actions {
  display: flex;
  gap: 12px;
}

.btn {
  flex: 1;
  padding: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.btn--solid {
  background: var(--text);
  color: var(--bg);
  border: 1px solid var(--text);
}

.btn--solid:hover {
  background: transparent;
  color: var(--text);
}

/* Animations for slide elements */
.slide-entered .hero__card {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-entered .channel-card {
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.slide-entered .channel-card:nth-child(1) { animation-delay: 0.1s; }
.slide-entered .channel-card:nth-child(2) { animation-delay: 0.2s; }
.slide-entered .channel-card:nth-child(3) { animation-delay: 0.3s; }

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

/* ---------------- FOOTER & CAT ANIMATION ---------------- */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 40px;
  z-index: 50;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  pointer-events: none; /* Let clicks pass through except for interactive children */
}

.footer-copyright {
  pointer-events: auto;
}

/* ---------------- BACKGROUND ANIMATION ---------------- */
.bg-animation {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-icon {
  position: absolute;
  color: var(--text-muted);
  opacity: 0;
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(110vh) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-20vh) rotate(360deg) scale(1.2);
    opacity: 0;
  }
}

.bg-icon:nth-child(1) { left: 10%; width: 40px; height: 40px; animation-duration: 31s; animation-delay: 0s; }
.bg-icon:nth-child(2) { left: 85%; width: 60px; height: 60px; animation-duration: 40s; animation-delay: 5s; }
.bg-icon:nth-child(3) { left: 35%; width: 30px; height: 30px; animation-duration: 27s; animation-delay: 15s; }
.bg-icon:nth-child(4) { left: 70%; width: 45px; height: 45px; animation-duration: 36s; animation-delay: 2s; }
.bg-icon:nth-child(5) { left: 50%; width: 50px; height: 50px; animation-duration: 34s; animation-delay: 22s; }
.bg-icon:nth-child(6) { left: 20%; width: 55px; height: 55px; animation-duration: 37s; animation-delay: 8s; }
.bg-icon:nth-child(7) { left: 90%; width: 35px; height: 35px; animation-duration: 25s; animation-delay: 12s; }
.bg-icon:nth-child(8) { left: 60%; width: 48px; height: 48px; animation-duration: 32s; animation-delay: 4s; }
.bg-icon:nth-child(9) { left: 5%; width: 42px; height: 42px; animation-duration: 29s; animation-delay: 18s; }
.bg-icon:nth-child(10) { left: 80%; width: 38px; height: 38px; animation-duration: 35s; animation-delay: 25s; }
.bg-icon:nth-child(11) { left: 40%; width: 65px; height: 65px; animation-duration: 45s; animation-delay: 10s; }
.bg-icon:nth-child(12) { left: 65%; width: 32px; height: 32px; animation-duration: 22s; animation-delay: 20s; }

/* ---------------- RESPONSIVENESS ---------------- */
@media (max-width: 768px) {
  .site-header {
    padding: 0 20px;
  }
  
  .slide {
    padding: 24px 20px;
  }
  
  .hero__card, .contact__card {
    padding: 32px 24px;
  }
  
  .hero__name {
    font-size: 2.2rem;
  }
  
  .hero__desc {
    font-size: 1rem;
    margin-bottom: 32px;
  }
  
  .section-head h2 {
    font-size: 1.75rem;
  }
  
  .site-footer {
    padding: 0 20px;
  }
  
  .theme-toggle {
    right: 20px;
  }
}
