/* assets/css/style.css */
:root {
    --primary-color: #6366f1;
    --primary-light: #e0e7ff;
    --primary-hover: #4f46e5;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 1rem;
    --radius-lg: 1.5rem;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9375rem;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.625rem;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 0.875rem 1.125rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Navigation */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    background: transparent;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--primary-color);
    letter-spacing: -0.04em;
}

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

.nav-links a {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9375rem;
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-color);
}

.nav-links a:hover:after,
.nav-links a.active:after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-color);
}

/* Badge System */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.access-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color) !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Responsive Grid */
.grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Bottom Navigation for Mobile */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 0.5rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
}

.bottom-nav-item.active {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .nav {
        padding: 0.75rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 5rem;
    }

    /* Mobile Typography */
    .hero h1 {
        font-size: 1.85rem;
        word-break: keep-all;
    }

    .projects-hero {
        padding: 4rem 1.5rem 3rem;
        border-radius: 0 0 2rem 2rem;
    }

    .projects-hero h1 {
        font-size: 1.65rem;
    }

    .projects-hero p {
        font-size: 1rem;
    }

    /* Spacing & Layout */
    .container {
        padding: 0 1.25rem;
    }

    .card {
        padding: 1.5rem;
        border-radius: var(--radius);
    }

    .grid {
        gap: 1.5rem;
    }

    /* Detail Page Mobile */
    .detail-header {
        padding: 2rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .detail-title-area h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .detail-body {
        padding: 2rem 1.5rem;
        gap: 2rem;
    }

    .sidebar-section {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-primary {
        width: 100%;
        /* Make primary CTA full width on mobile */
    }

    /* Logo adjustment if needed */
    .logo {
        font-size: 1.25rem;
    }

    .logo svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .projects-hero h1 {
        font-size: 1.5rem;
    }

    .detail-title-area h1 {
        font-size: 1.35rem;
    }

    .detail-title-area h1 {
        font-size: 1.35rem;
    }
}

/* 3D Carousel Styles */
.project-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 2rem 2rem;
    /* Symmetric padding */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -1.5rem;
    /* Negative margin to bleed to edges on mobile */
}

.project-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 85%;
    /* Mobile width */
    max-width: 320px;
    /* Desktop max width */
    scroll-snap-align: center;
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.7;
    transform: scale(0.9);
    border: 1px solid var(--border-color);
}

.carousel-item.carousel-active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 10;
    border-color: var(--primary-light);
}

/* Spacer for first item centering logic if needed, but padding handles it mostly */
.project-carousel::before,
.project-carousel::after {
    content: '';
    flex: 0 0 1rem;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.carousel-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.carousel-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}