/* ========================================
   CSS Variables & Theme
   ======================================== */
:root {
  --bg-primary: #FFFFFF;  
  --bg-secondary: #F9F9F9;  
  --bg-card: #FFFFFF;  
  --bg-card-hover: #F5F5F5;  

  --text-primary: #3D322A;
  --text-secondary: #6B5D4D;
  --text-muted: #9A8B7A;

  --accent-primary: #8B7355;
  --accent-secondary: #D4A574;
  --accent-light: #E8D5C4;
  --accent-glow: rgba(212, 165, 116, 0.3);

  --border-color: #E8DDD2;
  --border-light: #F0E8DF;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(61, 50, 42, 0.06);
  --shadow-md: 0 4px 20px rgba(61, 50, 42, 0.08);
  --shadow-lg: 0 8px 40px rgba(61, 50, 42, 0.12);
  --shadow-glow: 0 0 60px rgba(212, 165, 116, 0.2);

  /* Typography */
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-script: 'Lovers Quarrel';

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Layout */
  --navbar-height: 72px;
  --container-max: 1200px;
}

:root:not(.dark) body {
  background-color: #FFFFFF !important;
  background: #FFFFFF !important;
  position: relative;
}

/* Background gradient removed */

:root:not(.dark) .about,
:root:not(.dark) .work,
:root:not(.dark) .contact {
  background-color: #FFFFFF !important;
  background: #FFFFFF !important;
}

.about-card,
.work-card,
.contact-form,
.contact-info {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-clip: padding-box;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform, box-shadow, border-color;
}

/* Gradient overlay on hover */
.about-card::before,
.work-card::before,
.contact-form::before,
.contact-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.about-card:hover:not(.tilt-card),
.contact-form:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.about-card:hover::before,
.work-card:hover::before,
.contact-form:hover::before,
.contact-info:hover::before {
  opacity: 1;
}

.card {
  transform: translateY(0) scale(1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
}

/* ================= COMPONENT: 3D TILT ================= */
.tilt-element, .tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: box-shadow 0.3s ease;
  position: relative;
  z-index: 1;
  will-change: transform;
}

.tilt-element:hover, .tilt-card:hover {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
              0 0 30px rgba(212, 165, 116, 0.1);
}

.card-icon, .work-tag, .btn, .card-title, .work-info h3 {
  transform: translateZ(20px); 
}

.work-card {
  will-change: transform;
}

.work-card .work-thumbnail {
  transform: translateZ(10px);
}

.work-card .work-info {
  transform: translateZ(15px);
}

/* Achievement Badge */
.achievement-badge {
  background: rgba(212, 165, 116, 0.15);
  border: 1px solid rgba(212, 165, 116, 0.3);
  color: var(--accent-primary);
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

:root { --shadow-glow: 0 0 60px rgba(212, 165, 116, 0.1);
}

/* Dark Theme - Keep original dark theme colors */
.dark {
  --bg-primary: #1A1614;
  --bg-secondary: #211D19;
  --bg-card: #2A2520;
  --bg-card-hover: #3D352C;

  --text-primary: #F5EDE4;
  --text-secondary: #C9BEB0;
  --text-muted: #8A7D6D;

  --accent-primary: #D4A574;
  --accent-secondary: #E8C49A;
  --accent-light: #3D352C;
  --accent-glow: rgba(212, 165, 116, 0.15);

  --border-color: #3A332C;
  --border-light: #2F2925;

  /* Rotator role colors (Dark) */
  --role-ai:  #D4A574;  
  --role-bc:  #8B5E3C; 
  --role-web: #C9A67D; 
  --role-ui:  #E8C49A;  

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 60px rgba(212, 165, 116, 0.1);
}

.dark body {
  background-color: #12100E;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(139, 94, 60, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 94, 60, 0.15) 0%, transparent 50%);
  background-attachment: fixed;
}

.glass-card {
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(.22,1,.36,1);
  opacity: 0;
  transform: translateY(30px);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.glass-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0; 
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border-color: #C9A67D;
}

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

.glass-card .card-title,
.glass-card .card-content {
  transition: transform 0.4s cubic-bezier(.22,1,.36,1);
  transform: scale(0.85);
}

.glass-card:hover .card-title,
.glass-card:hover .card-content {
  transform: scale(1);
}

/* Glass Card - Dark Mode Overrides */
.dark .glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.dark .glass-card::before {
  border-color: rgba(255, 255, 255, 0.2);
}

.dark .glass-card:hover {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* ========================================
   Loading Screen
   ======================================== */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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



.loader-text {
  font-family: var(--font-script);
  color: var(--accent-primary);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: none;
  margin: 0;
  line-height: 0.8;
  padding-bottom: 0.5rem; 
  
  opacity: 1;
  text-shadow: 0 18px 40px rgba(212, 165, 116, 0.18);
  animation: loaderGlow 1.8s ease-in-out infinite;
}

.loader-bar {
  width: min(160px, 40vw);
  height: 8px;
  border-radius: 999px;
  position: relative;
  margin-top: 0; 
  background: rgba(232, 221, 210, 0.75);
  overflow: hidden;
  box-shadow:
    0 12px 28px rgba(61, 50, 42, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.loader-bar::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(212, 165, 116, 0.0), rgba(212, 165, 116, 0.55), rgba(212, 165, 116, 0.0));
  transform: translateX(-70%);
  animation: loaderSweep 1.15s ease-in-out infinite;
}

.loader-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), transparent 55%);
  opacity: 0.55;
  pointer-events: none;
}


