/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Elegant Color Palette */
    --primary-bg: #ffffff;
    --secondary-bg: #fafafa;
    --text-primary: #2c3e50;
    --text-secondary: #34495e;
    --text-muted: #7f8c8d;

    /* Refined accent colors */
    --accent-primary: #2c5282;
    --accent-secondary: #3182ce;
    --accent-tertiary: #4299e1;
    --accent-gold: #d69e2e;
    --accent-light: #e2e8f0;
    --accent-dark: #1a365d;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-tertiary) 100%);
    --gradient-gold: linear-gradient(135deg, var(--accent-gold) 0%, #f6ad55 100%);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(44, 82, 130, 0.08);
    --shadow-md: 0 4px 6px rgba(44, 82, 130, 0.1);
    --shadow-lg: 0 10px 15px rgba(44, 82, 130, 0.12);
    --shadow-glow: 0 0 0 1px rgba(44, 82, 130, 0.05), 0 4px 16px rgba(44, 82, 130, 0.15);
    --shadow-gold: 0 4px 16px rgba(214, 158, 46, 0.2);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --transition-smooth: 0.3s ease-in-out;

    /* Card & component surfaces */
    --card-bg: #ffffff;
    --navbar-bg: rgba(255,255,255,0.98);
    --music-player-bg: rgba(255,255,255,0.95);
    --hscroll-btn-bg: rgba(44, 82, 130, 0.1);
    --hscroll-btn-color: var(--accent-primary);
}

/* ==========================================
   DARK / NIGHT MODE VARIABLES
   ========================================== */
