* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #8CCFB7;
    --secondary-color: #2B3175;
    --accent-color: #4FBE9F;
    --text-color: #1f2937;
    --light-bg: #f9fafb;
    --white: #ffffff;
    --gray: #6b7280;
    /* Loading animation controls (editable) */
    --loading-duration: 0.9s;   /* animation length (s) */
    --loading-delay: 600ms;     /* delay before starting curve+slide */
    --loading-ease: cubic-bezier(.2,.9,.2,1);
    --loading-radius-x: 100%;   /* horizontal radius portion (bigger = more 'bulat') */
    --loading-radius-y: 35%;    /* vertical radius portion */
}

/* Dark mode theme */
html[data-theme="dark"] {
    --text-color: #e5e7eb;
    --light-bg: #1f2937;
    --white: #111827;
    --gray: #9ca3af;
}

html {
    scrollbar-gutter: stable;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: visible;
    padding: 0;
    margin: 0;
    /* Prepare for smooth rounding and slide (uses CSS variables above) */
    transition: transform var(--loading-duration) var(--loading-ease),
                border-radius var(--loading-duration) var(--loading-ease);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.loading-name {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 2px;
    animation: fadeInName 0.8s ease-out;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 0;
    z-index: 10001;
}

@keyframes fadeInName {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Make curve path visible during development: transparent fill + visible stroke */
#curvePath {
    fill: transparent;
    stroke: rgba(255,255,255,0.95);
    stroke-width: 2px;
    mix-blend-mode: normal;
}

.loading-bottom-curve {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 320px; /* larger so curve isn't clipped */
    display: block;
    pointer-events: none;
    overflow: visible;
}

/* Curved state: round the bottom and slide up */
.loading-screen.curved {
    border-bottom-left-radius: var(--loading-radius-x) var(--loading-radius-y);
    border-bottom-right-radius: var(--loading-radius-x) var(--loading-radius-y);
    transform: translateY(-100%);
    overflow: hidden; /* clip contents to show a rounded background while sliding up */
}

/* Make path visible against black while still subtle */
#curvePath {
    fill: #1a1a1a; /* default fill matches background */
    stroke: rgba(255,255,255,0.06);
    stroke-width: 1.5px;
}

@keyframes slideOutUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 1;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-brand:hover {
    opacity: 0.8;
}

.nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

/* Modern slider toggle for dark mode */
.theme-toggle {
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
    padding: 0;
    margin: 0 0.5rem;
    display: flex;
    align-items: center;
}

/* Icon inside the slider */
.theme-toggle::before {
    content: '';
}

.theme-toggle::after {
    content: '☾';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--white);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #666;
    font-weight: bold;
    transform: rotate(-20deg);
}

.theme-toggle:hover {
    background: #bbb;
}

html[data-theme="dark"] .theme-toggle {
    background: var(--primary-color);
}

html[data-theme="dark"] .theme-toggle:hover {
    background: var(--accent-color);
}

