/* UNIVERSAL */
* {
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
 }
 
html {
     font-size: 16px;
     -webkit-font-smoothing: antialiased;
 }
 
body {
     background-color: #ebbdb0;
     margin: 0;
     padding: 0;
     overflow-x: hidden;
     display: flex;
 }
 
/* NAV - Desktop */
header {
     display: flex;
     flex-direction: column;
     align-items: center;
     width: 180px; /* Fixed width for sidebar */
     min-height: 100vh;
     padding: 30px 0;
     border-right: 3px solid black;
     position: fixed;
     left: 0;
     top: 0;
 }
 
.nav {
     font-family: UniFont, Helvetica, sans-serif;
     font-weight: 700;
     text-align: center;
     letter-spacing: .5px;
     width: 100%;
 }

#bb-menu {
    list-style-type: none;
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center;
    gap: 10px; /* Space between items */
    margin: 0;
    padding: 0;
}
 
.nav-item {
    margin: 0;
}

.nav-item:first-child {
    margin-bottom: 20px; /* Adjust this value to your preference */
}

.nav-footer-logo {
    margin-top: auto;
    width: 100px;
}

/* Style for the anchor links */
.nav-item a {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Wiggle animation on hover for all nav items except the first (logo) */
.nav-item:not(:first-child) a:hover {
    animation: wiggle 0.4s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-5deg); }
    30% { transform: rotate(5deg); }
    50% { transform: rotate(-4deg); }
    70% { transform: rotate(4deg); }
    90% { transform: rotate(-2deg); }
}

/* UNIVERSAL CONTENT CONTAINER */
.bb-content {
    margin-left: 210px;
    padding: 30px;
    max-width: calc(100% - 210px);
    width: calc(100% - 210px);
    position: relative;
    box-sizing: border-box;
    overflow-x: clip;   /* clip without creating a scroll container — keeps position:sticky working */
}


/* Mobile adjustments */
@media (max-width: 576px) {
    body {
        flex-direction: column;
    }

    header {
        position: relative;
        width: 100%;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid black;
        padding: 15px 20px;
    }

    #bb-menu {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
        align-items: center;
    }

    .nav-item:first-child {
        margin-bottom: 0;
        margin-right: 5px;
    }

    .nav-footer-logo {
        display: none;
    }

    .nav-item:first-child img {
        margin-top: 2px;
        height: 33px;
    }

    .nav-item:not(:first-child) img {
        margin-top: 5px;
        height: 28px;
    }

    .bb-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 20px;
        margin-top: 15px;
    }

}

/* Fonts-Page */
/* FONTS SECTION */
.fonts {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    /* Remove grid-column here since parent selector handles it */
}

/* Toy Box "New" badges */
#font-toybox {
    position: relative;
}

.badge-new {
    position: absolute;
    top: -30px;
    left: 20px;
    width: 150px;
    z-index: 10;
    animation: badge-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

.badge-smiley {
    position: absolute;
    bottom: -30px;
    right: 20px;
    width: 150px;
    z-index: 10;
    animation: badge-rock 2.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.12); }
}

@keyframes badge-rock {
    0%, 100% { transform: rotate(-12deg); }
    50%       { transform: rotate(12deg); }
}

/* Individual font header */
.font-header {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 300px;
    min-width: 560px;
}

/* Corner SVGs - explicit dimensions from source */
.border-corner-left,
.border-corner-right {
    flex-shrink: 0;
    width: 150.16px; /* Match viewBox width exactly */
    height: 300px; /* Match viewBox height exactly */
    opacity: 0.18;
    transition: opacity 0.3s ease;
}

/* Middle content area - stretches horizontally */
.font-header-content {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Top and bottom black borders */
.font-header-top-border,
.font-header-bottom-border {
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.18);
    transition: background-color 0.3s ease;
}

.font-header-top-border {
    top: 0;
}

.font-header-bottom-border {
    bottom: 0;
}

/* Font Link*/

.font-header-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.font-header-link:hover {
    transform: translateY(-5px);
}

.font-header-link:hover .border-corner-left,
.font-header-link:hover .border-corner-right {
    opacity: 1;
}

.font-header-link:hover .font-header-top-border,
.font-header-link:hover .font-header-bottom-border {
    background-color: black;
}

.font-header-link:hover #font-pe .font-name,
.font-header-link:hover #font-kilt .font-name,
.font-header-link:hover #font-toybox .font-name {
    animation-play-state: running;
}

/* Font information */
.font-info {
    text-align: center;
    z-index: 1;
    /* padding: 0 40px; */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 150px; /* Minimum height instead of fixed */
}

.font-name {
    font-size: clamp(5rem, 10vw, 10rem);
    letter-spacing: 0.05em;
    margin: 0;
    font-weight: normal;
    line-height: 1;
}