[data-theme="dark"] {
    --primary-bg: #0f1117;
    --secondary-bg: #1a1d2e;
    --text-primary: #e8eaf0;
    --text-secondary: #b0b8cc;
    --text-muted: #6b7280;
    --accent-primary: #60a5fa;
    --accent-secondary: #93c5fd;
    --accent-tertiary: #bfdbfe;
    --accent-gold: #f59e0b;
    --accent-light: #1e2537;
    --accent-dark: #dbeafe;
    --card-bg: #1e2537;
    --navbar-bg: rgba(15,17,23,0.97);
    --music-player-bg: rgba(30,37,55,0.97);
    --hscroll-btn-bg: rgba(96, 165, 250, 0.15);
    --hscroll-btn-color: #60a5fa;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 0 1px rgba(96,165,250,0.1), 0 4px 16px rgba(96,165,250,0.2);
    --gradient-primary: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

/* Typography */
body {
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.section-title {
    font-family: "Playfair Display", serif;
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--accent-primary);
    position: relative;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(12px);
    z-index: 1000;
    transition: var(--transition-normal);
    border-bottom: 1px solid var(--accent-light);
    height: 70px;
}

.navbar.scrolled {
    background: var(--navbar-bg);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo .logo-text {
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding-top: 70px; /* Space for fixed navbar */
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    min-height: calc(100vh - 70px);
}

.hero-content {
    max-width: 600px;
}

.hero-visual {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-photo-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.photo-frame-3d {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    perspective: 1000px;
}

.photo-border-rotation {
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border: 3px solid transparent;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: borderRotate3D 6s linear infinite;
}

@keyframes borderRotate3D {
    0% {
        transform: rotate(0deg) rotateY(0deg);
    }
    50% {
        transform: rotate(180deg) rotateY(10deg);
    }
    100% {
        transform: rotate(360deg) rotateY(0deg);
    }
}

.photo-glow-circular {
    position: absolute;
    top: -25px;
    left: -25px;
    right: -25px;
    bottom: -25px;
    background: radial-gradient(circle at center, rgba(44, 82, 130, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(25px);
    opacity: 0.7;
    animation: glowPulse3D 4s ease-in-out infinite alternate;
}

@keyframes glowPulse3D {
    0% {
        opacity: 0.5;
        transform: scale(0.9) rotateZ(0deg);
    }
    100% {
        opacity: 0.9;
        transform: scale(1.1) rotateZ(5deg);
    }
}

.photo-wrapper-circular {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: var(--transition-smooth);
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(44, 82, 130, 0.3);
}

.photo-wrapper-circular:hover {
    transform: rotateY(15deg) rotateX(10deg) scale(1.05);
    box-shadow: 0 30px 60px rgba(44, 82, 130, 0.4);
}

.hero-photo-circular {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
    filter: brightness(1.1) contrast(1.1);
}

.photo-wrapper-circular:hover .hero-photo-circular {
    filter: brightness(1.2) contrast(1.2) saturate(1.2);
    transform: scale(1.1);
}

.photo-overlay-circular {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    padding: var(--spacing-lg);
    transform: translateY(100%);
    transition: var(--transition-smooth);
    border-radius: 0 0 50% 50%;
}

.photo-wrapper-circular:hover .photo-overlay-circular {
    transform: translateY(0);
}

.overlay-content-circular {
    text-align: center;
}

.overlay-content-circular .overlay-text {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.overlay-content-circular .overlay-subtext {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
}

.photo-particles-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 50%;
    overflow: hidden;
}

.particle-3d {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: float3D 8s ease-in-out infinite;
}

.particle-3d:nth-child(1) {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.particle-3d:nth-child(2) {
    top: 60%;
    right: 20%;
    animation-delay: 1s;
}

.particle-3d:nth-child(3) {
    bottom: 30%;
    left: 25%;
    animation-delay: 2s;
}

.particle-3d:nth-child(4) {
    top: 40%;
    right: 15%;
    animation-delay: 3s;
}

.particle-3d:nth-child(5) {
    bottom: 20%;
    right: 30%;
    animation-delay: 4s;
}

.particle-3d:nth-child(6) {
    top: 70%;
    left: 40%;
    animation-delay: 5s;
}

@keyframes float3D {
    0%,
    100% {
        transform: translateY(0) rotateZ(0deg) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-20px) rotateZ(90deg) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-10px) rotateZ(180deg) scale(0.8);
        opacity: 1;
    }
    75% {
        transform: translateY(-30px) rotateZ(270deg) scale(1.1);
        opacity: 0.7;
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.name-text {
    font-family: "Playfair Display", serif;
    color: var(--accent-primary);
    position: relative;
}

.name-text::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-gold);
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-secondary);
    margin-bottom: var(--spacing-lg);
    min-height: 60px;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: var(--transition-normal);
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.025em;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-normal);
    border: 1px solid transparent;
}

.social-link:hover {
    background: var(--accent-primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-secondary);
}

/* Hero Background Animation */
.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 25% 25%, rgba(44, 82, 130, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, rgba(214, 158, 46, 0.02) 0%, transparent 50%);
    opacity: 0.6;
}

/* About Section */
.about {
    padding: var(--spacing-xxl) 0;
    background: var(--secondary-bg);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-image {
    text-align: center;
}

.profile-photo {
    width: 280px;
    height: 280px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 0 auto;
    border: 3px solid var(--accent-light);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.about-subtitle {
    font-family: "Playfair Display", serif;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
    font-weight: 600;
}

.about-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.skills-preview {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-lg);
}

.skill-tag {
    background: var(--accent-light);
    color: var(--accent-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(44, 82, 130, 0.1);
}

/* Experience Section */
.experience {
    padding: var(--spacing-xxl) 0;
    position: relative;
    overflow: hidden;
}

.experience-visual-container {
    position: relative;
    z-index: 2;
}

.experience-3d-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(44, 82, 130, 0.1), transparent);
    animation: floatOrb 6s ease-in-out infinite;
}

.orb-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    left: 5%;
    animation-delay: 2s;
}

.orb-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes floatOrb {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.experience-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.experience-timeline::before {
    content: "";
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(44, 82, 130, 0.3);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-xl);
    padding-left: 80px;
}

