@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap');

:root {
  /* LIGHT MODE (DEFAULT) */
  --bg-color: #f4f4f5; /* App background outside container */
  --container-bg: #ffffff; /* Main content background */
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-tertiary: #888888;
  --border-color: rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  --card-bg: #f9f9f9;
  --hero-bg-img: url('/assets/bg.png'); /* Light mode background */
  
  --radius-lg: 40px;
  --radius-md: 20px;
  --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='dark'] {
  /* DARK MODE */
  --bg-color: #000000; 
  --container-bg: #0a0a0a; 
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(10, 10, 10, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
  --card-bg: #121212;
  --hero-bg-img: url('/assets/bg_dark.png'); /* Dark mode background */
}

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  transition-property: background-color, border-color, color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 500ms;
}

html,
body {
  background-color: var(--container-bg);
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* App Container */
.app-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  background-color: var(--container-bg);
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.7;
}

/* Utilities */
.btn-dark {
  background: var(--text-dark);
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform var(--transition);
}

.btn-dark:hover {
  transform: scale(1.05);
}

.icon-btn {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

html {
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 18, 12, 0.45) transparent;
}

body {
  overflow-x: hidden;
}

/* Custom scrollbar (WebKit browsers) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(20, 18, 12, 0.45);
  border-radius: 100px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(20, 18, 12, 0.7);
  background-clip: padding-box;
}

.home-container {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ============================================
   STICKY STACKED-PANEL SCROLL EFFECT
   Each section pins to the top of the viewport
   and stays "in place" while the next section
   scrolls up and settles on top of it, like a
   block being dropped over it.
   ============================================ */
.hero-section,
.about-section,
.journey-section,
.projects-section {
  position: sticky;
  top: 0;
}

.hero-section {
  z-index: 1;
}

.about-section {
  z-index: 2;
}

.projects-section {
  z-index: 3;
}

.hero-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg-extension {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100vh + 30vh);
  background-size: cover;
  background-position: top center;
  border-radius: 40px 40px 0 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Giant Typography in Background */
.giant-text {
  font-size: 20vw;
  font-weight: 900;
  z-index: 1;
  pointer-events: none;
  white-space: nowrap;
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  letter-spacing: -0.02em;
}

.giant-text .text-gradient {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0.8;
  display: inline-block;
}

.giant-text.glitch-active::before,
.giant-text.glitch-active::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.9);
  color: rgba(255, 255, 255, 0.9);
}

.giant-text.glitch-active::before {
  left: 3px;
  text-shadow: -3px 0 #00ffff;
  animation: glitch-anim-1 0.25s infinite linear alternate-reverse;
}

.giant-text.glitch-active::after {
  left: -3px;
  text-shadow: 3px 0 #ff00ff;
  animation: glitch-anim-2 0.25s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% { clip-path: polygon(0 20%, 100% 20%, 100% 21%, 0 21%); transform: translate(-2px, 1px); }
  20% { clip-path: polygon(0 33%, 100% 33%, 100% 33%, 0 33%); transform: translate(2px, -1px); }
  40% { clip-path: polygon(0 44%, 100% 44%, 100% 44%, 0 44%); transform: translate(-2px, 2px); }
  50% { clip-path: polygon(0 50%, 100% 50%, 100% 20%, 0 20%); transform: translate(2px, -2px); }
  60% { clip-path: polygon(0 70%, 100% 70%, 100% 70%, 0 70%); transform: translate(-2px, 1px); }
  70% { clip-path: polygon(0 80%, 100% 80%, 100% 80%, 0 80%); transform: translate(2px, -1px); }
  80% { clip-path: polygon(0 50%, 100% 50%, 100% 55%, 0 55%); transform: translate(-2px, 2px); }
  100% { clip-path: polygon(0 70%, 100% 70%, 100% 80%, 0 80%); transform: translate(2px, -2px); }
}

