/* roriloty subpages — paper pinned under the same night sky */
:root { --paper: #f4ead6; --paper-dark: #e3d4b4; --ink: #2a2142; --night: #120d26; --coral: #e8805f; --sage: #8fbf9f; --font: "Mali", "Itim", "Segoe UI", system-ui, sans-serif; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--night); }
body { font-family: var(--font); color: var(--paper); min-height: 100vh; line-height: 1.65; position: relative; }
body::before { /* the same painting, blurred & dimmed, fixed behind everything */
    content: ""; position: fixed; inset: -20px; z-index: -2; background: url(assets/bg.webp) center / cover; filter: blur(5px) brightness(.7) saturate(1.1);
}
body::after { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 30%, transparent 40%, rgba(8, 5, 20, .6)); }
a { color: inherit; }

.wrap { width: min(1080px, 100% - 2rem); margin: 0 auto; padding: 1.2rem 0 4rem; }
.top { flex-wrap: wrap; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .4rem 0 1.6rem; }
.back { white-space: nowrap; display: inline-flex; align-items: center; gap: .5em; text-decoration: none; font-weight: 600; padding: .4em 1em; border: 2px dashed rgba(244, 234, 214, .55); border-radius: 999px; background: rgba(18, 13, 38, .5); transition: transform .2s; }
.back:hover, .back:focus-visible { background: var(--paper); color: var(--ink); border-style: solid; outline: none; transform: translateX(-3px) rotate(-1deg); }
.nav { display: flex; gap: .3rem .9rem; flex-wrap: wrap; font-size: .92rem; }
.nav a { text-decoration: none; opacity: .75; padding: .1em .2em; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { opacity: 1; border-color: var(--coral); }

h1.title { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; transform: rotate(-1.5deg); transform-origin: left; margin-bottom: .3em; text-shadow: 0 3px 0 rgba(18, 13, 38, .6); }
h1.title span { color: var(--coral); }
.sub { max-width: 40rem; opacity: .85; margin-bottom: 2.2rem; }

/* paper sheets */
.sheet {
    position: relative; background: var(--paper); color: var(--ink); padding: 1.6rem 1.8rem 1.8rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, .25), 0 18px 40px rgba(0, 0, 0, .4);
    clip-path: polygon(0 .6%, 5% 0, 20% .5%, 40% 0, 62% .6%, 80% 0, 100% .4%, 99.6% 99%, 82% 100%, 60% 99.4%, 38% 100%, 18% 99.5%, 0 100%);
}
.sheet::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(120, 90, 50, .08) 27px 28px); }
.tape { position: absolute; top: -.5rem; left: 50%; width: 5.5rem; height: 1.7rem; margin-left: -2.75rem; background: rgba(232, 128, 95, .75); transform: rotate(-3deg); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); z-index: 2; }
.tape.mint { background: rgba(143, 191, 159, .8); transform: rotate(4deg); }
.sheet h2, .sheet h3 { line-height: 1.2; }

