:root {
    --background-color: #ddfcad;
    --main-color: #0000FF;
    --accent-pink: #fbcaef;
    --dark-pink: #D741A7;
    --dark-purple: #331E36;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
/* css for phone layouts - may make more specific later */
/* need to add phone layout for book shelf */
@media screen and (max-width: 510px) {
.nav-button {
    width: 3.75em;
    height: 2em;
}
.nav-button span {
    width: 3.5em;
    height: 1.75em;
}
}
@media screen and (max-width: 768px) {
    .container {
        margin-top: 70px;
        margin-bottom: 50px;
    }
    
    .artwork {
        max-width: 100%;
    }
    
    .bookshelf-container {
        padding-top: 150px;
        margin: 40px 0;
    }

    .books {
        gap: 3%;
    }
    
    .book {
        width: 15%;
        min-width: 40px;
    }

    .cv-grid {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
      /* Create visual grouping for phones */
    .cv-item:nth-child(3n+1) {
        margin-top: 1rem;
        font-weight: 500;
    }
    
    .cv-item:nth-child(3n+2)::before {
        content: "Location: ";
        color: var(--main-color);
    }
    
    .cv-item:nth-child(3n+3)::before {
        content: "Date: ";
        color: var(--main-color);
    }

    .publications-grid {
        grid-template-columns: 1fr;
    }
    
    .pub-date {
        text-align: left;
        margin-bottom: 1rem;
    }
    
    .pub-date::before {
        content: "Published: ";
        color: var(--main-color);
    }
}


/* general styles - body etc */
html {
    scroll-behavior: smooth;
}
body {
    background-color: var(--background-color);
    color: var(--main-color);
    font-family: 'Mister Pixel', 'Steps', monospace !important;
    text-transform: lowercase;
    font-weight: 500;
    
}
p {
    background-color: var(--background-color);
}
h2 {
    text-shadow: 0 0 10px var(--background-color);
    font-size: 2em;
    font-weight: bold;
}
h3 {
    text-shadow: 0 0 10px var(--background-color);
    font-size: 1.5em;
    font-weight: bold;
}
h4 {
    font-size: 1.25em;
    padding-right: 10px;
    display: inline;
    font-style: oblique;
}

/* custom fonts
font credit: 
Basteleur by Keussel. Distributed by velvetyne.fr.
Steps Mono by Jean-Baptiste Morizot, Raphaël Bastide. Distributed by velvetyne.fr. 
*/

@font-face {
    font-family: "Basteleur";
    src: url('assets/fonts/Basteleur-Bold.woff2');
    src: url('assets/fonts/Basteleur-Bold.woff2') format('woff2'),
        url('assets/fonts/Basteleur-Moonlight.woff2') format('woff2');
}
@font-face {
    font-family: "Steps";
    src: url('assets/fonts/Steps-Mono.otf');
    src: url('assets/fonts/Steps-Mono-Thin.otf');
}
@font-face {
    font-family: "Mister Pixel";
    src: url('assets/fonts/mp16reg-webfont.woff2');
    
}
@font-face {
    font-family: "Bespoke";
    src: url('assets/fonts/Bespoke-y4q0VQzYv3.woff');
}

/* grid layout styles */

.layout {
    width: 100%;

    display: grid;
    grid:
    "fixed-header" auto
    "container" 1fr
    "fixed-footer" auto
    / 1fr;
    gap: 8px;
}

.fixed-header { 
    grid-area: fixed-header; 
    text-align: left;
    font-size: 1.1rem;
    margin-top: 0;
    position: sticky; /* Changed from fixed to sticky */
    top: 0;
    z-index: 1000;
}
.container { 
    grid-area: container; 
    min-height: 60vh;
    overflow: visible;
    padding: 20px 0;
    margin-top: 120px; /* Space for header */
    margin-bottom: 60px; /* Space for footer */
}
.fixed-footer { 
    grid-area: fixed-footer;
    position: sticky; 
    bottom: 0;
    width: 100%;
    z-index: 100;
    padding: 2px;
}
.main-nav {
    margin-right: 20px;
    margin-left: 10px;
    align-content: right;
    border-radius: 30px;
}

/* header */
.name {
    font-family: 'Basteleur', monospace;
    font-size: 3em;
    margin: -5px 2px;
    z-index: 9000;
}

/* Chrome/Safari (WebKit) - keeps -webkit-text-stroke */
@supports (-webkit-text-stroke: 0.5px var(--background-color)) {
    .name {
        -webkit-text-stroke: 0.5px var(--background-color);
        text-shadow: 0 0 10px var(--background-color);
    }
}

/* Firefox/Non-WebKit - uses text-shadow instead */
@supports not (-webkit-text-stroke: 0.5px var(--background-color)) {
    .name {
        /* Simulate a stroke using multiple text-shadows */
        text-shadow: 
            1.5px  0     0 var(--background-color),
            -1.5px  0     0 var(--background-color),
            0      1.5px  0 var(--background-color),
            0     -1.5px  0 var(--background-color),
            0 0 10px var(--background-color); 
    }
}
#sewing-graphic {
    position: fixed;
    margin-top: -200px;
    z-index: -1;
}

/* Button Styles */

.nav-button {
    padding: 0.1em 0.25em;
    width: 5.75em;
    height: 2em;
    background-color: var(--main-color);
    border: 0.05em solid var(--main-color);
    border-radius: 10em;
    font-size: 0.8em;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 0 1px 2px hsla(84, 93%, 83%, 70%);
}
.nav-button span {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    bottom: 0.4em;
    width: 5.5em;
    height: 1.75em;
    transform: translateX(-3px);
    background-color: var(--accent-pink);
    border-radius: 10em;
    color: var(--main-color);
    border: 0.1em solid var(--main-color);
    box-shadow: 0 0.1em 0.2em 0.019em var(--main-color);
    font-family: inherit;

}
.nav-button span:hover {
    transition: all 0.5s;
    transform: translate(-3.5px, 4.5px);
    box-shadow: 0 0 0 0 var(--main-color);
}
.nav-button span:not(hover) {
    transition: all 1s;
}

/* footer */
.projects {
    padding: 10px;
    margin: 10px;
    border: solid 2px var(--main-color);
    border-radius: 30px;
    background-color: var(--background-color);

}

/* main content styles */
section {
    display: block;
}
.section-header {
    display: block;
    margin-left: 20px;
}
.content-right {
    float: right;
    text-align: right;
}
.intro {
    padding: 10px 100px 10px 10px;
    margin-right: 100px;
}
.artwork {
    max-width: 25%;
    max-height: 80vh;
    padding: 5px;
}

.cv-section {
    margin-bottom: 1rem;
}

.about {
    margin-right: 50px;
}

/* headers 4 screen readerz */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.cv-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    gap: 20px;
    margin-top: 0.5rem;
    width: 70%;
    text-align: right;
}

