@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

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

body {
    font-family: var(--font-body);
    background: radial-gradient(circle at 10% 20%, #ffffff 0%, var(--color-bg-warm) 90%);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

/* --- Layout Utility --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* --- Sticky Glassmorphic Header/Navbar --- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 246, 240, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-glass-border);
    box-shadow: 0 2px 20px rgba(74, 21, 75, 0.03);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.logo span {
    color: var(--color-secondary);
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: var(--transition-smooth);
}

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

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

/* Login/Logout Button Styling in Nav */
.nav-btn {
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(74, 21, 75, 0.15);
}

.nav-btn:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-2px);
    color: #ffffff;
}

.nav-btn-outline {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
}

.nav-btn-outline:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

/* Checkbox Hack for Mobile Menu */
.menu-toggle {
    display: none;
}

.hamburger-label {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.hamburger-label span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 3px;
    transition: var(--transition-smooth);
}

/* --- Hero Section & General Buttons --- */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(74, 21, 75, 0.2);
    transition: var(--transition-smooth);
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(74, 21, 75, 0.3);
    color: #ffffff;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 0.9rem 1.9rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    transform: translateY(-3px);
}

/* --- Footer --- */
.footer {
    background-color: var(--color-primary-dark);
    color: #FAF6F0;
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.25fr 2fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

.footer-brand p {
    color: rgba(250, 246, 240, 0.7);
    margin-bottom: 1.5rem;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--color-secondary);
    margin-top: 0.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(250, 246, 240, 0.7);
}

.footer-links a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.footer-contact p {
    color: rgba(250, 246, 240, 0.7);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-bottom {
    border-top: 1px solid rgba(250, 246, 240, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(250, 246, 240, 0.5);
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
    .hamburger-label {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--color-bg-warm);
        flex-direction: column;
        justify-content: center;
        gap: 3rem;
        transition: var(--transition-smooth);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }
    
    .menu-toggle:checked ~ .nav-menu {
        left: 0;
    }
    
    .menu-toggle:checked ~ .hamburger-label span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .menu-toggle:checked ~ .hamburger-label span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle:checked ~ .hamburger-label span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -7px);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Global Smooth Scroll and Reveal Transitions --- */
html {
    scroll-behavior: smooth;
}

.reveal-on-scroll {
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger reveal animations for lists/grids */
.reveal-stagger {
    display: flex;
    flex-wrap: wrap;
}

.reveal-stagger > * {
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.reveal-stagger.visible > * {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Stagger delays */
.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s !important; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s !important; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s !important; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s !important; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s !important; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s !important; }

/* Frosted glass header upgrade */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(250, 246, 240, 0.82) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid var(--color-glass-border) !important;
    box-shadow: 0 4px 30px rgba(74, 21, 75, 0.02) !important;
    transition: var(--transition-smooth) !important;
}

/* --- Interactive Custom Cursor --- */
@media (pointer: fine) {
    
    .custom-cursor {
        position: fixed;
        width: 32px;
        height: 32px;
        border: 1.5px solid var(--color-secondary);
        border-radius: 50%;
        pointer-events: none;
        transform: translate(-50%, -50%);
        z-index: 100000;
        transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                    height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                    background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                    border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        will-change: top, left, width, height, transform;
    }
    
    .custom-cursor-dot {
        position: fixed;
        width: 6px;
        height: 6px;
        background-color: var(--color-secondary);
        border-radius: 50%;
        pointer-events: none;
        transform: translate(-50%, -50%);
        z-index: 100001;
        will-change: top, left;
    }
    
    /* Hover scale and background adjustments */
    .custom-cursor.hover-active {
        width: 50px;
        height: 50px;
        background-color: rgba(214, 175, 55, 0.1);
        border-color: var(--color-secondary);
    }
    
    /* Project Card Hover - show "View" */
    .custom-cursor.hover-project {
        width: 80px;
        height: 80px;
        background-color: var(--color-primary);
        border-color: var(--color-secondary);
        box-shadow: 0 0 25px rgba(74, 21, 75, 0.3);
    }
    
    .custom-cursor.hover-project .cursor-text {
        color: #ffffff;
        font-family: var(--font-heading);
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        opacity: 1;
        transform: scale(1);
    }
    
    .cursor-text {
        opacity: 0;
        transform: scale(0.6);
        transition: opacity 0.25s ease, transform 0.25s ease;
        pointer-events: none;
    }
}

/* Hide on mobile touch devices */
@media (pointer: coarse) {
    .custom-cursor,
    .custom-cursor-dot {
        display: none !important;
    }
}

/* --- Smooth PJAX Page Swap Transitions --- */
main {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.page-transition-loading {
    opacity: 0 !important;
    transform: translateY(20px) !important;
}

/* --- Viewport-Triggered Animation Initial States --- */
[data-animation-type="slide-left"] {
    will-change: transform, opacity;
}
[data-animation-type="slide-right"] {
    will-change: transform, opacity;
}
[data-animation-type="stagger-pop"] > * {
    will-change: transform, opacity;
}
[data-animation-type="mask-reveal"] {
    will-change: clip-path;
}
[data-animation-type="zoom-bounce"] {
    will-change: transform, opacity;
}

