/*
 * =========================================
 * GHOST OF TSUSHIMA THEME & BENTO GRID
 * =========================================
*/

:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 20, 0.4);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary-red: #8f1e1e;
    --accent-red: #ff3333;
    --gold: #d4af37;
    --text-main: #f0f0f0;
    --text-dim: #a0a0a0;
    --glass-blur: 16px;
    /* Increased blur for stronger glass effect */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Base Settings */
body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    /* Centered vertically if content is short, but scrollable */
    min-height: 100vh;
    overflow-x: hidden;
    /* Deep atmospheric gradient */
    background: radial-gradient(circle at 50% -20%, #2a0a0a 0%, #050505 60%);
}

/* 
   Background Animation 
   Simulating floating embers/particles and subtle fog
*/
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    /* Noise texture for film grain feel */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
}

/* Dynamic Red Glow (Pulsing Light) */
body::after {
    content: "";
    position: fixed;
    bottom: -20%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(143, 30, 30, 0.15), transparent 70%);
    filter: blur(80px);
    z-index: -2;
    animation: drift 15s ease-in-out infinite alternate;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50px, -50px);
        opacity: 0.8;
    }
}

/* Main Layout */
.main-container {
    width: 100%;
    max-width: 1100px;
    padding: 2rem;
    box-sizing: border-box;
    margin: 2rem auto;
}

/* Bento Grid System */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(160px, auto);
    gap: 1.5rem;
}

/* Glassmorphism Cards */
.bento-item {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Interactive Hover Effects */
.bento-item:hover {
    transform: translateY(-8px) scale(1.01);
    background: rgba(40, 40, 40, 0.5);
    border-color: rgba(143, 30, 30, 0.5);
    /* Red border glow */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 20px rgba(143, 30, 30, 0.2);
    z-index: 2;
}

/* Light/Shine Effect on Cards */
.bento-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transform: skewX(-20deg);
    transition: left 0.8s ease;
}

.bento-item:hover::after {
    left: 200%;
    transition: left 1s ease;
}

/* --- Specific Card Styles --- */

/* Profile / Header */
.item-profile {
    grid-column: span 12;
    justify-content: center;
    align-items: flex-start;
    /* Left align text */
    padding: 2.5rem;
    background: linear-gradient(160deg, rgba(30, 30, 30, 0.7), rgba(10, 10, 10, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    .item-profile {
        grid-column: span 8;
        grid-row: span 1;
    }
}

/* CTA "Travaux" */
.item-cta {
    grid-column: span 12;
    background: linear-gradient(135deg, rgba(143, 30, 30, 0.2), rgba(0, 0, 0, 0.5));
    border-color: rgba(143, 30, 30, 0.3);
    cursor: pointer;
    text-decoration: none;
    color: white;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.item-cta:hover {
    background: linear-gradient(135deg, rgba(180, 40, 40, 0.3), rgba(20, 0, 0, 0.6));
}

@media (min-width: 768px) {
    .item-cta {
        grid-column: span 8;
        /* Expanded to fill space under Profile */
        grid-row: span 1;
    }
}

/* Socials */
/* Socials */
/* Socials */
.item-socials {
    grid-column: span 12;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Top align content */
    align-items: flex-start;
    /* Left align content */
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .item-socials {
        grid-column: span 4;
        grid-row: span 2;
        /* Make it taller to fit the list */
    }
}

/* Portfolio Link (Replaces Spotify) */
.item-portfolio {
    grid-column: span 12;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.6), rgba(10, 10, 10, 0.8));
    border-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: white;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 180px;
}

.item-portfolio:hover {
    background: linear-gradient(135deg, rgba(50, 50, 50, 0.7), rgba(20, 20, 20, 0.9));
    border-color: var(--primary-red);
}

@media (min-width: 768px) {
    .item-portfolio {
        grid-column: span 12;
        /* Full width at the bottom */
        grid-row: span 1;
    }
}

/* --- Typography --- */

h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
    color: white;
    /* Slight gold gradient text */
    background: linear-gradient(to bottom right, #ffffff, #dcdcdc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

h2 {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 10px 0 0;
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

p {
    font-size: 1rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* --- Social Icons --- */
/* --- Social Icons --- */
/* --- Social Icons List Design --- */
.socials-container {
    display: flex;
    flex-direction: column;
    /* Vertical list */
    gap: 1rem;
    width: 100%;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 86%;
    height: auto;
    /* Allow flexible height */
    text-decoration: none;

    /* Card Style */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    /* Rounded rect, not circle */
    padding: 1rem;

    transition: all 0.3s ease;
}

.social-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-right: 1rem;
    filter: brightness(0) invert(1) opacity(0.9);
    flex-shrink: 0;
}

/* Container for text inside the link */
.social-text {
    display: flex;
    flex-direction: column;
}

.social-text strong {
    color: white;
    font-size: 1rem;
    font-weight: 600;
}

.social-text span {
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Hover Effects */
.social-icon:hover {
    transform: translateX(5px);
    /* Slide right slightly */
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-red);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-icon:hover img {
    filter: brightness(0) invert(1) opacity(1);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .item-socials {
        align-items: center;
        text-align: center;
    }

    .socials-container {
        align-items: stretch;
    }

    .social-icon {
        background: rgba(255, 255, 255, 0.08);
        /* Slightly more visible on mobile */
    }
}

/* --- Footer --- */
.footer {
    grid-column: span 12;
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0.6;
}

/* --- Reveal Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*
 * =========================================
 * NAVIGATION PAGE SPECIFIC STYLES (Restored & Adapted)
 * =========================================
*/

/* Reset/Specifics for Navigation Page */
body.nav-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    min-height: 100vh;
}

body.nav-page header {
    padding: 0;
    margin-bottom: 2rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

/* Back Link (Parent Link) */
.parent-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-family: var(--font-heading);
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: color 0.3s ease;
    margin-bottom: 1rem;
}

.parent-link:hover {
    color: var(--primary-red);
}

.parent-link img {
    margin-right: 0.5rem;
    filter: invert(0.7);
}

body.nav-page main {
    width: 100%;
    max-width: 500px;
    padding: 0;
}

.link-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Navigation Buttons */
.link-list a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    display: block;
    padding: 1rem 2rem;
    color: white;
    background-color: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(143, 30, 30, 0.3);
    /* Red border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Button Glow Effect */
.link-list a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(189, 45, 45, 0.2),
            /* Red glow */
            transparent);
    transition: all 0.6s ease;
    z-index: 1;
}

.link-list a:hover::before {
    left: 100%;
}

/* Hover State */
.link-list a:hover {
    background-color: rgba(40, 40, 40, 0.8);
    transform: translateY(-4px) scale(1.02);
    border-color: var(--primary-red);
    box-shadow: 0 8px 25px rgba(189, 45, 45, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.3);
}

.link-list a:active {
    transform: translateY(1px) scale(0.98);
    background-color: rgba(20, 20, 20, 0.9);
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Staggered Animation Delays */
.link-list a:nth-child(1) {
    animation-delay: 0.1s;
}

.link-list a:nth-child(2) {
    animation-delay: 0.2s;
}

.link-list a:nth-child(3) {
    animation-delay: 0.3s;
}

.link-list a:nth-child(4) {
    animation-delay: 0.4s;
}

.link-list a:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}