html[data-theme="dark"] .theme-toggle::after {
    content: '◉';
    color: var(--primary-color);
    left: 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 120px 0 220px 0; /* increased bottom spacing */
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Clients (horizontal sliding on scroll) */
.clients {
    padding: 28px 0;
    /* light mode: more gray background */
    background: #e5e7eb;
}

.clients-track-wrapper {
    overflow: hidden;
    position: relative;
}

.clients-track {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    will-change: transform;
    transition: transform 0.08s linear;
    padding: 0.5rem 0;
    padding-left: 150px; /* large left padding to prevent cutoff near edge */
    padding-right: 150px; /* large right padding for balance */
}

.client-item {
    display: inline-block;
    min-width: 140px;
    padding: 6px 0;
    color: var(--text-color);
    font-weight: 700; /* bold */
    font-size: 0.95rem; /* smaller */
    text-transform: none;
    letter-spacing: 0.02em;
    background: transparent; /* no box */
}

@media (max-width: 768px) {
    .client-item { min-width: 110px; font-size: 0.9rem; }
}

/* Debug overlay styles */
.debug-toggle-btn {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 99999;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    cursor: pointer;
}

.debug-badge {
    position: absolute;
    background: rgba(99,102,241,0.95);
    color: white;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 6px;
    z-index: 99998;
    pointer-events: auto;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.debug-panel {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 56px;
    z-index: 99999;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    max-width: 90%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.debug-panel code {
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Dark mode: clients bar should be darker for good contrast */
html[data-theme="dark"] .clients {
    background: #0f172a;
}

/* Gallery Section with 3 tilted columns */
.gallery {
    padding: 80px 0;
    background: var(--light-bg);
}

.gallery-wrapper {
    display: flex;
    gap: 3rem;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Gallery container with straight clipping - responsive width */
.gallery-container {
    flex: 1;
    min-width: 0;
    height: 500px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Inner tilted columns wrapper - centers items */
.gallery-columns-wrapper {
    display: flex;
    gap: 2rem;
    transform: rotateZ(45deg);
    will-change: transform;
    align-items: center;
    justify-content: center;
}

/* Globe container */
.gallery-globe {
    width: 280px;
    height: 500px;
    background: rgba(140, 207, 183, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Gallery preview inside globe */
.gallery-preview {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    text-align: left;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.gallery-preview-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0;
    transition: transform 0.3s ease;
}

/* Divider */
.gallery-preview-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1.2rem 0;
    border-radius: 1px;
}

.gallery-preview-desc {
    font-size: 0.85rem;
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 400;
    text-align: left;
    flex: 1;
    overflow-y: auto;
}

/* Gallery item hover state */
.gallery-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.gallery-column {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    will-change: transform;
    transition: transform 0.08s linear;
}

/* Left column: 8 items, normal size */
.gallery-col-left {
    width: 180px;
}

/* Center column: 5 items, larger */
.gallery-col-center {
    width: 240px;
    transform: scale(1.2);
    transform-origin: center;
}

/* Right column: 8 items, normal size */
.gallery-col-right {
    width: 180px;
}

/* Gallery items (photo placeholders) */
.gallery-item {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(140, 207, 183, 0.2);
    text-align: center;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    opacity: 0.85;
}

/* Dark mode gallery background */
html[data-theme="dark"] .gallery {
    background: #1a1a2e;
}

html[data-theme="dark"] .gallery-clip {
    background: rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .gallery-globe {
    background: rgba(99, 102, 241, 0.15);
}

.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: slideDown 0.8s ease;
    position: relative;
    z-index: 10;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    position: relative;
    z-index: 10;
}

.hero-content .hero-subtext {
    font-size: 1.05rem;
    margin: 0 auto 2rem;
    max-width: 720px;
    opacity: 0.85;
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.7;
    position: relative;
    z-index: 10;
}

.hero-content a,
.slider-hint-main {
    position: relative;
    z-index: 10;
}

.slider-hint-main {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Slider Container */
.slider-container {
    position: fixed;
    left: -350px;
    top: 0;
    width: 350px;
    height: 100vh;
    background: var(--white);
    color: var(--text-color);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    touch-action: none;
}

.slider-container.active {
    left: 0;
}

.slider-handle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 0 12px 12px 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    box-shadow: 3px 5px 20px rgba(140, 207, 183, 0.4);
    z-index: 998;
    border: none;
}

.slider-handle:hover {
    left: 5px;
    box-shadow: 5px 8px 30px rgba(140, 207, 183, 0.5);
    transform: translateY(-50%) scale(1.05);
}

.slider-container.active .slider-handle {
    left: 350px;
}

.slider-content {
    padding: 2rem 1.5rem;
    flex-grow: 1;
}

.slider-photo {
    width: 100% !important;
    height: 280px !important;
    min-height: 280px !important;
    max-height: 280px !important;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(140, 207, 183, 0.2);
    flex-shrink: 0;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.photo-placeholder:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(140, 207, 183, 0.3);
}

.slider-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.slider-content p {
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.slider-skills {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.slider-skills h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.slider-skills ul {
    list-style: none;
}

.slider-skills li {
    color: var(--gray);
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.slider-skills li:before {
    content: "✓ ";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.slider-hint {
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    cursor: grab;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #db2777;
    transform: translateY(-2px);
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--light-bg);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--gray);
    line-height: 1.8;
}

.skills-list {
    list-style: none;
    margin-top: 1rem;
}

.skills-list li {
    padding: 8px 0;
    color: var(--gray);
}

.skills-list li:before {
    content: "✓ ";
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 8px;
}

.placeholder-image {
    background: var(--white);
    border: 2px dashed var(--primary-color);
    padding: 100px;
    border-radius: 10px;
    text-align: center;
    color: var(--gray);
    font-size: 1.2rem;
}

/* Projects Section */
.projects {
    padding: 80px 0;
}

.projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    padding: 100px;
    text-align: center;
    font-size: 1rem;
}

.project-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--text-color);
}

.project-card p {
    padding: 0 1.5rem;
    color: var(--gray);
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem 1.5rem 0;
}

.tag {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-card .btn {
    margin: 1rem 1.5rem 1.5rem;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: var(--light-bg);
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    padding: 8px 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transform: translateY(-2px);
    filter: brightness(1.15);
}
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 5px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form .btn {
    align-self: flex-start;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about h2,
    .projects h2,
    .contact h2 {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    @media (max-width: 480px) {
        .nav-menu {
            gap: 0.5rem;
        }

        .hero {
            padding: 50px 0;
        }

        .hero-content h1 {
            font-size: 1.5rem;
        }

        .hero-content p {
            font-size: 1rem;
        }
    }
}

/* ============================================ */
/* ORBIT LOGO SECTION - HIGH-TECH INTERACTIVE */
/* ============================================ */

.orbit-section {
    padding: 80px 0;
    background: var(--background);
    position: relative;
}

.orbit-wrapper {
    display: flex;
    gap: 3rem;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* In dark mode, give the wrapper the unified gradient so both columns look like one box */
html[data-theme="dark"] .orbit-wrapper {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
    border-radius: 12px;
    padding: 12px 20px;
}

/* Preview Box (Left Column) */
.orbit-preview-box {
    width: 280px;
    height: 500px;
    background: transparent;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.orbit-preview {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    text-align: left;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    gap: 1rem;
}

.orbit-preview-img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 0;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    padding: 1rem;
}

.orbit-preview-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1.2rem 0;
    border-radius: 1px;
}

.orbit-preview-desc {
    font-size: 0.85rem;
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 400;
    text-align: left;
    flex: 1;
    overflow-y: auto;
}

.scene-container {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex: 1;
    background: linear-gradient(135deg, rgba(140, 207, 183, 0.08), rgba(79, 190, 159, 0.08));
    border-radius: 12px;
}

html[data-theme="dark"] .scene-container {
    background: linear-gradient(135deg, rgba(140, 207, 183, 0.15), rgba(79, 190, 159, 0.15));
    border-radius: 12px;
}

/* Make the inner boxes use a slightly smaller inner radius so the wrapper's rounded corners read as the main shape */
html[data-theme="dark"] .orbit-preview-box,
html[data-theme="dark"] .scene-container {
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
}

.orbit-particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 12px;
    z-index: 0;
}

.orbit-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 700px;
    max-height: 700px;
    aspect-ratio: 1 / 1;
    perspective: 1200px;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

/* Ensure orbit content sits above the particle canvas */
.orbit-container,
.orbit-preview,
.orbit-preview * {
    position: relative;
    z-index: 1;
}

/* Make preview column visually unified with the scene in dark mode */
html[data-theme="dark"] .orbit-preview,
html[data-theme="dark"] .orbit-preview-box {
    background: transparent;
    box-shadow: none;
}

/* Optional: use a subtle tint for a unified look instead of full transparency
html[data-theme="dark"] .orbit-preview,
html[data-theme="dark"] .orbit-preview-box {
    background: rgba(17,24,39,0.6);
}
*/

.orbit-container:active {
    cursor: grabbing;
}

.orbit {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transition: transform 0.5s ease-out;
}

/* === Orbit High-Tech === */
.orbit-path {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 60%;
    transform: translate(-50%, -50%) rotateX(90deg);
    border-radius: 50%;
    pointer-events: none;
    background:
        radial-gradient(circle at center,
            rgba(0, 255, 255, 0.25) 0%,
            rgba(0, 255, 255, 0.1) 40%,
            transparent 70%),
        repeating-radial-gradient(circle,
            rgba(0, 255, 255, 0.15) 0 2px,
            transparent 2px 6px);
    animation: spherePulse 6s ease-in-out infinite;
    filter: drop-shadow(0 0 25px hsl(190, 100%, 35%));
}

.orbit-path::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 50%;
    border: 2px solid hsl(190, 100%, 35%);
    animation: haloSpin 12s linear infinite;
    opacity: 0.8;
    filter: drop-shadow(0 0 20px hsl(190, 100%, 35%));
}

.orbit-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
}

.particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: hsl(190, 100%, 35%);
    border-radius: 50%;
    filter: drop-shadow(0 0 8px hsl(190, 100%, 35%));
    animation: orbitParticle 8s linear infinite;
}

.particle:nth-child(2) {
    animation-delay: -2s;
}

.particle:nth-child(3) {
    animation-delay: -4s;
}

.particle:nth-child(4) {
    animation-delay: -6s;
}

@keyframes spherePulse {
    0%, 100% {
        transform: translate(-50%, -50%) rotateX(90deg) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) rotateX(90deg) scale(1.05);
        opacity: 1;
    }
}

@keyframes haloSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes orbitParticle {
    from {
        transform: rotate(0deg) translateX(220px) rotate(0deg);
    }
    to {
        transform: rotate(360deg) translateX(220px) rotate(-360deg);
    }
}

/* === Logo Slots === */
.slot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
    transform-style: preserve-3d;
    width: 50px;
    height: 50px;
    transition: transform 0.5s ease-out;
}

.logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    will-change: transform, filter, opacity;
    transition: all 0.05s linear;
}

/* === Navigation Buttons === */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: hsl(190, 100%, 35%);
    font-size: 40px;
    z-index: 10;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px hsl(190, 100%, 35%);
    user-select: none;
}