.timeline-marker-3d {
    position: absolute;
    left: 15px;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    transform-style: preserve-3d;
    animation: markerPulse 3s ease-in-out infinite;
}

.marker-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(44, 82, 130, 0.4), transparent);
    animation: glowPulse 2s ease-in-out infinite;
}

.marker-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 0 0 rgba(44, 82, 130, 0.7);
    animation: pulseRing 2s infinite;
}

@keyframes markerPulse {
    0%,
    100% {
        transform: scale(1) rotateY(0deg);
    }
    50% {
        transform: scale(1.1) rotateY(180deg);
    }
}

@keyframes glowPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.2;
    }
}

@keyframes pulseRing {
    0% {
        transform: scale(0.33);
    }
    80%,
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.timeline-content-3d {
    position: relative;
    transform-style: preserve-3d;
}

.content-card-3d {
    background: var(--card-bg);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--accent-light);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.content-card-3d::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(44, 82, 130, 0.1), transparent);
    transition: left 0.6s;
}

.content-card-3d:hover::before {
    left: 100%;
}

.content-card-3d:hover {
    transform: translateY(-5px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.25);
    border-color: var(--accent-secondary);
}

.timeline-title {
    font-family: "Playfair Display", serif;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 600;
}

.timeline-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.timeline-events {
    list-style: none;
    margin: var(--spacing-md) 0;
}

.timeline-events li {
    color: var(--text-secondary);
    padding: 4px 0;
    position: relative;
    padding-left: 20px;
}

.timeline-events li::before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--accent-secondary);
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.timeline-skill-3d {
    background: linear-gradient(135deg, var(--accent-light), rgba(44, 82, 130, 0.1));
    color: var(--accent-dark);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(44, 82, 130, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-skill-3d::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.timeline-skill-3d:hover::before {
    left: 100%;
}

.timeline-skill-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 82, 130, 0.2);
}

/* Projects Section */
.projects {
    padding: var(--spacing-xxl) 0;
    background: var(--secondary-bg);
    position: relative;
    overflow: hidden;
}

.projects-3d-container {
    position: relative;
    z-index: 2;
}

.projects-background-3d {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.bg-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: particleFloat 8s linear infinite;
}

.bg-particle-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.bg-particle-2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.bg-particle-3 {
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.bg-particle-4 {
    top: 40%;
    right: 30%;
    animation-delay: 6s;
}

@keyframes particleFloat {
    0%,
    100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.2);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-10px) translateX(-15px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-30px) translateX(5px) scale(1.1);
        opacity: 0.7;
    }
}

.projects-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    position: relative;
    z-index: 3;
}

.project-card-3d {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--accent-light);
}

.project-card-inner {
    position: relative;
    height: 100%;
}

.project-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.project-card-3d:hover .project-glow {
    opacity: 0.3;
}

.project-card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.15);
}

.project-image-3d {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-image-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.image-overlay-3d {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44, 82, 130, 0.8), rgba(44, 82, 130, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.overlay-icon {
    font-size: 1.5rem;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    transform: scale(0.5);
    transition: transform 0.3s ease;
}

.project-card-3d:hover .image-overlay-3d {
    opacity: 1;
}

.project-card-3d:hover .overlay-icon {
    transform: scale(1);
}

.project-card-3d:hover .project-image-3d img {
    transform: scale(1.1);
}

.project-content-3d {
    padding: var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.project-title-3d {
    font-family: "Playfair Display", serif;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 600;
    position: relative;
}

.project-title-3d::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-secondary);
    transition: width 0.3s ease;
}

.project-card-3d:hover .project-title-3d::after {
    width: 100%;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.project-tech-3d {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.tech-tag-3d {
    background: linear-gradient(135deg, var(--accent-light), rgba(44, 82, 130, 0.1));
    color: var(--accent-dark);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(44, 82, 130, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-tag-3d::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.tech-tag-3d:hover::before {
    left: 100%;
}

.tech-tag-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 82, 130, 0.2);
}

.project-links-3d {
    display: flex;
    gap: var(--spacing-sm);
}

.project-link-3d {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-link-3d::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.project-link-3d:hover::before {
    left: 0;
}

.project-link-3d:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 82, 130, 0.3);
}

/* Certificates Section */
.certificates {
    padding: var(--spacing-xxl) 0;
    background: var(--primary-bg);
    position: relative;
    overflow: hidden;
}

.certificates-3d-container {
    position: relative;
    z-index: 2;
}

.certificates-background-3d {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.certificates-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    position: relative;
    z-index: 3;
}

.certificate-card-3d {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--accent-light);
}

.certificate-card-inner {
    position: relative;
    height: 100%;
}

.certificate-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-gold), #f6ad55);
    border-radius: var(--radius-lg);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.certificate-card-3d:hover .certificate-glow {
    opacity: 0.3;
}

