@font-face {
  font-family: "Bodoni 72 Italics";
  src: url("../fonts/bodoni72-italic.ttf") format("truetype");
}

body {
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    margin:0;
    color:#fffde3;
}

html,body{
    min-height: 100vh;
    margin:0;
    color:#fffde3;
    overscroll-behavior:none;
    overflow-x:clip;
}

.fish-cursor-on{
    cursor:none;
}

.fish-cursor{
    position:fixed;
    top:0;
    left:0;
    z-index:10000;
    width:40px;
    max-width:none;
    pointer-events:none;
    visibility:hidden;
}

.fish-cursor.is-visible{
    visibility:visible;
}

img{
    max-width:100%;
    height:auto;      
    /* no dragging images around as a see-through "ghost" (Firefox: see index.html) */
    -webkit-user-drag:none;
    user-select:none;
}

.landing{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
     background: linear-gradient(
        180deg,
        #238CE2,
        #25B3F6
    );
}


.shooting-stars{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    z-index:0;
    pointer-events:none;
}

.landing-text{
    display:flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index:1;
}

.title{
    font-family: "Bodoni 72 Italics", serif;
    font-style: italic;
    font-weight: 400;
    font-size:clamp(4.5rem, 16vw, 8rem);
    color:#fffde3;
    margin-bottom:1rem;
    line-height:1;
}

.title-letter{
    display:inline-block;
    transition:transform 0.2s ease;
}

.title-letter:hover{
    transform:scale(1.3);
}


.h1{
    font-family: "Bodoni 72 Italics", serif;
    font-style: italic;
    font-weight: 400;
    font-size:clamp(2rem, 9vw, 4rem);
    color:#fffde3;
    margin-bottom:1rem;
    line-height:1;
}

.h2{
    font-family: "Bodoni 72 Italics", serif;
    font-style: italic;
    font-weight: z00;
    font-size:clamp(2rem, 7vw, 4rem);
    color:#fffde3;
    margin-bottom:1rem;
    line-height:1;
}

.subtitle{
    font-family: "Verdana", sans-serif;
    font-weight: 400;
    font-size:clamp(1.75rem, 6vw, 3rem);
    color:#FFFFF1;
    line-height:1;
}

.body{
    font-family:"Verdana",sans-serif;
    font-size:clamp(1rem, 3.5vw, 1.5rem);
    color:#FFFFF1;
}

.hyperlink{
    font-family:"Verdana",sans-serif;
    font-size:1.1rem; 
    color:#c7f7ff;
    align-content:center;
}

.hyperlink:hover{
    transform: scale(1.1);
    color:#87edff;
}

.icons{
    display:flex;
    gap:1.5em;
    justify-content:center;
}

.icon-wrapper{
    position:relative;
}


.icons img{
    width:3.5rem;
    padding-top:2em;
    z-index:2;
    transition: transform 0.2s ease;
}

.icons img:hover{
    transform: scale(1.3);
    cursor: grab;
}

.icons a{
    cursor:grab;
    touch-action:none;
}

.is-grabbing,
.is-grabbing *{
    cursor:grabbing !important;
}

.icon-wrapper.is-empty .hoverbox{
    display:none;
}

/* an icon that has been dragged out of the row */
.falling-icon{
    position:absolute;
    top:0;
    left:0;
    z-index:5;
    will-change:transform;
}

.falling-icon a,
.falling-icon img{
    display:block;
}


.falling-icon img,
.falling-icon img:hover{
    transform:scale(1.3);
}


.falling-icon a:focus:not(:focus-visible){
    outline:none;
}