@keyframes glitch-anim-2 {
  0% { clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%); transform: translate(2px, -1px); }
  15% { clip-path: polygon(0 3%, 100% 3%, 100% 3%, 0 3%); transform: translate(-2px, 2px); }
  22% { clip-path: polygon(0 5%, 100% 5%, 100% 20%, 0 20%); transform: translate(2px, -2px); }
  31% { clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%); transform: translate(-2px, 1px); }
  45% { clip-path: polygon(0 40%, 100% 40%, 100% 40%, 0 40%); transform: translate(2px, -1px); }
  51% { clip-path: polygon(0 52%, 100% 52%, 100% 59%, 0 59%); transform: translate(-2px, 2px); }
  63% { clip-path: polygon(0 60%, 100% 60%, 100% 60%, 0 60%); transform: translate(2px, -2px); }
  76% { clip-path: polygon(0 75%, 100% 75%, 100% 75%, 0 75%); transform: translate(-2px, 1px); }
  81% { clip-path: polygon(0 65%, 100% 65%, 100% 40%, 0 40%); transform: translate(2px, -1px); }
  94% { clip-path: polygon(0 45%, 100% 45%, 100% 50%, 0 50%); transform: translate(-2px, 2px); }
  100% { clip-path: polygon(0 14%, 100% 14%, 100% 33%, 0 33%); transform: translate(2px, -2px); }
}

/* Floating Object */
.floating-object-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  z-index: 2;
  pointer-events: none;
}

.floating-anim-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: float 6s ease-in-out infinite;
}

.floating-object {
  object-fit: contain;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(2deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* Labels */
.label {
  position: absolute;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.1em;
  z-index: 3;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.label-left {
  top: 60%;
  left: 15%;
  transform: translateY(-50%);
  font-size: 0.9rem;
}

.label-right {
  top: 60%;
  right: 15%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.9;
}


.play-btn {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 3;
  color: var(--text-dark);
  transition: transform var(--transition);
}

.play-btn:hover {
  transform: translateX(-50%) scale(1.1);
}

/* Hero Section fixes */
.hero-section {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--container-bg);
}

/* Base Section Styling */
.about-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  margin-top: 0;
  padding: 100px 5%;
  background-color: var(--container-bg);
  color: var(--text-primary);
  border-radius: 40px 40px 0 0;
}

.journey-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 5%;
  background-color: var(--container-bg);
  color: var(--text-primary);
  border-radius: 40px 40px 0 0;
  z-index: 3;
}

.projects-bento-wrapper {
  position: relative;
  width: 100%;
}

.projects-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 5%;
  background-color: var(--container-bg);
  color: var(--text-primary);
  border-radius: 40px 40px 0 0;
  z-index: 4;
}

/* ============================================
   JOURNEY / MINIMAL TYPOGRAPHIC
   ============================================ */
.minimal-journey-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 6rem 5%;
  position: relative;
  z-index: 2;
}

.journey-header {
  margin-bottom: 5rem;
}

.journey-header h2 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin: 0;
}

.minimal-journey-list {
  display: flex;
  flex-direction: column;
}

.minimal-journey-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 4rem;
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  transition: opacity 0.4s ease;
}

/* Subtly highlight the hovered row */
.minimal-journey-list:hover .minimal-journey-row {
  opacity: 0.3;
}
.minimal-journey-list .minimal-journey-row:hover {
  opacity: 1;
}

/* Remove top border from the very first item for ultra-clean look */
.minimal-journey-row:first-child {
  border-top: none;
  padding-top: 0;
}

.journey-year-col {
  flex: 0 0 220px;
  padding-top: 0.5rem; /* Optical alignment with heading */
}

.journey-year {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.journey-info-col {
  flex: 1;
}

.journey-info-col h3 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
}

.journey-info-col p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .minimal-journey-row {
    flex-direction: column;
    gap: 1.5rem;
    padding: 3rem 0;
  }
  .journey-year-col {
    flex: 0 0 auto;
    padding-top: 0;
  }
}