.certificate-card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.15);
}

.certificate-image-3d {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.certificate-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.certificate-overlay-3d {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(214, 158, 46, 0.8), rgba(214, 158, 46, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.overlay-text {
    font-size: 1.2rem;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    transform: scale(0.5);
    transition: transform 0.3s ease;
}

.certificate-card-3d:hover .certificate-overlay-3d {
    opacity: 1;
}

.certificate-card-3d:hover .overlay-text {
    transform: scale(1);
}

.certificate-card-3d:hover .certificate-img {
    transform: scale(1.1);
}

.certificate-content-3d {
    padding: var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.certificate-title-3d {
    font-family: "Playfair Display", serif;
    color: var(--accent-primary);
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 600;
    position: relative;
}

.certificate-title-3d::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.certificate-card-3d:hover .certificate-title-3d::after {
    width: 100%;
}

.certificate-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.certificate-tech-3d {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.cert-tag-3d {
    background: linear-gradient(135deg, rgba(214, 158, 46, 0.1), rgba(214, 158, 46, 0.05));
    color: var(--accent-gold);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(214, 158, 46, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cert-tag-3d::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.cert-tag-3d:hover::before {
    left: 100%;
}

.cert-tag-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 158, 46, 0.2);
}

.certificate-links-3d {
    display: flex;
    gap: var(--spacing-sm);
}

.certificate-link-3d {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 2px solid var(--accent-gold);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.certificate-link-3d::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gold);
    transition: left 0.3s ease;
    z-index: -1;
}

.certificate-link-3d:hover::before {
    left: 0;
}

.certificate-link-3d:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(214, 158, 46, 0.3);
}

/* Contact Section */
.contact {
    padding: var(--spacing-xxl) 0;
}

.contact-3d-container {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-background-3d {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
}

.contact-orb {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0.1;
    animation: floatOrb 8s ease-in-out infinite;
}

.contact-orb-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.contact-orb-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 15%;
    animation-delay: -3s;
}

.contact-orb-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: -6s;
}

.contact-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.contact-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-secondary);
    border-radius: 50%;
    opacity: 0.6;
    animation: floatParticle 12s linear infinite;
}

.contact-particle:nth-child(1) {
    top: 20%;
    left: 30%;
    animation-delay: 0s;
}

.contact-particle:nth-child(2) {
    top: 40%;
    right: 25%;
    animation-delay: -3s;
}

.contact-particle:nth-child(3) {
    bottom: 30%;
    left: 60%;
    animation-delay: -6s;
}

.contact-particle:nth-child(4) {
    top: 70%;
    left: 80%;
    animation-delay: -9s;
}

.contact-particle:nth-child(5) {
    bottom: 50%;
    right: 40%;
    animation-delay: -12s;
}