.font-meta {
    display: flex;
    justify-content: center;
    gap: clamp(80px, 18vw, 240px);
    font-size: 12px;
    margin-top: auto; /* This pushes it to the bottom with consistent spacing */
}

.font-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: UniFont, Helvetica, sans-serif;
    white-space: nowrap;
}

.meta-icon {
    font-family: UniEmoji, sans-serif;
    font-style: normal;
    font-size: 16px;
}

/* Font-specific styles */
#font-pe .font-name {
    font-family: pe-vf, monospace;
    font-size: 11rem;
    margin-bottom: 5px;
    transform: translateX(13px);
    font-variation-settings: 'DOTW' 0, 'BARW' 100;
    animation: pe-morph 4s ease-in-out infinite;
    animation-play-state: paused;
}

#font-kilt .font-name {
    font-family: kilt-vf, monospace;
    font-size: 13rem;
    font-variation-settings: 'wght' 100;
    transform: translateX(10px);
    margin-bottom: -15px;
    animation: weight-pulse 3s ease-in-out infinite;
    animation-play-state: paused;
}

@keyframes pe-morph {
    0%, 100% {
        font-variation-settings: 'DOTW' 0, 'BARW' 100;
    }
    50% {
        font-variation-settings: 'DOTW' 100, 'BARW' 0;
    }
}

@keyframes weight-pulse {
    0%, 100% {
        font-variation-settings: 'wght' 100;
    }
    50% {
        font-variation-settings: 'wght' 200;
    }
}

#font-toybox .font-name {
    font-family: toy-box, monospace;
    font-size: 11rem;
    transform: translateX(10px);
    font-variation-settings: 'HOLE' 0;
    animation: hole-pulse 3s ease-in-out infinite;
    animation-play-state: paused;
}

@keyframes hole-pulse {
    0%   { font-variation-settings: 'HOLE' 0; }
    50%  { font-variation-settings: 'HOLE' 100; }
    100% { font-variation-settings: 'HOLE' 0; }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .font-header {
        min-height: 200px;
    }
    
    .border-corner-left,
    .border-corner-right {
        width: 100px;
        height: 200px;
    }

    .badge-smiley{
        width: 60px;
        bottom: -10px;
        right: 10px;
    }

    .badge-new{
        width: 60px;
        top: -10px;
        left: 5px;
    }
    
    .font-header-top-border,
    .font-header-bottom-border {
        height: 13.33px;
    }
    
    .font-name {
        font-size: 3rem;
    }
    
    .font-meta {
        flex-direction: column;
        gap: 10px;
        font-size: 0.85rem;
    }
}

/* Mobile - font cards */
@media (max-width: 576px) {
    .font-header {
        min-width: 0;
        min-height: auto;
    }

    .border-corner-left,
    .border-corner-right {
        width: 60px;
        height: auto;
    }

    /* corner height at 60px wide = 60 × (300/150.16) ≈ 120px
       SVG bar at Y=0, h=20 in 300-unit space → 120 × (20/300) ≈ 8px */
    .font-header-top-border,
    .font-header-bottom-border {
        height: 8px;
    }

    .font-info {
        min-height: 0;
        gap: 5px;
        padding-bottom: 3px;
    }

    #font-pe .font-name {
        font-size: 15vw;
        transform: translateX(5px);
        margin-bottom: 0;
    }

    #font-kilt .font-name {
        font-size: 16vw;
        transform: translateX(7px);
        transform: translateY(5px);
        margin-bottom: 0;
    }

    #font-toybox .font-name {
        font-size: 15vw;
        transform: translateX(4px);
        margin-bottom: 0;
    }

    .font-meta {
        font-size: 7px;
        gap: 8px;
        flex-direction: row;
        justify-content: center;
    }

    .font-meta span {
        white-space: normal;
        text-align: center;
    }
}


/*Font Pages*/

/* PE-Slider-Icons */
  
.typing-area {
    color: #000000;
    outline: none;
    font-size: 120px;
    line-height: 150px;
    letter-spacing: 0px;
    text-align: center;
    overflow: hidden;
}

#d2d-area {
    font-family: dot2dot;
}


#pe-area {
    font-size: 72px;
    line-height: 86px;
    font-family: pe-vf;
    font-variation-settings:
        'DOTW' 0,
        'BARW' 0;
    height: 100px;
    overflow: hidden;
}




/* Download-button */

.download-area{
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#bloopy-dwn-btn{
    transform: translateX(40px);
    width: 40%;
    height: auto;
}

/* PE Page Hero */
#hero-img-mob {
    display: none;
}

#hero-img {
    width: 50%;
    margin: 0 auto;
}

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

/*d2d Page Mob*/

