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

:root {
    --color-bg-primary: #FBFBFB;
    --color-text-primary: #333333;
    --color-text-secondary: #6B6B6B;
    --color-nav-inactive: #999999;
    --sidebar-max-width: 414px;
    --radius: 24px;
}

body {
    background-color: var(--color-bg-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--color-text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

.home {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* Sidebar on the Left (Fixed) */
.sidebar {
    padding: 80px 40px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-flow: column;
    width: 100%;
    max-width: var(--sidebar-max-width);
    z-index: 10;
}

.intro_container {
    pointer-events: all;
}

.text-block p {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 28px;
}

.text-block p:last-child {
    margin-bottom: 0;
}

.text-block .intro-greeting {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 28px;
}

/* Left Navigation Buttons */
.sidebar .navigation {
    display: flex;
    flex-flow: column;
    gap: 8px;
    margin-top: auto;
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    border: none;
    outline: none;
    padding: 12px 20px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    color: var(--color-text-primary);
    background: transparent;
    transition: background 0.25s ease, color 0.25s ease;
}

.button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.button svg {
    stroke: currentColor;
}

/* Featured Projects on the Right (Scrollable) */
.featured_projects {
    padding: 80px 80px 120px var(--sidebar-max-width);
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-flow: column;
    align-items: flex-end;
    overflow-y: scroll;
    gap: 40px;
    scrollbar-width: none; /* Hide Firefox scrollbar */
}

.featured_projects::-webkit-scrollbar {
    display: none; /* Hide Chrome/Safari scrollbar */
}

.featured_projects .project {
    width: 100%;
    max-width: calc(100vh - 200px);
}

/* Project Thumbnail Link */
.project_thumbnail {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1; /* Keeps blocks square */
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: unset;
    background: transparent;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project_thumbnail:hover {
    transform: scale(1.02) translate3d(0, 0, 0);
}

.project_artwork {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.project_artwork img, 
.project_artwork video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Project Info Inside Card */
.project_info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 48px 32px 32px;
    display: flex;
    flex-flow: column-reverse; /* Subtitle (year) at the bottom, Title on top */
    gap: 6px;
    z-index: 2;
}

.project_info .title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    filter: drop-shadow(0 0 16px rgba(0,0,0,0.4));
}

.project_info .subtitle {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    filter: drop-shadow(0 0 16px rgba(0,0,0,0.4));
}

/* Blur overlay for text legibility */
.progressive_blur {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Theme: Dark Text (for light background projects like AI) */
.project_thumbnail.theme-dark-text .progressive_blur {
    display: none;
}

.project_thumbnail.theme-dark-text .project_info .title {
    color: #000000;
    filter: none;
}

.project_thumbnail.theme-dark-text .project_info .subtitle {
    color: rgba(0, 0, 0, 0.6);
    filter: none;
}

/* Theme: No Shadow (removes bottom gradient overlay and text drop-shadow) */
.project_thumbnail.no-shadow .progressive_blur {
    display: none;
}

.project_thumbnail.no-shadow .project_info .title,
.project_thumbnail.no-shadow .project_info .subtitle {
    filter: none;
}

/* Mobile specific metadata, hidden on desktop */
.mobile_card_info {
    display: none;
}

/* Footer / View More Button */
.view-more-grid-button {
    width: 100%;
    max-width: calc(100vh - 200px);
    display: flex;
    flex-flow: column;
    align-items: stretch; /* Stretch content to full width */
    position: relative;
    padding: 60px 0 40px; /* Natural padding instead of aspect-ratio: 1 */
}

.view-more-grid-button .center_content {
    display: flex;
    flex-flow: column;
    align-items: stretch; /* Stretch button to full width */
    width: 100%;
}

.view-more-grid-button .btn-secondary {
    background: rgba(0, 0, 0, 0.05);
}

.view-more-grid-button .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

.view-more-grid-button .footer {
    margin-top: 80px; /* Natural spacing below button */
    width: 100%;
    text-align: center;
}

.view-more-grid-button .footer p {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-secondary);
}

/* Floating Navigation Tabs Dock (Glassmorphism) */
.navigation_tabs {
    display: inline-flex;
    padding: 2px;
    justify-content: center;
    align-items: center;
    gap: 2px;
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav_item_container {
    display: flex;
}

.nav_item {
    display: flex;
    width: 48px;
    height: 48px;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: var(--color-nav-inactive);
    transition: background-color 0.25s, color 0.25s;
    text-decoration: none;
}

.nav_item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--color-text-primary);
}

.nav_item .profile_pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.accessibility_label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* RESPONSIVE LAYOUT */
@media (max-width: 850px) {
    .home {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        padding: 40px 20px 20px;
        min-height: auto;
        height: auto;
        max-width: 100%;
    }

    .text-block p, 
    .text-block .intro-greeting {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .sidebar .navigation {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 24px;
    }

    .button {
        padding: 10px 16px;
        font-size: 14px;
    }

    .featured_projects {
        padding: 20px 20px 100px;
        width: 100%;
        height: auto;
        overflow-y: visible;
        scroll-snap-type: none;
        gap: 40px;
    }

    .featured_projects .project {
        max-width: 100%;
        min-height: auto;
    }

    .project_thumbnail {
        aspect-ratio: 1.25 / 1; /* Standard landscape aspect-ratio on mobile screens */
        border-radius: 16px;
    }

    .project_thumbnail .project_info {
        display: none; /* Hide info inside thumbnail on mobile */
    }

    /* Show info underneath project thumbnail on mobile */
    .mobile_card_info {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 16px 0 0;
    }

    .mobile_card_info .card_title {
        font-size: 18px;
        font-weight: 700;
        color: var(--color-text-primary);
        margin: 0;
    }

    .mobile_card_info .card_tags {
        font-size: 14px;
        color: var(--color-text-secondary);
        margin: 0;
    }

    .mobile_card_info .card_excerpt {
        font-size: 15px;
        line-height: 1.5;
        color: var(--color-text-primary);
        margin: 8px 0 0;
    }

    .view-more-grid-button {
        max-width: 100%;
        aspect-ratio: unset;
        min-height: 200px;
        padding-top: 40px;
    }

    .view-more-grid-button .footer {
        position: static;
        padding: 40px 0 20px;
    }
}

/* ==========================================================================
   INTERACTIVE CARD STACK CAROUSEL (FLOWWOW ANIMATION)
   ========================================================================== */

:root {
    --rotate-x: 0deg;
    --rotate-y: 0deg;
}

.fw_artwork {
    background: #FFE9EE;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 10px 0;
}

.card-stack {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1500px;
    transform-style: preserve-3d;
    animation: stackFloat 5s ease-in-out infinite;
}

@keyframes stackFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.card-stack .card {
    position: absolute;
    width: 440px;   /* Significantly larger, fits beautifully in the dynamic square container */
    height: 550px;  /* Aspect ratio matches original cards nicely */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    background-color: #ffffff;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.3s ease;
    pointer-events: none;
    transform-origin: bottom center;
    backface-visibility: hidden;
}

.card-stack .card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* Card stack states with 3D tilt properties */
.card-stack .card.active {
    transform: scale(1) translateY(0) rotate(0deg) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) translateZ(20px);
    opacity: 1;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.card-stack .card.next {
    transform: scale(0.93) translateY(32px) rotate(-1.5deg) rotateX(calc(var(--rotate-x, 0deg) * 0.7)) rotateY(calc(var(--rotate-y, 0deg) * 0.7)) translateZ(10px);
    opacity: 0.9;
    z-index: 9;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

.card-stack .card.next-2 {
    transform: scale(0.86) translateY(64px) rotate(1.5deg) rotateX(calc(var(--rotate-x, 0deg) * 0.4)) rotateY(calc(var(--rotate-y, 0deg) * 0.4)) translateZ(0px);
    opacity: 0.8;
    z-index: 8;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.card-stack .card.exit {
    transform: translate(160%, -20px) rotate(15deg) translateZ(50px);
    opacity: 0;
    z-index: 11;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease-in;
}

/* Rest of the stack hidden */
.card-stack .card:not(.active):not(.next):not(.next-2):not(.exit) {
    transform: scale(0.8) translateY(96px) translateZ(-20px);
    opacity: 0;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 850px) {
    .fw_artwork {
        padding: 20px 0;
        min-height: 380px;
    }
    .card-stack {
        height: 380px;
    }
    .card-stack .card {
        width: 220px;
        height: 275px;
    }
}

/* Light theme overrides for Flowwow project card text & backdrop */
.flowwow_project .progressive_blur {
    display: none;
}

.flowwow_project .project_info .title {
    color: #141414;
    filter: none;
}

.flowwow_project .project_info .subtitle {
    color: rgba(20, 20, 20, 0.6);
    filter: none;
}

/* --- Style 1: Royal Blue Solid (Active by default, matched to Tailwind reference) --- */
.btn-telegram-blue-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%; /* Stretch to full width of column block */
    height: 48px; /* Matched to h-[48px] */
    background-color: #2563eb; /* Matched to bg-blue-600 */
    border: 1px solid #1e40af; /* Matched to border-blue-800 */
    border-radius: 9999px; /* Matched to rounded-full */
    font-size: 16px;
    font-weight: 500; /* Matched to font-medium */
    color: #FFFFFF; /* Matched to text-white */
    text-decoration: none;
    box-shadow: inset 0 1.5px 0 0 rgba(255, 255, 255, 0.20); /* Matched to shadow-[0_1.50px_0_0_rgba(255,255,255,0.20)_inset] */
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.btn-telegram-blue-glass:hover {
    background-color: #1d4ed8; /* Matched to hover:bg-blue-700 */
    border-color: #1e40af;
    color: #FFFFFF;
}

.btn-telegram-blue-glass:active {
    transform: scale(0.985); /* Clean active press click effect */
}

/* --- Style 2: Frosted Blue Tint (Subtle and clean) --- */
.btn-telegram-blue-tint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%; /* Stretch to full width of column block */
    background: rgba(0, 16, 229, 0.05); /* Very light blue background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(0, 16, 229, 0.15);
    border-radius: 9999px;
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 550;
    color: #0010E5;
    text-decoration: none;
    box-shadow: 
        0 12px 30px rgba(0, 16, 229, 0.02), 
        inset 0 2px 4px rgba(255, 255, 255, 0.8), 
        inset 0 -2px 4px rgba(0, 0, 0, 0.01);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-telegram-blue-tint:hover {
    background: rgba(0, 16, 229, 0.1);
    border-color: rgba(0, 16, 229, 0.25);
    box-shadow: 
        0 16px 36px rgba(0, 16, 229, 0.05), 
        inset 0 2px 4px rgba(255, 255, 255, 0.9), 
        inset 0 -2px 4px rgba(0, 0, 0, 0.01);
    transform: translateY(-1px);
    color: #0010E5;
}

.btn-telegram-blue-tint:active {
    transform: translateY(1px);
    box-shadow: 
        0 8px 20px rgba(0, 16, 229, 0.01), 
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
}

/* --- Style 3: Neomorphic Soft Inset (Light 3D look) --- */
.btn-telegram-neomorphic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%; /* Stretch to full width of column block */
    background: #FBFBFB;
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 9999px;
    padding: 16px 36px;
    font-size: 16px;
    font-weight: 550;
    color: #000000;
    text-decoration: none;
    box-shadow: 
        6px 6px 16px rgba(0, 0, 0, 0.04), 
        -6px -6px 16px #FFFFFF, 
        inset 1px 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-telegram-neomorphic:hover {
    box-shadow: 
        inset 3px 3px 6px rgba(0, 0, 0, 0.03), 
        inset -3px -3px 6px #FFFFFF;
    color: #000000;
}

.btn-telegram-neomorphic:active {
    box-shadow: 
        inset 4px 4px 8px rgba(0, 0, 0, 0.04), 
        inset -4px -4px 8px #FFFFFF;
}
