*, *:before, *:after { box-sizing: border-box; }
body {
    margin: 0;
    background-color: #fffbfa;
}

/* Globals */
h1, h2, h3, h4, p, ol, ul, li, a, figure, p:last-child, ul:last-child, ol:last-child {
    font-family:'Courier New', monospace;
    font-size: 14px;
    margin: 0;
    padding: 0;
    overflow-wrap: anywhere;   /* modern, nice */
    word-break: break-word; 
}

a:hover {
    border:2px dashed #ff948f;
    transform: scale(1.05);
} 

h1 { 
    font-size: 150%;
    margin-bottom: .3em;
}

h2 {
    font-size: 125%;
}


p .section-description {
    background: #fffbfa;
    border: 1px solid #969696;
    border-radius: 5px;
    padding: 8px;
}

ul, ol { 
    position: relative;
    list-style: none;
    margin-left: 0;
    padding-left:.5em;
}

li:before { 
    content: "»";
    position: absolute;
    left: 0;
/*   padding-left: .5em;
    display: block;
    float: left;
    width: 1.2em;
    color: #000; */
}


li {
    list-style-position: inside;
    padding-left: 1em;
}


p, ul, ol {
    margin-bottom: 1em;
    line-height: 1.3;
}

img {
    max-width: 100%;
    height: auto;
}

header, section, aside, footer {
    padding: 8px;
    border: 1px solid #969696;
    border-radius: 10px;
    background: #fffbfa;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;  /* desktop: avatar aligns with top of text */
    gap: 10px;
    border-top: none;
}

/* text column takes the remaining space */
#bio {
    flex: 1 1 auto;
}

/* avatar column on the right */
#avatar {
    flex: 0 0 auto;
    max-width: 100px;   /* you said you set these */
    max-height: 100px;
    width: 100%;
    height: auto;
    border-radius: 50%; /* optional: circle avatar */
    object-fit: cover;  /* keeps it nice if the source isn't square */
}

#avatar {
    touch-action: none; /* let our JS fully control dragging on touch screens */
}

.avatar-stuck {
    border-radius: 50%;     /* match your main avatar */
    pointer-events: none;   /* let clicks pass through; purely decorative */
    opacity: 0.85;          /* tiny bit ghosty so you can tell it’s a sticker */
    transition: opacity 5s ease-out;  /* <--- NEW: fade over ~5s */
}


header, footer, .section-wrapper, .tri-column {background: #ff948f;}

.medium {font-size: 125%;}
.large {font-size: 400%;}

figure img {
    max-height: 100px;
    max-width: 100px;
    aspect-ratio: 1 / 1;
    padding: 2px;
    place-items: center;
}

time {
    text-size: 0.8em;
    display: inline-block;
    border: 1px dashed #ff948f;
    border-radius: 5px;
    padding: 0 4px;
    border-top: 0;
    border-left: 0;
    padding-left: 0;
    padding-top: 0;
}

blockquote {
    border-left: 2px solid #ff948f;
    padding-left: 10px;
}

#announcements .section {
    border: none;
}

.section-wrapper a {
    overflow-wrap: anywhere;   /* modern, nice */
    word-break: break-word;    /* good fallback */
}

.section-wrapper > .two-column {
    border: none;
    padding: 0;      /* optional: lets inner sections control their padding */
    background: #ff948f;  /* keep pink background */
}

.panel-explorer > .two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 10px;
    grid-auto-rows: minmax(200px, 1fr);
    background: #ff948f;
    border: none;
    padding: 0;
}

.panel-explorer iframe {
    display: block;
    margin: 0;
    background: #fffafb;
}

.explorer-item {
    padding: 0;
    border: 1px solid #969696;
    border-radius: 5px;
}


footer {
    text-align: center;
}

.credit {font-style: italic;}

/* Profile Container */

#container {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px;
    margin-top: 30px;
    margin-bottom: 30px;
    position: relative;
    display: grid;
    grid-gap: 10px;
    border-radius: 10px;
}

/* Layouts */
.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 10px;
    grid-auto-rows: minmax(200px, 1fr);
}

.section-wrapper {
    display: grid;
    grid-gap: 10px;
    background: #ff948f;
    border-radius: 10px;
}

