:root{
  --bg:#f4f1e8;--paper:#fffdf7;--ink:#191a17;--muted:#73746d;--line:#cfcfc5;
  --soft:#e7e4da;--dark:#20221f;--blue:#d9e7f8;--yellow:#f3cc70;--red:#d86b52;
  --mono:"DM Mono",monospace;--hand:"Caveat",cursive
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--mono);font-size:14px;line-height:1.6}
body:after{content:"";position:fixed;inset:0;pointer-events:none;opacity:.022;z-index:99;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
a{text-decoration:none;color:inherit}
button{font:inherit}
.scroll-line{position:fixed;z-index:100;left:0;top:0;height:3px;background:var(--ink);width:0}
.site-header{height:70px;padding:0 5vw;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:25px;position:sticky;top:0;background:rgba(244,241,232,.94);backdrop-filter:blur(12px);z-index:50}
.brand{font-size:12px;font-weight:500;letter-spacing:-.04em;margin-right:auto}
.code-mark{font-size:10px;border:1px solid var(--ink);padding:3px 5px;margin-right:8px}
nav{display:flex;gap:17px;font-size:9px;text-transform:uppercase;letter-spacing:.05em}
nav a{color:var(--muted);position:relative;transition:color .2s ease}
nav a:hover,nav a.active{color:var(--ink)}
nav a.active:after{content:"";position:absolute;left:0;right:0;bottom:-8px;height:1px;background:var(--ink)}
.resume-link{font-size:9px;border-bottom:1px solid var(--ink)}
.menu-toggle{display:none;border:0;background:none;font-size:19px}

/* HERO WHITEBOARD */
.hero-board-section{height:calc(100svh - 70px);min-height:0;padding:22px 5vw 26px;display:flex;flex-direction:column}
.magnetic-board{width:min(1440px,100%);height:auto;min-height:0;max-height:none;margin:auto;position:relative;overflow:hidden;background:#fbfaf4;border:1px solid #c8c8be;box-shadow:0 12px 0 rgba(25,26,23,.05),0 22px 50px rgba(25,26,23,.07);flex:1 1 auto;isolation:isolate}


/* First-load entrance: the board comes alive piece by piece. */
.hero-piece{opacity:0;animation:magnetPop .95s cubic-bezier(.16,.78,.2,1) forwards;animation-play-state:paused}
.note-name.hero-piece{animation-delay:.35s}
.magnet-photo.hero-piece{animation-delay:1.45s}
.note-label.hero-piece{animation-delay:2.55s}
.note-thought.hero-piece{animation-delay:3.45s}
.note-maker.hero-piece{animation-delay:4.35s}
.note-learning.hero-piece{animation-delay:5.25s}
.note-mca.hero-piece{animation-delay:6.15s}
.note-location.hero-piece{animation-delay:7.05s}
.board-resume.hero-piece{animation-delay:7.95s}
.hero-board-section.loaded .hero-piece{animation-play-state:running}
@keyframes magnetPop{0%{opacity:0;transform:translateY(24px) scale(.78) rotate(var(--entry-rotation,0deg))}58%{opacity:1;transform:translateY(-6px) scale(1.045) rotate(var(--entry-rotation,0deg))}100%{opacity:1;transform:translateY(0) scale(1) rotate(var(--entry-rotation,0deg))}}
.note-name.hero-piece{--entry-rotation:1deg}
.note-label.hero-piece{--entry-rotation:-2deg}
.note-thought.hero-piece{--entry-rotation:-2deg}
.note-maker.hero-piece{--entry-rotation:2deg}
.note-learning.hero-piece{--entry-rotation:2deg}
.note-mca.hero-piece{--entry-rotation:-3deg}
.note-location.hero-piece{--entry-rotation:-1deg}
.magnet-photo.hero-piece{--entry-rotation:3deg}
.board-resume.hero-piece{--entry-rotation:0deg}

.board-grid{position:absolute;inset:0;opacity:.45;background-image:linear-gradient(#deddd5 1px,transparent 1px),linear-gradient(90deg,#deddd5 1px,transparent 1px);background-size:38px 38px}
.magnetic-board:before{content:"";position:absolute;left:0;right:0;top:0;height:9px;background:var(--dark);opacity:.94}
.magnet-note,.magnet-photo,.board-resume{position:absolute;left:var(--x);top:var(--y);touch-action:none;user-select:none;transition:left .22s ease,top .22s ease}
.magnet-note{padding:15px 18px;background:var(--paper);border:1px solid #bfc0b7;box-shadow:3px 4px 0 rgba(25,26,23,.09);cursor:grab;z-index:3}
.magnet-note:active,.magnet-photo:active{cursor:grabbing}.magnet-note.dragging,.magnet-photo.dragging{transition:none}
.magnet-note .pin,.magnet-photo .pin{position:absolute;top:-9px;left:50%;width:17px;height:17px;border-radius:50%;background:var(--red);border:2px solid #a74c3a;box-shadow:0 2px 3px #0002}
.note-label{font-size:11px;background:var(--yellow);transform:rotate(-2deg)}
.note-label .pin{background:var(--dark);border-color:#111}
.note-name{font-family:var(--hand);font-size:clamp(48px,4.7vw,74px);line-height:.75;padding:23px 30px;background:#f5df8c;transform:rotate(1deg)}
.note-name .name-intro{font-family:var(--mono);font-size:.27em;letter-spacing:-.02em;line-height:1;font-weight:400}.note-name strong{font-family:var(--hand);font-weight:600}
.note-thought{font-family:var(--hand);font-size:clamp(29px,2.7vw,43px);line-height:.88;padding:25px 28px;background:#dce9fa;transform:rotate(-2deg)}
.note-thought em{font-weight:700}
.note-maker{font-size:clamp(10px,0.8vw,12px);line-height:2.1;background:#e8e6de;transform:rotate(2deg)}
.note-maker small,.note-learning small,.note-mca small{display:block;color:var(--muted);font-size:8px;letter-spacing:.08em}
.note-learning{font-size:clamp(10px,0.8vw,12px);line-height:1.9;background:#f7d2c5;transform:rotate(2deg)}
.note-mca{font-size:22px;line-height:1.1;background:#d7ead2;transform:rotate(-3deg);padding:18px 24px}
.note-mca small{font-size:8px;margin-bottom:6px}
.note-location{font-size:9px;background:var(--paper);transform:rotate(-1deg);max-width:360px}
.magnet-photo{width:clamp(220px,21vw,310px);padding:8px;background:#fff;box-shadow:5px 7px 0 rgba(25,26,23,.13);transform:rotate(3deg);cursor:grab;z-index:4}
.magnet-photo img{width:100%;display:block;aspect-ratio:1/1.05;object-fit:cover;object-position:center 20%;filter:saturate(.75);pointer-events:none;-webkit-user-drag:none}
.photo-drag-area{position:absolute;inset:0;z-index:2;cursor:grab}
.magnet-photo:active .photo-drag-area{cursor:grabbing}.magnet-photo img{user-select:none}

.magnet-photo img{margin:0}
.board-resume{right:3%;left:auto;top:auto;bottom:4%;padding:10px 12px;border:1px dashed var(--ink);font-size:8px;background:var(--paper);display:flex;gap:14px;z-index:5}
.board-resume b{font-size:15px;line-height:.7}
.board-help{max-width:1440px;width:100%;margin:0 auto 12px;flex:0 0 auto;display:flex;justify-content:space-between;align-items:baseline;gap:30px}.board-help p{font-size:17px;margin:0;color:var(--ink);line-height:1.2}.board-help .help-left{font-family:var(--mono)}.board-help .help-right{text-align:right}.board-help span{font-family:var(--hand);font-size:26px;font-weight:600}.hero-under{max-width:1440px;width:100%;margin:10px auto 0;display:flex;justify-content:space-between;font-size:9px;color:var(--muted);flex:0 0 auto}.hero-under a{font-size:10px}
.hero-under span,.hero-under a{color:var(--ink)}


/* Central composition: every major section is visually anchored to the page centre. */
.section > .content,
.section > .section-head,
.section > .project-grid,
.section > .model-viewer-card,
.section > .achievement-list,
.section > .language-grid {
  width: min(1200px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.section > .section-head { text-align: center; }
.section > .section-head > div:first-child { margin-left: auto; margin-right: auto; }
.section > .section-head .scroll-hint { margin-left: auto; }

/* The About statement is a centred handwritten thought, not a quotation. */
.about-content h2 { margin-left: auto; margin-right: auto; text-align: center; }

/* GENERAL */
.section{padding:110px 5vw;border-bottom:1px solid var(--line)}
.section > .label{display:block;max-width:1200px;margin:0 auto 28px;text-align:center}.section > .content{margin-left:auto;margin-right:auto}
.two-col{display:block}.about-content{max-width:900px;margin:0 auto;text-align:center}
.content{max-width:1100px}
.label,.tiny,.small-label{font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
h2{font-size:clamp(31px,4.8vw,67px);line-height:1.03;letter-spacing:-.07em;font-weight:400;margin:0 0 30px;max-width:900px}
h2 span,.achievement-list span{font-family:var(--hand);font-weight:600;letter-spacing:0}
p{color:#55574f;font-size:12px}
.content>p{max-width:780px;line-height:1.9;margin-left:auto;margin-right:auto}
.education-timeline{max-width:820px;margin:58px auto 0;text-align:left;position:relative;padding:4px 0}.education-timeline:before{content:"";position:absolute;left:17px;top:18px;bottom:18px;width:1px;background:var(--line)}
.education-item{position:relative;display:grid;grid-template-columns:35px 1fr auto;gap:18px;padding:25px 25px 25px 0;background:var(--paper);border:1px solid var(--line);margin-bottom:14px;align-items:start}.education-item:last-child{margin-bottom:0}.education-dot{width:11px;height:11px;border-radius:50%;background:var(--ink);margin:6px 0 0 12px;z-index:1;border:3px solid var(--paper);outline:1px solid var(--ink)}.education-main h3{font-size:15px;font-weight:500;margin:8px 0 4px}.education-main p{font-size:9px;margin:3px 0}.education-item strong{font-size:26px;text-align:right;white-space:nowrap}.education-item strong small{display:block;font-size:8px;color:var(--muted);font-weight:400}

/* EXPERIENCE */
.experience{background:#f7f5ee}
.experience .content{max-width:1050px;margin:0 auto;text-align:center}.experience .content>h2{margin:0 auto 50px}
.experience-timeline{max-width:820px;margin:0 auto;text-align:left;position:relative;padding:4px 0}
.experience-timeline:before{content:"";position:absolute;left:17px;top:18px;bottom:18px;width:1px;background:var(--line)}
.experience-item{position:relative;display:grid;grid-template-columns:35px 1fr;gap:18px;padding:25px 25px 25px 0;background:var(--paper);border:1px solid var(--line);margin-bottom:14px;align-items:start}
.experience-item:last-child{margin-bottom:0}
.experience-dot{width:11px;height:11px;border-radius:50%;background:var(--ink);margin:6px 0 0 12px;z-index:1;border:3px solid var(--paper);outline:1px solid var(--ink)}
.experience-main h3{font-size:15px;font-weight:500;margin:8px 0 5px}.experience-main p{font-size:10px;margin:0;line-height:1.8;max-width:720px}.experience-main .tiny{font-size:8px}

/* TEACHING */
.teaching{background:var(--dark);color:#f4f1e8}.teaching .label,.teaching .tiny,.teaching p{color:#aaa9a0}.teaching .content{max-width:1200px;margin:0 auto}
.teaching-head{display:flex;flex-direction:column;align-items:center;text-align:center;gap:28px;max-width:1050px;margin:0 auto}.teaching-head h2{margin:0;text-align:center}.teaching-head>p{margin:0 auto;max-width:620px;line-height:1.9;text-align:center}
.lesson-list{display:grid;grid-template-columns:1fr 1fr;margin-top:55px;border-top:1px solid #454640}
.lesson-list>div{padding:25px 30px 25px 0;border-bottom:1px solid #454640}
.lesson-list>div:nth-child(odd){border-right:1px solid #454640}.lesson-list>div:nth-child(even){padding-left:30px}
.lesson-list span{font-size:8px;color:#777970}.lesson-list h3{font-size:14px;font-weight:500;margin:12px 0 5px}.lesson-list p{font-size:10px;margin:0;max-width:470px}
.hire-me{margin-top:100px;border:1px solid #5b5d55;background:#292b27;display:grid;grid-template-columns:170px 1fr;position:relative;overflow:hidden}
.hire-stamp{font-family:var(--hand);font-size:64px;line-height:.68;color:var(--yellow);padding:45px 20px;transform:rotate(-6deg);display:flex;align-items:center;justify-content:center;text-align:center;border-right:1px solid #454640}
.hire-copy{padding:42px 45px}.hire-copy h2{font-size:clamp(30px,4vw,54px);margin-top:15px}.hire-copy h2 span{font-family:var(--hand);font-weight:600;letter-spacing:0;color:var(--yellow);font-size:1.12em}
.hire-points{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #454640;margin-top:40px}
.hire-points>div{padding:20px 22px 5px 0}.hire-points>div+div{padding-left:22px;border-left:1px solid #454640}
.hire-points b{font-size:8px;color:#777970}.hire-points p{font-size:9px;line-height:1.8}.hire-points strong{color:#f4f1e8;font-weight:500}

/* PROJECTS */
.projects{overflow:hidden}.projects .section-head{max-width:1200px;margin-left:auto;margin-right:auto;justify-content:center;text-align:center}.projects .section-head > div:first-child{margin-left:auto;margin-right:auto}.projects .scroll-hint{display:none}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:30px;margin-bottom:45px}
.scroll-hint{font-size:8px;color:var(--muted);white-space:nowrap}
.project-grid{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:5px 0 25px}
.project-card{background:var(--paper);border:1px solid var(--line);padding:10px;min-width:0;cursor:pointer;display:block;color:inherit}
.project-card:hover{box-shadow:7px 8px 0 rgba(25,26,23,.08);transform:translateY(-3px);transition:.25s ease}
.project-art{height:230px;display:flex;align-items:center;justify-content:center;background:var(--soft);position:relative;overflow:hidden}
.project-number{font-size:8px;color:var(--muted);margin:17px 4px 7px}.project-card h3{font-size:18px;font-weight:500;margin:0 4px 5px}.project-card p{font-size:9px;margin:0 4px;min-height:58px}.tags{display:flex;gap:6px;flex-wrap:wrap;margin:15px 4px 5px}.tags span{font-size:7px;border:1px solid var(--line);padding:4px 6px}
.north-art{background:#e6ecf4}.north-art:before{content:"";position:absolute;inset:-40%;background:repeating-linear-gradient(90deg,transparent 0 58px,#17181518 59px 60px),repeating-linear-gradient(0deg,transparent 0 58px,#17181518 59px 60px);transform:rotate(14deg)}.north-art span{font:105px var(--hand);z-index:1}.north-art i{position:absolute;bottom:18px;right:18px;font-size:8px;font-style:normal;z-index:1}
.mines-art{background:#22231f}.cells{display:grid;grid-template-columns:repeat(3,45px);gap:5px;transform:rotate(-4deg)}.cells i{width:45px;height:45px;border:1px solid #575850}.cells i:nth-child(2),.cells i:nth-child(7){background:var(--yellow)}
.ar-art{background:#e8e3d8;flex-direction:column}.ar-art span{font:110px var(--hand)}.ar-art small,.ad-art small{font-size:8px;letter-spacing:.16em}.boxes-art{gap:16px;background:#dfe6dc}.boxes-art b{font:80px var(--hand);font-weight:400}.boxes-art b:nth-child(2){transform:translateY(-25px)}.ad-art{background:#d8e2ed;flex-direction:column}.ad-art span{font-size:80px}.runner-art{background:#252723;color:#fff;font-size:60px}.cube-art{background:#eee4d1;font:110px var(--hand)}.hex-art{background:#e1ddd6;font-size:100px}


.project-slides{position:absolute;inset:0;z-index:5;display:none;background:var(--paper)}
.project-card.has-slides:hover .project-slides{display:block}
.project-slide{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;padding:10px;box-sizing:border-box;opacity:0;transition:opacity .45s ease}
.project-slide.active{opacity:1}
.portfolio-art{background:#e1e7df;flex-direction:column}.portfolio-art span{font-size:80px}.portfolio-art small{font-size:8px;letter-spacing:.16em}
/* 3D */
.models{background:#e9e7df}.models .section-head{max-width:1200px;margin-left:auto;margin-right:auto}.centered-head{justify-content:center;text-align:center}.centered-head .scroll-hint{margin-left:0}
.model-viewer-card{background:var(--paper);border:1px solid var(--line);width:min(1200px,100%);margin:0 auto}
.viewer-top,.viewer-bottom{display:flex;justify-content:space-between;gap:20px;padding:14px 18px;font-size:8px;color:var(--muted);text-transform:uppercase}
.viewer-top{border-bottom:1px solid var(--line)}
.viewer-bottom{border-top:1px solid var(--line);align-items:end}.viewer-bottom h3{font-size:16px;font-weight:500;margin:0;text-transform:none;color:var(--ink)}.viewer-bottom p{font-size:9px;margin:3px 0 0}.viewer-bottom code{font-size:8px}
model-viewer{display:block;width:100%;height:520px;background:linear-gradient(135deg,#e8e6df,#faf9f4);--poster-color:transparent}

/* ACHIEVEMENTS */
.achievements .section-head{margin-bottom:34px}.achievement-list{display:grid;grid-template-columns:1fr;max-width:820px;margin:0 auto}
.achievement-list>div{padding:28px 0;border-top:1px solid var(--line)}
.achievement-list b{font-size:8px;color:var(--muted);letter-spacing:.12em}
.achievement-list span{display:block;font-size:25px;margin:12px 0 3px}.achievement-list p{font-size:9px;margin:0}

/* LANGUAGES */
.languages{background:#f1efe9}
.languages .section-head{justify-content:center;text-align:center}.language-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;max-width:1100px;margin:0 auto}
.language-card{border:1px solid var(--line);background:var(--paper);padding:20px;display:grid;grid-template-columns:1fr 20px;align-items:center;text-align:left;cursor:pointer}
.language-card:hover,.language-card.playing{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.lang-name{font-size:11px;font-weight:500}.lang-name small{display:block;font-family:var(--hand);font-size:21px;font-weight:600;color:var(--muted);line-height:1.1}
.language-card:hover .lang-code,.language-card.playing .lang-code,.language-card:hover .lang-name small,.language-card.playing .lang-name small{color:#aaa}
.audio-status{font-size:8px;color:var(--muted);margin-top:14px}

/* CONTACT */
.contact{padding:110px 5vw}
.contact-paper{max-width:1200px;margin:auto;min-height:470px;background:var(--blue);border:2px solid var(--ink);box-shadow:14px 14px 0 var(--ink);padding:55px;display:grid;grid-template-columns:38% 1fr;align-items:center;position:relative;overflow:hidden}
.contact-paper:before,.contact-paper:after{content:"";position:absolute;width:180px;height:180px;border:1px dashed var(--ink);border-radius:50%;opacity:.35}.contact-paper:before{right:-60px;top:-70px}.contact-paper:after{left:-80px;bottom:-100px}
.contact-copy{position:relative;z-index:1}.contact-centered{text-align:center;max-width:900px;margin:0 auto;grid-column:1 / -1}.contact-copy h2{font-size:clamp(34px,4.4vw,61px)}.contact-copy>a{font-size:10px;border-bottom:1px solid var(--ink);padding-bottom:3px}

/* FOOTER */
footer{padding:25px 5vw;display:flex;justify-content:space-between;gap:20px;font-size:8px;color:var(--muted);text-transform:uppercase}
footer div{display:flex;gap:12px}footer b{color:var(--ink);font-weight:500}

/* RESPONSIVE */
@media(max-width:1000px){
  nav{display:none}nav.open{display:flex;position:absolute;top:70px;left:0;right:0;background:var(--paper);padding:20px 6vw;flex-direction:column;border-bottom:1px solid var(--line)}
  .menu-toggle{display:block}.site-header{padding:0 6vw}
  .magnetic-board{height:auto;min-height:0}.magnet-photo{width:270px}
  .section{padding:85px 6vw}
  .teaching-head{gap:20px}.teaching-head>p{margin:0 auto}.hire-me{grid-template-columns:130px 1fr}.hire-points{grid-template-columns:1fr}
  .hire-points>div+div{padding-left:0;border-left:0;border-top:1px solid #454640}.language-grid{grid-template-columns:repeat(2,1fr)}
  .project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.contact-paper{grid-template-columns:1fr;gap:40px}
}
@media(max-width:600px){
  .hero-board-section{height:calc(100svh - 62px);padding:12px 4vw 14px}.magnetic-board{height:auto}
  .note-label{font-size:8px}.note-name{font-size:clamp(40px,11vw,50px)}.note-thought{font-size:clamp(25px,7vw,31px)}.note-maker,.note-learning{font-size:8px}
  .magnet-photo{width:190px}.note-location{max-width:280px;font-size:7px}.board-resume{font-size:7px}
  .board-help p{font-size:12px}.board-help span{font-size:20px}.board-help{gap:15px}.hero-under{font-size:8px}.section{padding:70px 6vw}.section-head{display:block}.scroll-hint{margin-top:10px}
  .project-grid{grid-template-columns:1fr}.project-card{width:100%}.language-grid{grid-template-columns:1fr}.skill-table>div{grid-template-columns:1fr}
  .timeline article{grid-template-columns:1fr;gap:7px}.education-item{grid-template-columns:30px 1fr}.education-item strong{grid-column:2;text-align:left;margin-top:6px}.achievement-list{grid-template-columns:1fr}
  model-viewer{height:390px}.viewer-bottom{align-items:flex-start}.contact{padding:75px 6vw}.contact-paper{padding:38px 25px;box-shadow:9px 9px 0 var(--ink)}
  footer{flex-direction:column}footer div{flex-direction:column;gap:3px}
}


/* V14 refinements */
.centered-heading { width:100%; text-align:center; }
.models .section-head, .languages .section-head, .achievement-heading { justify-content:center; text-align:center; }
.achievement-heading { margin-bottom:45px; }
.achievement-heading h2 { font-family:var(--mono); font-weight:500; }
.achievement-heading h2 span { font-family:var(--mono); }
.achievement-list { display:grid; grid-template-columns:1fr; max-width:900px; margin:0 auto; }
.achievement-list>div, .achievement-list>div:nth-child(even) { padding:26px 0; border-top:1px solid var(--line); border-left:0; }
.achievement-list>div:first-child { border-top:1px solid var(--line); }
.achievement-list b { font-family:var(--mono); font-size:9px; letter-spacing:.08em; }
.achievement-list span { font-family:var(--mono); font-size:25px; }
.achievement-list p { font-family:var(--mono); }
.language-card { grid-template-columns:1fr auto 30px; gap:18px; }
.lang-name { font-family:var(--mono); }
.lang-script { font-family:var(--hand); font-size:22px; font-weight:600; line-height:1; text-align:right; }
.lang-play { text-align:right; font-family:var(--mono); }
.language-card:hover .lang-script, .language-card.playing .lang-script { color:#aaa; }
@media (max-width:700px){ .language-card{grid-template-columns:1fr auto 24px;} .lang-script{font-size:19px;} }

/* V16: make every section headline truly dead-centre */
.section-head,
.centered-section-head,
.centered-head,
.achievement-heading {
  width:100% !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
}
.section-head > div,
.centered-section-head > div,
.centered-head > div,
.achievement-heading > div {
  width:100% !important;
  display:flex !important;
  justify-content:center !important;
  text-align:center !important;
}
.section-head h2,
.centered-section-head h2,
.centered-head h2,
.achievement-heading h2 {
  width:100% !important;
  margin-left:auto !important;
  margin-right:auto !important;
  text-align:center !important;
}
.section-head .scroll-hint,
.centered-section-head .scroll-hint,
.centered-head .scroll-hint {
  margin-left:0 !important;
  margin-right:0 !important;
  text-align:center !important;
  align-self:center !important;
}


/* V19 — central composition + project last-row centering */
main { width:100%; }
.section > * { margin-left:auto; margin-right:auto; }
.section-head, .centered-head, .centered-section-head, .achievement-heading {
  width:100%;
  box-sizing:border-box;
  text-align:center !important;
  align-items:center !important;
  justify-content:center !important;
}
.section-head h2, .centered-head h2, .centered-section-head h2, .achievement-heading h2 {
  text-align:center !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
.project-grid {
  width:min(1200px, 100%);
  margin-left:auto !important;
  margin-right:auto !important;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  justify-content:center;
}
@media (min-width:1001px) {
  /* 1 item in the final row: centre it in column 2 */
  .project-grid > :nth-child(3n+1):last-child { grid-column:2; }
  /* 2 items in the final row: centre them as columns 2 and 3 only
     when exactly two remain after complete rows */
  .project-grid > :nth-last-child(2):nth-child(3n+1) { grid-column:2; }
  .project-grid > :nth-last-child(1):nth-child(3n+2) { grid-column:3; }
}

/* Multi-model selector */
.model-selector {
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:16px auto 0;
}
.model-choice {
  appearance:none;
  border:1px solid var(--ink);
  background:var(--paper);
  color:var(--ink);
  padding:10px 16px;
  font:inherit;
  cursor:pointer;
}
.model-choice.active {
  box-shadow:4px 4px 0 var(--ink);
  transform:translate(-1px,-1px);
}
@media(max-width:1000px){
  .project-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:600px){
  .project-grid{grid-template-columns:1fr;}
}

/* V21 FIXED — final requested layout */
.site-header{
  position:sticky !important;
  top:0 !important;
  z-index:10000 !important;
}

/* All section headlines remain centrally aligned */
.section-head,
.centered-head,
.centered-section-head,
.achievement-heading{
  width:100% !important;
  text-align:center !important;
  display:flex !important;
  justify-content:center !important;
}
.section-head h2,
.centered-head h2,
.centered-section-head h2,
.achievement-heading h2{
  text-align:center !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Language: romanised/English LEFT, native script RIGHT, play stays FAR RIGHT */
.language-card{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto !important;
  align-items:center !important;
  column-gap:18px !important;
}
.language-card .romanised-name{
  grid-column:1 !important;
  text-align:left !important;
  justify-self:start !important;
}
.language-card .native-script{
  grid-column:2 !important;
  text-align:right !important;
  justify-self:end !important;
  font-family:"Caveat",cursive !important;
}
.language-card .play{
  grid-column:3 !important;
  justify-self:end !important;
  text-align:center !important;
}

/* Pure CSS medal icons */
.achievement-list > div{
  position:relative !important;
}
.medal-icon{
  position:absolute !important;
  left:22px !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  width:34px !important;
  height:42px !important;
  display:block !important;
}
.medal-icon::before{
  content:"" !important;
  position:absolute !important;
  left:4px !important;
  top:12px !important;
  width:24px !important;
  height:24px !important;
  border-radius:50% !important;
  border:2px solid currentColor !important;
  box-sizing:border-box !important;
}
.medal-icon::after{
  content:"" !important;
  position:absolute !important;
  left:7px !important;
  top:0 !important;
  width:20px !important;
  height:16px !important;
  background:currentColor !important;
  clip-path:polygon(0 0,100% 0,74% 100%,50% 72%,26% 100%) !important;
}
.medal-icon.gold{color:#b58a22 !important}
.medal-icon.bronze{color:#a45f38 !important}

/* Projects: incomplete final row is centered */
.project-grid{
  width:min(1200px,100%) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  justify-content:center !important;
}
@media (min-width:1001px){
  .project-grid > :nth-child(3n+1):last-child{grid-column:2 !important;}
  .project-grid > :nth-last-child(2):nth-child(3n+1){grid-column:2 !important;}
  .project-grid > :nth-last-child(1):nth-child(3n+2){grid-column:3 !important;}
}

/* Persistent bottom-left links */
.persistent-links{
  position:fixed !important;
  left:20px !important;
  bottom:20px !important;
  z-index:10001 !important;
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
}
.persistent-links a{
  color:inherit !important;
  text-decoration:none !important;
  border-bottom:1px solid currentColor !important;
  padding-bottom:2px !important;
}
@media(max-width:600px){
  .persistent-links{left:12px !important;bottom:12px !important;}
}

/* ================= V25 — EDITORIAL ACCENT =================
   The darker framed visual language is intentionally limited to
   the Projects and 3D sections. The rest of the site keeps its
   original visual theme.
*/
#projects{
  background:#171a19!important;
  color:#f1eee5!important;
  padding-top:clamp(90px,9vw,150px)!important;
  padding-bottom:clamp(90px,9vw,150px)!important;
}
#projects .section-head{
  border-color:rgba(241,238,229,.20)!important;
}
#projects .section-head h2,
#projects .section-head .centered-heading{
  color:#f1eee5!important;
}
#projects .project-grid{
  gap:1px!important;
  background:rgba(241,238,229,.20)!important;
  border:1px solid rgba(241,238,229,.20)!important;
}
#projects .project-card{
  border:0!important;
  border-radius:0!important;
  background:#202422!important;
  color:#f1eee5!important;
  min-height:360px!important;
}
#projects .project-card h3{
  font-family:"DM Mono",monospace!important;
  font-weight:400!important;
  color:#f1eee5!important;
}
#projects .project-card p,
#projects .project-card small{
  color:#aeb0aa!important;
}
#projects .project-card:hover{
  background:#242927!important;
}

/* 3D gets the full framed treatment */
#models{
  background:transparent!important;
}
#models .model-viewer-card{
  width:min(1100px,100%)!important;
  margin:0 auto!important;
  border:1px solid rgba(241,238,229,.20)!important;
  border-radius:0!important;
  overflow:hidden!important;
  background:#202422!important;
  color:#f1eee5!important;
}
#models .viewer-top{
  border-color:rgba(241,238,229,.20)!important;
  color:#aeb0aa!important;
  background:#202422!important;
}
#models .viewer-bottom{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  text-align:center!important;
  border-color:rgba(241,238,229,.20)!important;
  color:#aeb0aa!important;
  background:#202422!important;
}
#models .viewer-bottom > div{
  width:100%!important;
  text-align:center!important;
}
#models .viewer-bottom h3{
  color:#f1eee5!important;
  text-align:center!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
#models .viewer-bottom p{
  color:#aeb0aa!important;
  text-align:center!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
#models .viewer-bottom code{display:none!important}
#models .model-controls{
  height:58px;
  border-top:1px solid rgba(241,238,229,.20);
  border-bottom:1px solid rgba(241,238,229,.20);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:28px;
  font:12px "DM Mono",monospace;
  letter-spacing:.1em;
  background:#202422;
}
#models .model-controls button{
  width:42px;height:34px;
  border:1px solid rgba(241,238,229,.34);
  background:transparent;
  color:#f1eee5;
  font:inherit;
  cursor:pointer;
  transition:.2s ease;
}
#models .model-controls button:hover:not(:disabled){
  background:#f1eee5;
  color:#171a19;
}
#models .model-controls button:disabled{
  opacity:.28;
  cursor:not-allowed;
}

/* Reliable persistent navbar.
   Fixed positioning avoids the browser-specific sticky/overflow edge cases
   that were preventing the previous header from staying in view. */
.site-header{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  z-index:10000!important;
}
body{
  padding-top:70px!important;
}
@media(max-width:800px){
  body{padding-top:60px!important}
}

/* ================= V26 REQUESTED POLISH ================= */
.education-section .content{
  max-width:1100px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
.education-section .education-timeline{
  max-width:900px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Experience: two columns on desktop. */
.experience-timeline{
  max-width:1100px!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:14px!important;
}
.experience-timeline::before{display:none!important}
.experience-item{
  margin-bottom:0!important;
  height:100%!important;
}
@media(max-width:850px){
  .experience-timeline{grid-template-columns:1fr!important}
}

/* Medals sit directly above their achievement cards. */
.achievement-list > div{
  position:relative!important;
  padding-top:58px!important;
}
.achievement-list > div .medal-icon{
  position:absolute!important;
  left:50%!important;
  top:-31px!important;
  transform:translateX(-50%)!important;
  width:58px!important;
  height:62px!important;
}

/* Native language scripts use the accent colour. */
.language-card .native-script{
  color:var(--yellow)!important;
  font-family:var(--hand)!important;
}

/* Highlighted persistent Resume + Email controls. */
.persistent-links{gap:7px!important}
.persistent-links a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:92px!important;
  padding:8px 13px!important;
  border:1px solid var(--ink)!important;
  background:var(--paper)!important;
  color:var(--ink)!important;
  font-family:var(--mono)!important;
  font-size:9px!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  box-shadow:3px 3px 0 var(--ink)!important;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease!important;
}
.persistent-links a:hover{
  background:var(--yellow)!important;
  color:var(--ink)!important;
  transform:translate(2px,2px)!important;
  box-shadow:1px 1px 0 var(--ink)!important;
}

/* No Resume button in the top navbar. */
.site-header .resume-link{display:none!important}

/* Reliable persistent navbar. */
.site-header{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  z-index:10000!important;
}
body{padding-top:70px!important}
@media(max-width:800px){body{padding-top:60px!important}}

/* ================= V27 LANGUAGE EDITORIAL THEME ================= */
#languages{
  background:#171a19!important;
  color:#f1eee5!important;
  padding-top:clamp(90px,9vw,150px)!important;
  padding-bottom:clamp(90px,9vw,150px)!important;
}
#languages .section-head{
  border-color:rgba(241,238,229,.20)!important;
}
#languages .section-head h2,
#languages .section-head .centered-heading{
  color:#f1eee5!important;
}
#languages .scroll-hint,
#languages .audio-status{
  color:#aeb0aa!important;
}
#languages .language-grid{
  gap:1px!important;
  background:rgba(241,238,229,.20)!important;
  border:1px solid rgba(241,238,229,.20)!important;
}
#languages .language-card{
  border:0!important;
  border-radius:0!important;
  background:#202422!important;
  color:#f1eee5!important;
}
#languages .language-card:hover{
  background:#242927!important;
}
#languages .language-card .romanised-name{
  color:#f1eee5!important;
}
#languages .language-card .native-script{
  color:var(--yellow)!important;
  font-family:var(--hand)!important;
}
#languages .language-card .play{
  color:var(--yellow)!important;
}

/* The About section was intentionally removed; no empty spacing should remain. */
#about{display:none!important}


/* ================= V28 — FULL-BLEED DARK SECTIONS ================= */
#projects,
#languages{
  width:100vw!important;
  margin-left:calc(50% - 50vw)!important;
  margin-right:calc(50% - 50vw)!important;
  box-sizing:border-box!important;
}
#projects{
  background:#171a19!important;
  overflow:hidden!important;
  padding-bottom:clamp(80px,8vw,120px)!important;
}
#projects .project-grid{
  background:transparent!important;
  border:1px solid rgba(241,238,229,.20)!important;
  padding:0!important;
  gap:1px!important;
}
#projects .project-card{
  min-height:360px!important;
  border:0!important;
  outline:1px solid rgba(241,238,229,.20)!important;
  outline-offset:-1px!important;
}
#projects .section-head,
#projects .project-grid{
  width:min(1200px,calc(100% - 10vw))!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
#languages{
  background:#171a19!important;
  overflow:hidden!important;
}
#languages .section-head,
#languages .language-grid,
#languages .audio-status{
  width:min(1100px,calc(100% - 10vw))!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* ================= V28 — BETTER MEDALS ================= */
.achievement-list > div{
  position:relative!important;
  padding-top:68px!important;
  text-align:center!important;
}
.achievement-list > div > b{
  position:absolute!important;
  left:50%!important;
  top:-34px!important;
  width:68px!important;
  height:74px!important;
  transform:translateX(-50%)!important;
  display:block!important;
  font-size:0!important;
  z-index:3!important;
}
.achievement-list > div .medal-icon{
  position:absolute!important;
  inset:0!important;
  width:68px!important;
  height:74px!important;
  display:block!important;
  transform:none!important;
  left:auto!important;
  top:auto!important;
  color:#c89b2c!important;
  filter:drop-shadow(0 3px 2px rgba(0,0,0,.18))!important;
}
.achievement-list > div .medal-icon::after{
  content:""!important;
  position:absolute!important;
  left:19px!important;
  top:0!important;
  width:30px!important;
  height:27px!important;
  background:linear-gradient(135deg,#7e5b18 0 16%,#d5b24e 16% 42%,#9a741e 42% 58%,#e3c66c 58% 84%,#7e5b18 84%)!important;
  clip-path:polygon(0 0,100% 0,84% 100%,50% 76%,16% 100%)!important;
  border-radius:1px!important;
}
.achievement-list > div .medal-icon::before{
  content:"★"!important;
  position:absolute!important;
  left:13px!important;
  top:22px!important;
  width:42px!important;
  height:42px!important;
  border-radius:50%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  border:3px solid currentColor!important;
  background:radial-gradient(circle at 35% 28%,#fff1a8 0 8%,#e2bb4c 24%,#bd8b22 68%,#806016 100%)!important;
  color:#fff7d2!important;
  font-family:Arial,sans-serif!important;
  font-size:18px!important;
  line-height:1!important;
  text-shadow:0 1px 1px rgba(70,45,5,.5)!important;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.22),0 2px 4px rgba(0,0,0,.20)!important;
}
.achievement-list > div .medal-icon.gold{color:#c89b2c!important}
.achievement-list > div .medal-icon.bronze{color:#a96743!important}
.achievement-list > div .medal-icon.bronze::after{
  background:linear-gradient(135deg,#70432d 0 16%,#b97851 16% 42%,#854c32 42% 58%,#cf8b63 58% 84%,#70432d 84%)!important;
}
.achievement-list > div .medal-icon.bronze::before{
  background:radial-gradient(circle at 35% 28%,#f0c6a8 0 8%,#c37b55 24%,#9e5b3b 68%,#683b29 100%)!important;
}
@media(max-width:600px){
  .achievement-list > div{padding-top:64px!important}
  .achievement-list > div > b{top:-30px!important;width:62px!important;height:68px!important}
  .achievement-list > div .medal-icon{width:62px!important;height:68px!important}
  .achievement-list > div .medal-icon::after{left:17px!important;width:28px!important;height:25px!important}
  .achievement-list > div .medal-icon::before{left:11px!important;top:20px!important;width:40px!important;height:40px!important}
}

/* ================= V29 — CENTRED TEACHING LESSON COPY ================= */
#teaching .lesson-list > div{
  text-align:center!important;
}
#teaching .lesson-list > div:nth-child(even){
  padding-left:30px!important;
}
#teaching .lesson-list > div:nth-child(odd){
  padding-right:30px!important;
}
#teaching .lesson-list h3{
  text-align:center!important;
}
#teaching .lesson-list p{
  text-align:center!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
#teaching .lesson-list > div > span{
  display:block!important;
  text-align:center!important;
}

/* Use screenshot #1 as the permanent project thumbnail; hover still cycles through all screenshots. */
.project-card.has-slides .project-slides{display:block}
.project-card.has-slides:hover .project-slides{display:block}
.project-card.has-slides .project-slide.active{opacity:1}
