:root {
    --bg-color: #050505;
    --text-color: #f7f7f7;
    --text-muted: #888888;
    --accent-color: #ffffff;
    --glass-bg: rgba(10, 10, 10, 0.4);
    --glass-border: rgba(255, 255, 255, 0.05);
    --transition-speed: 0.4s;
    --font-main: "Montserrat", sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: transparent;
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6, 
.headline, 
.section-title, 
.card-title, 
.modal-title, 
.sub-project-title, 
.like-item-title, 
.sidebar-title {
    font-family: var(--font-main);
    font-weight: 800;
    line-height: 1.1;
    color: var(--accent-color);
}

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

ul {
    list-style: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.hidden {
    display: none !important;
}

/* Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
}

.section {
    padding: 8rem 0;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 3.5rem;
    margin-bottom: 4rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    text-align: center;
}

.mobile-only-br {
    display: none;
}

/* Buttons */
button {
    font-family: var(--font-main);
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    line-height: 0;
    margin: 0;
}

.icon-btn svg {
    display: block;
    width: 32px;
    height: 32px;
}

.icon-btn:hover {
    opacity: 0.6;
}

.primary-btn {
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    width: 100%;
}

.primary-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    transition: background var(--transition-speed), backdrop-filter var(--transition-speed), border-bottom var(--transition-speed), padding var(--transition-speed);
    z-index: 1000;
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 3rem;
}

.nav-left, .nav-center, .nav-right {
    display: flex;
    align-items: center;
}

.nav-left {
    justify-content: flex-start;
    flex: 0 0 50px;
}

.nav-center {
    flex: 1;
    justify-content: center;
    overflow: hidden;
}

.nav-right {
    justify-content: flex-end;
    flex: 0 0 50px;
    gap: 1rem;
}

/* Marquee Logo Animation */
.marquee-container {
    width: 500px;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-inner {
    display: flex;
    width: max-content;
    animation: marquee-scroll 6s linear infinite;
}

@keyframes marquee-scroll {
    to { transform: translateX(-50%); }
}

.marquee-logo {
    display: block;
    height: 72px; /* Reduced from 96px */
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    margin: 0 1.5rem;
    transition: height var(--transition-speed) cubic-bezier(0.165, 0.84, 0.44, 1);
}

#navbar.scrolled .marquee-logo {
    height: 42px; /* Slightly reduced */
}

.action-icon {
    display: block;
    width: 32px;
    height: 32px;
    filter: invert(1); /* Assuming black placeholder */
}

#navbar.scrolled .icon-btn svg,
#navbar.scrolled .action-icon {
    width: 24px;
    height: 24px;
}

/* Fullscreen Menu */
.overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.5s;
}

.overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.menu-content {
    text-align: center;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nav-links li {
    margin: 1.5rem 0;
    overflow: hidden;
}

.menu-link {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    transition: color 0.4s ease;
}

.menu-link::before {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 0%;
    height: 4px;
    background-color: var(--accent-color);
    transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.menu-link:hover {
    color: var(--text-color);
}

.menu-link:hover::before {
    width: 100%;
}

.close-btn, .close-modal {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    position: absolute;
    top: 2rem;
    right: 3rem;
    transition: transform 0.4s ease, opacity 0.3s ease;
    z-index: 10;
}

.close-btn:hover, .close-modal:hover {
    transform: rotate(90deg);
    opacity: 0.6;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(8px);
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    border-radius: 12px;
    padding: 3.5rem 2.5rem;
    width: 90%;
    max-width: 440px;
    position: relative;
    text-align: center;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal.hidden .modal-content {
    transform: translateY(20px);
}

.modal-title {
    margin-bottom: 2rem;
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.auth-icon {
    width: 20px;
    height: 20px;
}


.auth-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-form {
    margin-bottom: 2rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .primary-btn {
    margin-top: 1rem;
}

.auth-toggle {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

#toggle-auth {
    color: var(--accent-color);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
}

.auth-separator {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.auth-separator::before,
.auth-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.auth-separator span {
    padding: 0 1rem;
}

.error-message {
    color: #ff453a;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}


.dev-toggle {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    background: none;
    border: 1px solid #333;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dev-toggle:hover {
    color: var(--text-color);
    border-color: var(--text-muted);
}

.user-menu li {
    margin: 1rem 0;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
}

.menu-btn:hover {
    color: var(--text-muted);
}

.menu-btn.logout {
    color: #ff453a;
    margin-top: 1rem;
}

.menu-btn.logout:hover {
    color: #ff6961;
}

/* Sidebar (Cart) */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-color);
    border-left: 1px solid var(--glass-border);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sidebar.hidden {
    transform: translateX(100%);
}

.sidebar-header {
    padding: 2.5rem 2rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 1.5rem;
}

.sidebar-header .close-btn {
    position: static;
}

.sidebar-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.empty-cart-state {
    text-align: center;
    color: var(--text-muted);
}

.empty-cart-state p {
    margin-bottom: 2rem;
}

.sidebar-footer {
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.payment-methods {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Likes Sidebar Elements */
.like-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.like-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.like-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.like-item-info {
    flex: 1;
    text-align: left;
}

.like-item-title {
    font-size: 1rem;
    font-weight: 600;
}

.like-item-tags {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.remove-like-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 0 0.5rem;
}

.remove-like-btn:hover {
    color: #ff453a;
    transform: scale(1.1);
}

/* Hero Section */
#hero {
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Global Site Background */
#site-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

#site-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(0px) brightness(0.6);
    transform: scale(1);
    transition: filter 0.1s ease-out, transform 0.1s ease-out;
}

#site-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5,5,5,0.2) 0%, rgba(5,5,5,1) 100%);
    opacity: 0.2;
    transition: opacity 0.1s ease-out;
}

.headline {
    font-size: clamp(2.2rem, 8vw, 5rem);
    letter-spacing: -0.03em;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.typewriter-text {
    color: var(--accent-color);
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent-color);
    font-weight: 300;
}

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

.scroll-down {
    position: absolute;
    bottom: 3rem;
    font-size: 1rem;
}

.arrow-down {
    color: var(--text-muted);
    transition: color 0.3s ease, transform 0.3s ease;
}

.scroll-down a {
    display: block;
    padding: 1rem;
    animation: float 2.5s ease-in-out infinite;
}

.scroll-down a:hover .arrow-down {
    color: var(--accent-color);
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(10px); }
    100% { transform: translateY(0); }
}

/* Work Grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
    width: 100%;
}

.project-card {
    cursor: pointer;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-card:hover .card-img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Prompt Assets Text Placeholders */
.card-text-placeholder {
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), background 0.6s ease;
}

.project-card:hover .card-text-placeholder {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.05);
}

.placeholder-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.placeholder-text-small {
    font-size: 0.5rem;
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    text-align: center;
}

.modal-placeholder {
    height: 50vh;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(20,20,20,0.8) 0%, rgba(5,5,5,0.9) 100%);
}

.modal-placeholder .placeholder-text {
    font-size: 4rem;
}

.like-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
}

.heart-icon {
    transition: fill 0.3s ease, stroke 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.like-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.like-btn.liked .heart-icon {
    fill: #ff3b30;
    stroke: #ff3b30;
    transform: scale(1.1);
}

.card-info {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-title {
    font-size: 1.5rem;
}

.card-desc {
    color: var(--text-muted);
    font-size: 1rem;
}

.card-tags {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Lightbox Modal Override */
.project-modal-content {
    max-width: 900px;
    max-height: 90vh; /* Keep it within viewport */
    padding: 3rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto; /* Enable vertical scroll */
    scrollbar-width: none; /* Firefox */
}

.project-modal-content::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}


.project-modal-gallery {
    width: 100%;
    max-height: 50vh;
    border-radius: 8px;
    overflow: hidden;
}

.project-modal-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-modal-details .modal-title {
    margin-bottom: 0.5rem;
}

.project-modal-details .card-tags {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.project-modal-details p {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
    opacity: 0.9;
}

/* Sub-projects list inside modal details */
.sub-projects-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 2rem;
}

.sub-project-canvas {
    width: 100%;
}

.sub-project-img-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.sub-project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.sub-project-canvas:hover .sub-project-img {
    transform: scale(1.05);
}

.sub-project-canvas .like-btn {
    top: 1.5rem;
    right: 1.5rem;
}

.sub-project-info {
    text-align: left;
}

.sub-project-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}



/* Contact Form */
.form-wrapper {
    max-width: 700px;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.minimal-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-muted);
    padding: 1rem 0;
    color: var(--text-color);
    font-family: inherit;
    font-size: 1.25rem;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    resize: none;
}

.minimal-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.minimal-input:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
    box-shadow: 0 1px 0 0 var(--accent-color);
}

.submit-btn {
    margin-top: 1rem;
    display: inline-block;
    width: auto;
    padding: 1.25rem 3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Footer */
.footer {
    padding: 4rem 3rem 3rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.follow-me {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.follow-text {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.social-icon {
    width: 32px;
    height: 32px;
    filter: invert(1);
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .headline { font-size: 3.5rem; }
    .section-title { font-size: 2.75rem; }
    .work-grid { 
        grid-template-columns: 1fr;
        gap: 4rem;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    .desktop-only {
        display: none !important;
    }
    .footer-container { flex-direction: column; gap: 2rem; }
    
    .marquee-container {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .headline, 
    .section-title, 
    #contact .section-title,
    .modal-title,
    .sub-project-title { 
        font-size: 2.25rem !important; 
    }

    .headline {
        padding: 0 1rem;
    }

    .section-title { margin-bottom: 2.5rem; }
    
    #navbar { 
        padding: 0.75rem 1rem; 
    }
    #navbar.scrolled { 
        padding: 0.5rem 1rem; 
    }
    
    .nav-left, .nav-right {
        flex: 0 0 40px;
    }
    
    .menu-link { font-size: 2.25rem; }
    .project-card { border-radius: 8px; }
    .card-image-wrapper { border-radius: 8px; aspect-ratio: 1/1; } /* More square on mobile */
    .section { padding: 4rem 0; }
    .close-btn, .close-modal { right: 1rem; top: 1rem; font-size: 2rem; }
    
    .marquee-container { 
        width: 180px; /* Much smaller to fit between components */
    }
    .marquee-logo { height: 48px; margin: 0 1rem; }
    #navbar.scrolled .marquee-logo { height: 32px; }
    
    .project-card {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .card-info {
        text-align: center;
    }

    .project-modal-content {
        padding: 2.5rem 1.5rem;
        text-align: center;
    }

    .project-modal-gallery {
        max-height: 40vh;
    }

    .project-modal-details {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .sub-projects-vertical-list {
        gap: 3rem;
    }
    
    .sub-project-info {
        text-align: center;
    }

    .mobile-only-br {
        display: block;
    }

    .title-slash {
        display: none;
    }

    #contact .section-title {
        margin-bottom: 1.5rem;
    }

    .minimal-input {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .marquee-container { width: 140px; }
    .marquee-logo { height: 40px; margin: 0 0.75rem; }
    #navbar.scrolled .marquee-logo { height: 28px; }
}