.fruit {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
}
section {background: #fffbfa;}

#energy-box {
    background: #fffbfa;  
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
#energy-box figcaption {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-style: italic;
}
#energy {
    width: 80px;
    height: 80px;
    margin-top: -20px;
    background: #fffbfa;
    border-radius: 100%;
    filter: blur(20px);
}

/* Pagination */
#pagination {
    display: grid;
    grid-template-columns: max-content 1fr max-content;
}
#pagination img {
    max-width: 20px;
}
#pagination a {
    display: grid;
    grid-template-columns: 20px max-content;
    grid-gap: 10px;
}
#pagination #next {
    /* text-align: right; */
    grid-column: 3/3;
}

/* PORTFOLIO AREA */

.tri-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 10px;
    border: none;
}

    
.portfolio-card {
    border: 1px solid #969696;
    border-radius: 10px;
    box-sizing: border-box;
    background: #fffbfa;
    min-height: 250px;
}

/* center the text in portfolio cards */
.portfolio-card h3,
.portfolio-card p {
  text-align: center;
  margin: 0;
}

.portfolio-card h3 {
  margin-bottom: 0.25rem;
}

/* clickable header for each card */
summary.portfolio-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
    padding: 8px;
    list-style: none;
    cursor: pointer;
}

/* hide default disclosure marker */
summary.portfolio-link::-webkit-details-marker {
    display: none;
}
summary.portfolio-link::marker {
    content: "";
}

.portfolio-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fffbfa;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* hover effect on cards */
.portfolio-card:hover {
    transform: scale(1.05);
    border:2px dashed #ff948f;
    border-radius:10px;
}

/* inside cards, don't add a second border/scale to links */
.portfolio-card a:hover {
    border: none;
    transform: none;
}

/* DETAIL VIEW – using <details> */

.portfolio-detail {
    display: none;
    margin-top: 0.75rem;
    text-align: left;
}

/* when a card is open, make it span the full row */
.portfolio-card[open] {
    grid-column: 1 / -1;  /* span whole tri-column row */
    display: grid;
    grid-template-columns: minmax(0, 35%) minmax(0, 65%);
    grid-auto-rows: auto;
    column-gap: 1rem;
    align-items: flex-start;
}

/* when open, make summary a "transparent" wrapper so its children join the grid */
.portfolio-card[open] summary.portfolio-link {
    display: contents;
}

/* image: left column, spanning both rows (title + blurb) */
.portfolio-card[open] .portfolio-image {
    margin-bottom: 0;
    grid-column: 1;
    grid-row: 1 / span 2;
}

/* don't leave the extra gap under the image when open */
.portfolio-card[open] .portfolio-image {
    margin-bottom: 0;
}


/* title + subtitle: top-right cell */
.portfolio-card[open] .portfolio-text {
    grid-column: 2;
    grid-row: 1;
    padding: 15px 5px 5px 0;   /* top/right/bottom/left */
}


/* blurb: bottom-right cell, directly under title/artist */
.portfolio-card[open] .portfolio-detail {
    display: block;
    grid-column: 2;
    grid-row: 2;
    padding: 0 5px 5px 0;     /* match right padding with above */
}

/* when a card is open, left-align all its text */
.portfolio-card[open] h3,
.portfolio-card[open] p,
.portfolio-card[open] .portfolio-detail {
    text-align: left;
}

/* bump text sizes in the open state */
.portfolio-card[open] .portfolio-text h3 {
    font-size: 120%;
}

.portfolio-card[open] .portfolio-text p {
    font-size: 110%;
}


/* don't zoom an open card on hover (optional) */
.portfolio-card[open]:hover {
    transform: none;
}

/* TABBED WORKSPACE */

#workspace input[name="workspace-view"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* tab row: inline text, not pills */
.view-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0;
    margin-bottom: 0px;
    background: #ff948f;   /* same as section background */
}

/* inactive tabs: h4-ish, slate gray, no borders */
.view-tab {
    font-size: 0.75em;      /* like a small heading */
    font-weight: normal;
    color: #000;           
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    user-select: none;
}

/* automatic "»" separators between tabs */
.view-tab + .view-tab::before {
    content: "»";
    display: inline-block;
    margin: 0px -5px 0px 1.5em;
    color: #000;           
}

.view-tab:first-of-type::before {
    content: "»";
    display: inline-block;
    margin-right: -5px;  /* space between this arrow and the first tab’s text */
}

