:root {
  --text-muted: rgba(255, 255, 255, 0.6);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 0;
  background-color: #0a0a0a;
  color: #fff;
  overflow-x: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* ── Background Video (home only) ── */
.bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}


/* ── Navigation Bar ── */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 900px;
  padding: 14px 28px;
  border-radius: 60px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 40%,
    rgba(255, 255, 255, 0.06) 60%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(18px) saturate(140%) brightness(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(140%) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.04) 35%,
      rgba(255, 255, 255, 0.01) 55%,
      rgba(255, 255, 255, 0.10) 100%
    );
  animation: waterSheen 6s ease-in-out infinite alternate;
}

@keyframes waterSheen {
  0%   { opacity: 0.8; }
  50%  { opacity: 1; }
  100% { opacity: 0.85; }
}

.navbar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    repeating-conic-gradient(
      rgba(255, 255, 255, 0.04) 0% 25%,
      transparent 0% 50%
    );
  background-size: 4px 4px;
  mix-blend-mode: overlay;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  position: relative;
}

.navlink {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 50px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.33, 0, 0, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.navlink svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #fff;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.33, 0, 0, 1),
              filter 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.navlink:hover {
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-3px) scale(1.06);
  filter: brightness(1.3);
}

.navlink:hover svg {
  transform: scale(1.1) rotate(-3deg);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
}

.navlink:active {
  transform: translateY(-1px) scale(0.98);
  transition-duration: 0.15s;
}

.navlink.active {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

/* ── Liquid Nav Indicator ── */
.nav-liquid-indicator {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 50px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.4), transparent 42%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.2));
  background-size: 200% 200%, 200% 200%, 200% 200%;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.1),
    0 4px 20px rgba(0, 0, 0, 0.15);
  transition:
    left 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  animation: liquidSheen 6s ease-in-out infinite;
  will-change: left, top, width, height;
}

@keyframes liquidSheen {
  0%, 100% { background-position: 0% 0%, 0% 0%, 0% 0%; }
  50%      { background-position: 100% 100%, 100% 100%, 100% 100%; }
}

@media (max-width: 768px), (hover: none) {
  .nav-liquid-indicator {
    display: none;
  }
}

/* ── Burger ── */
.burger {
  display: none;
  position: fixed;
  top: 26px;
  right: 26px;
  z-index: 1001;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 22px;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.burger:active {
  transform: scale(0.88);
}

.burger div {
  width: 100%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
  transform-origin: center;
}

.burger.open .line1 {
  transform: translateY(7.5px) rotate(45deg);
  background: rgba(255, 255, 255, 0.9);
}

.burger.open .line2 {
  opacity: 0;
  transform: scaleX(0.4);
}

.burger.open .line3 {
  transform: translateY(-7.5px) rotate(-45deg);
  background: rgba(255, 255, 255, 0.9);
}

/* ── Section Title / Shared Typography ── */
.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientFlow 4s ease-in-out infinite;
}