/* about */
.about { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 2.4rem; align-items: start; }
.sticker { position: relative; transform: rotate(-3deg); background: #1c1538; border: 6px solid var(--paper); border-radius: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); overflow: hidden; aspect-ratio: 1; }
.sticker img { position: absolute; width: 230%; max-width: none; left: -62%; top: -8%; }
.sticker::after { content: ""; position: absolute; inset: 0; background: url(assets/bg.webp) center / cover; z-index: -1; }
.sticker { isolation: isolate; }
.about .sheet p { margin: 0 0 1em; }
.about .lead { font-size: 1.12rem; font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem 1.2rem; margin: 1.4rem 0; }
.facts dt { font-size: .7rem; letter-spacing: .12em; color: var(--coral); font-weight: 700; }
.facts dd { font-weight: 600; }
.btns { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.btn { display: inline-block; text-decoration: none; font-weight: 700; background: var(--ink); color: var(--paper); padding: .5em 1.2em; border-radius: 8px 14px 9px 13px; box-shadow: 0 3px 0 rgba(0, 0, 0, .3); transition: transform .2s; }
.btn:hover, .btn:focus-visible { transform: translateY(-3px) rotate(-1.5deg); background: var(--coral); outline: none; }

/* photos: pinned polaroids */
.polaroids { display: grid; align-items: start; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2.4rem 1.8rem; padding-top: .6rem; }
.polaroid { position: relative; background: var(--paper); color: var(--ink); padding: .8rem .8rem 0; border: 0; text-align: left; font: inherit; cursor: zoom-in; box-shadow: 0 4px 0 rgba(0, 0, 0, .22), 0 16px 32px rgba(0, 0, 0, .45); transform: rotate(var(--r, 0deg)); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1), box-shadow .3s; }
.polaroid:nth-child(6n+1) { --r: -2.2deg; } .polaroid:nth-child(6n+2) { --r: 1.6deg; } .polaroid:nth-child(6n+3) { --r: -1deg; }
.polaroid:nth-child(6n+4) { --r: 2.4deg; } .polaroid:nth-child(6n+5) { --r: -1.8deg; } .polaroid:nth-child(6n) { --r: 1deg; }
.polaroid:hover, .polaroid:focus-visible { transform: rotate(0) scale(1.04) translateY(-4px); outline: none; z-index: 3; box-shadow: 0 6px 0 rgba(0, 0, 0, .2), 0 26px 44px rgba(0, 0, 0, .5); }
.polaroid:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #1c1538; }
.polaroid .cap { display: block; padding: .7rem .2rem 1rem; }
.polaroid strong { display: block; font-size: 1rem; }
.polaroid small { font-size: .74rem; opacity: .65; }
.polaroid .pin { position: absolute; top: -.7rem; left: 50%; width: 1.4rem; height: 1.4rem; margin-left: -.7rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6, transparent 35%), var(--coral); box-shadow: 0 3px 5px rgba(0, 0, 0, .4); }
.polaroid:nth-child(even) .pin { background: radial-gradient(circle at 35% 30%, #fff6, transparent 35%), var(--sage); }

dialog.lightbox { border: 0; background: transparent; width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; overflow: hidden; color: var(--paper); }
dialog.lightbox::backdrop { background: rgba(10, 6, 24, .88); }
.lb { height: 100%; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center; padding: 1.2rem 4rem .8rem; gap: .8rem; }
.lb figure { min-height: 0; max-height: 100%; background: var(--paper); padding: .7rem .7rem 0; box-shadow: 0 20px 60px #000a; transform: rotate(-.6deg); display: flex; flex-direction: column; }
.lb img { height: auto; width: auto; min-height: 0; max-width: min(90vw, 1200px); max-height: calc(100vh - 9rem); object-fit: contain; display: block; }
.lb figcaption { color: var(--ink); padding: .6rem .2rem .8rem; text-align: center; }
.lb figcaption strong { display: block; } .lb figcaption small { opacity: .65; }
.lb button { position: absolute; font: inherit; font-size: 1.6rem; width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 2px dashed rgba(244, 234, 214, .6); background: rgba(18, 13, 38, .7); color: var(--paper); cursor: pointer; }
.lb button:hover, .lb button:focus-visible { background: var(--paper); color: var(--ink); border-style: solid; outline: none; }
.lb .x { top: 1rem; right: 1rem; } .lb .prev { left: .8rem; top: 50%; } .lb .next { right: .8rem; top: 50%; }

/* projects: pinned notes */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 2.2rem 1.6rem; padding-top: .8rem; }
.note { position: relative; display: flex; flex-direction: column; text-decoration: none; background: var(--paper); color: var(--ink); padding: 1.6rem 1.3rem 1.2rem; transform: rotate(var(--r, 0deg)); box-shadow: 0 4px 0 rgba(0, 0, 0, .22), 0 14px 28px rgba(0, 0, 0, .4); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.note:nth-child(4n+1) { --r: -1.4deg; } .note:nth-child(4n+2) { --r: 1deg; background: #efe0c0; } .note:nth-child(4n+3) { --r: -.6deg; } .note:nth-child(4n) { --r: 1.6deg; background: #e8e4cf; }
.note:hover, .note:focus-visible { transform: rotate(0) translateY(-6px) scale(1.02); outline: none; z-index: 3; }
.note:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
.note::before { content: ""; position: absolute; top: -.6rem; left: 50%; width: 4.4rem; height: 1.4rem; margin-left: -2.2rem; background: rgba(232, 128, 95, .72); transform: rotate(-2deg); }
.note:nth-child(even)::before { background: rgba(143, 191, 159, .78); transform: rotate(3deg); }
.note h3 { font-size: 1.15rem; margin-bottom: .2em; }
.note .tagline { align-self: flex-start; font-size: .68rem; letter-spacing: .1em; font-weight: 700; color: var(--paper); background: var(--ink); padding: .1em .7em; border-radius: 99px; margin-bottom: .7em; }
.note p { font-size: .92rem; flex: 1; }
.note .go { margin-top: .9em; font-weight: 700; color: var(--coral); }

.foot { text-align: center; opacity: .6; font-size: .8rem; padding: 1rem 0 2rem; }

/* page enter */
.curtain { position: fixed; inset: 0; background: var(--night); z-index: 99; pointer-events: none; opacity: 0; transition: opacity .5s; }
body.enter .curtain { opacity: 1; }
body.leaving .curtain { opacity: 1; pointer-events: all; }
.wrap { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } }

@media (max-width: 760px) {
    .about { grid-template-columns: 1fr; }
    .sticker { max-width: 240px; margin: 0 auto; }
    .lb { padding: 1rem .6rem .6rem; }
    .lb .prev { left: .3rem; top: auto; bottom: .6rem; } .lb .next { right: .3rem; top: auto; bottom: .6rem; }
}
@media (prefers-reduced-motion: reduce) { .wrap { animation: none; } * { transition: none !important; } }