:root:not(.dark) .loader-bar {
  background: rgba(232, 213, 196, 0.55);
}

.dark .loader-bar {
  background: rgba(61, 53, 44, 0.55);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.dark .loader-bar::before {
  background: linear-gradient(90deg, rgba(212, 165, 116, 0.0), rgba(212, 165, 116, 0.45), rgba(212, 165, 116, 0.0));
}

@keyframes loaderSweep {
  0% { transform: translateX(-75%); opacity: 0.55; }
  50% { opacity: 1; }
  100% { transform: translateX(75%); opacity: 0.55; }
}

@keyframes loaderGlow {
  0%, 100% { opacity: 0.9; filter: blur(0px); transform: translateY(0); }
  50% { opacity: 1; filter: blur(0px); transform: translateY(-1px); }
}

@keyframes loading {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ========================================
   Smooth Scrolling & Performance
   ======================================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--navbar-height) + 1rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

* {
  scroll-behavior: smooth;
  scroll-margin-top: 1rem;
}

/* ========================================
   Reset & Base Styles
   ======================================== */


*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
  transition-delay: var(--reveal-delay, 0.1s);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal for children */
.reveal-1 { --reveal-delay: 0.1s; }
.reveal-2 { --reveal-delay: 0.2s; }
.reveal-3 { --reveal-delay: 0.3s; }
.reveal-4 { --reveal-delay: 0.4s; }
.reveal-5 { --reveal-delay: 0.5s; }

/* Performance optimizations */
.hero,
.about,
.work,
.contact {
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Section spacing and transitions */
section {
  position: relative;
  padding: 8rem 0;
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.3s ease;
  scroll-margin-top: calc(var(--navbar-height) + 2rem);
}

/* Light mode section backgrounds */
:root:not(.dark) section.hero,
:root:not(.dark) section.about,
:root:not(.dark) section.work,
:root:not(.dark) section.contact {
  background-color: transparent ;
  box-shadow: none;
}

/* Dark mode - make sections transparent */
.dark section.about,
.dark section.work,
.dark section.contact {
  background-color: transparent;
  box-shadow: none;
}

/* Add some breathing room between sections */
section + section {
  margin-top: 1rem;
}

/* Hero section - see .hero definition at line 913+ */

/* Parallax container for hero */
.parallax-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.parallax-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Smooth scroll target */
:target {
  scroll-margin-top: calc(var(--navbar-height) + 2rem);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  /* Layout & Reset Consolidation */
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}

.main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.content {
  flex: 1;
  width: 100%;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

/* Utility to hide elements */
.hidden {
  display: none !important;
}

/* ========================================
   Container & Layout
   ======================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  text-align: center;
  letter-spacing: -0.02em;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 75%;
  max-width: 1200px;
  height: var(--navbar-height);
  background: rgba(255, 245, 235, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  transform: translateX(-50%) scale(0.95);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

:root:not(.dark) .navbar {
  background: transparent;
  border: none;
}

.dark .navbar {
  background: transparent;
  border: none;
}

.nav-container {
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--accent-primary);
  font-weight: 400;
  letter-spacing: 2px;
}

:root:not(.dark) .nav-logo {
  text-shadow: 0 10px 24px rgba(212, 165, 116, 0.18);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 1rem;
  position: relative;
  transition: all var(--transition-base);
  border-radius: 100px;
  z-index: 1;
  overflow: hidden;
}

:root:not(.dark) .nav-link {
  border: 1px solid transparent;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent-light);
  border-radius: 100px;
  transform: scale(0.9);
  opacity: 0;
  z-index: -1;
  transition: all var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-primary);
}

.nav-link:hover::before,
.nav-link.active::before {
  transform: scale(1);
  opacity: 1;
  background: var(--accent-light);
}

:root:not(.dark) .nav-link:hover,
:root:not(.dark) .nav-link.active {
  border-color: rgba(212, 165, 116, 0.28);
  box-shadow: 0 10px 22px rgba(61, 50, 42, 0.08);
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 1001;
}

.hamburger {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition-fast);
}

.hamburger::before { top: -6px; }
.hamburger::after  { bottom: -6px; }

.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
  bottom: 0;
  transform: rotate(-45deg);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
  border: 1px solid var(--border-color);
}

.theme-toggle:hover {
  background: var(--accent-light);
  transform: scale(1.05);
}

.theme-icon {
  font-size: 1.1rem;
  transition: var(--transition-base);
}

.dark .theme-icon {
  transform: rotate(180deg);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  padding: calc(var(--navbar-height) + var(--space-xl)) var(--space-md) var(--space-xl);
  overflow: hidden;
}

.hero-inner {
  width: min(var(--container-max), 100%);
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) 0;
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  padding: 0 var(--space-md);
}


.photo-signature {
  text-align: center;
  margin-top: 1px;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

.photo-signature .signature-text {
  font-family: 'Lovers Quarrel';
  font-size: 2.5rem; 
  font-weight: 400;
  color: var(--accent-primary);
  opacity: 1; 
  letter-spacing: 2px;
  display: inline-block;
  position: relative;
}

.photo-signature .signature-text::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0.5;
}

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

.hero-photo-container {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 400px;
}

.photo-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

.photo-frame {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 24px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 20px 40px rgba(139, 115, 85, 0.15);
  transition: transform 0.3s ease;
}

.photo-frame:hover {
  transform: scale(1.02);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.5s ease;
  background: transparent;
}

.photo-frame:hover .hero-photo {
  transform: scale(1.05);
}

/* ========================================
   GSAP Cursor Spotlight (The "Flashlight" Effect)
   ======================================== */
.cursor-spotlight {
  position: fixed;
  top: 0;
  left: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle at center, 
    rgba(212, 165, 116, 0.12) 0%, 
    rgba(212, 165, 116, 0.03) 45%, 
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999; 
  opacity: 0; 
  transition: opacity 0.5s ease;
  mix-blend-mode: screen; 
}

.dark .cursor-spotlight {
  opacity: 1; 
}

@media (max-width: 1024px) {
  .cursor-spotlight { display: none; }
}

/* ========================================
   Liquid Theme Transition Layer
   ======================================== */
#theme-transition-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999; 
  transform: translate(-50%, -50%); 
  display: block;
}

.decorative-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.deco-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.6;
  animation: float-deco 8s ease-in-out infinite;
}

.deco-1 {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #E8D5C4, #D4A574);
  top: -20px;
  right: -10px;
  animation-delay: 0s;
}

.deco-2 {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #F5E6D3, #E8D5C4);
  bottom: 20px;
  left: -15px;
  animation-delay: 2s;
}

.deco-3 {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #FFF8F0, #F5E6D3);
  top: 50%;
  right: -25px;
  animation-delay: 4s;
}

.deco-star {
  position: absolute;
  width: 0;
  height: 0;
  border-right: 10px solid transparent;
  border-bottom: 7px solid #D4A574;
  border-left: 10px solid transparent;
  transform: rotate(35deg);
  opacity: 0.7;
  animation: twinkle 3s ease-in-out infinite;
}

.deco-star:before {
  border-bottom: 8px solid #D4A574;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  position: absolute;
  height: 0;
  width: 0;
  top: -5px;
  left: -6px;
  display: block;
  content: '';
  transform: rotate(-35deg);
}

.deco-star:after {
  position: absolute;
  display: block;
  top: 0px;
  left: -10px;
  width: 0px;
  height: 0px;
  border-right: 10px solid transparent;
  border-bottom: 7px solid #D4A574;
  border-left: 10px solid transparent;
  transform: rotate(-70deg);
  content: '';
}

.deco-star-1 {
  top: 10px;
  left: 10px;
  animation-delay: 0s;
}

.deco-star-2 {
  bottom: 30px;
  right: 20px;
  animation-delay: 1s;
}

.deco-star-3 {
  top: 60%;
  left: -5px;
  animation-delay: 2s;
}

.deco-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8B7355;
  opacity: 0.5;
  animation: pulse 4s ease-in-out infinite;
}