@keyframes gradientFlow {
  0%   { background-position: 0% 0%; }
  25%  { background-position: 100% 0%; }
  50%  { background-position: 100% 100%; }
  75%  { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}

/* ── Hero Introduction (home only) ── */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 80px 24px 24px;
  text-align: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero-greeting {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.hero-name {
  margin: 14px 0 0;
  font-size: clamp(2.6rem, 9vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  word-break: break-word;
  background: linear-gradient(
    100deg,
    #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%, #f8fafc 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  margin: 18px 0 0;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
  min-height: 1.5em;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tagline-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
}

.hero-divider {
  width: 64px;
  height: 2px;
  margin: 40px 0;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.hero-desc {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  max-width: 500px;
}

/* Rotating Words */
.rotating-word {
  display: inline-block;
  vertical-align: bottom;
  height: 1.3em;
  line-height: 1.3em;
  position: relative;
  min-width: 14ch;
  text-align: left;
}

.rotating-word .rw {
  display: block;
  white-space: nowrap;
  height: 1.3em;
  line-height: 1.3em;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transform: translateY(80%);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientFlow 4s ease-in-out infinite;
}

.rotating-word .rw.active {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer ── */
.footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer .credit {
  margin-top: 6px;
}

/* ── Home Summary Sections ── */
.home-section {
  padding: 80px 24px 100px;
  background: transparent;
  position: relative;
  z-index: 1;
}

.home-section .section-container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.home-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 40%,
    rgba(255, 255, 255, 0.06) 60%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(18px) saturate(140%) brightness(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(140%) brightness(1.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.08);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease;
  opacity: 0;
  transform: translateY(30px);
}

.home-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.home-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 0 rgba(255, 255, 255, 0.08);
}

.home-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.home-card:hover .home-card-icon {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.08);
}

.home-card h3 {
  color: #f8fafc;
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 600;
}

.home-card p {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 20px;
  font-size: 0.92rem;
  line-height: 1.7;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease, gap 0.3s ease;
}

.home-link:hover {
  color: #f8fafc;
  gap: 10px;
}

@media (max-width: 768px) {
  .home-section .section-container {
    grid-template-columns: 1fr;
  }

  .home-section {
    padding: 60px 16px 80px;
  }

  .home-card {
    padding: 24px 20px;
  }
}

/* ── Social Orbit ── */
.social-orbit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 60px auto;
  z-index: 1;
}

.orbit-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
  padding: 0;
  outline: none;
  animation: orbitPulse 3s ease-in-out infinite;
}

@keyframes orbitPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.3); }
  50% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.08), 0 0 60px rgba(255, 255, 255, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.3); }
}

.orbit-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.orbit-toggle:active {
  transform: scale(0.92);
}

.orbit-toggle .orbit-icon-open {
  display: none;
}

.orbit-toggle.open .orbit-icon-closed {
  display: none;
}

.orbit-toggle.open .orbit-icon-open {
  display: block;
}

.orbit-toggle.open {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.orbit-item {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.3);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.5s ease,
              background 0.3s ease,
              box-shadow 0.3s ease;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  will-change: transform, opacity;
}

.orbit-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
  color: var(--color);
}

.orbit-item svg {
  width: 20px;
  height: 20px;
}

.social-orbit.open .orbit-item {
  pointer-events: auto;
  opacity: 1;
}


@media (max-width: 480px) {
  .social-orbit {
    margin: 30px auto;
  }

  .orbit-toggle {
    width: 52px;
    height: 52px;
  }

  .orbit-item {
    width: 42px;
    height: 42px;
  }

  .orbit-item svg {
    width: 18px;
    height: 18px;
  }
}

/* ── Disable hover effects on touch devices ── */
@media (hover: none) {
  .navlink:hover,
  .skill-card-dark:hover,
  .lang-bar:hover,
  .project-card-white:hover,
  .contact-side-card:hover,
  .contact-form-box .submit-btn:hover,
  .home-card:hover,
  .home-link:hover,
  .orbit-toggle:hover,
  .orbit-item:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* ── Scroll Reveal ── */
.section-title,
.skill-card-dark,
.lang-bar,
.project-card-white,
.contact-form-box,
.contact-side-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-title.revealed,
.skill-card-dark.revealed,
.lang-bar.revealed,
.project-card-white.revealed,
.contact-form-box.revealed,
.contact-side-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
    width: 100%;
    max-width: 100%;
    pointer-events: none;
  }

  .navbar::before,
  .navbar::after {
    display: none;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(40px) saturate(120%);
    -webkit-backdrop-filter: blur(40px) saturate(120%);
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .navlink {
    width: 280px;
    max-width: 85vw;
    justify-content: center;
    text-align: center;
    padding: 18px 28px;
    font-size: 17px;
    border-radius: 50px;
    white-space: normal;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
  }

  .navlink:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .navlink svg {
    display: none;
  }

  .burger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .section-title {
    margin-bottom: 32px;
  }

  .hero {
    padding: 60px 16px 20px;
  }

  .hero-greeting {
    font-size: 1.15rem;
    letter-spacing: 0.2em;
  }

  .hero-tagline {
    font-size: clamp(1.2rem, 5vw, 1.4rem);
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-divider {
    margin: 28px 0;
  }

  .footer {
    padding: 24px 16px;
  }

  .footer p {
    font-size: 0.75rem;
  }
}
