/* ✿ A little pixel-art cottage. Change these variables to recolour everything! */
:root{--cream:#f5ead9;--paper:#fff8e9;--wood:#ad7c56;--wood-dark:#754f3b;--sage:#789679;--sage-dark:#506b57;--lavender:#b9a0cf;--peach:#dba48c;--ink:#554238;--muted:#826b5d;--shadow:#d4bda1}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font:16px/1.6 'Courier New',Courier,monospace
}
button,a{font:inherit}button{cursor:pointer}a{color:var(--sage-dark)}a:hover{text-decoration-thickness:3px}a:focus-visible,button:focus-visible{outline:3px dashed var(--sage-dark);outline-offset:5px}.shell{width:min(1080px,calc(100% - 40px));margin-inline:auto}.skip-link{position:absolute;top:-100px;left:8px;padding:8px;background:white;z-index:100}.skip-link:focus{top:8px}.site-header{border-bottom:4px solid var(--wood-dark);background:var(--paper)}.nav-wrap{display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:76px}.brand{font-weight:900;white-space:nowrap;font-size:1.1rem;text-decoration:none;color:var(--ink)}.brand span{color:var(--sage)}nav{display:flex;gap:clamp(10px,3vw,30px);flex-wrap:wrap}nav a{text-decoration:none;font-size:.85rem;font-weight:bold}.section{margin:66px 0;scroll-margin-top:32px}.pixel-frame{border:4px solid var(--wood-dark);border-radius:0;box-shadow:7px 7px 0 var(--shadow);background:var(--paper)}h1,h2,h3,h4,p{margin-top:0}h1{font-size:clamp(2rem,5vw,3.3rem);line-height:1.18;letter-spacing:-.05em;margin:18px 0 22px}h2{font-size:clamp(1.35rem,3vw,2rem);line-height:1.2;margin:2px 0 10px}h3{font-size:1.15rem;line-height:1.3}p{max-width:65ch}h4{margin-bottom:2px;font-size:1rem}.eyebrow{font-size:.68rem;font-weight:900;letter-spacing:.09em;color:var(--sage-dark);text-transform:uppercase}.hero{display:grid;grid-template-columns:1.05fr .95fr;gap:30px;align-items:stretch}.hero-copy{padding:clamp(24px,4vw,48px)}.hero-copy p{color:var(--muted)}.hero-buttons{display:flex;flex-wrap:wrap;gap:12px;margin-top:26px}.pixel-button{display:inline-flex;align-items:center;justify-content:center;padding:9px 13px;background:var(--sage);color:#fff;border:3px solid var(--sage-dark);box-shadow:4px 4px 0 var(--shadow);font-size:.82rem;font-weight:bold;text-decoration:none;min-height:43px}.pixel-button.secondary{background:#fff9ed;color:var(--ink);border-color:var(--wood-dark)}.pixel-button:hover{transform:translate(-1px,-2px);box-shadow:5px 6px 0 var(--shadow)}.room{min-height:350px;position:relative;overflow:hidden;background:#f0d8b9}.room-title{position:absolute;z-index:4;top:12px;left:13px;font-size:.65rem;color:var(--wood-dark);font-weight:900}.floor{position:absolute;bottom:0;width:100%;height:37px;background:#c7a17a;border-top:6px solid #956f52}.window{position:absolute;right:35px;top:51px;width:120px;height:126px;background:#b4d3d0;border:9px solid #966b4c;box-shadow:5px 5px 0 #d4b395;overflow:hidden}.window:before,.window:after{content:"";position:absolute;background:#966b4c;z-index:3}.window:before{width:8px;top:0;bottom:0;left:49px}.window:after{height:8px;left:0;right:0;top:54px}.sun{position:absolute;background:#ffe8a9;width:33px;height:33px;top:14px;right:13px}.hill{position:absolute;bottom:-28px;background:#85b198;width:115px;height:76px;transform:rotate(-25deg)}.hill-one{left:-40px}.hill-two{background:#6c9c80;left:42px;bottom:-33px;transform:rotate(24deg)}.wall-shelf{position:absolute;left:31px;top:113px;width:120px;height:10px;background:#875b44;border-top:4px solid #d4a075;display:flex;align-items:flex-end;padding-left:7px;gap:5px}.tiny-book{width:15px;height:44px;border:3px solid #65483e;box-shadow:inset 3px 0 #ffffff55}.b1{height:48px;background:#bb9ac5}.b2{height:37px;background:#7fae9d}.b3{height:55px;background:#d79a86}.b4{height:40px;background:#e6bf7a}.b5{height:46px;background:#a3a3c1}.plant{position:absolute;left:40px;bottom:35px;width:58px;height:83px;z-index:3}.pot{position:absolute;bottom:0;left:10px;width:39px;height:31px;background:#c98564;border:5px solid #96604b;clip-path:polygon(0 0,100% 0,86% 100%,14% 100%)}.stem{position:absolute;bottom:29px;left:28px;background:#527b58;width:6px;height:48px}.leaf{position:absolute;background:#719b73;width:22px;height:18px;border:4px solid #527b58}.leaf-a{left:4px;top:12px}.leaf-b{left:32px;top:0}.leaf-c{left:27px;top:28px}.desk{position:absolute;right:24px;bottom:35px;width:159px;height:99px;z-index:3}.desk-top{position:absolute;bottom:35px;left:0;right:0;height:13px;background:#b98057;border:4px solid #754f3b}.desk-leg{position:absolute;bottom:0;width:13px;height:40px;background:#754f3b}.desk-leg.left{left:9px}.desk-leg.right{right:9px}.monitor{position:absolute;bottom:47px;left:45px;background:#6a595d;border:5px solid #51434a;width:74px;height:51px;display:grid;place-items:center;color:#38584e}.monitor:before{content:"";position:absolute;inset:5px;background:#a7c9b4}.monitor span{z-index:1;font-size:.59rem;font-weight:900}.cat{position:absolute;bottom:32px;left:134px;width:72px;height:67px;z-index:4}.cat-head{position:absolute;top:11px;left:13px;width:42px;height:33px;background:#ad947c;border:4px solid #725e4f;z-index:2}.ear{position:absolute;top:1px;width:16px;height:17px;background:#ad947c;border:4px solid #725e4f}.ear-l{left:13px}.ear-r{left:39px}.cat-head i{position:absolute;top:13px;width:4px;height:4px;background:#483f3a}.cat-head i:first-child{left:9px}.cat-head i:last-child{right:9px}.cat-body{position:absolute;bottom:0;left:4px;width:60px;height:35px;background:#ad947c;border:4px solid #725e4f}.cat-tail{position:absolute;right:0;top:19px;width:16px;height:35px;border:6px solid #725e4f;border-left:0}.section-heading{display:flex;align-items:center;gap:15px;margin-bottom:22px}.section-heading p{margin:0;color:var(--muted);font-size:.9rem}.section-icon{display:grid;place-items:center;min-width:62px;height:62px;font-size:2rem;background:var(--paper);border:4px solid var(--wood-dark)}.library-layout{display:grid;grid-template-columns:1.25fr 1fr;gap:24px;align-items:stretch}.bookshelf{padding:25px 22px 16px;background:#f8ecd7;min-width:0}.shelf-label{font-size:.7rem;letter-spacing:.03em;text-align:center;color:var(--muted);margin-bottom:26px;font-weight:bold}.book-list{display:flex;justify-content:center;align-items:flex-end;gap:9px;min-height:166px;flex-wrap:wrap;padding:0 5px}.book{position:relative;display:grid;place-items:center;width:52px;min-width:45px;padding:5px 2px;background:var(--book-color);border:4px solid var(--ink);border-bottom:0;border-radius:0;box-shadow:inset 6px 0 #ffffff55;transition:transform .15s ease}.book:before,.book:after{content:"";position:absolute;left:10px;right:7px;height:6px;background:#fbe4ad}.book:before{top:15px}.book:after{bottom:15px}.book:hover,.book.selected{transform:translateY(-12px)}.book-spine{writing-mode:vertical-rl;transform:rotate(180deg);font-size:.65rem;font-weight:900;max-height:85px;overflow:hidden;line-height:1.05;color:#40352f;text-align:center;z-index:1}.wood-shelf{height:22px;background:var(--wood);border:4px solid var(--wood-dark);box-shadow:0 9px #d7bb9b}.shelf-bottom{text-align:center;color:var(--muted);font-size:.69rem;padding-top:31px}.book-details{padding:25px;min-height:255px}.book-details h3{margin:12px 0}.book-details p{margin:15px 0;color:var(--muted)}.status-chip,.skill-chip{display:inline-block;background:#e3ebdd;border:2px solid var(--sage-dark);font-size:.71rem;padding:3px 7px;color:#39523e;font-weight:bold}.text-link{font-weight:bold}.card-grid,.gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.project-card{padding:26px}.project-icon{width:65px;height:65px;display:grid;place-items:center;background:#e5d6ed;border:4px solid #8d7299;color:#6e577e;font-size:2rem;margin-bottom:16px}.project-card h3{margin:8px 0}.project-card p{color:var(--muted)}.coming-soon{font-size:.78rem;color:var(--muted);font-style:italic}.filter-row{display:flex;gap:10px;margin-bottom:20px;flex-wrap:wrap}.filter{padding:7px 12px;background:var(--paper);color:var(--ink);border:3px solid var(--wood-dark);font-size:.82rem}.filter.active{background:var(--sage);color:white;border-color:var(--sage-dark)}.gallery-card{overflow:hidden}.gallery-card[hidden]{display:none}.gallery-media{aspect-ratio:16/9;background:#ead9c3;display:grid;place-items:center;overflow:hidden}.gallery-media img,.gallery-media video{width:100%;height:100%;object-fit:cover}.placeholder-art{position:relative;background:repeating-linear-gradient(45deg,#ead9c3,#ead9c3 16px,#e2cfb6 16px,#e2cfb6 32px);display:flex;flex-direction:column;gap:5px;color:#95755f}.placeholder-icon{font-size:4.2rem;line-height:1}.placeholder-caption{font-size:.68rem;background:var(--paper);padding:3px 8px}.gallery-body{padding:18px 21px}.gallery-body h3{margin:6px 0}.gallery-body p{color:var(--muted);font-size:.87rem}.cv-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.cv-panel{padding:25px}.cv-panel>h3{border-bottom:3px dashed #d3b394;padding-bottom:12px}.cv-entry+.cv-entry{border-top:2px dashed #ddcab2;padding-top:15px;margin-top:15px}.cv-meta{font-size:.75rem;color:var(--sage-dark);font-weight:bold}.cv-entry p{font-size:.84rem;color:var(--muted);margin-top:8px}.skill-list{display:flex;flex-wrap:wrap;align-content:flex-start;gap:9px}.contact-links{display:flex;gap:10px;flex-wrap:wrap}.contact-links .pixel-button{font-size:.76rem}.tiny-note{margin-top:22px;font-size:.7rem;color:var(--muted)}.footer{margin-top:95px;border-top:4px solid var(--wood-dark);background:var(--paper);font-size:.76rem;text-align:center;padding:22px 0}.footer span{color:var(--sage-dark)}@media(max-width:760px){.hero,.library-layout,.card-grid,.gallery-grid,.cv-layout{grid-template-columns:1fr}.nav-wrap{flex-direction:column;justify-content:center;padding:13px 0}.nav-wrap nav{justify-content:center}.room{min-height:300px}.section{margin:46px 0}.book-list{gap:7px}.book{width:47px}.section-heading{align-items:flex-start}.hero-copy{padding:26px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.book{transition:none}}

/* ====================== PIXEL COTTAGE ART UPGRADE ====================== */
:root { --outline:#564338; --brick:#d3a27e; }
body { background-color:#f7eddc; background-image:radial-gradient(#dfcbb1 1px,transparent 1px);background-size:22px 22px; }
.site-header {position:relative;background:#fff4df;box-shadow:0 6px 0 #dfc5a5;}
.site-header::after {content:"";position:absolute;left:0;right:0;bottom:-10px;height:4px;background:repeating-linear-gradient(90deg,#c29c72 0 14px,transparent 14px 22px);pointer-events:none;}
.brand {letter-spacing:1px;}
.brand::before{content:"";display:inline-block;vertical-align:middle;width:24px;height:24px;margin-right:8px;background:url('assets/pixel/flower.png') center/contain no-repeat;image-rendering:pixelated;}
.brand span {display:none;}
.pixel-frame{border:4px solid var(--outline);box-shadow:5px 5px 0 #d3aa87,9px 9px 0 #f9f1df;}
.hero-copy{background:#fff8e8;position:relative;}
.hero-copy::after{content:"";position:absolute;right:13px;top:11px;width:38px;height:38px;background:url('assets/pixel/coffee.png') center/contain no-repeat;image-rendering:pixelated;opacity:.85;}
.hero-copy h1{color:#6c8064;letter-spacing:-.06em;}
.hero-copy .eyebrow {max-width:calc(100% - 45px);}
.room{background:#e6c49f;min-height:360px;display:flex;align-items:stretch;}
.room-pixel-art{display:block;width:100%;height:100%;position:absolute;inset:0;object-fit:cover;image-rendering:pixelated;}
.room-title{padding:3px 7px;background:#fff1d7;color:#6d4b3f;border:3px solid #6d4b3f;left:12px;top:12px;}
.room-plaque{position:absolute;bottom:12px;right:10px;background:#fff0d7;border:3px solid #704e40;padding:3px 6px;font-size:.57rem;font-weight:900;color:#6e5846;}
.travel-signs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:-14px;}
.travel-signs a{display:flex;flex-direction:column;align-items:center;gap:3px;background:#fff8e9;border:4px solid #72503d;box-shadow:4px 4px 0 #d4b08c;padding:15px 6px 12px;text-decoration:none;color:#584536;font-size:.75rem;font-weight:900;transition:transform .12s;}
.travel-signs a:nth-child(even){background:#edf1df;}
.travel-signs a:hover{transform:translateY(-5px);}
.travel-signs a img{width:48px;height:48px;image-rendering:pixelated;margin-bottom:3px;}
.travel-signs a span{color:#8b715d;font-weight:normal;font-size:.61rem;text-align:center;}
.section-heading{padding-bottom:12px;border-bottom:4px dashed #d7b99b;}
.section-icon{height:72px;min-width:72px;box-shadow:4px 4px 0 #dfc09d;background:#fff5de;}
.section-icon img{height:48px;width:48px;image-rendering:pixelated;}
.book-list{position:relative;padding-top:46px;}
.bookshelf{background:repeating-linear-gradient(0deg,#f8eedc 0 21px,#f2e4cc 21px 23px);position:relative;overflow:hidden;}
.shelf-ornaments{position:absolute;top:63px;left:18px;right:18px;display:flex;justify-content:space-between;pointer-events:none;}
.shelf-ornaments img{width:45px;height:45px;image-rendering:pixelated;}
.book{border:4px solid #574238;border-bottom:0;box-shadow:inset 6px 0 #ffffff65,inset -5px 0 #00000016,3px 0 0 #d2b393;}
.book:hover,.book.selected{filter:saturate(1.25);}
.book-details{background:#fffaee;position:relative;padding-top:43px;}
.book-details::before{content:"✿ LIBRARY CARD";position:absolute;left:-4px;top:-4px;background:#789679;color:white;border:4px solid #574238;padding:3px 9px;font-size:.63rem;font-weight:bold;}
.book-details::after{content:"";position:absolute;right:15px;bottom:12px;width:38px;height:38px;background:url('assets/pixel/star.png') center/contain no-repeat;image-rendering:pixelated;opacity:.4;pointer-events:none;}
.project-card{position:relative;background:#fff8e9;}
.project-card::before{content:"";position:absolute;top:0;right:0;width:34px;height:34px;background:linear-gradient(135deg,transparent 50%,#e5cdb1 50%);}
.project-card:nth-child(even) .project-icon{background:#d8e7d4;border-color:#69816e;}
.project-icon{image-rendering:pixelated;box-shadow:4px 4px 0 #dbbc9d;}
.gallery-card{background:#fff7e8;}
.gallery-media{border-bottom:4px solid var(--outline);}
.placeholder-art{background-color:#d8b9aa;background-image:linear-gradient(#f3dfc6 4px,transparent 4px),linear-gradient(90deg,#f3dfc6 4px,transparent 4px);background-size:38px 38px;}
.gallery-card:nth-child(2) .placeholder-art{background-color:#bdd0b6;}
.gallery-card:nth-child(3) .placeholder-art{background-color:#cfc1de;}
.placeholder-icon{display:block;width:80px;height:80px;background:url('assets/pixel/camera.png') center/contain no-repeat;image-rendering:pixelated;font-size:0;}
.gallery-card[data-type="video"] .placeholder-icon{background-image:url('assets/pixel/monitor.png');}
.cv-panel{position:relative;background:#fff9ee;}
.cv-panel::before{content:"";position:absolute;right:13px;top:13px;width:10px;height:10px;background:#cb8c7c;border:2px solid #704f40;}
.language-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;}
.languages-intro{margin-bottom:22px;text-align:center;padding:14px;font-size:.81rem;font-weight:900;background:#edf0df;color:#64725b;}
.languages-intro span{color:#c88f92;}
.language-card{background:#fffaf0;padding:21px 20px 22px;position:relative;min-height:225px;}
.language-stamp{font-size:.61rem;font-weight:900;letter-spacing:.06em;color:#816a5a;margin-bottom:17px;}
.speech-bubble{display:inline-block;max-width:100%;overflow-wrap:anywhere;position:relative;background:var(--language-accent);border:4px solid #594538;box-shadow:4px 4px 0 #d9c3a9;padding:13px 15px;font-size:1.15rem;font-weight:900;color:#42342e;margin-bottom:19px;}
.speech-bubble::after{content:"";position:absolute;bottom:-12px;left:15px;width:12px;height:8px;background:var(--language-accent);border-left:4px solid #594538;border-bottom:4px solid #594538;}
.language-card h3{margin:2px 0 10px;}
.language-card p{margin:15px 0 0;font-size:.82rem;color:var(--muted);}
.footer{background:#fff4e0;}
@media(max-width:900px){.travel-signs{grid-template-columns:repeat(3,minmax(0,1fr));}.language-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.travel-signs{grid-template-columns:repeat(2,minmax(0,1fr));}.language-grid{grid-template-columns:1fr;}.room{min-height:280px;}.hero-copy::after{opacity:.4;}.room-plaque{font-size:.5rem;}}
@media(prefers-reduced-motion:reduce){.travel-signs a{transition:none;}}


/* ====================== BOOKSHELF TWEAKS v2 ====================== */
.book-list{
  align-items:flex-end;
  gap:6px;
  padding:54px 10px 6px;
}
.book{
  position:relative;
  justify-items:center;
  padding:0;
  overflow:visible;
  isolation:isolate;
  width:var(--book-width,52px);
  background:linear-gradient(90deg, rgba(255,255,255,.20) 0 14%, transparent 14% 100%), var(--book-color);
  box-shadow: inset 5px 0 rgba(255,255,255,.35), inset -4px 0 rgba(71,52,40,.14), 3px 0 0 #d2b393;
}
.book::before,
.book::after{content:none;}
.book-top-band{
  position:absolute;
  top:11px;
  left:8px;
  right:8px;
  height:8px;
  background:#f8e5b8;
  border:2px solid rgba(87,66,56,.65);
  z-index:2;
}
.book-emblem{
  position:absolute;
  top:27px;
  left:50%;
  transform:translateX(-50%);
  width:17px;
  height:17px;
  display:grid;
  place-items:center;
  background:#fff6df;
  border:2px solid rgba(87,66,56,.7);
  color:#5a4536;
  font-size:.62rem;
  font-weight:900;
  z-index:2;
}
.book-spine{
  max-height:none;
  height:calc(100% - 72px);
  margin-top:49px;
  margin-bottom:22px;
  padding-inline:2px;
  font-size:.60rem;
  letter-spacing:.02em;
  text-shadow:1px 0 rgba(255,255,255,.18);
}
.book-ribbon{
  position:absolute;
  top:36px;
  right:3px;
  width:6px;
  height:34px;
  background:#b56f6d;
  box-shadow:-1px 0 0 rgba(87,66,56,.65);
}
.book-pages{
  position:absolute;
  left:-2px;
  right:-2px;
  bottom:-1px;
  height:8px;
  background:repeating-linear-gradient(90deg,#fff8eb 0 6px,#e8dac8 6px 7px);
  border:3px solid #574238;
  border-top:0;
  z-index:-1;
}
.book.variant-2 .book-ribbon{background:#6f8faa;}
.book.variant-3 .book-ribbon{background:#7ea46f;}
.book.variant-4 .book-ribbon{background:#d3945e;}
.book.variant-2 .book-top-band{background:#f0d6a2;}
.book.variant-3 .book-top-band{background:#e9ddb0;}
.book.variant-4 .book-top-band{background:#f4ddbe;}
.book.selected,
.book:hover{
  transform:translateY(-12px);
  filter:saturate(1.15) brightness(1.03);
}
.book.selected .book-pages,
.book:hover .book-pages{bottom:-3px;}
.wood-shelf{
  position:relative;
  margin-top:2px;
}
.wood-shelf::before{
  content:"";
  position:absolute;
  left:16px;
  right:16px;
  top:-9px;
  height:10px;
  background:repeating-linear-gradient(90deg,#c49368 0 20px,#b68059 20px 40px);
  border:3px solid #6b4938;
}
.shelf-bottom{padding-top:38px;}
@media(max-width:900px){
  .language-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:760px){
  .book-list{gap:4px;}
  .book-spine{font-size:.56rem;}
}
@media(max-width:600px){
  .language-grid{grid-template-columns:1fr;}
}


/* === RETRO COTTAGE RPG · v3 === */
/* Tiny game-world details made with plain CSS. No framework needed. */
:root{--pixel-outline:#493c39;--gold:#f4d58b;--mint:#b6cfaa;}
body{background-color:#f2e7d3;background-image:linear-gradient(90deg,#e4d3ba 2px,transparent 2px),linear-gradient(#e4d3ba 2px,transparent 2px);background-size:28px 28px;background-position:14px 14px;}
.site-header{background:#f8e4c5;border-bottom:6px solid var(--pixel-outline);}
.site-header::after{height:7px;bottom:-14px;background:repeating-linear-gradient(90deg,#a97855 0 14px,#f4d5a6 14px 28px);}
.brand{font-size:1.16rem;text-shadow:2px 2px 0 #fdf3d9;}
.nav-wrap a:not(.brand){padding:6px 8px;border-bottom:3px solid transparent;}
.nav-wrap a:not(.brand):hover{background:#e4efd8;border-bottom-color:#668568;}
.pixel-frame{border-width:5px;border-color:var(--pixel-outline);box-shadow:5px 0 #bd8e66,-5px 0 #bd8e66,0 5px #bd8e66,0 -5px #bd8e66,9px 9px 0 #dac29f;margin-bottom:8px;}
.hero-copy{background:#fff7e6;background-image:linear-gradient(90deg,transparent 97%,#efdac0 97%);background-size:25px 25px;}
.hero-copy .eyebrow{display:inline-block;background:#dbe9d3;padding:7px 9px;border:3px solid #5b745e;box-shadow:3px 3px #b7c49e;}
.hero-copy h1{color:#526f59;text-shadow:3px 3px #e3e9c9;}
.hero-copy::before{content:'✦  ✧  ✦';position:absolute;bottom:13px;right:18px;color:#d7a671;letter-spacing:3px;font-size:1.2rem;}
.room{border:6px solid var(--pixel-outline);}
.room-pixel-art{image-rendering:pixelated;}
.room-plaque{background:#f7e6b5;box-shadow:3px 3px #b48b64;}
.travel-signs{margin-top:8px;gap:15px;}
.travel-signs a{background:#fdf2d9;border:5px solid var(--pixel-outline);box-shadow:0 5px 0 #ab805b,5px 5px 0 #ab805b;}
.travel-signs a:nth-child(2n){background:#e3ecd6;}
.travel-signs a:hover{transform:translateY(-6px);}
.travel-signs img{filter:drop-shadow(3px 3px 0 #cbb391);}
.section-heading .eyebrow{display:inline-block;background:#e1e9d0;padding:3px 7px;border:2px solid #819b78;}
.section-heading h2{color:#5e6f54;}
.bookshelf{background:#cfb18b;overflow:visible;padding:18px 20px 20px;border:6px solid #644b3c;box-shadow:inset 7px 7px 0 #dfc4a0,inset -7px -7px 0 #a47d5b,7px 7px 0 #d2b898;}
.library-arch{font-weight:900;letter-spacing:2px;text-align:center;background:#8c5f43;color:#fff0c8;padding:9px 6px;border:4px solid #5b4035;box-shadow:inset 0 4px 0 #c58c64,0 6px 0 #6d4a38;margin:0 18px 19px;}
.library-arch span{color:#f2ca82;}
.shelf-label{font-size:.7rem;letter-spacing:.04em;color:#765843;margin-bottom:8px;}
.alcove{background:repeating-linear-gradient(90deg,#f5debc 0 28px,#eacda6 28px 30px);border:6px solid #6f4d3a;box-shadow:inset 6px 6px #b98e67;position:relative;margin:0 4px;}
.alcove::before{content:'';position:absolute;top:11px;left:13px;right:13px;height:5px;background:repeating-linear-gradient(90deg,transparent 0 15px,#e8bd81 15px 21px);opacity:.65;}
.alcove-pixels{position:absolute;right:10px;top:12px;width:6px;height:6px;background:#eec979;box-shadow:-12px 8px #eec979,-20px -3px #fff0b0,-250px 16px #fff0b0;}
.shelf-ornaments{z-index:5;top:126px;left:28px;right:28px;}
.shelf-ornaments img{width:38px;height:38px;}
.book-list{padding:60px 8px 4px;gap:7px;min-height:204px;align-items:flex-end;flex-wrap:nowrap;justify-content:center;}
.book{width:clamp(40px,10%,58px)!important;min-width:0;border:4px solid #4b3d35;border-bottom:0;background:var(--book-color);box-shadow:inset 5px 0 #ffffff49,inset -5px 0 #00000018,4px 0 #88664c;transition:transform .12s steps(2,end);}
.book-top-band{top:13px;left:5px;right:5px;height:7px;background:#ffe9aa;border:2px solid #675044;}
.book-emblem{top:26px;left:50%;width:20px;height:20px;background:#fff2ce;border:3px solid #5f4a3c;color:#8f7148;font-size:.65rem;}
.book-spine{writing-mode:vertical-rl;transform:rotate(180deg);margin-top:53px;height:calc(100% - 76px);margin-bottom:14px;font-size:.62rem;letter-spacing:0;line-height:1.1;overflow:hidden;color:#3d302d;text-shadow:none;}
.book-ribbon{width:5px;right:2px;top:49px;height:28px;box-shadow:none;background:#734e45;}
.book-pages{bottom:-1px;left:0;right:0;height:6px;background:#f8eed9;border-width:2px;}
.book.variant-2{border-top:7px solid #58473b;}
.book.variant-3{box-shadow:inset 6px 0 #ffffff70,inset -4px 0 #00000015,4px 0 #88664c;}
.book.variant-4 .book-emblem{background:#e7d29d;}
.book:hover,.book.selected{transform:translateY(-10px);filter:brightness(1.06);}
.book:focus-visible{outline:3px dashed #fff6dd;outline-offset:5px;}
.wood-shelf{height:25px;border:4px solid #5d4337;background:repeating-linear-gradient(90deg,#a46e4a 0 24px,#b27b53 24px 48px);box-shadow:0 7px 0 #694a38;}
.wood-shelf::before{top:-5px;height:7px;left:0;right:0;border:none;background:#e0af77;}
.shelf-bottom{padding-top:22px;color:#614735;font-weight:bold;}
.book-details{background:#fff7e4;box-shadow:6px 6px 0 #dac19f;}
.book-details::before{content:'✦ RESEARCH CODEX ✦';background:#718d75;}
.book-details h3{color:#4d674f;}
.project-card,.cv-panel,.gallery-card,.language-card{background:#fff7e5;}
.project-card::after{content:'✦';position:absolute;right:16px;bottom:10px;color:#d1ac78;font-size:1.4rem;}
.project-icon{background:#d9e4cd;border:4px solid #596d55;box-shadow:5px 5px 0 #c3a47e;}
.gallery-media{border-bottom:6px solid #594638;}
.language-card{box-shadow:5px 5px 0 #d5b590;}
.language-stamp{background:#f1e0bf;display:inline-block;border:2px solid #927257;padding:3px 6px;}
@media(max-width:760px){.book-list{gap:5px;padding-left:3px;padding-right:3px}.shelf-ornaments{display:none;}.library-layout{gap:22px}.book-spine{font-size:.58rem;}}
@media(max-width:440px){.book-list{gap:3px}.book{border-width:3px;width:clamp(38px,19%,54px)!important}.book-spine{font-size:.55rem}.book-emblem{width:16px;height:16px;top:24px}.book-ribbon{display:none}.library-arch{margin-inline:0;font-size:.72rem}}
@media(prefers-reduced-motion:reduce){.book{transition:none}.travel-signs a{transition:none}}


/* ======== Four retro bookcases, with a proper independent creative studio ======== */
.shelf-tabs{display:flex;gap:7px;flex-wrap:wrap;justify-content:center;margin:16px 0 20px}
.shelf-tab{background:#ead5b7;color:#634934;border:3px solid #7e5d43;padding:6px 9px;font-size:.69rem;font-weight:900;box-shadow:3px 3px 0 #d4b99a}
.shelf-tab:hover,.shelf-tab.active{background:#819b7e;color:#fff;border-color:#48644f}
.shelf-name{margin:6px auto 4px;text-align:center;color:#5f4b3c;font-size:.8rem;font-weight:900;letter-spacing:.05em;background:#edd9b8;border:3px solid #825b43;width:fit-content;padding:3px 13px}
.book-list{padding-top:35px;min-height:185px;flex-wrap:nowrap;gap:4px}
.book{flex-shrink:1;min-width:33px}
.book-spine{overflow:hidden;font-size:clamp(.42rem, .7vw, .58rem)}
.concept-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:15px}
.concept-tag{background:#ecdfc9;border:2px solid #ad9274;padding:3px 6px;font-size:.64rem;font-weight:bold;color:#655044}
.studio-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:9px;margin:35px 0 16px;border-bottom:4px dashed #cfb395;padding-bottom:10px}
.studio-heading h3{margin:0;color:#68513d}
.studio-heading p{margin:0;color:#826b5d;font-size:.8rem}
.studio-heading>span{color:#b87868}
.studio-card{background:#eef0df}
.studio-pixel-icon{height:62px;width:62px;background:#dac2e0;border:4px solid #70567c;box-shadow:4px 4px 0 #d2b89c;display:grid;place-items:center;color:#624767;font-size:2rem;margin-bottom:15px}
@media(max-width:600px){.book-list{flex-wrap:wrap;min-height:220px}.book{min-width:39px}.book-spine{font-size:.53rem}}

/* ====================== TALKS & CURIOSITIES v5 ====================== */
.travel-signs { grid-template-columns: repeat(7,minmax(0,1fr)); }
.travel-signs a { min-width:0; }
.talk-card { overflow:hidden; background:#fff9ec; }
.talk-poster { min-height:150px; border-bottom:4px solid #654b3d; background:repeating-linear-gradient(0deg,#afc6b0 0 14px,#a5bea9 14px 18px); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; }
.talk-poster-icon { font-size:2.4rem; color:#f8e9b5; text-shadow:4px 4px #5b755e; }
.talk-poster-text { background:#fff2d7; padding:5px 18px; border:4px solid #66503d; box-shadow:5px 5px 0 #72937a; font-weight:900; }
.talk-body { padding:22px; }
.talk-body p {font-size:.85rem;color:var(--muted)}
.talk-body .text-link{margin-right:14px;}
.talk-poster iframe{
  width: 100% !important;
  aspect-ratio: 16/9;
}
.interests-banner { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:15px 22px; margin-bottom:26px; background:#eef0da; text-align:center; }
.interests-banner img {width:46px;height:46px;image-rendering:pixelated;}
.interests-banner strong { display:block;color:#4f6e52; }
.interests-banner span {display:block;font-size:.79rem;color:#776554;}
.interest-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px; }
.interest-card { position:relative; min-height:175px; padding:18px; background:#fff8e9; }
.interest-card::after{content:"";position:absolute;right:0;top:0;width:17px;height:17px;background:var(--interest-color);border-left:3px solid #654b3d;border-bottom:3px solid #654b3d;}
.interest-card .eyebrow{font-size:.6rem;}
.interest-icon {display:grid;place-items:center;width:52px;height:52px;margin:12px 0;background:var(--interest-color);border:3px solid #654b3d;box-shadow:4px 4px 0 #e3c9a7;font-size:1.65rem;}
.interest-card h3{margin-bottom:6px;}
.interest-card p{font-size:.8rem;color:var(--muted);margin:0;}
@media(max-width:1050px){.travel-signs{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:760px){.interest-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.travel-signs{grid-template-columns:repeat(2,minmax(0,1fr));}.interest-grid{grid-template-columns:1fr;}}

/* v7: denser bookshelves keep the larger maths and theory collections tidy. */
.shelf-tabs{gap:6px}
.shelf-tab{font-size:.72rem}
.alcove{min-width:0}
.book-list{display:flex;flex-wrap:wrap;align-content:end;justify-content:center;gap:9px 5px;min-height:196px;padding-bottom:3px}
.book{flex-shrink:0}
@media(max-width:700px){.book-list{gap:7px 4px}}


/* ======== v8 shelf ornament + tabs fix ======== */
.shelf-tabs{
  position:relative;
  z-index:3;
  margin-bottom:14px;
}
.shelf-name{
  position:relative;
  z-index:3;
  margin-bottom:18px;
}
.alcove{
  position:relative;
  padding-top:50px;
  overflow:visible;
}
.alcove .shelf-ornaments{
  position:absolute;
  top:10px;
  left:14px;
  right:14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  z-index:2;
  pointer-events:none;
}
.alcove .shelf-ornaments img{
  width:34px;
  height:34px;
  image-rendering:pixelated;
}
.book-list{
  position:relative;
  z-index:1;
}
@media(max-width:760px){
  .alcove{padding-top:38px;}
  .alcove .shelf-ornaments{top:6px; left:10px; right:10px;}
  .alcove .shelf-ornaments img{width:28px;height:28px;}
}


/* ======== v9: project history / academic cottage archives ======== */
.archive-heading{margin-top:47px;}
.archive-heading h3{color:#6c5544;}
.archive-intro{display:flex;align-items:center;justify-content:center;gap:17px;padding:14px 22px;margin-bottom:24px;background:#edf0dc;color:#5b4a38;}
.archive-intro>span{font-size:1.5rem;color:#779478;flex:none;}
.archive-intro strong{display:block;font-size:.98rem;color:#506d55;}
.archive-intro p{margin:4px 0 0;font-size:.84rem;}
.history-card{background:#fff7e7;}
.archive-card:nth-child(3n+2){background:#f1f0e1;}
.archive-card:nth-child(3n){background:#f9ecdf;}
.history-icon{width:59px;height:59px;display:grid;place-items:center;margin-bottom:15px;background:#c3d1c0;border:4px solid #5e735e;box-shadow:4px 4px 0 #d5b691;font-size:1.65rem;font-weight:bold;color:#52664c;}
.archive-card .history-icon{background:#d7c3df;border-color:#77647e;color:#60496b;}
.history-contribution{font-size:.81rem!important;font-weight:bold;color:#665444!important;border-left:4px solid #a8b9a2;padding:8px 10px;background:#f3e9d9;}
.archive-unlinked{display:inline-block;font-size:.7rem;color:#8f715f;font-style:italic;margin-top:5px;}
@media(max-width:600px){.archive-intro{gap:10px;padding:12px}.archive-intro>span{font-size:1.1rem;}}


/* v10: language cards — put the label and speech bubble on separate rows. */
.language-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
}
.language-stamp {
  display: block;
  align-self: flex-start;
  max-width: 100%;
  margin: 0 0 20px;
}
.speech-bubble {
  display: block;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 26px;
  line-height: 1.45;
  font-family: 'Courier New', 'PingFang SC', 'PingFang TC', 'Microsoft YaHei', sans-serif;
}
.language-card h3 {
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
.language-card .status-chip {
  align-self: flex-start;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.language-card p {
  margin: 18px 0 0;
  overflow-wrap: anywhere;
}


/* v11: original screenshot from the 2019 MNIST experiment. */
.archive-figure{margin:14px 0 17px;padding:9px;background:#eee4cc;border:4px solid #765b47;box-shadow:4px 4px 0 #d2b99b;}
.archive-image{width:100%;max-height:320px;object-fit:contain;display:block;background:#272729;image-rendering:auto;}
/* Make YouTube videos fill their gallery frames */
.gallery-media iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

/* Make the YouTube player fill the gallery frame */
.gallery-card[data-type="video"] .gallery-media {
  aspect-ratio: 16 / 9;
  display: block;
  position: relative;
  overflow: hidden;
}

.gallery-card[data-type="video"] .gallery-media iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  position: absolute;
  inset: 0;
  border: 0;
}

/* ===== The Guestbook: a proper closing contact section ===== */
#cv .cv-panel:last-child { grid-column: 1 / -1; }
.contact-section { margin-bottom: 85px; }
.contact-hall { padding: 0; overflow: hidden; background: #fff7e6; }
.contact-hall-heading { display: flex; align-items: center; justify-content: space-around; gap: 12px; padding: 13px 18px; background: #b8cfaf; border-bottom: 5px solid #594638; color: #425f49; text-align: center; font-size: .72rem; font-weight: 900; letter-spacing: .08em; }
.contact-hall-heading span:first-child, .contact-hall-heading span:last-child { color: #fff6d7; }
.contact-hall-body { display: grid; grid-template-columns: 1.1fr .9fr; gap: 0; align-items: stretch; }
.contact-letter { padding: clamp(25px, 4vw, 48px); border-right: 5px dashed #d9bfa0; background: radial-gradient(#e9d5b9 1px, transparent 1px) 0 0 / 19px 19px, #fff8e9; }
.contact-letter .eyebrow { margin-bottom: 13px; }
.contact-letter h3 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); color: #58715c; line-height: 1.28; max-width: 26ch; }
.contact-letter p { color: #806859; max-width: 44ch; }
.contact-scribble { color: #ab826e; margin-top: 28px; font-size: .78rem; font-weight: bold; }
.contact-postboard { padding: clamp(24px, 3vw, 36px); background: #f1e1c8; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.contact-postboard-label { font-weight: 900; font-size: .76rem; color: #6c5640; letter-spacing: .06em; }
.contact-links { display: grid; grid-template-columns: 1fr; gap: 10px; }
.contact-links .contact-link { display: flex; align-items: center; gap: 12px; background: #fffaf0; padding: 12px 13px; border: 3px solid #725845; box-shadow: 4px 4px 0 #d1b18e; font-size: .8rem; font-weight: 900; text-decoration: none; color: #4e6956; overflow-wrap: anywhere; transition: transform .12s ease, box-shadow .12s ease; }
.contact-links .contact-link:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 #d1b18e; background: #eaf1df; }
.contact-links .contact-link:focus-visible { outline: 3px dashed #506b57; outline-offset: 5px; }
.contact-link-icon { flex: none; display: grid; place-items: center; width: 31px; height: 31px; background: #e0e9d4; border: 2px solid #718d75; color: #4e6956; font-size: 1rem; }
.contact-footnote { margin: 8px 0 0; color: #94775f; font-size: .7rem; }
@media (max-width: 760px) { .contact-hall-body { grid-template-columns: 1fr; } .contact-letter { border-right: 0; border-bottom: 5px dashed #d9bfa0; } .contact-hall-heading span:first-child, .contact-hall-heading span:last-child { display: none; } }
@media (prefers-reduced-motion: reduce) { .contact-links .contact-link { transition: none; } }