.deco-dot-1 {
  top: 20%;
  right: 15%;
  animation-delay: 0s;
}

.deco-dot-2 {
  bottom: 25%;
  left: 10%;
  animation-delay: 1.5s;
}

.deco-dot-3 {
  top: 70%;
  right: 5%;
  animation-delay: 3s;
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes float-deco {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: rotate(35deg) scale(0.8);
  }
  50% {
    opacity: 0.8;
    transform: rotate(35deg) scale(1.1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}



.kicker {
  letter-spacing: .2em;
  text-transform: uppercase;
  font-size: .8rem;
  color: var(--accent-primary);
}

.headline {
  margin: .35rem 0 1rem;
  line-height: 1.1;
  font-weight: 700;
  font-family: "Poppins", var(--font-body);
  font-size: clamp(38px, 5.2vw, 64px);
}

.headline .accent { 
  color: var(--accent-primary); 
}

/* Subtitle + Rotator */
.sub {
  font-size: clamp(16px, 2.1vw, 20px);
  color: var(--text-secondary);
  display: inline-flex;
  gap: .6ch;
  line-height: 1.2;
  flex-wrap: wrap;
}

#typing-text {
  display: inline-block;
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent-primary); 
  border-right: 2px solid currentColor; 
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { border-color: transparent; }
  51%, 100% { border-color: currentColor; }
}