.nav-button:hover {
    color: var(--white);
    text-shadow: 0 0 15px hsl(190, 100%, 35%);
}

.left-button {
    left: 10px;
}

.right-button {
    right: 10px;
}

/* Dark mode adjustments for orbit section */
html[data-theme="dark"] .orbit-container {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
}

html[data-theme="dark"] .nav-button:hover {
    color: var(--primary-color);
}

html[data-theme="dark"] .orbit-preview {
    background: var(--surface-dark);
    color: var(--text-color);
}

@media (max-width: 768px) {
    .orbit-section {
        padding: 60px 0;
    }

    .orbit-wrapper {
        flex-direction: column;
        gap: 2rem;
    }

    .scene-container {
        width: 100%;
        min-height: 450px;
        order: 2;
    }

    .orbit-preview-box {
        width: 100%;
        max-width: 300px;
        height: 400px;
        order: 1;
    }

    .orbit-container {
        max-width: 500px;
        max-height: 500px;
    }

    .nav-button {
        font-size: 30px;
    }

    .slot {
        width: 40px;
        height: 40px;
    }

    .logo {
        width: 40px;
        height: 40px;
    }

    /* Videos Section Responsive */
    .videos-nav-button {
        font-size: 18px;
        width: 40px;
        height: 40px;
    }

    .video-card {
        width: 200px;
        height: 250px;
    }

    .play-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .video-card.center .play-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* ========================================
   Videos Section (3D Carousel Slider)
   ======================================== */
.videos-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.videos-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    align-items: stretch;
    height: 500px;
}