.contact-content-centered {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.contact-info-centered {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    justify-items: center;
    align-items: center;
}

.contact-item-3d {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 280px;
    transform-style: preserve-3d;
}

.contact-item-3d::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.contact-item-3d:hover::before {
    left: 100%;
}

.contact-item-3d:hover {
    transform: translateY(-8px) rotateX(5deg);
    border-color: var(--accent-secondary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(var(--accent-secondary-rgb), 0.3);
}

.contact-icon-3d {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    transform-style: preserve-3d;
    transition: all 0.4s ease;
}

.icon-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.4s ease;
}

.contact-item-3d:hover .icon-glow {
    opacity: 0.6;
}

.icon-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.contact-item-3d:hover .icon-ripple {
    width: 120px;
    height: 120px;
    opacity: 0;
}

.contact-item-3d:hover .contact-icon-3d {
    transform: rotateY(360deg) scale(1.1);
}

.contact-details-3d h3 {
    color: var(--accent-primary);
    margin-bottom: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-link-3d {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
}

.contact-link-3d::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
}

.contact-link-3d:hover {
    color: var(--accent-secondary);
    transform: translateX(5px);
}

.contact-link-3d:hover::after {
    width: 100%;
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--accent-light);
}

.footer-content {
    text-align: center;
    color: var(--text-muted);
}