.cta {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Responsive Hero */
@media (max-width: 900px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
    gap: var(--space-xl);
  }
  
  .hero-photo-container {
    order: -1;
    margin-bottom: var(--space-md);
  }
  
  .photo-wrapper {
    width: 280px;
    height: 280px;
  }
  
  .photo-frame {
    width: 240px;
    height: 240px;
  }
  

  
  .cta, .sub {
    justify-content: center;
  }
}



/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
}

.btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid rgba(212, 165, 116, 0.55);
  outline-offset: 3px;
}

:root:not(.dark) .btn-primary:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow:
    0 14px 34px rgba(61, 50, 42, 0.10),
    0 0 0 4px rgba(212, 165, 116, 0.14);
}

:root:not(.dark) .btn-secondary:hover {
  background: rgba(232, 213, 196, 0.22);
  box-shadow: 0 10px 24px rgba(61, 50, 42, 0.06);
}

.btn-primary {
  background: var(--accent-primary);
  color: #FFFFFF;
  border: 2px solid var(--accent-primary);
}

.btn-primary:hover {
  background: var(--text-primary);
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-primary);
  padding: 8px 0;
  font-weight: 500;
}

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

/* Dark Mode Buttons */
.dark .btn-primary,
.dark .btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  transition: all 0.3s ease;
}

.dark .btn-primary:hover,
.dark .btn-secondary:hover {
  background: var(--accent-primary);
  color: var(--bg-primary); /* Dark text for contrast */
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

/* Card & Modal Buttons (Pill Style) */
.dark .work-card .btn,
.dark .modal .btn,
.dark .note-resources .btn {
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid rgba(212, 165, 116, 0.5); 
}

.dark .work-card .btn:hover,
.dark .modal .btn:hover,
.dark .note-resources .btn:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
}

.btn-small {
  padding: 8px 18px;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

/* ========================================
   About Section
   ======================================== */
.about {
  padding: var(--space-2xl) 0;
}

.about-intro {
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  text-align: center;
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.card-icon {
  width: 28px;
  height: 28px;
  margin-bottom: var(--space-sm);
  color: #B08968;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.about-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.focus-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.focus-list li {
  position: relative;
  padding-left: var(--space-md);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.focus-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
}

.skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent-primary);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.chip:hover {
  background: var(--accent-primary);
  color: #FFFFFF;
}

.facts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.fact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-light);
}

.fact-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.fact-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ========================================
   Work Section
   ======================================== */
.work {
  padding: var(--space-2xl) 0;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: var(--transition-base);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-primary);
  color: #FFFFFF;
  border-color: var(--accent-primary);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* Work card specific sizing */
.work-card {
  padding: var(--space-md) !important;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 420px;
}


.work-card.hidden {
  display: none;
}

.work-thumbnail {
  height: 180px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.work-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.thumbnail-fallback {
  width: 100%;
  height: 100%;
}

.work-info {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--accent-light);
  color: var(--accent-primary);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  align-self: flex-start;
}

.work-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.work-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.8em;
}

.work-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  margin-top: auto;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
  padding: var(--space-2xl) 0;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-card);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input.error,
.form-group textarea.error {
  border-color: #E57373;
}