.videos-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    perspective: 1200px;
}

.videos-slider {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    cursor: grab;
    user-select: none;
    transform-style: preserve-3d;
}

.videos-slider.dragging {
    cursor: grabbing;
}

.video-card {
    position: absolute;
    width: 300px;
    height: 380px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: auto;
    transform-style: preserve-3d;
    left: 50%;
    z-index: 30;
}

.video-card.center {
    transform: translateX(-50%) translateZ(0) rotateY(0deg) scale(1);
    opacity: 1;
}

.video-card.side.left {
    transform: translateX(calc(-50% - 250px)) rotateY(35deg) scale(0.85);
    opacity: 1;
    filter: brightness(0.75) saturate(0.65);
}

.video-card.side.right {
    transform: translateX(calc(-50% + 250px)) rotateY(-35deg) scale(0.85);
    opacity: 1;
    filter: brightness(0.75) saturate(0.65);
}

.video-card.far-left {
    transform: translateX(calc(-50% - 450px)) rotateY(50deg) scale(0.6);
    opacity: 1;
    filter: brightness(0.6) saturate(0.5);
}

.video-card.far-right {
    transform: translateX(calc(-50% + 450px)) rotateY(-50deg) scale(0.6);
    opacity: 1;
    filter: brightness(0.6) saturate(0.5);
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    flex-direction: column;
    background-image: none !important;
}