.footer-content p {
    margin-bottom: var(--spacing-xs);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navigation */
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-lg) 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: var(--spacing-sm) 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hero Section Mobile Fixes */
    .hero {
        padding-top: 70px;
        min-height: auto;
        height: auto;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        padding: var(--spacing-lg) var(--spacing-md);
        min-height: auto;
        margin-top: 0;
    }
    
    .hero-visual {
        height: auto;
        min-height: 300px;
        order: -1;
        padding: var(--spacing-md) 0;
        margin-bottom: 0;
    }
    
    .hero-photo-container {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        padding: 0;
    }
    
    .photo-frame-3d {
        width: 250px;
        height: 250px;
        padding-bottom: 0;
        margin: 0 auto;
    }
    
    .photo-border-rotation {
        top: -12px;
        left: -12px;
        right: -12px;
        bottom: -12px;
    }
    
    .photo-glow-circular {
        top: -20px;
        left: -20px;
        right: -20px;
        bottom: -20px;
        filter: blur(20px);
    }
    
    .hero-content {
        text-align: center;
        max-width: 100%;
        order: 2;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-top: var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }

    /* Section Titles */
    .section-title {
        font-size: 2rem;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .profile-photo {
        width: 240px;
        height: 240px;
    }

    /* Experience Timeline */
    .experience-timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-marker-3d {
        left: 5px;
    }

    /* Contact Section */
    .contact-info-centered {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .contact-item-3d {
        min-width: auto;
        width: 100%;
        padding: var(--spacing-lg);
    }

    .contact-icon-3d {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    /* Matikan semua efek hover 3D transform di mobile */
    .project-card-3d:hover,
    .certificate-card-3d:hover {
        transform: none;
    }

    .content-card-3d:hover {
        transform: none;
    }

    /* Matikan interaksi pada foto profil di mobile */
    .photo-wrapper-circular {
        pointer-events: none;
        cursor: default;
    }

    .profile-photo {
        pointer-events: none;
        touch-action: manipulation;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-container {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .photo-frame-3d {
        width: 200px;
        height: 200px;
    }
    
    .photo-border-rotation {
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
    
    .photo-glow-circular {
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
        filter: blur(15px);
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .profile-photo {
        width: 200px;
        height: 200px;
    }
    
    .project-content-3d,
    .certificate-content-3d {
        padding: var(--spacing-md);
    }
    
    .contact-item-3d {
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }
    
    .contact-details-3d h3 {
        font-size: 1rem;
    }
    
    .contact-link-3d {
        font-size: 1rem;
    }
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Simple Certificate Modal Styles */
.certificate-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificate-modal.active {
    display: block;
    opacity: 1;
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 1;
}

.modal-image-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: imageZoomIn 0.4s ease;
}

@keyframes imageZoomIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: white;
}

.modal-close-btn {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.image-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* Blur effect untuk background */
body.modal-open {
    overflow: hidden;
}

body.modal-open > *:not(.certificate-modal) {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-image-wrapper {
        width: 95%;
        max-height: 80vh;
    }
    
    .modal-close-btn {
        top: -50px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .image-controls {
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .modal-image-wrapper {
        width: 98%;
        max-height: 70vh;
    }
    
    .modal-close-btn {
        top: -45px;
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* ==========================================
   DARK MODE – component overrides
   ========================================== */
[data-theme="dark"] body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
}

[data-theme="dark"] .navbar {
    background: var(--navbar-bg);
    border-bottom-color: rgba(96, 165, 250, 0.15);
}

[data-theme="dark"] .navbar.scrolled {
    background: var(--navbar-bg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0f1117 0%, #1a1d2e 100%);
}

[data-theme="dark"] .about {
    background: var(--secondary-bg);
}

[data-theme="dark"] .content-card-3d,
[data-theme="dark"] .project-card-3d,
[data-theme="dark"] .certificate-card-3d {
    background: var(--card-bg);
    border-color: rgba(96, 165, 250, 0.15);
}

[data-theme="dark"] .profile-photo {
    border-color: rgba(96, 165, 250, 0.2);
}

[data-theme="dark"] .footer {
    background: var(--secondary-bg);
    border-top-color: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .music-player {
    background: var(--music-player-bg);
    border-color: rgba(96, 165, 250, 0.15);
}

[data-theme="dark"] .music-btn {
    color: var(--accent-primary);
}

[data-theme="dark"] .nav-menu {
    background-color: rgba(15,17,23,0.98);
}

[data-theme="dark"] .hscroll-track .content-card-3d {
    background: var(--card-bg);
}

[data-theme="dark"] .contact-item-3d {
    background: rgba(96, 165, 250, 0.05);
    border-color: rgba(96, 165, 250, 0.15);
}

[data-theme="dark"] .skill-tag {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.2);
    color: var(--accent-secondary);
}

[data-theme="dark"] .social-link {
    background: rgba(96, 165, 250, 0.1);
    color: var(--accent-primary);
}

[data-theme="dark"] .social-link:hover {
    background: var(--accent-primary);
    color: #fff;
}

/* ==========================================
   THEME TOGGLE BUTTON & NAV-ACTIONS
   ========================================== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--accent-light);
    background: var(--accent-light);
    color: var(--accent-primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    transform: rotate(20deg) scale(1.1);
    box-shadow: 0 0 15px rgba(44, 82, 130, 0.4);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.3);
    color: #fbbf24;
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(251, 191, 36, 0.2);
    border-color: #fbbf24;
    color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

/* ==========================================
   HORIZONTAL SCROLL CAROUSEL
   ========================================== */
.hscroll-wrapper {
    position: relative;
    width: 100%;
    /* Removed flex to allow absolute buttons to overlay */
}

.hscroll-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 20px 4px; /* generous padding for box-shadows */
    width: 100%;
    cursor: grab;
    user-select: none;
    /* touch-action: pan-x pan-y = biarkan browser menangani scroll
       di kedua sumbu secara native, tanpa JS menghalangi */
    touch-action: pan-x pan-y;
}

.hscroll-track::-webkit-scrollbar {
    display: none;
}

.hscroll-track.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

/* Card base: full content wraps, nothing clips */
.hscroll-card {
    flex: 0 0 320px;
    width: 320px;
    min-width: 0;
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    overflow: hidden; /* clip internal content, not page */
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Make sure inner text/tags don't overflow card */
.hscroll-card .timeline-skills,
.hscroll-card .project-tech-3d,
.hscroll-card .certificate-tech-3d {
    flex-wrap: wrap;
    overflow: hidden;
}

.hscroll-card .timeline-skill-3d,
.hscroll-card .tech-tag-3d,
.hscroll-card .cert-tag-3d {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Experience cards – same width but with padding */
.experience .hscroll-card {
    flex: 0 0 380px;
    width: 380px;
    padding: var(--spacing-lg);
}

/* Arrow buttons */
.hscroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--accent-light);
    background: var(--hscroll-btn-bg);
    color: var(--hscroll-btn-color);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.hscroll-btn-left {
    left: -20px;
}

.hscroll-btn-right {
    right: -20px;
}

.hscroll-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.hscroll-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* Dot indicators */
.hscroll-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding-bottom: 4px;
}

.hscroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-light);
    border: 2px solid var(--accent-light);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hscroll-dot.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    width: 24px;
    border-radius: 4px;
}

/* Timeline inline marker (for horizontal cards) */
.timeline-marker-inline {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-primary);
    margin-bottom: var(--spacing-md);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-marker-inline .marker-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 0 0 rgba(44, 82, 130, 0.5);
    animation: pulseRing 2s infinite;
}

/* ==========================================
   LINKEDIN SOCIAL LINK COLOR
   ========================================== */
.social-link[title="LinkedIn"]:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: #fff;
}

/* ==========================================
   DARK MODE MOBILE MENU
   ========================================== */
[data-theme="dark"] .bar {
    background: var(--text-primary);
}

/* ==========================================
   RESPONSIVE OVERRIDES FOR CAROUSEL
   ========================================== */
@media (max-width: 768px) {
    .hscroll-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .hscroll-btn-left {
        left: -15px;
    }

    .hscroll-btn-right {
        right: -15px;
    }

    .hscroll-track {
        gap: 16px;
        padding: 10px 4px 20px 4px;
        scroll-snap-type: x mandatory;
    }

    /* Cards use percentage width on mobile to perfectly fit screen */
    .hscroll-card,
    .experience .hscroll-card {
        flex: 0 0 100%;
        width: 100%;
        max-width: none;
        scroll-snap-align: center;
    }

    .experience .hscroll-card {
        padding: var(--spacing-md);
    }

    /* Images shorter on mobile */
    .hscroll-card .project-image-3d,
    .hscroll-card .certificate-image-3d {
        height: 180px;
        width: 100%;
    }

    .hscroll-card .project-content-3d,
    .hscroll-card .certificate-content-3d {
        padding: 16px;
    }

    /* Fonts & Tags */
    .hscroll-card .project-title-3d,
    .hscroll-card .certificate-title-3d,
    .hscroll-card .timeline-title {
        font-size: 1.15rem;
    }

    .hscroll-card .project-description,
    .hscroll-card .certificate-description,
    .hscroll-card .timeline-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .hscroll-card .timeline-skills,
    .hscroll-card .project-tech-3d,
    .hscroll-card .certificate-tech-3d {
        gap: 6px;
    }

    .hscroll-card .timeline-skill-3d,
    .hscroll-card .tech-tag-3d,
    .hscroll-card .cert-tag-3d {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .nav-actions {
        gap: 8px;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hscroll-btn {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .hscroll-btn-left {
        left: -10px;
    }

    .hscroll-btn-right {
        right: -10px;
    }

    .hscroll-card,
    .experience .hscroll-card {
        flex: 0 0 100%;
        width: 100%;
        max-width: none;
    }

    .hscroll-card .project-image-3d,
    .hscroll-card .certificate-image-3d {
        height: 160px;
    }

    .hscroll-card .project-content-3d,
    .hscroll-card .certificate-content-3d {
        padding: 14px;
    }

    .hscroll-card .project-title-3d,
    .hscroll-card .certificate-title-3d,
    .hscroll-card .timeline-title {
        font-size: 1.05rem;
    }

    .hscroll-card .timeline-skill-3d,
    .hscroll-card .tech-tag-3d,
    .hscroll-card .cert-tag-3d {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}