.error-message {
  display: block;
  font-size: 0.8rem;
  color: #E57373;
  margin-top: 4px;
  min-height: 20px;
}

.form-success {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  margin-top: var(--space-md);
  background: rgba(129, 199, 132, 0.1);
  border: 1px solid rgba(129, 199, 132, 0.3);
  border-radius: var(--radius-md);
  color: #66BB6A;
}

.form-success.show {
  display: flex;
}

.success-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #66BB6A;
  color: #FFFFFF;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: bold;
}

.contact-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: var(--transition-base);
}

.social-link:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* Contact Direct List - Replacing Inline Styles */
.direct-contact {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-direct-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-icon-circle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 50%;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.contact-icon-circle.whatsapp {
  color: #25D366;
}

.contact-label-text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-link-text, 
.contact-value-text {
  margin: 0;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}

/* Contact Heading Context */
.contact-context-text {
  margin-bottom: 4.0rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.contact-context-sub {
  font-family: serif;
  font-style: italic;
  font-weight: 400;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 0.5rem;
}

.contact-context-desc {
  font-family: serif;
  font-style: italic;
  font-size: 0.5em;
  font-weight: 400;
  color: var(--text-secondary);
  display: block;
  line-height: 1.6;
}

/* ========================================
   Dark Mode Form & Button Improvements
   ======================================== */

/* 1. Form Input Visibility - Dark Mode */
.dark .form-group input,
.dark .form-group textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.dark .form-group input::placeholder,
.dark .form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.dark .form-group input:focus,
.dark .form-group textarea:focus {
  border-color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2),
              0 0 20px rgba(212, 165, 116, 0.15);
  outline: none;
}

/* 2. "Kirim Pesan" Button - Dark Mode Solid Style */
.dark .contact-form .btn-primary,
.dark .btn-full.btn-primary {
  background: var(--accent-primary);
  color: #1A1614;
  border: none;
  font-weight: 600;
}

.dark .contact-form .btn-primary:hover,
.dark .btn-full.btn-primary:hover {
  background: var(--accent-secondary);
  color: #1A1614;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 165, 116, 0.35);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 0.75rem 0.8rem;   
  margin-top: 0.15rem; 
  margin-bottom: 0.75rem;      
  background: transparent;
  text-align: center;
  width: 100%;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  padding: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 22, 20, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
  z-index: 2000;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: var(--transition-base);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-radius: 50%;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--accent-light);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
  padding-right: var(--space-xl);
  color: var(--text-primary);
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.modal-tech {
  margin-bottom: var(--space-lg);
}

.modal-tech h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-list span {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent-primary);
  border-radius: var(--radius-sm);
}

.modal-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.modal-note {
  max-width: 650px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

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

@media (max-width: 768px) {
  :root { --navbar-height: 64px; }

  .nav-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle { display: flex; }

  .filter-buttons { gap: var(--space-xs); }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .contact-form { padding: var(--space-lg); }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .modal {
    padding: var(--space-lg);
    margin: var(--space-sm);
    max-height: 90vh;
  }
}

@media (max-width: 480px) {
  .section-title { font-size: 1.75rem; }

  .skills-chips { gap: 6px; }
  .chip { padding: 4px 10px; font-size: 0.75rem; }
}



/* ========================================
   Status Badge (Hero)
   ======================================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  background-clip: padding-box; 
  border-radius: 50px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  width: max-content; 
  cursor: pointer;
  text-decoration: none;
}

.status-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent-secondary);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 20px rgba(212, 165, 116, 0.15);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10B981; /* Emerald Green */
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background-color: inherit;
  border-radius: 50%;
  animation: pulse-dot 2s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.status-text {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  line-height: 1;
}

@keyframes pulse-dot {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* Dark Mode Status Badge */
.dark .status-badge {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dark .status-text {
  color: #E2E8F0; 
}

.dark .status-badge:hover {
  border-color: var(--accent-secondary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(212, 165, 116, 0.2);
}


.contact-column-right {
  opacity: 1 !important;
  transform: none !important;
}

/* 3D Terrain Background Container */
#canvas-container {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none; 
}

.dark #canvas-container {
  opacity: 1;
}

/* Micro-interaction Text */
.hover-char {
  display: inline-block;
  cursor: default;
  transition: color 0.2s;
}

@media (max-width: 480px) {
  .kicker {
    font-size: 0.6rem !important;
    letter-spacing: 0.05em !important;
    line-height: 1.4;
    white-space: nowrap; /* Force single line if possible, or handle break better */
    text-align: center;
    width: 100%;
    display: block;
  }
}