/* ============================================
   LINKS / FOOTER SECTION
   ============================================ */
.links-section {
  position: relative;
  width: 100%;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #fafafa;
  /* Very subtle dotted grid background */
  background-image: radial-gradient(rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: 10;
}

/* The giant watermark text */
.links-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 22vw;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.02);
  letter-spacing: -0.05em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

/* Dark Mode Overrides for Links */
[data-theme='dark'] .links-section {
  background-color: var(--bg-color);
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
}

[data-theme='dark'] .links-watermark {
  color: rgba(255, 255, 255, 0.02);
}

/* The icons container */
.links-icons {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 4rem;
  align-items: center;
}

/* The individual icons */
.links-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  color: #a3a3a3; /* Light silver/gray */
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.links-icons a:hover {
  opacity: 1 !important; /* Override global a:hover opacity */
}

.links-icons a svg {
  width: 110px;
  height: 110px;
  fill: currentColor;
}

/* Responsive links */
@media (max-width: 768px) {
  .links-icons {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 1rem;
  }
  .links-icons a {
    width: 70px;
    height: 70px;
  }
  .links-icons a svg {
    width: 40px;
    height: 40px;
  }
}

.section-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 3rem;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

/* ============================================
   ABOUT / PREMIUM SPLIT SECTION
   ============================================ */
.premium-split-section {
  background-color: var(--container-bg);
  padding: 5rem 5%;
  position: relative;
  border-radius: 40px 40px 0 0;
  display: flex;
  align-items: center;
}

.premium-split-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Left Column */
.split-left {
  position: relative;
}

.split-title {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  margin: 0 0 1.5rem 0;
}

.split-decorative-line {
  width: 80px;
  height: 4px;
  background-color: var(--text-primary);
}

/* Right Column */
.split-right {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.split-typography h3 {
  font-size: 2.4rem;
  line-height: 1.35;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.split-typography h3 em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text-primary);
}

.split-typography p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 800px;
}

.split-stats-row {
  display: flex;
  gap: 4rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.split-stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}

/* Responsive Split Layout */
@media (max-width: 1024px) {
  .premium-split-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .split-title {
    font-size: 4rem;
  }
}

@media (max-width: 768px) {
  .split-typography h3 {
    font-size: 1.8rem;
  }
  .split-stats-row {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* ============================================
   FEATURED WORK / BENTO GRID
   ============================================ */
.projects-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 320px;
  gap: 1.5rem;
  padding-top: 2rem;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
}

.bento-card {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background-color: var(--text-primary);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.bento-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.bento-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
  z-index: 2;
  transition: opacity 0.4s ease;
}

.bento-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.bento-card:hover::before {
  transform: scale(1.05);
}

.bento-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 2.5rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bento-content h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.bento-content p {
  color: #ccc;
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0;
  max-width: 90%;
}

/* Bento Grid Placements */
.bento-1 { grid-column: span 2; grid-row: span 2; }
.bento-2 { grid-column: span 2; grid-row: span 1; }
.bento-3 { grid-column: span 1; grid-row: span 1; }
.bento-4 { grid-column: span 1; grid-row: span 1; }
.bento-wide { grid-column: span 4; grid-row: span 1; }
.commission-card { grid-column: span 2; grid-row: span 1; }

/* Custom sizes for huge hero card */
.bento-1 .bento-content h3 { font-size: 2.8rem; }
.bento-1 .bento-content p { font-size: 1.2rem; }

/* Responsive Bento */
@media (max-width: 1024px) {
  .projects-bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-1, .bento-2, .bento-wide, .commission-card { grid-column: span 2; }
  .bento-3, .bento-4 { grid-column: span 1; }
}

@media (max-width: 768px) {
  .projects-bento {
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
  }
  .bento-1 { grid-row: span 1; }
  .bento-card { grid-column: span 1 !important; }
  .bento-content { padding: 1.5rem; }
  .bento-1 .bento-content h3 { font-size: 1.8rem; }
}

.project-tags {
  display: flex;
  gap: 0.8rem;
}

.project-tags span {
  background: #f1f3f5;
  color: #333;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ============================================
   PREMIUM 3D BLUR REVEAL ANIMATION
   ============================================ */
.reveal-block {
  opacity: 0;
  will-change: transform, opacity, filter;
}

.reveal-block.in-view {
  animation: premiumReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--delay, 0) * 0.15s);
}

