/* MoreAboutMe.CSS - Specific styles for the More About Me page */

/* -- Page Layout -- */
.hex-container {
    padding-top: 6rem;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
}

/* -- Left Column: Details Panel & Carousel -- */
.details-panel {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInLeft 0.8s ease forwards;
    min-height: 500px;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

.interest-description {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: opacity 0.5s ease;
}

.carousel-container.hidden {
    display: none !important;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    height: 100%;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(112, 0, 255, 0.4);
    border-color: rgba(112, 0, 255, 0.8);
    box-shadow: 0 0 15px rgba(112, 0, 255, 0.4);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator-dot.active {
    background: var(--color-accent-secondary);
    box-shadow: 0 0 10px var(--color-accent-secondary);
    transform: scale(1.3);
}

/* -- Right Column: Hexablock Grid -- */
.hex-grid-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

.hex-grid {
    display: flex;
    flex-wrap: wrap;
    width: 450px;
    /* 3 blocks per row * 150px space */
    justify-content: flex-start;
    align-content: flex-start;
    padding-top: 10px;
    /* Buffer */
    padding-bottom: 40px;
    margin: 0 auto;
}

/* Hexagon Base Styles */
.hexagon {
    width: 140px;
    height: 160px;
    background: rgba(20, 20, 25, 0.8);
    backdrop-filter: blur(10px);
    margin: -40px 5px 0 5px;
    /* Negative margin pulls them up to interlock */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

/* Ensure the first row doesn't get clipped by the negative top margin */
.hexagon:nth-child(1),
.hexagon:nth-child(2),
.hexagon:nth-child(3) {
    margin-top: 0;
}

/* 3-2-3-2 Interlocking Honeycomb Math */
/* Every 4th item (start of the 2-item row) gets pushed right by half a hexagon width + margin (75px) */
.hexagon:nth-child(5n + 4) {
    margin-left: 80px;
    /* 75px offset + 5px base margin */
}

/* Simulated Hex Border Gradient */
.hexagon::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--color-bg-deep);
    /* Inner color matching site background */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: -1;
    transition: all 0.4s ease;
}

/* Hover & Interactive States */
.hex-interactive {
    background: rgba(255, 255, 255, 0.1);
}

.hex-interactive:hover {
    transform: scale(1.1);
    z-index: 10;
    background: linear-gradient(135deg, var(--color-accent-secondary), var(--color-accent-primary));
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
}

.hex-interactive.active {
    transform: scale(1.15);
    z-index: 20;
    background: linear-gradient(135deg, var(--color-accent-primary), var(--color-accent-tertiary));
}

.hex-interactive:hover::before,
.hex-interactive.active::before {
    background: rgba(10, 10, 15, 0.9);
    /* Slightly darken inner to make border pop */
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
}

.hex-content {
    color: var(--color-text-secondary);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hex-interactive:hover .hex-content,
.hex-interactive.active .hex-content {
    color: #fff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    transform: scale(1.15);
}

.hex-decorative {
    background: rgba(255, 255, 255, 0.02);
    cursor: default;
}


/* -- Responsive -- */
@media (max-width: 1200px) {
    .hex-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hex-grid-wrapper {
        order: -1;
        /* Put hexes on top on small screens */
    }
}

@media (max-width: 768px) {
    .hex-container {
        padding-top: 4rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .details-panel {
        padding: 2rem 1.5rem;
    }

    /* Shrink the hex grid on mobile */
    .hex-grid {
        width: 226px;
        /* Forces exactly 2 per row (2 * 113 = 226) */
    }

    .hexagon {
        width: 105px;
        height: 120px;
        margin: -30px 4px 0 4px;
        /* Pull up 1/4 of 120px */
    }

    /* Reset desktop first-row margins */
    .hexagon:nth-child(3) {
        margin-top: -30px;
    }

    .hexagon:nth-child(1),
    .hexagon:nth-child(2) {
        margin-top: 0;
    }

    /* Reset desktop nth-child margins */
    .hexagon:nth-child(5n + 4) {
        margin-left: 4px;
        /* Reset to base */
    }

    /* Apply mobile 2-1-2-1 Interlocking Honeycomb Math */
    /* Cycle is 3 items. Every 3rd item is the start of the 1-item row. */
    .hexagon:nth-child(3n + 3) {
        margin-left: 60.5px;
        /* Half of 113px space (56.5px) + 4px base margin */
    }

    .hex-content svg {
        width: 30px;
        height: 30px;
    }
}