/* Different colors for each video */
.video-card:nth-child(1) .video-thumbnail {
    background: #FF6B6B !important;
}

.video-card:nth-child(2) .video-thumbnail {
    background: #4ECDC4 !important;
}

.video-card:nth-child(3) .video-thumbnail {
    background: #FFE66D !important;
}

.video-card:nth-child(4) .video-thumbnail {
    background: #95E1D3 !important;
}

.video-card:nth-child(5) .video-thumbnail {
    background: #C7CEEA !important;
}

.video-card.center .video-thumbnail {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.video-thumbnail::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent);
    border-radius: 0 0 12px 12px;
    filter: blur(8px);
    transform: scaleY(0.5);
    z-index: -1;
}

.play-button {
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 1s ease;
    border: none;
    pointer-events: none;
    position: relative;
    z-index: 5;
    box-shadow: 3px 5px 20px rgba(140, 207, 183, 0.4);
    opacity: 1;
    transform: scaleX(-1);
    padding-left: 6px;
}

.video-card.center .play-button {
    width: 70px;
    height: 55px;
    font-size: 28px;
    padding-left: 8px;
}

.video-card.center:hover .play-button {
    box-shadow: 5px 8px 30px rgba(140, 207, 183, 0.5);
    transform: scaleX(-1) scale(1.05);
}

.play-button.fade-out {
    opacity: 0;
}

.play-button.fade-in {
    animation: fadeInPlayButton 1s ease 0.3s forwards;
}

@keyframes fadeInPlayButton {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.play-button.fade-out {
    opacity: 0;
}

.videos-globe {
    flex: 0 0 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
}

.videos-preview {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    text-align: left;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.videos-preview-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0;
    transition: transform 0.3s ease;
}

.videos-preview-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1.2rem 0;
    border-radius: 1px;
}

.videos-preview-desc {
    font-size: 0.85rem;
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 400;
    text-align: left;
    flex: 1;
    overflow-y: auto;
}

/* Dark mode adjustments for Videos Section */
html[data-theme="dark"] .videos-preview {
    background: var(--white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Responsive Videos Section */
@media (max-width: 1024px) {
    .videos-wrapper {
        flex-direction: column;
        gap: 1rem;
        height: auto;
    }

    .videos-container {
        height: 400px;
    }

    .videos-globe {
        flex: 1;
        height: 300px;
    }

    .video-card {
        width: 260px;
        height: 330px;
    }
}

@media (max-width: 768px) {
    .videos-wrapper {
        padding: 0 1rem;
    }

    .videos-container {
        height: 320px;
    }

    .video-card {
        width: 220px;
        height: 280px;
    }

    .play-button {
        width: 45px;
        height: 35px;
        font-size: 18px;
        padding-left: 5px;
    }

    .video-card.center .play-button {
        width: 60px;
        height: 48px;
        font-size: 22px;
        padding-left: 7px;
    }
}

/* Button Styling */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(140, 207, 183, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(140, 207, 183, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: var(--white);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(140, 207, 183, 0.5);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: var(--white);
    filter: brightness(1.15);
}

/* Contact Button */
button[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(140, 207, 183, 0.3);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(140, 207, 183, 0.4);
}
