/**
 * Main Styles - Kadley Portfolio
 * Global layout, body defaults, section containers, and utility classes.
 */

/* ---------- Body & Page ---------- */

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

#hero {
    min-height: 75dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--nav-height);
    padding-bottom: var(--space-md);
}

#hero .victorian-frame {
    padding: 2rem 5%;
    /* Breathable side padding */
    /* Minimal side padding */
    margin: 0;
    max-width: none;
    width: 100%;
    border-left: none;
    /* Remove side borders if they look bad at edges? Let's keep them for now but ensure full width */
    border-right: none;
    box-sizing: border-box;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    /* Add depth */
}

/* Split Layout - Desktop First */
.hero-split {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    justify-content: space-between;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 45%;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 2;
}

.hero-showcase {
    flex: 1.2;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    padding-left: 2rem;
    /* Add breathing room */
}

.hero-showcase-img {
    max-width: 100%;
    height: auto;
    max-height: 480px;
    /* Taller image */
    border-radius: var(--border-radius);
    border: 1px solid var(--border-glow);
    box-shadow: var(--glow-blue-strong), 0 0 30px rgba(77, 168, 255, 0.2);
    object-fit: cover;
    transform: perspective(1000px) rotateY(-5deg);
    /* Subtle 3D kick */
    transition: all 0.5s ease;
}

.hero-showcase:hover .hero-showcase-img {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
    box-shadow: var(--glow-blue-strong), 0 0 60px rgba(77, 168, 255, 0.4);
}



#hero .ornament-divider {
    margin-block: 1rem;
    align-self: flex-start;
    /* Left align divider */
    margin-left: 1rem;
    /* Indent slightly */
}



#hero h1 {
    margin-bottom: 0.5rem;
    font-size: 3.2rem;
    line-height: 1.1;
    text-align: left;
    background: linear-gradient(135deg, var(--neon-ice), #fff, var(--neon-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(77, 168, 255, 0.6));
}



/* ---------- Hero Dialog (Speech Bubble) ---------- */

.hero-dialog-layout {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

.hero-dialog-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    /* Center children horizontally */
}

/* Override bubble flex if needed */
.hero-bubble {
    width: 100%;
    /* Remaining styles same */
}

.contact-button-wrapper {
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

.hero-avatar-container {
    flex-shrink: 0;
    margin-top: 0.5rem;
}

#hero .avatar-hero {
    width: 126px;
    height: 126px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.4);
    background: var(--bg-elevated);
    object-fit: cover;
}

.hero-bubble {
    background: rgba(14, 14, 24, 0.75);
    /* Dark Glass */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glow);
    /* Animated glow border if possible, or just var */
    border-radius: 12px;
    padding: 1.5rem 2rem;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    flex: 1;
    animation: fadeIn 0.8s ease-out forwards;
}

/* Bubble Tail (Arrow) pointing Left */
.hero-bubble::before {
    content: '';
    position: absolute;
    top: 24px;
    left: -12px;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 12px solid rgba(14, 14, 24, 0.75);
    /* Match glass bg */
    filter: drop-shadow(-2px 0 2px rgba(0, 0, 0, 0.2));
}

#hero .hero-text {
    margin-bottom: 0;
    font-family: 'Victorian Parlor', serif;
    /* Requested Font */
    font-size: 1.25rem;
    /* Slightly larger for readability */
    line-height: 1.4;
    color: var(--text-primary);
    /* Cream/White */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: normal;
    font-style: normal;
    letter-spacing: 0.02em;
}

/* Quote Marks */
.hero-bubble::after {
    content: "\201D";
    position: absolute;
    bottom: -10px;
    right: 15px;
    font-size: 4rem;
    color: var(--gold);
    opacity: 0.4;
    font-family: 'Victorian Parlor', serif;
    line-height: 1;
    pointer-events: none;
}

/* Centered Social Links & Button */

.social-links-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    /* Center horizontally */
    margin-top: 1rem;
}

#hero .social-links {
    margin-bottom: 2rem;
    justify-content: center;
}

.social-link .social-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.social-link:hover .social-icon-img {
    transform: scale(1.1);
}



/* Ensure button container is centered */
.hero-content>div:last-child {
    text-align: center;
    width: 100%;
}

/* Mobile Responsive - Hero & Dialog (consolidated) */
@media (max-width: 900px) {
    .hero-dialog-layout {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .hero-bubble {
        width: 100%;
        text-align: center;
    }

    .hero-bubble::before {
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        border-right: 12px solid transparent;
        border-left: 12px solid transparent;
        border-bottom: 12px solid rgba(14, 14, 24, 0.75);
        border-top: none;
    }

    #hero {
        padding-top: calc(var(--nav-height) + 1rem);
        padding-bottom: var(--space-xl);
        height: auto;
        min-height: auto;
    }

    #hero .victorian-frame {
        padding: 1.5rem;
        max-width: 100%;
        width: 100%;
        border: none;
        border-top: 2px solid var(--border-glow);
        border-bottom: 2px solid var(--border-glow);
        background: linear-gradient(to bottom, transparent, rgba(10, 10, 12, 0.8), transparent);
    }

    .hero-split {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        align-items: center;
        text-align: center;
    }

    .hero-showcase {
        width: 100%;
        justify-content: center;
        padding-left: 0;
        margin-bottom: 1rem;
    }

    .hero-showcase-img {
        max-height: 350px;
        transform: none;
        box-shadow: var(--glow-blue);
    }

    .hero-showcase:hover .hero-showcase-img {
        transform: none;
    }

    #hero h1 {
        font-size: 2.8rem;
        text-align: center;
    }

    #hero .hero-text {
        text-align: center;
        font-size: 1rem;
        text-shadow: none;
    }

    #hero .ornament-divider {
        align-self: center;
        margin-left: 0;
    }

    #hero .social-links {
        justify-content: center;
    }

    .victorian-frame-corners {
        opacity: 0.3;
    }
}