.cv-item {
    padding: 0.25rem;
}

  /* 2 cols for selected pubs */
.publications-grid {
    display: grid;
    grid-template-columns: 3fr 1fr; /* Wider first column */
    gap: 0.5rem 1rem;
    margin-top: 0.5rem;
}

.pub-item {
    padding: 0.25rem 0;
    font-style: italic; 
}

.pub-date {
    padding: 0.25rem 0;
    text-align: right; /* Align dates to right */
}


/* bookshelf hell */
.studio {
    position: relative;
    padding-top: 200px; /* Space for floating books */
    margin: 40px 0;
    z-index: 1; /* Create new stacking context */
}
.bookshelf-note {
    position: absolute;
    right: 20px;
    margin: 10px;
    padding: 10px;
    border: solid 2px var(--main-color);
    border-radius: 30px; 
}
.bookshelf-container {
    position: relative;
    margin: 60px 0; /* Space above and below each shelf */
    padding-top: 180px; /* Space for floating books */
    min-height: 60px; /* Minimum height for shelf area */
}

.bookshelf {
    max-width: 1000px;
    width: 80%;
    margin: 0 auto;
    position: relative;
    height: 60px;
    z-index: 2;
    border-radius: 30px;
}

/* Shelf top (the visible part) */
.bookshelf::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 16px;
    box-shadow: 0px -1px 6px #E3CEDD, 0px 4px 16px #C59BBA;
    z-index: 3;
    border-radius: 30px;
    background-color: var(--accent-pink);
}

/* Shelf shadow */
.bookshelf::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(180deg, #E3CEDD 0%, rgba(197, 155, 186, 0) 100%);
    clip-path: polygon(0% 0%, 100% 0%, 97% 100%, 3% 100%);
    z-index: 1;
    border-radius: 30px;
}

.books {
    display: flex;
    justify-content: space-evenly;
    gap: 1%;
    width: 100%;
    position: absolute;
    bottom: 25px; /* Changed from bottom positioning */
    left: 0;
    right: 0;
    flex-wrap: wrap;
    z-index: 1;
    padding-bottom: 20px;
}

.book {
    width: 10%;
    min-width: 50px;
    border-radius: 3px 0.5px 0.5px 3px;
    aspect-ratio: 115 / 180;
    position: relative;
    transform-style: preserve-3d;
    margin-bottom: 0;
    transform: none;
    z-index: 1;
}
.book-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* Higher than the pseudo-elements */
    cursor: pointer;
}

.book::before,
.book::after {
    position: absolute;
    width: 100%;
    display: block;
    content: " ";
    transition: all 300ms ease-out;
    background: var(--bg-image) center center/cover no-repeat, #FEECF9;
}

.book::before {
    height: 100%;
    box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.25),
        inset 2px 0px 2px 1px rgba(29, 27, 27, 0.2);
}

.book::after {
    height: 102%;
    filter: blur(10px);
    z-index: -1;
    opacity: 1;
}

.book:hover::before,
.book:hover::after {
    transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.book:hover::before {
    transform: translate(0, -45%) skew(3deg, -3deg) scale(1.35);
}

.book:hover::after {
    transform: translate(0, -45%) skew(3deg, -3deg) scale(1.275);
}

.book:nth-child(even):hover::before {
    transform: translate(0, -45%) skew(-3deg, 3deg) scale(1.35);
}

.book:nth-child(even):hover::after {
    transform: translate(0, -45%) skew(-3deg, 3deg) scale(1.275);
}

/* Studio Nonsense */
.bespoke-text {
    font-family: 'Bespoke', monospace;
}
#for-all-mankind {
    height: 200px;
    width: auto;
}
.studio img {
    max-width: 600px;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    flex-wrap: wrap;
}

/* Other Pages */

#readinglistgallery {
     padding: 2px;
     display: flex;
     flex-direction: row;
     flex-wrap: wrap;
    }
#readinglistgallery img {
max-width: 300px;
height: 100%;
position: relative;
flex-grow: 1;
}