@keyframes premiumReveal {
  0% {
    opacity: 0;
    transform: translateY(80px) scale(0.95) rotateX(10deg);
    filter: blur(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0);
  }
}

@media (max-width: 768px) {
  .giant-text {
    font-size: 25vw;
  }

  .label {
    display: none;
  }

  .floating-object-container {
    width: 90%;
    height: 90%;
  }

  .explore-btn {
    top: auto;
    bottom: 15%;
    right: 50%;
    transform: translateX(50%);
  }

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

  .about-section,
  .projects-section {
    border-radius: 24px 24px 0 0;
  }
}

/* ============================================
   JOURNEY / TIMELINE SECTION
   ============================================ */
.journey-section {
  background-color: var(--background);
  padding: 5rem 5%;
  position: relative;
}

.journey-header {
  margin-bottom: 4rem;
}

.interactive-timeline {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-row {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.timeline-row:hover {
  background-color: #fafafa;
  padding-left: 2rem;
  padding-right: 2rem;
  border-radius: 12px;
  border-top-color: transparent;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.timeline-row:hover + .timeline-row {
  border-top-color: transparent;
}

.t-year {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  padding-top: 0.5rem;
}

.t-title h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.02em;
}

.t-desc p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #666;
  margin: 0;
}

/* Responsive Timeline */
@media (max-width: 992px) {
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2.5rem 0;
  }
  .timeline-row:hover {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .t-year {
    padding-top: 0;
    margin-bottom: 0.5rem;
  }
} /* Close the @media query */

.projects-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-bottom: 4rem;
}

/* Tab Switcher */
.tab-switcher {
  display: flex;
  justify-content: center;
  width: 100%;
}

.tab-pill-bg {
  position: relative;
  display: flex;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 100px;
  padding: 0.3rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  width: fit-content;
}

.tab-indicator {
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  width: calc(50% - 0.3rem);
  background: var(--text-primary);
  border-radius: 100px;
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  pointer-events: none;
}

.tab-indicator.left {
  transform: translateX(0);
}

.tab-indicator.right {
  transform: translateX(100%);
}