.tab-short {
    display: none;
}

/* panels wrapper */

.view-panels {
    background: #ff948f;
}

.view-panel {
    display: none;        /* base panel style: hidden by default */
}


/* show the right panel when that radio is checked */
#view-portfolio:checked ~ .view-panels .panel-portfolio {
    display: block;
}
#view-calendar:checked  ~ .view-panels .panel-calendar {
    display: block;
}
#view-log:checked       ~ .view-panels .panel-log {
    display: block;
}
#view-explorer:checked       ~ .view-panels .panel-explorer {
    display: block;
}


/* active tab: black, slightly larger, bold */
#view-portfolio:checked ~ .view-tabs label[for="view-portfolio"],
#view-calendar:checked  ~ .view-tabs label[for="view-calendar"],
#view-log:checked       ~ .view-tabs label[for="view-log"], 
#view-explorer:checked       ~ .view-tabs label[for="view-explorer"] {
    color: #000;
    font-weight: bold;
    font-size: 1em;
}

/* inside the workspace, don't draw a second card border */
#workspace .view-panel {
    border: none;
    padding: 0;
    background: #ff948f;  /* let the outer section-wrapper be the "card" */
}

/* EXPLORE PANEL */

.panel-explorer {
    padding: 8px;
}

/* row of small selector buttons */
.explore-controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 25px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

/* individual selector pill */
.explore-tab {
    border: .5px dashed #969696;
    border-radius: 50px;
    background: #ff948f;
    padding: 5px 35px;
    font-size: .8em;
    font-family: 'Courier New';
    cursor: pointer;
    white-space: nowrap;
}

/* active/selected state */
.explore-tab.is-active {
    background: #fffbfa;
    font-weight: bold;
    border: 1px dashed #ff948f;
}

/* viewport area */
.explore-view h3 {
    margin: 0 0 4px;
}

.explore-view p {
    margin: 0 0 8px;
}

/* the iframe itself */
panel-explorer iframe {
    display: block;
    width: 100%;
    /* height: 600px; */
    border-radius: 5px;
    border: none;
    background: #ff948f;
}




/* MEDIA QUERIES */
@media (max-width:600px) {

    #container { 
        margin-top: 0; 
    }

    header {
        grid-template-columns: 2fr 1fr;   /* name still bigger than avatar */
        grid-template-areas:
            "name avatar"
            "bio  bio";
        align-items: center;  /* vertically center avatar relative to the text block */
    }

    #avatar {
        max-width: 120px;   /* keep it from dominating on tiny screens */
    }

    .tri-column {
        grid-template-columns: repeat(2, 1fr);
    }

    /* when open on very small screens, stack image + text */
    .portfolio-card[open] {
        grid-template-columns: 1fr;
    }

    .portfolio-card[open] .portfolio-image,
    .portfolio-card[open] .portfolio-text,
    .portfolio-card[open] .portfolio-detail {
        grid-column: 1;
        grid-row: auto;
    }

    /* nicer padding for open cards on small screens */
    .portfolio-card[open] .portfolio-text {
        padding: 10px 14px 4px 14px;   /* title/artist area */
    }

    .portfolio-card[open] .portfolio-detail {
        padding: 4px 14px 14px 14px;   /* blurb + link area */
    }

    /* --- mobile tab layout: horizontal scroll --- */
    .explore-tab { 
        padding: 5px 10px;
        font-size: 0.75em;
    }
    
    .view-tabs {
        display: block;              /* override desktop flex layout */
        overflow-x: auto;            /* horizontal scroll when needed */
        white-space: nowrap;         /* keep labels on one line */
        padding-bottom: 0px;
    }

    /* keep the heading from wrapping too */
    .view-tabs h2 {
        display: inline-block;
        white-space: nowrap;
        margin: 0;
    }

    .view-tab {
        display: inline-block;
        padding: 0px 3px;
        font-size: 0.75em;
    }

    /* separators on mobile (slightly tighter) */
    .view-tab + .view-tab::before {
        content: "»";
        display: inline-block;
        margin: 0 -5px 0 .75em;
    }

    /* on small screens, show short tab names instead of long ones */
    .tab-long {
        display: none;
    }

    .tab-short {
        display: inline;
    }
}



    

    




