/* 3D Portfolio - Custom styles (Tailwind handles most) */

:root {
  --accent: #5eead4;
  --accent-2: #7c9cff;
}

body {
  font-feature-settings: "ss01", "ss02";
}

html {
  scroll-behavior: smooth;
}

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

/* Looping video background (plays continuously in loop) */
#bg-video {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: videoFadeIn 1.5s ease-out forwards;
}

@keyframes videoFadeIn {
  from {
    opacity: 0;
    transform: scale(1.02);
  }
  to {
    opacity: 0.78;
    transform: scale(1);
  }
}

/* Video background is the only layer now - styles via Tailwind in HTML */

/* Hero content as minimal card - very small opaque area */
.glass-hero {
  background: rgba(5, 7, 12, 0.06);
  border: none;
  border-radius: 1.5rem;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
}

@media (min-width: 768px) {
  .glass-hero {
    padding: 2.5rem 2rem;
  }
}

/* Strong contrast for hero text now that glass is disabled */
#hero h1,
#hero p,
#hero .hero__bio {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95),
               0 10px 30px rgba(0, 0, 0, 0.8);
  color: #fff;
}

/* ===== SECTION CARDS - compact width, increased opacity */
.section-card {
  max-width: 60rem; /* slightly wider for better readability and more breathing room */
  margin-left: auto;
  margin-right: auto;
  background-color: rgba(5, 7, 12, 0.7) !important;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1.5rem;
  padding: 1rem;
  backdrop-filter: blur(32px);
}


/* Improve readability on video background */
.section-card p,
.section-card h3,
.section-card li {
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.experience-card,
.skill-group,
.timeline__item,
.detail {
  background-color: rgba(5, 7, 12, 0.12) !important;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 1rem;
  backdrop-filter: blur(8px);
}

/* Hero has no bg tint so background sequence is fully visible */
#hero {
  background-color: transparent !important;
}

/* Project cards - visible as distinct cards, glass effect, compact size */
.work-card {
  background-color: rgba(5, 7, 12, 0.25) !important;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  padding: 0.75rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  min-height: 220px;
  max-width: 320px; /* to keep compact, not expand horizontally */
}

/* Additional class for project cards: higher opacity + visible border */
.project-card {
  background-color: rgba(5, 7, 12, 0.35) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 8px 25px -5px rgb(0 0 0 / 0.2);
}

/* Ensure hover works well with the new class */
.project-card:hover {
  background-color: rgba(5, 7, 12, 0.45) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

/* ===== ANIMATIONS ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: none;
}

/* Hero entrance */
#hero .hero__content,
#hero .hero__metrics {
  animation: fadeInUp 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

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

/* Site opening animation - subtle fade + lift */
#hero > div,
section {
  animation: siteOpen 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
  animation-fill-mode: both;
}

@keyframes siteOpen {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Gentle stagger for sections */
#hero > div { animation-delay: 0.05s; }
section:nth-of-type(1) { animation-delay: 0.1s; }
section:nth-of-type(2) { animation-delay: 0.2s; }
section:nth-of-type(3) { animation-delay: 0.3s; }
section:nth-of-type(4) { animation-delay: 0.4s; }
section:nth-of-type(5) { animation-delay: 0.5s; }
section:nth-of-type(6) { animation-delay: 0.6s; }

/* Card hover animation */
.work-card {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1),
              border-color 0.3s;
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.4);
  border-color: rgba(94, 234, 212, 0.3);
}

/* Nav link animation */
.nav__links a {
  position: relative;
  transition: color 0.2s ease;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #5eead4;
  transition: width 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav__links a:hover::after,
.nav__links a.is-active::after {
  width: 100%;
}

/* Language toggle */
.lang-btn {
  transition: all 0.15s ease;
}

/* Button animations */
.button {
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.button:hover {
  transform: translateY(-1px);
}

/* Scroll cue */
.scroll-cue {
  animation: scrollCue 2s infinite;
}

@keyframes scrollCue {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}

/* Nav */
.lang-btn {
  transition: all 0.1s cubic-bezier(0.23, 1, 0.32, 1);
}

.lang-btn.active {
  background-color: rgba(255,255,255,0.1);
  color: white;
}

/* Hero */
#hero {
  min-height: 100dvh;
}

/* Section typography polish */
h1, h2, h3 {
  font-feature-settings: "tnum";
}

/* Glass / semi-transparent cards */
.skill-pill {
  @apply px-3 py-1 rounded-full bg-[#05070c]/70 text-sm text-white/90;
}

/* Project cards hover lift */
a.group,
.project-card {
  transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), 
              box-shadow 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

a.group:hover,
.project-card:hover {
  transform: translateY(-2px);
}

/* Mobile menu links */
.mobile-link {
  min-height: 44px;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hero-social-links a,
.repository-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

.mobile-link:last-of-type {
  border-bottom: none;
}

/* Scroll cue animation */
#hero a[href="#about"]:hover span + div {
  animation: scroll-bob 1.2s infinite;
}

@keyframes scroll-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Make sure 3D stays visible through content */
section {
  position: relative;
  z-index: 1;
}

/* Subtle text selection color */
::selection {
  background: rgba(94, 234, 212, 0.25);
}

/* Responsive hero title scaling */
@media (max-width: 640px) {
  h1 {
    font-size: 56px;
    letter-spacing: -2.5px;
  }
}

/* ===== FOOTER / LAST "LET'S CONNECT" CARD as page bottom ===== */
.footer-card {
  max-width: none;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  background-color: rgba(5, 7, 12, 0.98) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-left: none;
  border-right: none;
  border-bottom: none;
  border-radius: 0;
  padding: 2rem 1.5rem 3.5rem;
  backdrop-filter: blur(32px);
}

/* Constrain title and text nicely even when full-width */
.footer-card h2 {
  text-align: center;
}

.footer-card p {
  text-align: center;
}

/* Extra breathing at the very bottom of the page + cover the background video completely */
#contact {
  background-color: rgba(5, 7, 12, 0.97);
  padding-bottom: 5rem;
}

@media (min-width: 768px) {
  .footer-card {
    padding: 2.5rem 2rem 4rem;
  }
}