@media (max-width: 480px) {
    #hero .avatar-hero {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .section {
        overflow: hidden;
    }

    .victorian-frame {
        overflow: hidden;
    }
}


/* Scroll Down Indicator */
/* Scroll Down Indicator */
.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    animation: bounce 2s infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.scroll-down__text {
    font-family: 'Victorian Parlor', serif;
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    color: white;
    /* Changed to white per request */
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.scroll-down svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

.scroll-down:hover .scroll-down__text {
    color: var(--neon-blue);
    text-shadow: var(--text-glow-blue);
}

.scroll-down:hover svg {
    color: var(--neon-blue);
    filter: drop-shadow(0 0 15px var(--neon-blue));
}

.scroll-down:hover,
.scroll-down:focus,
.scroll-down:active {
    color: var(--neon-blue);
    filter: drop-shadow(0 0 8px var(--neon-blue));
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

::selection {
    background: rgba(77, 168, 255, 0.25);
    color: var(--neon-ice);
}

/* ---------- Layout Containers ---------- */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--space-md);
}

.container--narrow {
    max-width: var(--max-width-narrow);
}

/* ---------- Sections ---------- */

.section {
    padding-block: var(--space-section);
    position: relative;
}

.section__header {
    text-align: center;
    margin-bottom: var(--space-sm);
}

.section__title {
    font-family: var(--font-display);
    font-size: var(--fs-h1);
    color: var(--neon-ice);
    text-shadow: var(--text-glow-blue);
    letter-spacing: 0.06em;
    margin-bottom: var(--space-xs);
}

.section__subtitle {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--text-secondary);
    font-style: italic;
}

/* ---------- Victorian Ornament Dividers ---------- */

.ornament-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-block: 0.5rem;
    color: var(--gold-dim);
    opacity: 0.6;
}

.ornament-divider::before,
.ornament-divider::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--gold-dim),
            transparent);
}

.ornament-divider__symbol {
    font-size: 1.2rem;
    color: var(--gold);
    text-shadow: var(--text-glow-gold);
}

/* ---------- Typography Utilities ---------- */

.display-title {
    font-family: var(--font-display);
    font-size: var(--fs-display);
    color: var(--neon-ice);
    text-shadow: var(--text-glow-blue);
    letter-spacing: 0.05em;
}

.heading-gold {
    font-family: var(--font-display);
    color: var(--gold);
    text-shadow: var(--text-glow-gold);
    letter-spacing: 0.04em;
}

/* ---------- Victorian Frame ---------- */

.victorian-frame {
    position: relative;
    border: 1px solid var(--border-glow);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    margin: var(--space-md);
}

.victorian-frame::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px solid var(--border-subtle);
    pointer-events: none;
}

.victorian-frame-corners {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.corner {
    position: absolute;
    font-family: 'Victorian Ornaments';
    font-size: 3.5rem;
    color: var(--gold);
    text-shadow: var(--text-glow-gold);
    line-height: 1;
    width: 1em;
    height: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Top Left */
.corner--tl {
    top: -24px;
    left: -24px;
    content: 'N';
}

/* Top Right */
.corner--tr {
    top: -24px;
    right: -24px;
    content: 'O';
}

/* Bottom Left */
.corner--bl {
    bottom: -24px;
    left: -24px;
    content: 'M';
}

/* Bottom Right */
.corner--br {
    bottom: -24px;
    right: -24px;
    content: 'K';
}

/* ---------- Visibility & Scroll Animation ---------- */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

/* ---------- Skip to Content (Accessibility) ---------- */

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--neon-blue);
    color: var(--bg-primary);
    font-weight: 700;
    z-index: 1000;
    border-radius: var(--border-radius);
}

.skip-link:focus {
    top: var(--space-sm);
}

/* ---------- Background Layer ---------- */

.bg-flowers {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url('../IMAGENES/background/Ice Blueweb.webp') center bottom / cover no-repeat;
    opacity: 0.08;
    pointer-events: none;
}

/* ==========================================================================
   FLOATING CHAT WIDGET
   ========================================================================== */
.floating-chat {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.floating-chat:hover {
    transform: translateY(-5px);
}

.floating-chat__gif {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--neon-blue);
    box-shadow: var(--glow-blue);
    background: var(--bg-card);
}

.floating-chat__bubble {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--neon-blue);
    box-shadow: var(--glow-blue);
    position: relative;
    white-space: nowrap;
    animation: float 3s ease-in-out infinite;
}

.floating-chat__bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--neon-blue) transparent transparent transparent;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .floating-chat {
        bottom: 1rem;
        right: 1rem;
    }

    .floating-chat__gif {
        width: 60px;
        height: 60px;
    }

    .floating-chat__bubble {
        font-size: 0.8rem;
    }
}