.hoverbox{
  position: absolute;
  bottom: -20%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: #238CE2;
  padding: 0.4em 0.8em;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.hoverbox-image{
  position: absolute;
  bottom: 30%;
  left: 40%;
  background: white;
  color: #238CE2;
  padding: 0.4em 0.8em;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.icon-wrapper:hover .hoverbox {
  opacity: 1;
}

.section-image:hover .hoverbox-image{
    opacity:1;
    z-index:2;
}

.cloud{
    position:absolute;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    overflow:hidden;
    bottom:-4em;
    z-index:1;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.cloud img{
    width:100%;
    max-width:none;
}

.cloud2{
    position:absolute;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    overflow:hidden;
    bottom:1em;
    z-index:2;
    transition: transform 0.8s ease;
    pointer-events: none;
}

.cloud2 img{
    width:100%;
    max-width:none;
}

.wave{
    position:absolute;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    overflow:hidden;
    bottom:calc(1em + 4vw - 23.8vw);
    z-index:1;
    transition: transform 0.2s ease;
    pointer-events: none;
    opacity:80%;
}

.wave img{
    width:100%;
    max-width:none;
}


.main{
    background:linear-gradient(
        180deg,
        #25B3F6,
        #8DDBFF
    );
    padding-top:calc(19.8vw + 6em);

    position:relative;
    z-index:0;
}

.sparkles{
    position:fixed;
    inset:0;
    width:100%;
    height:100%;
    z-index:-1;
    pointer-events:none;
}

.section{
    z-index:0;
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap: 2em;
    padding-left: 10em;
    padding-top:2em;
    padding-right:10em;
    padding-bottom:10em;

}

.section img{
    border-radius:0.4em;
}

.last-section{
    justify-content:center;
    align-items:center;
    z-index:0;
    text-align:center;
}

.section-text{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:0.5rem;
}

.section-image{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:0.2rem;
    padding-top:2rem;
    padding-left:1rem;
}

.section-image:empty{
    display:none;
}

.section-image:first-child{
    align-items:flex-start;
    padding-left:0;
}

.section img:hover{
    transition:transform 0.2s ease-in-out;
    transform:scale(1.1);
}

.section img{
    max-width:min(30rem, 100%);
    max-height:30rem;
    align-items:center;
}





.third{
justify-content:center;
display:flex;
flex-direction:column;
align-items:center;
padding:5em;
gap:1.5em;

}

.polaroid{
    justify-content:center;
    display:flex;
    flex-direction:row;
    align-items:center;
}


.section:has(.column){
    gap:clamp(3.5em, 9vw, 8em);
    justify-content:center;
}

/* photo and caption centred within each column */
.column{
    float:left;
    width:50%;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    z-index:0;
    margin-top:2em;
}

.column img{
    border-radius:0.6em;
}

.section-image img,
.column img{
    cursor:pointer;
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
}
.stack{
    /* resting spots of the two cards behind the photo */
    --pose-1:translate(3%, 1.5%) rotate(4deg);
    --pose-2:translate(-3%, 2.5%) rotate(-5deg);
    position:relative;
    display:inline-block;
    max-width:100%;
    line-height:0;
    isolation:isolate;
}

/* fan the pile out a little on hover so it invites a click */
.stack:hover{
    --pose-1:translate(5%, 2%) rotate(7deg);
    --pose-2:translate(-5%, 3%) rotate(-8deg);
}


/* "click me!" pill over the polaroids, like Shopify Editions' hover buttons */
.click-bubble{
    position:absolute;
    top:50%;
    left:50%;
    z-index:3;
    padding:0.7em 1.1em;
    border-radius:999px;
    background:rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter:blur(8px);
    backdrop-filter:blur(8px);
    color:#000;
    font-size:0.8rem;
    line-height:1;
    white-space:nowrap;
    pointer-events:none; /* clicks go through to the photo */
    opacity:0;
    visibility:hidden;
    transform:translate(-50%, -50%);
    transition:opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover){
    .stack:hover > .click-bubble{
        opacity:1;
        visibility:visible;
    }
}

/* out of the way while the top photo is flying to the back */
.stack.is-shuffling > .click-bubble{
    opacity:0;
    transition:none;
}

/* the merch art isn't a polaroid */
.stack:has(.window2) > .click-bubble{
    display:none;
}

.stack > img{
    box-sizing:border-box;
    padding:0.8em 0.8em 2em;
    background:#efefec;
    border-radius:3px;
    filter:var(--tone) var(--shadow);
}

.scroll-gallery{
    display:none;
}

@media (min-width: 769px){
    .section:has(.scroll-gallery){
        align-items:flex-start;
    }

    .section:has(.scroll-gallery) .section-text{
        position:sticky;
        top:30vh;
    }

    .section-image:has(.scroll-gallery) .stack,
    .section-image:has(.scroll-gallery) .hoverbox-image{
        display:none;
    }

    .scroll-gallery{
        display:flex;
        flex-direction:column;
        align-items:center;
        gap:4rem;
    }

    .scroll-photo{
        display:block;
        max-width:min(30rem, 100%);
        max-height:30rem;
        box-sizing:border-box;
        border-radius:3px;
        filter:var(--tone) var(--shadow);
        transition:filter 0.4s ease;
    }


    .scroll-gallery.no-frame .scroll-photo{
        padding:0;
        background:none;
        border-radius:0.4em;
    }
}

/* the artist / merch designer artwork goes without the polaroid frame */
.stack:has(.window2) > img{
    padding:0;
    background:none;
    border-radius:0.4em;
}

/* the photos in the side-by-side rows ("random things", "favorite memories")
   have no polaroid frame */
.column .stack > img{
    padding:0;
    background:none;
    border-radius:0.4em;
}

.stack > img:not(.stack-back){
    position:relative;
    z-index:2;
    display:block;
    max-width:100%;
    transition:filter 0.4s ease, transform 0.1s ease-in-out;
}

.column .stack{
    margin-bottom:0.75rem;
}

.section .stack{
    max-width:min(30rem, 100%);
}

.stack-back{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    pointer-events:none;
    transition:transform 0.3s ease, opacity 0.3s ease;
}

.stack-back-1{
    z-index:1;
    transform:var(--pose-1);
}

.stack-back-2{
    z-index:0;
    transform:var(--pose-2);
    opacity:0.9;
}

/* shuffle (timed by the gallery script): the top photo slides out to the side
   and tucks in at the back of the pile, while each card behind moves up a spot */
.stack.is-shuffling > .stack-back{
    transition:transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s, opacity 0.5s ease;
}

.stack.is-shuffling > img:not(.stack-back){
    animation:stack-to-back 0.55s ease-in-out forwards;
}

@keyframes stack-to-back{
    0%{ transform:none; z-index:2; }
    45%{ transform:translate(-62%, -3%) rotate(-10deg); z-index:2; }
    46%{ transform:translate(-62%, -3%) rotate(-10deg); z-index:-1; }
    100%{ transform:var(--pose-2); z-index:-1; opacity:0.9; }
}

/* every other click the photo leaves to the right instead */
.stack.is-shuffling.exit-right > img:not(.stack-back){
    animation-name:stack-to-back-right;
}

@keyframes stack-to-back-right{
    0%{ transform:none; z-index:2; }
    45%{ transform:translate(62%, -3%) rotate(10deg); z-index:2; }
    46%{ transform:translate(62%, -3%) rotate(10deg); z-index:-1; }
    100%{ transform:var(--pose-2); z-index:-1; opacity:0.9; }
}

.stack.is-shuffling .stack-back-1{
    transform:none;
    opacity:1;
}

.stack.is-shuffling .stack-back-2{
    transform:var(--pose-1);
    opacity:1;
}

.stack.no-anim > img{
    transition:none !important;
}

.column img:hover{
    transform: scale(1.05); 
    transition:transform 0.2s ease-in-out, filter 0.4s ease;
}
.row:after{
    content:"";
    display:table;
    clear:both;
}

.rounded{
    border-radius:1em;
}

.rounded:hover{
    transform:scale(1.05);
    cursor:pointer;
    transition:transform 0.2s ease-in-out;
}

.fourth{
    justify-content:center;
display:flex;
flex-direction:column;
align-items:center;
padding:5em;
gap:1.5em;
}

.trail {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: fade 0.6s ease forwards;
  z-index: 9999;
}

.window1 {
  position: relative;
  cursor: pointer;
}

.window1 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@keyframes fade {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
}

.return-button{
    border:1px solid #fffde3;
    padding:0.8rem 2.5rem;
    corner-radius:1em;
    display:inline-block;
    font-size:12px;
}

.return-button:hover{
    transform:scale(1.35);
    transition: 0.2s ease-out;
}

.forward-button{
    margin-top:1em;
    text-decoration:none;
    border:1px solid #fffde3;
    padding:0.8rem 2rem;
    color:#efefec;
    corner-radius:1em;
    display:inline-block;
    font-size:1.3em;
}

.forward-button:hover{
    transform:scale(1.2);
    transition: 0.3s ease-out;
}

.player{
    --player-blue:#238CE2;
    --player-fg:#fff;
    --player-bg:rgba(37, 179, 246, 0.85);
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:100;
    font-family:"Bodoni 72 Italics", serif;
    color:var(--player-fg);
    pointer-events:none;
}

.player-card,
.player-bubble{
    opacity:0;
    visibility:hidden;
    pointer-events:auto;
    transition:opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.player-card{
    transform:translateY(100%);
}

.player-bubble{
    transform:scale(0.6);
}

.player.is-shown:not(.is-closed) .player-card,
.player.is-shown.is-closed .player-bubble{
    opacity:1;
    visibility:visible;
    transform:none;
}

.player-card{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    align-items:center;
    gap:1.5rem;
    padding:0.6rem 1.5rem;
    background:var(--player-bg);
    -webkit-backdrop-filter:blur(12px);
    backdrop-filter:blur(12px);
    border-top:1px solid rgba(255, 255, 255, 0.35);
    box-shadow:0 -4px 20px rgba(20, 90, 150, 0.2);
}

.player-center{
    display:flex;
    flex-direction:column;
    gap:0.3rem;
    width:min(30rem, 42vw);
}

.player-side{
    justify-self:end;
    display:flex;
    align-items:center;
    gap:1rem;
}

.player-bubble{
    position:absolute;
    right:1.25rem;
    bottom:1.25rem;
    width:56px;
    height:56px;
    padding:0;
    border:3px solid #fff;
    border-radius:50%;
    overflow:hidden;
    background:#d9efff;
    box-shadow:0 6px 18px rgba(20, 90, 150, 0.3);
    cursor:pointer;
}

.player-bubble .player-cover{
    width:100%;
    height:100%;
    border-radius:0;
}

.player.is-playing .player-bubble .player-cover{
    animation:player-spin 8s linear infinite;
}

@keyframes player-spin{
    to{ transform:rotate(360deg); }
}

.player-info{
    display:flex;
    align-items:center;
    gap:0.7rem;
}

.player-cover{
    width:52px;
    height:52px;
    flex-shrink:0;
    border-radius:6px;
    object-fit:cover;
    background:#d9efff;
}

.player-text{
    flex:1;
    min-width:0;
}

.player-title,
.player-subtitle{
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.player-title{
    font-size:1.1rem;
    font-style:italic;
}

.player-subtitle{
    font-size:0.85rem;
    opacity:0.75;
}

.player-close,
.player-btn,
.player-play{
    display:grid;
    place-items:center;
    padding:0;
    border:0;
    background:none;
    color:var(--player-fg);
    cursor:pointer;
    transition:transform 0.15s ease;
}

.player-close svg{
    width:26px;
    height:26px;
    fill:currentColor;
}

.player-controls{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:0.9rem;
}

.player-btn svg{
    width:24px;
    height:24px;
    fill:currentColor;
}

.player-btn text{
    font-family:"Bodoni 72 Italics", serif;
    font-size:7px;
    font-weight:700;
}

.player-play{
    width:42px;
    height:42px;
    border-radius:50%;
    background:#fff;
    color:var(--player-blue);
}

.player-play svg{
    width:22px;
    height:22px;
    fill:currentColor;
}

.player-close:hover,
.player-btn:hover,
.player-play:hover{
    transform:scale(1.08);
}

.player .icon-pause,
.player.is-playing .icon-play{
    display:none;
}

.player.is-playing .icon-pause{
    display:block;
}

.player-progress{
    display:flex;
    align-items:center;
    gap:0.5rem;
}

.player-time{
    font-size:0.8rem;
    min-width:2.2em;
    text-align:center;
    font-variant-numeric:tabular-nums;
}

.player-seek{
    --fill:0%;
    flex:1;
    height:4px;
    margin:0;
    border-radius:2px;
    background:linear-gradient(to right, #fff var(--fill), rgba(255, 255, 255, 0.35) var(--fill));
    appearance:none;
    -webkit-appearance:none;
    cursor:pointer;
}

.player-seek::-webkit-slider-thumb{
    -webkit-appearance:none;
    width:12px;
    height:12px;
    border-radius:50%;
    background:#fff;
}

.player-seek::-moz-range-thumb{
    width:12px;
    height:12px;
    border:0;
    border-radius:50%;
    background:#fff;
}

.player-link{
    font-size:0.85rem;
    color:var(--player-fg);
}

.player-engine{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    opacity:0;
    pointer-events:none;
}

@media (prefers-reduced-motion: reduce){
    .player.is-playing .player-bubble .player-cover{
        animation:none;
    }
}


.site-footer{
    position:relative; /* the footer's shooting-star canvas sits behind the art */
}

.footer-deer{
    display:block;
    width:100%;
    height:auto;
    position:relative;
    z-index:1;
}

/* "Blog!" button: on phones it sits just above the deer art (whose antlers
   reach the top edge); from 768px up it sits in the wide hill art's sky.
   vw keeps it the same spot on the art, since the art is full width */
.footer-blog{
    position:absolute;
    bottom:100%;
    left:50%;
    z-index:2;
    margin-top:0;
    translate:-50% 0; /* separate from transform, so the hover scale still works */
}

@media (min-width: 768px){
    .footer-blog{
        top:2.5vw;
        bottom:auto;
    }
}

.footer-bar{
    padding:4rem 2rem calc(96px + 0.6rem);
    background:#88D484;
    text-align:center;
    font-family:"Bodoni 72 Italics", serif;
    font-style:italic;
    font-size:min(1.2em); 
    line-height:1.1;
    color:#fffde3;
}

/* the wide hill (768px and up) ends in a slightly different green */
@media (min-width: 768px){
    .footer-bar{
        background:#8DD48C;
    }
}

.footer-credit{
    color:inherit;
}

.footer-credit:hover{
    color:#ffffff;
}

@media (max-width: 1200px){
    .section{
        padding-left:5em;
        padding-right:5em;
        padding-bottom:7em;
    }

}


@media (max-width: 900px){
    .section{
        padding-left:2.5em;
        padding-right:2.5em;
        padding-bottom:5em;
    }

    .polaroid{
        padding:0 1.5rem;
        text-align:center;
    }
}


@media (max-width: 768px){
    .landing{
        padding:0 1rem;
        box-sizing:border-box;
    }

    .landing-text{
        text-align:center;
    }

    .icons{
        gap:1.25em;
        flex-wrap:wrap;
    }

    .icons img{
        width:2.75rem;
        padding-top:1.5em;
    }


    .cloud,
    .cloud2{
        width:240%;
        left:-70%;
    }

    .cloud{
        bottom:-6em;
    }

    .cloud2{
        bottom:-1em;
    }

    .wave{
        width:300%;
        left:-100%;
        bottom:calc(-1em + 15vw - 71.4vw);
    }

    .main{
        padding-top:calc(56.4vw + 4em);
    }

    .footer-bar{
        padding-bottom:calc(134px + 0.6rem);
    }
    .section{
        flex-direction:column;
        align-items:center;
        gap:1rem;
        padding:0 1.25rem 4em;
        text-align:center;
    }

    .section-text{
        align-items:center;
        order:-1;
    }

    .section-image,
    .section-image:first-child{
        align-items:center;
        padding:0;
        position:relative;
    }

    .hoverbox-image{
        left:50%;
        transform:translateX(-50%);
    }

    .section:has(.column){
        flex-direction:row;
        align-items:flex-start;
    }

    .column{
        float:none;
        width:30%;
        margin-top:0;
        gap:3em;
    }

    .column .body{
        margin-top:0.5rem;
    }

  .column .img{
  }

    .player-card{
        grid-template-columns:1fr auto;
        gap:0.4rem 1rem;
        padding:0.6rem 1rem 0.8rem;
    }

    .player-center{
        grid-column:1 / -1;
        grid-row:2;
        width:100%;
    }

    .player-link{
        display:none;
    }

    .player-cover{
        width:44px;
        height:44px;
    }

    .player-bubble{
        right:1rem;
        bottom:1rem;
    }

    .third,
    .fourth{
        padding:3em 1.25rem;
    }
}

@media (max-width: 560px){
    .section:has(.column){
        flex-direction:column;
        align-items:center;
        gap:1.5rem;
    }

    .column{
        width:100%;
        max-width:17rem;
    }
}

@media (max-width: 400px){
    .icons{
        gap:0.9em;
    }

    .icons img{
        width:2.4rem;
    }

    .hoverbox,
    .hoverbox-image{
        font-size:0.75rem;
    }
}

@media (hover: none){
    .title:hover,
    .title-letter:hover,
    .hyperlink:hover,
    .icons img:hover,
    .section-image:hover,
    .rounded:hover,
    .return-button:hover{
        transform:none;
    }

    .trail{
        display:none;
    }
}

.fade-in{
    opacity:0;
    transform:translateY(40px);
    transition:opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible{
    opacity:1;
    transform:none;
}

/* Typewriter text (spans added by the script in index.html, desktop only) */
.forward-button.tw-box{
    transition:border-color 0.8s ease, transform 0.3s ease-out;
}

.forward-button.tw-box:not(.is-typed){
    border-color:transparent;
}

.tw-char{
    visibility:hidden;
}

.tw-char.tw-shown{
    visibility:visible;
}

/* cursor that rides along with the newest character */
.tw-current{
    position:relative;
}

.tw-current::after{
    content:"";
    position:absolute;
    top:0.1em;
    bottom:0.05em;
    right:-0.12em;
    width:max(2px, 0.05em);
    background:currentColor;
}

.sr-only{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
    white-space:nowrap;
}

/* ---------- Subpages: academics.html, events.html ----------
   both use the .acad-* layout below (hero, headings, outlined cards) */
.academics-page{
    background:#4a956e;
}

.acad-hero{
    position:relative;
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:2rem 1.25rem;
    box-sizing:border-box;
    overflow:hidden;
    text-align:center;
}

.acad-hero-text{
    position:relative;
    z-index:1; /* above the shooting stars */
    margin:0;
    display:flex;
    flex-direction:column;
    gap:0.25rem;
    font-family:"Libertinus Serif", serif;
    font-style:italic;
    font-weight:400;
    line-height:1.15;
}

.acad-hero-small{
    font-size:clamp(1.75rem, 4vw, 2.5rem);
}

.acad-hero-big{
    font-size:clamp(2.25rem, 6vw, 3.75rem);
    font-weight:700;
}

.acad-content{
    max-width:40rem;
    margin:0 auto;
    padding:2rem 1.25rem 6rem;
}

.acad-lead,
.acad-heading,
.acad-years,
.acad-dates,
.acad-role,
.acad-back{
    font-family:"Libertinus Serif", serif;
    font-style:italic;
}

.acad-lead{
    margin:0 0 4rem;
    text-align:center;
    font-size:clamp(1.75rem, 4.5vw, 2.4rem);
    font-weight:700;
}

.acad-heading{
    margin:0;
    text-align:center;
    font-size:clamp(1.75rem, 4.5vw, 2.4rem);
    font-weight:600;
}

.acad-heading-big{
    margin:5rem 0 1.75rem;
    font-size:clamp(2.25rem, 6vw, 3.25rem);
    font-weight:700;
}

.acad-years{
    margin:0.5rem 22% 1.25rem 0;
    text-align:right;
    font-size:1rem;
}

.acad-card{
    margin-bottom:1rem;
    padding:1.5rem 1.5rem 1.25rem;
    border:1.5px solid rgba(255, 253, 227, 0.9);
}

.acad-card h3{
    margin:0 0 0.15rem;
    font-size:clamp(1.3rem, 3.5vw, 1.6rem);
    font-weight:700;
}

.acad-card p{
    margin:0;
}

.acad-dates{
    font-size:1.05rem;
}

.acad-card .acad-role{
    margin-top:0.25rem;
    font-size:0.8rem;
}

.acad-card .acad-note{
    margin-top:1.75rem;
    font-size:0.85rem;
    font-style:italic;
    line-height:1.4;
}

/* academics + events: a card shows the name, dates (and role); its notes slide
   open on hover (or a tap / keyboard focus, via tabindex on the card) */
:is(.academics-page, .events-page) .acad-card .acad-note{
    max-height:0;
    margin-top:0;
    overflow:hidden;
    opacity:0;
    transition:max-height 0.35s ease, margin-top 0.35s ease, opacity 0.2s ease;
}

:is(.academics-page, .events-page) .acad-card:is(:hover, :focus-within) .acad-note{
    max-height:12em;
    margin-top:1.75rem;
    opacity:1;
    transition:max-height 0.5s ease, margin-top 0.4s ease, opacity 0.4s ease 0.1s;
}

:is(.academics-page, .events-page) .acad-card:focus{
    outline:none;
}

:is(.academics-page, .events-page) .acad-card:focus-visible{
    outline:2px solid #fffde3;
    outline-offset:4px;
}

@media (prefers-reduced-motion: reduce){
    :is(.academics-page, .events-page) .acad-card .acad-note,
    :is(.academics-page, .events-page) .acad-card:is(:hover, :focus-within) .acad-note{
        transition:none;
    }
}

.acad-back{
    margin-top:4rem;
    text-align:center;
    font-size:1.25rem;
}

.acad-back a{
    color:#fffde3;
}


.events-page{
    background:#372e68;
}

.events-intro{
    position:relative;
    z-index:1; /* above the shooting stars */
    max-width:30rem;
    text-align:left;
    font-size:0.95rem;
    line-height:1.4;
}

.events-intro p{
    margin:0 0 1.6rem;
}

.events-heading{
    margin:5rem 0 1.5rem;
    font-size:clamp(1.6rem, 4vw, 2.1rem);
    font-weight:700;
}

.events-heading:first-child{
    margin-top:2rem;
}

/* cards read from the right */
.acad-card-right{
    text-align:right;
}

/* event cards: text on one side, the video cover / photo on the other
   (mirrored on the right-aligned cards). The cover is tucked away until the
   card is hovered (or tapped / focused), then grows open with the notes */
.events-page .acad-card{
    display:flex;
    align-items:center;
}

.events-page .acad-card-right{
    flex-direction:row-reverse;
}

.event-text{
    flex:1;
    min-width:0;
}

.event-media{
    --media-gap:2rem;
    position:relative;
    flex:0 0 0%;
    aspect-ratio:16 / 9;
    overflow:hidden;
    background:#d9d9d9;
    opacity:0;
    transition:flex-basis 0.4s ease, margin 0.4s ease, opacity 0.2s ease;
}

.events-page .acad-card:is(:hover, :focus-within) .event-media{
    flex-basis:40%;
    margin-left:var(--media-gap);
    opacity:1;
    transition:flex-basis 0.5s ease, margin 0.5s ease, opacity 0.4s ease 0.15s;
}

.events-page .acad-card-right:is(:hover, :focus-within) .event-media{
    margin-left:0;
    margin-right:var(--media-gap);
}

.event-media img{
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    object-fit:cover; /* YouTube's covers are 4:3 with black bars; this crops them */
    transition:transform 0.4s ease;
}

.event-play{
    position:absolute;
    top:50%;
    left:50%;
    width:clamp(44px, 18%, 68px);
    translate:-50% -50%;
    transition:scale 0.2s ease;
}

.event-play rect{
    fill:rgba(33, 33, 33, 0.8);
    transition:fill 0.2s ease;
}

.event-play path{
    fill:#fff;
}

.event-media:hover img,
.event-media:focus-visible img{
    transform:scale(1.05);
}

.event-media:hover .event-play,
.event-media:focus-visible .event-play{
    scale:1.1;
}

.event-media:hover .event-play rect,
.event-media:focus-visible .event-play rect{
    fill:#f00;
}

/* label on a photo that links somewhere other than a video (JPEG's news story) */
.event-tag{
    position:absolute;
    right:0.5rem;
    bottom:0.5rem;
    padding:0.15em 0.3em;
    border-radius:999px;
    background:rgba(255, 253, 227, 0.9);
    color:#2b4a63;
    font-size:0.7rem;
    font-weight:700;
    white-space:nowrap;
}

/* phones: the cover opens full width under the text */
@media (max-width: 600px){
    .events-page .acad-card,
    .events-page .acad-card-right{
        flex-direction:column;
        align-items:stretch;
    }

    .event-media,
    .events-page .acad-card:is(:hover, :focus-within) .event-media{
        flex-basis:auto;
        margin:0;
    }

    .event-media{
        max-height:0;
        transition:max-height 0.4s ease, margin 0.4s ease, opacity 0.2s ease;
    }

    .events-page .acad-card:is(:hover, :focus-within) .event-media{
        max-height:60vw;
        margin-top:1.25rem;
        transition:max-height 0.5s ease, margin 0.5s ease, opacity 0.4s ease 0.15s;
    }
}

@media (prefers-reduced-motion: reduce){
    .event-media,
    .events-page .acad-card:is(:hover, :focus-within) .event-media{
        transition:none;
    }
}

/* ---------- Portfolio page (portfolio.html) ---------- */
.portfolio-page{
    background:#CE8BAB;
}

.portfolio-intro{
    position:relative;
    z-index:1; /* above the shooting stars */
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:1rem;
}

.portfolio-title{
    margin:0 0 1rem;
    font-family:"Libertinus Serif", serif;
    font-style:italic;
    font-weight:400;
    font-size:clamp(1.6rem, 4vw, 2.3rem);
    line-height:1.25;
}

.portfolio-intro .forward-button{
    margin-top:0;
    border-width:2px;
    font-weight:700;
}

.portfolio-contact{
    color:#fffde3;
    font-size:0.85rem;
}

.portfolio-posts{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:1.75rem;
    padding:2rem 1.25rem 6rem;
}

.post{
    width:min(30rem, 100%);
    box-sizing:border-box;
    padding:2rem 1.9rem 0.9rem;
    background:#fafffd;
    border-radius:0.5em;
    box-shadow:0 8px 20px rgba(120, 40, 80, 0.12);
}

/* grey placeholder until an <img> is added */
.post-photo{
    aspect-ratio:9 / 7;
    background:#d9d9d9;
    border-radius:6px;
    overflow:hidden;
    user-select:none;
}

.post-photo img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain; /* show each piece whole, whatever its shape */
}

/* a real image sits on the card's own white instead of the placeholder grey */
.post-photo:has(img){
    background:none;
}

.post-caption{
    margin:0.5rem 0 0;
    color:#111;
    font-size:0.9rem;
    line-height:1.4;
    white-space:pre-line; /* line breaks in a caption show up */
}

.like-button{
    display:inline-flex;
    align-items:center;
    gap:0.6rem;
    margin-top:0.5rem;
    padding:0.25rem 0;
    border:0;
    background:none;
    color:#111;
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    font-size:1.6rem;
    cursor:pointer;
}

.like-button .heart{
    width:1.7rem;
    height:1.7rem;
    fill:none;
    stroke:#111;
    stroke-width:2;
    transition:fill 0.15s ease, stroke 0.15s ease;
}

.like-button .heart:hover{
     transform:scale(1.3);
     transition:transform 0.2s ease;
}

.post.is-liked .like-button .heart{
    fill:#e8336d;
    stroke:#e8336d;
}

.like-button.pop .heart{
    animation:heart-pop 0.45s cubic-bezier(0.3, 0.9, 0.5, 1.2);
}

@keyframes heart-pop{
    0%{ transform:scale(1.2); }
    30%{ transform:scale(0.8); }
    60%{ transform:scale(1.5) rotate(10deg); }
    100%{ transform:scale(1.5) rotate(0); }
}

/* like burst (js/portfolio.js): ring + flying hearts/dots + "+1", centred on the heart */
.like-button{
    position:relative;
}

.like-burst{
    position:absolute;
    width:0;
    height:0;
    pointer-events:none;
}

.like-ring{
    position:absolute;
    left:-14px;
    top:-14px;
    width:28px;
    height:28px;
    border:2px solid #e8336d;
    border-radius:50%;
    animation:like-ring 0.5s ease-out forwards;
}

@keyframes like-ring{
    0%{ transform:scale(0.3); opacity:0.9; }
    100%{ transform:scale(1.8); opacity:0; border-width:0.5px; }
}

.like-particle{
    position:absolute;
    left:0;
    top:0;
    font-size:0.7rem;
    line-height:1;
    transform:translate(-50%, -50%);
    animation:like-fly 0.7s cubic-bezier(0.15, 0.7, 0.35, 1) forwards;
}

.like-particle.is-dot{
    width:5px;
    height:5px;
    border-radius:50%;
    background:currentColor;
}

@keyframes like-fly{
    0%{ transform:translate(-50%, -50%) scale(0.4); opacity:1; }
    70%{ opacity:1; }
    100%{
        transform:translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
            scale(1) rotate(var(--spin));
        opacity:0;
    }
}

.like-plus{
    position:absolute;
    left:0;
    top:0;
    color:#e8336d;
    font-size:0.85rem;
    font-weight:700;
    transform:translate(-50%, -50%);
    animation:like-plus 0.8s ease-out forwards;
}

@keyframes like-plus{
    0%{ transform:translate(-50%, -50%); opacity:0; }
    20%{ opacity:1; }
    100%{ transform:translate(-50%, -260%); opacity:0; }
}

/* big heart over the photo after a double-click */
.post-photo{
    position:relative;
}

.photo-heart{
    position:absolute;
    left:50%;
    top:50%;
    width:28%;
    height:auto;
    fill:#fff;
    filter:drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
    pointer-events:none;
    transform:translate(-50%, -50%) scale(0);
    animation:photo-heart 0.85s ease forwards;
}

@keyframes photo-heart{
    0%{ transform:translate(-50%, -50%) scale(0); opacity:0; }
    15%{ transform:translate(-50%, -50%) scale(1.2); opacity:1; }
    30%{ transform:translate(-50%, -50%) scale(0.95); }
    45%{ transform:translate(-50%, -50%) scale(1); }
    80%{ transform:translate(-50%, -50%) scale(1); opacity:1; }
    100%{ transform:translate(-50%, -60%) scale(0.8); opacity:0; }
}

.portfolio-home{
    position:absolute;
    top:1.25rem;
    left:1.25rem;
    z-index:1;
    color:#fffde3;
    font-family:"Libertinus Serif", serif;
    font-style:italic;
    font-size:1.1rem;
}

/* like + comment buttons under the photo */
.post-actions{
    display:flex;
    align-items:center;
    gap:1.25rem;
    margin-top:0.5rem;
}

.post-actions .like-button{
    margin-top:0;
}

.comment-button{
    display:inline-flex;
    align-items:center;
    gap:0.6rem;
    padding:0.25rem 0;
    border:0;
    background:none;
    color:#111;
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    font-size:1.6rem;
    cursor:pointer;
}

.comment-button .bubble{
    width:1.6rem;
    height:1.6rem;
    fill:none;
    stroke:#111;
    stroke-width:2;
    stroke-linejoin:round;
}

/* comments: "username comment 2h", Instagram style */
.view-all{
    display:block;
    margin:0.4rem 0 0;
    padding:0;
    border:0;
    background:none;
    color:#8e8e8e;
    font-size:0.85rem;
    cursor:pointer;
}

.view-all[hidden]{
    display:none;
}

.comment-list{
    list-style:none;
    margin:0.4rem 0 0;
    padding:0;
    color:#111;
    font-size:0.9rem;
    line-height:1.4;
    overflow-wrap:anywhere;
}

.comment{
    margin-top:0.25rem;
    white-space:pre-line; /* keep line breaks people typed */
}

.comment-user{
    font-weight:700;
}

.comment-time{
    color:#8e8e8e;
    font-size:0.75rem;
}

/* comment box: username + email the first time */
.comment-form{
    margin-top:0.75rem;
    padding-top:0.6rem;
    border-top:1px solid #ececec;
}

.comment-identity{
    display:flex;
    gap:0.5rem;
    margin-bottom:0.5rem;
}

.comment-identity[hidden]{
    display:none;
}

.comment-input{
    flex:1;
    min-width:0;
    padding:0.45rem 0.6rem;
    border:1px solid #e9e9e9;
    border-radius:0.4em;
    background:#dedede;
    color:#111;
    font:verdana;
    font-size:0.9rem;
}

.comment-row{
    display:flex;
    align-items:flex-start;
    gap:0.5rem;
}

.comment-body{
    flex:1;
    min-width:0;
    padding:0.35rem 0;
    border:0;
    background:none;
    color:#111;
    font:inherit;
    font-size:0.9rem;
    line-height:1.4;
    resize:none;
    outline:none;
}

.comment-post{
    padding:0.35rem 0;
    border:0;
    background:none;
    color:#0095f6;
    font:inherit;
    font-size:0.9rem;
    font-weight:700;
    cursor:pointer;
}

.comment-post:disabled{
    opacity:0.35;
    cursor:default;
}

.comment-input:focus-visible,
.comment-post:focus-visible,
.comment-change:focus-visible{
    outline:2px solid #0095f6;
    outline-offset:2px;
}

.comment-meta{
    display:flex;
    justify-content:space-between;
    gap:0.5rem;
    margin-top:0.25rem;
    color:#8e8e8e;
    font-size:0.72rem;
}

.comment-change{
    padding:0;
    border:0;
    background:none;
    color:#0095f6;
    font:inherit;
    cursor:pointer;
}

.comment-error{
    margin:0.25rem 0 0;
    color:#d6264f;
    font-size:0.78rem;
}

.comment-error:empty{
    display:none;
}

.portfolio-posts .acad-back{
    margin-top:2rem;
}

/* ---------- loading screen between pages (js/loading.js) ---------- */
html.is-arriving{
    background:#25B3F6;
}

html.is-arriving body > :not(.loader){
    visibility:hidden;
}

.loader{
    position:fixed;
    inset:0;
    z-index:9999;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:1.5rem;
    padding:0 16px;
    background:linear-gradient(#25B3F6, #8DDBFF);
    color:#fff;
    text-align:center;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity 0.4s ease, visibility 0s linear 0.4s;
}

html.is-loading .loader{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transition:opacity 0.4s ease;
}

html.is-arriving .loader{
    transition:none;
}

.loader-fish{
    width:min(110px, 28vw);
    max-width:none;
}

.loader-text{
    max-width:32rem;
    min-height:3.6em;
    margin:0;
    font-family:"Libertinus Serif", Georgia, serif;
    font-size:clamp(1.1rem, 3.5vw, 1.4rem);
    line-height:1.4;
    transition:opacity 0.4s ease;
}

.loader-text.is-changing{
    opacity:0;
}

.loader-question{
    display:block;
    font-style:italic;
}

.loader-answer{
    display:block;
    font-style:normal;
    margin-top:1em;
    color:rgb(255, 249, 161);
    font-size:calc(clamp(0.8rem, 3.5vw, 1.4rem) - 4px);
}

@media (prefers-reduced-motion: reduce){
    .loader,
    html.is-loading .loader,
    .loader-text{
        transition:none;
    }
}

/* ---------- "too much love" error screen (js/portfolio.js, at 99 likes) ---------- */

.love-error{
    position:fixed;
    inset:0;
    z-index:10001; /* above the fish cursor and the loading screen */
    display:flex;
    align-items:center;
    justify-content:center;
    padding:0 16px;
    background:#000;
    cursor:default;
}

.love-error-text{
    position:relative;
    margin:0;
    font-family:"Libertinus Serif", Georgia, serif;
    font-size:clamp(1.3rem, 2.6vw, 2.1rem);
    letter-spacing:0.06em;
    color:#fff;
    text-align:center;
    animation:love-shake 2.6s steps(1) infinite;
}

/* two copies of the text, red and cyan, sliced up and jumping sideways */
.love-error-text::before,
.love-error-text::after{
    content:attr(data-text);
    position:absolute;
    inset:0;
    background:#000;
    clip-path:inset(0 0 100% 0);
}

.love-error-text::before{
    text-shadow:-2px 0 #ff2a55;
    animation:love-slice-1 2.2s steps(1) infinite;
}

.love-error-text::after{
    text-shadow:2px 0 #2af0ff;
    animation:love-slice-2 1.7s steps(1) infinite;
}

@keyframes love-slice-1{
    0%, 100%{ clip-path:inset(0 0 100% 0); transform:none; }
    8%{ clip-path:inset(10% 0 60% 0); transform:translateX(-6px); }
    10%{ clip-path:inset(55% 0 20% 0); transform:translateX(5px); }
    12%{ clip-path:inset(0 0 100% 0); transform:none; }
    46%{ clip-path:inset(30% 0 45% 0); transform:translateX(9px); }
    48%{ clip-path:inset(70% 0 5% 0); transform:translateX(-4px); }
    50%{ clip-path:inset(0 0 100% 0); transform:none; }
    81%{ clip-path:inset(0 0 65% 0); transform:translateX(-10px); }
    83%{ clip-path:inset(0 0 100% 0); transform:none; }
}

@keyframes love-slice-2{
    0%, 100%{ clip-path:inset(0 0 100% 0); transform:none; }
    20%{ clip-path:inset(60% 0 10% 0); transform:translateX(7px); }
    22%{ clip-path:inset(15% 0 70% 0); transform:translateX(-8px); }
    24%{ clip-path:inset(0 0 100% 0); transform:none; }
    63%{ clip-path:inset(40% 0 35% 0); transform:translateX(-5px); }
    65%{ clip-path:inset(0 0 100% 0); transform:none; }
    90%{ clip-path:inset(5% 0 80% 0); transform:translateX(11px); }
    92%{ clip-path:inset(0 0 100% 0); transform:none; }
}

@keyframes love-shake{
    0%, 100%{ transform:none; text-shadow:none; }
    30%{ transform:translate(-2px, 1px) skewX(-8deg); text-shadow:-2px 0 #ff2a55, 2px 0 #2af0ff; }
    32%{ transform:translate(3px, -1px); text-shadow:2px 0 #ff2a55, -2px 0 #2af0ff; }
    34%{ transform:none; text-shadow:none; }
    71%{ transform:translateX(4px) skewX(10deg); text-shadow:-3px 0 #ff2a55, 3px 0 #2af0ff; }
    73%{ transform:none; text-shadow:none; }
}

@media (prefers-reduced-motion: reduce){
    .love-error-text,
    .love-error-text::before,
    .love-error-text::after{
        animation:none;
    }
}

/* ---------- drag-and-throw (js/throwables.js) ---------- */

/* landing words and letters you can pick up and throw */
.throw-word{
    display:inline-block;
}

.throw-word,
.title-letter{
    cursor:grab;
    touch-action:none;
    -webkit-user-select:none;
    user-select:none;
}

.thrown-word{
    position:absolute;
    top:0;
    left:0;
    z-index:5;
    white-space:nowrap;
    will-change:transform;
}

/* photos you can throw: sideways drags pick them up, up/down still scrolls */
.throwable-photo{
    touch-action:pan-y;
}

.throwable-photo.is-thrown{
    position:relative;
    will-change:transform;
}

/* no hover easing on a thrown photo, so it keeps up with the pointer */
.scroll-photo.is-thrown{
    transition:filter 0.4s ease !important;
}

/* a column's z-index (it's a flex item) would trap its thrown photo underneath
   the footer's deer */
.column:has(.is-thrown){
    z-index:auto;
}

/* desktop photo columns: click a photo and it flips over to the next one.
   `scale` (not transform) so it works on a photo that's been thrown too */
.scroll-photo.is-flipping{
    animation:photo-flip 0.36s ease-in-out;
}

@keyframes photo-flip{
    0%{ scale:1 1; }
    50%{ scale:0 1; }
    100%{ scale:1 1; }
}

/* ---------- Blog page (blog.html + js/blog.js) ---------- */
.blog-page{
    min-height:100vh;
    margin:0;
    padding:0 16px 4rem;
    background:linear-gradient(#2597E6, #7FD4FF);
    background-attachment:fixed;
}

.blog-home{
    position:absolute;
    top:1.25rem;
    left:1.25rem;
    z-index:1;
    color:#fffde3;
    font-family:"Libertinus Serif", serif;
    font-style:italic;
    font-size:1.1rem;
}

.blog-title{
    margin:0;
    padding:clamp(5rem, 10vw, 7.5rem) 0 clamp(2rem, 5vw, 3.5rem);
    color:#fff;
    font-family:"Libertinus Serif", Georgia, serif;
    font-style:italic;
    font-weight:700;
    letter-spacing: -1%;
    font-size:clamp(3rem, 8vw, 7rem);
    letter-spacing:0.02em;
    text-align:center;
}

.blog-list{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:clamp(2rem, 4vw, 3.75rem);
}

.blog-empty{
    color:#fff;
    font-family:"Libertinus Serif", Georgia, serif;
    font-style:italic;
    font-size:1.4rem;
}

/* the card: fades in, and gives its flipper the 3D space to tilt and turn in */
.blog-card{
    --tilt-x:0deg;
    --tilt-y:0deg;
    --flip:0deg;
    width:min(85%, 68rem);
    perspective:1400px;
    outline:none;
}

@media (max-width: 600px){
    .blog-card{
        width:100%;
    }
}

.blog-card.is-flipped{
    --flip:180deg;
}

.blog-flipper{
    display:grid;
    transform-style:preserve-3d;
    transform:rotateX(var(--tilt-x)) rotateY(calc(var(--tilt-y) + var(--flip)));
    transition:transform 0.5s ease;
    -webkit-user-select:none;
    user-select:none;
}

.blog-card.is-tilting .blog-flipper{
    transform:rotateX(var(--tilt-x)) rotateY(calc(var(--tilt-y) + var(--flip))) scale(1.02);
    transition:transform 0.12s ease-out;
}

/* after the tilt rule, so a flip turns slowly even while tilting */
.blog-card.is-flipping .blog-flipper{
    transition:transform 0.7s cubic-bezier(0.3, 0.7, 0.3, 1);
}

.blog-face{
    position:relative;
    grid-area:1 / 1;
    box-sizing:border-box;
    padding:clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 4.5vw, 3.5rem);
    border-radius:10px;
    background:#fff;
    color:#222;
    box-shadow:var(--shadow-x, 0px) var(--shadow-y, 10px) 30px rgba(10, 60, 110, 0.18);
    -webkit-backface-visibility:hidden;
    backface-visibility:hidden;
    transition:box-shadow 0.2s ease-out;
}

/* shine that follows the cursor across the tilted card */
.blog-face::after{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;
    background:radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 55%);
    opacity:0;
    pointer-events:none;
    transition:opacity 0.3s ease;
}

.blog-card.is-tilting .blog-face::after{
    opacity:1;
}

.blog-card:focus-visible .blog-face{
    box-shadow:0 0 0 3px #fffde3, 0 10px 30px rgba(10, 60, 110, 0.18);
}

/* both sides are as tall as the taller one; the front centers its content */
.blog-front{
    display:flex;
    flex-direction:column;
    justify-content:center;
    text-align:center;
}

.blog-back{
    transform:rotateY(180deg);
}

.blog-card-title{
    margin:0;
    font-family:"Libertinus Serif", Georgia, serif;
    font-style:italic;
    font-weight:700;
    font-size:clamp(1.6rem, 3.6vw, 2.5rem);
    line-height:1.15;
}

.blog-card-date{
    margin:0.5rem 0 0;
    font-family:"Libertinus Serif", Georgia, serif;
    font-style:italic;
    font-size:clamp(1.1rem, 2.2vw, 1.5rem);
}

.blog-photo{
    margin-top:1.25rem;
    aspect-ratio:16 / 7;
    border-radius:8px;
    overflow:hidden;
    background:#9b9b9b;
}

.blog-photo img{
    display:block;
    width:100%;
    height:100%;
    max-width:none;
    object-fit:cover;
}

.blog-journal{
    margin:clamp(1.5rem, 4vw, 3rem) 0 0;
    font-size:clamp(0.95rem, 1.8vw, 1.15rem);
    line-height:1.55;
    white-space:pre-line; /* keep line breaks from the form */
    overflow-wrap:anywhere;
}

.blog-footer{
    margin:3.5rem 0 0;
    text-align:center;
}

.blog-write{
    color:#fffde3;
    font-family:"Libertinus Serif", Georgia, serif;
    font-style:italic;
    font-size:1rem;
    opacity:0.75;
}

.blog-write:hover{
    opacity:1;
}

@media (prefers-reduced-motion: reduce){
    .blog-flipper,
    .blog-card.is-flipping .blog-flipper{
        transition:none;
    }
}

/* ---------- blog-admin.html: the "new entry" form ---------- */
.blog-admin-title{
    font-size:clamp(1rem, 3.5vw, 4rem);
}

.blog-admin{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:1rem;
}

.admin-note,
.admin-panel{
    box-sizing:border-box;
    border: solid 0.1rem #153987;
    width:min(100%, 35rem);
    margin:0;
    border-radius:0.2rem;
}

/* display:flex below would otherwise override the hidden attribute */
.admin-panel[hidden],
.admin-note[hidden],
.admin-preview[hidden]{
    display:none;
}

.admin-note{
    padding:1rem 10rem;
    background:rgba(255, 253, 227, 0.92);
    color:#2b4a63;
    font-size:0.9rem;
    line-height:1.5;
}

.admin-panel{
    display:flex;
    flex-direction:column;
    gap:1.5rem;
    padding:clamp(1.25rem, 4vw, 2.25rem);
    background:#fff;
    color:#222;
    box-shadow:0 10px 30px rgba(10, 60, 110, 0.18);
}

.admin-panel h2{
    margin:0;
    font-family:"Libertinus Serif", Georgia, serif;
    font-style:italic;
    font-size:1.6rem;
}

.admin-field{
    display:flex;
    flex-direction:column;
    gap:0.4rem;
    font-size:0.95rem;
    font-weight:400;
}

.admin-field small{
    font-weight:400;
    color:#777;
}

.admin-field input,
.admin-field textarea{
    padding:0.65rem 0.75rem;
    border:1px solid #cfd8e3;
    border-radius:6px;
    font:verdana;
    font-weight:400;
    color:#222;
}

.admin-field input[type="file"]{
    padding:0.5rem;
}

.admin-field textarea{
    resize:vertical;
}

.admin-count{
    align-self:flex-end;
}

.admin-preview{
    max-height:12rem;
    width:auto;
    max-width:100%;
    align-self:flex-start;
    border-radius:6px;
}

.admin-submit{
    align-self:flex-start;
    padding:0.75rem 1.75rem;
    border:none;
    border-radius:6px;
    background:#2597E6;
    color:#fff;
    font:inherit;
    font-weight:400;
    cursor:pointer;
}

.admin-submit:disabled{
    opacity:0.6;
    cursor:default;
}

.admin-status,
.admin-who{
    margin:0;
    font-size:0.9rem;
}

.admin-link,
.admin-delete{
    padding:0;
    border:none;
    background:none;
    color:#2597E6;
    font:inherit;
    text-decoration:underline;
    cursor:pointer;
}

.admin-entries{
    list-style:none;
    margin:0;
    padding:0;
}

.admin-entries li{
    display:flex;
    justify-content:space-between;
    gap:1rem;
    padding:0.6rem 0;
    border-top:1px solid #eef1f5;
    font-size:0.9rem;
}

.admin-delete{
    color:#c0392b;
}

/* ---------- "draw a box!" page (draw.html, js/draw.js) ---------- */

html:has(.draw-page),
.draw-page{
    --draw-ink:#1d2b36;
    --draw-muted:#6b7a86;
    --draw-line:#dfe6eb;
    --draw-blue:#238CE2;
    background:#fff;
    color:var(--draw-ink);
}

.draw-page{
    max-width:1200px;
    margin:0 auto;
    padding:2rem 16px 3rem;
    box-sizing:border-box;
}

.draw-header{
    display:flex;
    flex-wrap:wrap;
    align-items:flex-end;
    justify-content:space-between;
    gap:1rem 2rem;
    margin-bottom:1.5rem;
}

.draw-title{
    margin:0;
    font-family:"Bodoni 72 Italics", serif;
    font-style:italic;
    font-weight:400;
    font-size:clamp(2.5rem, 8vw, 4rem);
    line-height:1;
    color:var(--draw-blue);
}

.draw-subtitle{
    margin:0.4rem 0 0;
    font-family:"Libertinus Serif", Georgia, serif;
    font-style:italic;
    font-size:1.2rem;
    color:var(--draw-muted);
}

.draw-progress{
    text-align:right;
}

.draw-tally{
    display:flex;
    gap:6px;
    justify-content:flex-end;
    margin:0 0 0.5rem;
    padding:0;
    list-style:none;
}

/* one little box per drawing; filled once it's done */
.draw-tally li{
    width:18px;
    height:18px;
    border:1.5px solid var(--draw-ink);
    border-radius:3px;
    transition:background 0.3s ease, transform 0.3s ease;
}

.draw-tally li.is-done{
    background:var(--draw-blue);
    border-color:var(--draw-blue);
    transform:rotate(-6deg);
}

.draw-count,
.draw-streak{
    margin:0;
    font-size:0.9rem;
}

.draw-streak{
    margin-top:0.2rem;
    color:var(--draw-blue);
}

.draw-main{
    display:grid;
    grid-template-columns:minmax(0, 2fr) minmax(0, 3fr);
    gap:1.5rem;
    align-items:start;
}

.draw-panel{
    border:1px solid var(--draw-line);
    border-radius:12px;
    padding:1rem;
}

.draw-panel-head{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:0.5rem;
    margin-bottom:0.75rem;
}

.draw-heading{
    margin:0;
    font-family:"Bodoni 72 Italics", serif;
    font-style:italic;
    font-weight:400;
    font-size:1.6rem;
}

.draw-tools{
    display:flex;
    gap:0.4rem;
}

.draw-button{
    padding:0.45rem 0.9rem;
    border:1px solid var(--draw-ink);
    border-radius:999px;
    background:#fff;
    color:var(--draw-ink);
    font:inherit;
    font-size:0.85rem;
    cursor:pointer;
    transition:background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.draw-button:hover:not(:disabled){
    background:var(--draw-ink);
    color:#fff;
}

.draw-button:active:not(:disabled){
    transform:scale(0.96);
}

.draw-button:disabled{
    opacity:0.35;
    cursor:default;
}

.draw-button:focus-visible,
.draw-select:focus-visible,
.draw-check input:focus-visible{
    outline:2px solid var(--draw-blue);
    outline-offset:2px;
}

.draw-actions{
    display:flex;
    gap:0.5rem;
    margin-top:0.75rem;
}

.draw-check-button{
    padding:0.75rem 1.4rem;
    border-color:var(--draw-blue);
    color:var(--draw-blue);
    font-size:1rem;
}

.draw-check-button:hover:not(:disabled){
    background:var(--draw-blue);
}

.draw-check-button[aria-pressed="true"]{
    background:var(--draw-blue);
    color:#fff;
}

.draw-done{
    flex:1;
    padding:0.75rem;
    border-color:var(--draw-blue);
    background:var(--draw-blue);
    color:#fff;
    font-size:1rem;
}

.draw-done:hover:not(:disabled){
    background:#1b74bd;
    color:#fff;
}

.draw-ref-svg{
    display:block;
    width:100%;
    height:auto;
    background:#fafcfd;
    border-radius:8px;
}

.ref-edge{
    stroke:#000;
    stroke-width:2.5;
    stroke-linecap:round;
}

.ref-hidden{
    stroke:#9aa8b3;
    stroke-width:1.5;
    stroke-dasharray:6 5;
    stroke-linecap:round;
}

.ref-guide{
    stroke:var(--draw-blue);
    stroke-width:1;
    opacity:0.45;
}

.ref-horizon{
    stroke:var(--draw-blue);
    stroke-width:1;
    stroke-dasharray:2 4;
    opacity:0.7;
}

.ref-label{
    fill:var(--draw-blue);
    font-size:11px;
    font-family:Verdana, sans-serif;
}

.draw-options{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:0.5rem 1rem;
    margin-top:0.75rem;
    font-size:0.85rem;
}

.draw-select{
    margin-left:0.3rem;
    padding:0.25rem 0.4rem;
    border:1px solid var(--draw-line);
    border-radius:6px;
    background:#fff;
    color:var(--draw-ink);
    font:inherit;
}

.draw-check{
    display:inline-flex;
    align-items:center;
    gap:0.35rem;
    cursor:pointer;
}

.draw-check input{
    accent-color:var(--draw-blue);
}

.draw-tips{
    margin-top:1rem;
    font-family:"Libertinus Serif", Georgia, serif;
    font-size:1.05rem;
    line-height:1.4;
}

.draw-tips summary{
    cursor:pointer;
    font-style:italic;
    color:var(--draw-blue);
}

.draw-tips ul{
    margin:0.5rem 0 0;
    padding-left:1.2rem;
}

.draw-tips li + li{
    margin-top:0.3rem;
}

/* the paper: white, a faint edge, and a pen-tip cursor */
.draw-pad{
    display:block;
    width:100%;
    aspect-ratio:4 / 3;
    border:1px solid var(--draw-line);
    border-radius:8px;
    background:#fff;
    cursor:crosshair;
    touch-action:none;
}

.draw-level{
    margin:0 0 0.5rem;
    font-family:"Libertinus Serif", Georgia, serif;
    font-style:italic;
    font-size:1.05rem;
    color:var(--draw-muted);
}

.draw-feedback{
    margin-top:0.75rem;
    padding:0.75rem 1rem;
    border-radius:8px;
    background:#f4f8fb;
}

.draw-score{
    margin:0;
    font-family:"Bodoni 72 Italics", serif;
    font-style:italic;
    font-size:1.4rem;
    color:var(--draw-blue);
}

.draw-tips-list{
    margin:0.4rem 0 0;
    padding-left:1.2rem;
    font-size:0.9rem;
    line-height:1.45;
}

.draw-tips-list li + li{
    margin-top:0.25rem;
}

.draw-legend{
    display:flex;
    flex-wrap:wrap;
    gap:0.4rem 1rem;
    margin:0.6rem 0 0;
    font-size:0.75rem;
    color:var(--draw-muted);
}

.draw-legend span::before{
    content:"";
    display:inline-block;
    width:14px;
    height:3px;
    margin-right:0.35rem;
    vertical-align:middle;
    border-radius:2px;
}

.draw-legend .is-good::before{ background:#2e9d5b; }
.draw-legend .is-off::before{ background:#e08a1e; }
.draw-legend .is-missing::before{ background:#d64545; }

.draw-gallery li{
    position:relative;
}

.draw-thumb-score{
    position:absolute;
    right:6px;
    bottom:6px;
    padding:0.1rem 0.4rem;
    border-radius:999px;
    background:var(--draw-blue);
    color:#fff;
    font-size:0.7rem;
}

.draw-hint{
    margin:0.5rem 0 0;
    color:var(--draw-muted);
    font-size:0.8rem;
    text-align:center;
}

.draw-today{
    margin-top:2rem;
}

.draw-empty{
    margin:0.5rem 0 0;
    color:var(--draw-muted);
    font-size:0.9rem;
}

.draw-gallery{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(120px, 1fr));
    gap:0.75rem;
    margin:0.75rem 0 0;
    padding:0;
    list-style:none;
}

.draw-gallery img{
    display:block;
    width:100%;
    height:auto;
    border:1px solid var(--draw-line);
    border-radius:6px;
}

.draw-footer{
    margin-top:2.5rem;
    text-align:center;
    font-size:0.9rem;
}

.draw-footer a{
    color:var(--draw-blue);
}

@media (max-width: 800px){
    .draw-main{
        grid-template-columns:minmax(0, 1fr);
    }

    .draw-progress{
        text-align:left;
    }

    .draw-tally{
        justify-content:flex-start;
    }
}

/* link to the drawing page, under the artist section's portfolio button */
.draw-invite{
    margin-top:0.75rem;
    font-family:"Libertinus Serif", Georgia, serif;
    font-style:italic;
    font-size:1.25rem;
    color:#fffde3;
    text-decoration:underline;
    text-decoration-thickness:1px;
    text-underline-offset:0.25em;
    transition:transform 0.2s ease-out, opacity 0.2s ease;
}

.draw-invite:hover{
    transform:translateX(4px);
}

/* ---------- Top-right portfolio buttons (index.html) ---------- */
.landing-nav{
    position:absolute;
    top:1.25rem;
    right:1.25rem;
    z-index:2;
    display:flex;
    gap:0.75rem;
}

.landing-nav-button{
    padding:0.6rem 1.1rem;
    border:1px solid #fffde3;
    color:#fffde3;
    text-decoration:none;
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    font-size:0.85rem;
    font-weight:700;
    transition:transform 0.3s ease-out, background-color 0.3s ease-out;
}

.landing-nav-button:hover,
.landing-nav-button:focus-visible{
    transform:scale(1.08);
    background:rgba(255, 253, 227, 0.12);
}

@media (max-width:560px){
    .landing-nav{
        flex-direction:column;
        align-items:flex-end;
        gap:0.5rem;
    }
    .landing-nav-button{
        font-size:0.75rem;
        padding:0.5rem 0.8rem;
    }
}

/* ---------- UI/UX portfolio page (uiux.html) ---------- */
.uiux-page{
    min-height:100vh;
    background:#4A98E3;
}

.uiux-main{
    position:relative;
    max-width:72rem;
    margin:0 auto;
    padding:5rem 1.5rem 6rem;
    box-sizing:border-box;
}

.uiux-title{
    margin:0 0 3rem;
    text-align:center;
    font-family:"Libertinus Serif", serif;
    font-style:italic;
    font-weight:400;
    font-size:clamp(1.8rem, 4vw, 2.4rem);
}

.uiux-grid{
    list-style:none;
    margin:0;
    padding:0;
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:3rem 2.75rem;
}

.uiux-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:0.6rem;
}

.uiux-card{
    position:relative;
    display:block;
    width:100%;
    aspect-ratio:7 / 4;
    background:#D9D9D9;
    text-decoration:none;
    border-radius:12px;
    --dx:0px;
    --dy:0px;
    transition:transform 0.25s ease-out;
}

/* solid white border that drifts a few px toward the cursor
   (js/uiux.js sets --dx / --dy, capped at a small limit each way) */
.uiux-card::after{
    content:"";
    position:absolute;
    inset:-7px;
    z-index:1;
    border:3px solid #fff;
    border-radius:18px;
    opacity:0;
    transform:translate(var(--dx), var(--dy));
    transition:opacity 0.2s ease-out, transform 0.35s ease-out;
    pointer-events:none;
}

.uiux-card:hover,
.uiux-card:focus-visible{
    transform:scale(1.05);
    z-index:1;
}

.uiux-card:hover::after,
.uiux-card:focus-visible::after{
    opacity:1;
}

.uiux-card:focus-visible{
    outline:none;
}

.uiux-card img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:top;
    border-radius:inherit;
}

/* grey box for designs without a screenshot yet */
.uiux-placeholder{
    display:flex;
    width:100%;
    height:100%;
    align-items:center;
    justify-content:center;
    color:#222;
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    font-size:0.95rem;
}

.uiux-link{
    color:#fff;
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    font-size:0.85rem;
}

@media (max-width:900px){
    .uiux-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

@media (max-width:560px){
    .uiux-grid{ grid-template-columns:1fr; gap:2.5rem; }
    .uiux-main{ padding:4.5rem 1rem 4rem; }
}

@media (prefers-reduced-motion:reduce){
    .uiux-card, .landing-nav-button{ transition:none; }
}

/* ---------- Return links ("← back home" etc.) get a solid white box ---------- */
.portfolio-home,
.blog-home,
.acad-back a{
    display:inline-block;
    padding:0.45rem 1rem;
    border:2px solid #fff;
    color:#fff;
    text-decoration:none;
    line-height:1.2;
    transition:transform 0.25s ease-out, background-color 0.25s ease-out;
}

.portfolio-home:hover,
.blog-home:hover,
.acad-back a:hover,
.portfolio-home:focus-visible,
.blog-home:focus-visible,
.acad-back a:focus-visible{
    transform:scale(1.06);
    background:rgba(255, 255, 255, 0.12);
}

@media (prefers-reduced-motion:reduce){
    .portfolio-home, .blog-home, .acad-back a{ transition:none; }
}