@media (max-width: 576px){

    /*Hero-img*/
    #hero-img{
        display: none;
    }

    #hero-img-mob{
        width: 100%;
        height: auto; /* Makes the container take up the full viewport height */
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden; /* Ensures no content spills outside */
        margin-top: 20px;
        display: block;
    }
    
    /* Font Specimen */
    #matter-container {
        display: none;
    }

    /* Type Tester */
    .bb-tester{
        margin: 20px 0px;
    }

    .typing-area {
        font-size: 50px;
        line-height: 72px;
        letter-spacing: 0px;
        text-align: center;
        overflow: hidden;
    }

    #pe-area {
        font-size: 50px;
        line-height: 75px;
    }

    .range-value{
        display: none;
    }

    .bb-description{
        margin: 50px 0px;
    }

    #d2d-text, #pe-text{
        display: none;
    }

    #d2d-text-mob, #pe-text-mob{
        display: block;
    }

    #bloopy-dwn-btn{
        display: none;
    }

}

/* About  Page */

#abt-content{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 50px;
}

.abt-layout {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%; /* Ensure it takes the full width of the parent */
    max-width: 500px;
    height: auto; /* Automatically adjust the height */
    margin-bottom: 50px;
    border-top: 1px solid black;
    padding-top: 20px;
}

.abt-header{
    font-family: Helvetica, sans-serif;
    font-size: 18px;
    background-color: none; /* Optional: Add a background color */
    padding-bottom: 18px;
}

.about-text-container{
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Arrange its children vertically */
    justify-content: center;
    padding-right: 30px;
}

.about-column{
    font-family: monospace;
    font-size: 0.75em;
    max-width: 480px;
}

.abt-riv {
    position: relative;
    width: 100%; /* Ensure it takes the full width of the parent */
    height: auto; /* Automatically adjust the height */
}

.abt-canvas {
    display: block; /* Ensure it is displayed as a block element */
    width: 100%; /* Ensure it takes the full width of the parent */
    height: auto; /* Automatically adjust the height */
    max-width: 750px;
}

/* About  Page - Rivs */

/* Section 01 */
.about-copy a{
    color: black;
    transition: 0.2s ease-in;
}

.about-copy a:hover{
    color: rgb(255, 0, 200);
    transition: 0.2s ease-out;
}

/* Section 04 */

/* Section 05 */
#abt-canvas-5{
    max-width: 750px;
}

#abt-5-cl-2{
    position: absolute;
    bottom: 30%;
    left: 25%
}

#abt-5-cl-2 a{
    color: blue;
}

/*About Page - MOB*/
@media (max-width: 576px){

}

/* Journal Page*/

#journal-title{
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    margin-bottom: 0;
    transform: translateY(-30px);
}

#journal-gif{
    max-width: 80vw;
}

.journal-entries{
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    width: 100%;
    height: auto;
    align-items: flex-start;
}

.journal-col{
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    justify-content: flex-start;
    width: 50%;
    max-width: 400px;
}

#journal-col-1{
    margin-right: 3em;
    align-items: flex-start;
}

#journal-col-2{
    align-items: flex-end;
}

.entry{
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    width: 100%;
    margin-bottom: 1em;
}

.entry-r{
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    width: 100%;
    margin-bottom: 1em;
    justify-content: flex-end;
}

.pencil {
    position: relative;
    display: flex;
    align-items: center; /* Center vertically */
    justify-content: space-around; /* Distribute space between elements */
    width: 500px;
    height: 40px; /* Adjust this value according to the actual height of your pencil image */
    background-image: url(journal/svgs/bb24_journal-pencil_V1.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain; /* or cover, depending on your design */
    overflow: visible;
}

.entry-button{
    position: relative;
    display: block;
    font-family: monospace;
    font-size: 0.8em;
    text-align: center;
    border: 2px solid black;
    width: 20%;
    border-radius: 12px;
    padding: 10px 20px;
    transform: translateX(-10px);
}

.entry-button a{
    color: #000000;
}

.entry-date {
    position: relative;
    flex: 1 1 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "IBM Plex Mono", monospace;
    font-weight: 600;
    font-style: italic;
    font-size: 0.5em;
    height: 100%; /* Make sure it spans the full height of the pencil */
    padding-left: 20px;
}

.entry-bloopy {
    position: relative;
    display: flex;
    flex: 1 1 0;
    align-items: center; /* Center vertically */
    justify-content: center; /* Distribute space between elements */
    height: 0.9em; /* Adjust this value according to the actual height of your pencil image */
    background-image: url(journal/svgs/bb24_Journal-Bloopy.svg);
    background-repeat: no-repeat;
    background-size: contain; /* or cover, depending on your design */
    overflow: visible;
    transform: translateX(12px);
}

/*Journal - Mob*/
@media (max-width: 576px){
    #journal-title{
        transform: translateY(0px);
        margin: 10px 0px;
    }
    
    .journal-entries{
        flex-direction: column;
    }

    .journal-col {
        width: 100%;
    }
}