.tab-btn {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.6rem 2rem;
  cursor: pointer;
  transition: color 0.4s ease;
  width: 50%;
  text-align: center;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--container-bg);
}
.navbar {
  width: 100%;
  background: var(--container-bg);
  padding: 1.2rem 3rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.nav-link {
  position: relative;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  padding: 0.5rem 1.2rem;
  /* padding for the pill shape */
  border-radius: 25px;
  transition: color 0.3s ease;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* The pill background */
.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--text-primary);
  border-radius: 25px;
  z-index: -1;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-link:hover {
  color: var(--container-bg) !important;
  /* Invert text color to background color */
  opacity: 1 !important;
  /* Override global 0.7 opacity */
}

.nav-link:hover::before {
  opacity: 1;
  transform: scale(1);
}

.nav-icons {
  display: flex;
  gap: 1.5rem;
}

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

/* Logika Utama FBF - Navbar Logo */
@keyframes fbf-play {
    0% { opacity: 1; }
    25% { opacity: 0; }
    100% { opacity: 0; }
}

.fbf-frame {
    position: absolute; inset: 0; opacity: 0; 
    animation: fbf-play 0.4s infinite step-end;
    width: 100%; height: 100%;
    will-change: opacity, transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.theme-fbf-container {
    position: relative;
    width: 20px;
    height: 20px;
    display: inline-block;
}

/* Delay agar bergantian */
.fbf-1 { animation-delay: 0s; }
.fbf-2 { animation-delay: -0.3s; }
.fbf-3 { animation-delay: -0.2s; }
.fbf-4 { animation-delay: -0.1s; }

.interactive-wrapper {
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; position: relative;
    text-decoration: none;
    margin-left: 2rem;
}

.star-container {
    position: relative; width: 40px; height: 40px;
    z-index: 2; transition: transform 0.3s ease;
}

.star-idle-group, .star-hover-group { position: absolute; inset: 0; transition: opacity 0.1s ease; }
.star-idle-group { opacity: 1; }
.star-hover-group { opacity: 0; }

.interactive-wrapper:hover .star-idle-group { opacity: 0; }
.interactive-wrapper:hover .star-hover-group { opacity: 1; }
.interactive-wrapper:hover .star-container { transform: scale(1.1); }

/* Posisi Teks */
.text-fbf-container {
    position: absolute; top: 50%; left: 50%; opacity: 0;
    transform: translate(-50%, -50%) scale(0.8); 
    z-index: 10; transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none; 
}
.interactive-wrapper:hover .text-fbf-container {
    opacity: 1; transform: translate(-50%, -50%) scale(1); 
}

.text-placeholder { visibility: hidden; font-size: 1.2rem; font-weight: 800; padding: 0.5rem; }

.text-fbf-container .fbf-frame {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; font-weight: 900; white-space: nowrap;
    /* Efek Outline (Cut-out) that adapts to the theme */
    text-shadow: 
        -3px -3px 0 var(--container-bg),  3px -3px 0 var(--container-bg),
        -3px  3px 0 var(--container-bg),  3px  3px 0 var(--container-bg),
         0px  5px 15px rgba(0,0,0,0.8);
}

/* Variasi Jitter pada Teks */
.t-style-1 { color: #4338ca; transform: rotate(-1.5deg) scale(0.98); letter-spacing: 1px; }
.t-style-2 { color: #e11d48; transform: rotate(1.5deg) translate(2px, -1px); }
.t-style-3 { color: #f59e0b; transform: rotate(-0.5deg) translate(-1px, 2px) scale(1.02); letter-spacing: 1.5px; }
.t-style-4 { color: #4338ca; transform: rotate(1deg) translate(1px, 0); font-style: italic; letter-spacing: 0.5px; }

/* PRELOADER STYLES */
        .preloader-container {
          position: fixed;
          top: 0; left: 0; width: 100%; height: 100%;
          z-index: 99999;
          pointer-events: none;
          color: #fff;
          font-family: 'Inter', sans-serif;
          display: flex;
          align-items: center;
          justify-content: center;
        }

        /* The Blast Doors */
        .door {
          position: absolute;
          left: 0;
          width: 100%;
          height: 50vh;
          background-color: #030303;
          transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
          z-index: 1;
        }
        .door-top {
          top: 0;
          border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }
        .door-bottom {
          bottom: 0;
          border-top: 1px solid rgba(255, 255, 255, 0.05);
        }
        .door-top.open { transform: translateY(-100%); }
        .door-bottom.open { transform: translateY(100%); }

        /* Text & Content Z-index */
        .content-layer {
          position: absolute;
          z-index: 2;
          display: flex;
          flex-direction: column;
          align-items: center;
        }

        /* Tearing Text */
        .split-text {
          position: relative;
          font-size: 8vw;
          font-weight: 900;
          letter-spacing: 0.2em;
          text-transform: uppercase;
          color: transparent; /* Hide real text */
          text-align: center;
          white-space: nowrap;
          display: inline-block;
        }
        .split-text::before,
        .split-text::after {
          content: attr(data-text);
          position: absolute;
          left: 0;
          top: 0;
          width: 100%;
          height: 100%;
          text-align: center;
          color: #fff;
          /* Sync exact transition with doors */
          transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
        }
        /* Top Half */
        .split-text::before {
          clip-path: polygon(0 0, 100% 0, 100% 50.5%, 0 50.5%);
        }
        /* Bottom Half */
        .split-text::after {
          clip-path: polygon(0 49.5%, 100% 49.5%, 100% 100%, 0 100%);
        }

        /* The Open Animation - moves exact viewport distance */
        .split-active .split-text::before {
          transform: translateY(-50vh);
        }
        .split-active .split-text::after {
          transform: translateY(50vh);
        }

        /* Loading Progress */
        .loading-status {
          position: absolute;
          top: 100%;
          margin-top: 2rem;
          display: flex;
          flex-direction: column;
          align-items: center;
          transition: opacity 0.3s ease;
        }
        .loading-status.hide {
          opacity: 0;
        }
        
        .progress-bar-wrapper {
          width: 250px;
          height: 2px;
          background-color: rgba(255, 255, 255, 0.1);
          position: relative;
          margin-bottom: 1rem;
        }
        .progress-bar-fill {
          position: absolute;
          top: 0; left: 0; height: 100%;
          background-color: #fff;
          box-shadow: 0 0 10px rgba(255,255,255,0.8);
          transition: width 0.1s ease-out;
        }
        .progress-percentage {
          font-size: 0.8rem;
          font-weight: 600;
          letter-spacing: 0.2em;
          color: #888;
        }

        @media (max-width: 768px) {
          .split-text { font-size: 3rem; }
        }
      

/* CONTACT FORM STYLES */
.contact-form-container {
  padding: 3rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  color: #fff;
  font-family: inherit;
  transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.submit-btn {
  width: 100%;
  margin-top: 1rem;
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.status-msg {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.status-msg.success {
  color: var(--accent);
}

.status-msg.error {
  color: #ef4444;
}

/* PROJECT CARD STYLES */
.project-card {
  display: block;
  padding: 2rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-card:hover::before {
  opacity: 1;
}

.card-content {
  position: relative;
  z-index: 1;
}

.card-content h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.tech-stack {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.tech-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: var(--accent);
}








/* =========================================
   SCROLL TRANSITION (ELEVATOR SHAFT)
   ========================================= */
.elevator-shaft {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 6px;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    /* Dotted line pattern (Boxy) */
    background: repeating-linear-gradient(
      to bottom,
      var(--text-primary) 0,
      var(--text-primary) 10px,
      transparent 10px,
      transparent 20px
    );
    background-size: 100% 40px;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 5px var(--text-primary));
}

/* Base positions */
.elevator-shaft.left { left: 10px; transform: translateX(-20px); border-left: 1px solid rgba(255,255,255,0.1); padding-left: 2px; }
.elevator-shaft.right { right: 10px; transform: translateX(20px); border-right: 1px solid rgba(255,255,255,0.1); padding-right: 2px; }

/* Active states (sliding in) */
body.is-navigating-down .elevator-shaft.left, 
body.is-navigating-up .elevator-shaft.left { 
    opacity: 0.4; 
    transform: translateX(0); 
}
body.is-navigating-down .elevator-shaft.right, 
body.is-navigating-up .elevator-shaft.right { 
    opacity: 0.4; 
    transform: translateX(0); 
}

/* Moving animations */
body.is-navigating-down .elevator-shaft {
    animation: shaft-move-down 0.15s linear infinite;
}
body.is-navigating-up .elevator-shaft {
    animation: shaft-move-up 0.15s linear infinite;
}

@keyframes shaft-move-down {
    0% { background-position: 0 0; }
    100% { background-position: 0 40px; }
}
@keyframes shaft-move-up {
    0% { background-position: 0 0; }
    100% { background-position: 0 -40px; }
}
