:root {
  --ink: #24201c;
  --muted: #746a60;
  --paper: #f4efe6;
  --cream: #e9dfcf;
  --wood: #6b4733;
  --deep: #1e2427;
  --gold: #c8a56a;
  --line: rgba(55, 44, 35, .18);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .045;
  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='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 76px; display: flex; align-items: center; padding: 0 4vw;
  color: white; background: rgba(17, 20, 21, .18); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { font: 600 31px var(--serif); letter-spacing: .02em; margin-right: auto; }
nav { display: flex; gap: 28px; font: 500 13px var(--sans); }
nav a { opacity: .82; transition: .25s; position: relative; }
nav a:hover, nav a.active { opacity: 1; }
nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -11px; height: 2px; background: var(--gold); }
.header-links { display: flex; gap: 17px; margin-left: 35px; font-size: 12px; opacity: .9; }
.menu { display: none; margin-left: 20px; background: none; border: 0; color: white; font-size: 23px; }

.hero { min-height: 100svh; position: relative; color: white; display: flex; align-items: center; }
.hero-image { position: absolute; inset: 0; background: url("assets/hero-room.png") center/cover no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,16,18,.87) 0%, rgba(12,16,18,.62) 43%, rgba(12,16,18,.05) 80%), linear-gradient(0deg, rgba(12,16,18,.35), transparent 35%); }
.hero-content { position: relative; z-index: 2; max-width: 700px; margin-left: 9vw; margin-top: 50px; }
.eyebrow { letter-spacing: .19em; font-size: 10px; font-weight: 600; margin: 0 0 16px; opacity: .78; }
.hero h1 { font: 600 clamp(70px, 9vw, 132px)/.78 var(--serif); margin: 0 0 26px; letter-spacing: -.04em; }
.role { font: 500 21px var(--serif); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 24px; color: #e8d3ac; }
.intro { max-width: 530px; font: 400 17px/1.65 var(--serif); color: rgba(255,255,255,.84); }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 22px; border: 1px solid var(--gold);
  border-radius: 999px; background: var(--gold); color: #211d18;
  font-size: 12px; font-weight: 600; letter-spacing: .03em; transition: .25s;
}
.button:hover { transform: translateY(-2px); filter: brightness(1.08); }
.button.ghost { background: transparent; color: inherit; }
.scroll-cue { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 2; text-align: center; font-size: 18px; opacity: .72; }
.scroll-cue span { display: block; font: 10px var(--sans); text-transform: uppercase; letter-spacing: .15em; margin-top: 5px; }

.section { padding: 120px 7vw; position: relative; }
.section-heading { max-width: 700px; margin: 0 auto 60px; text-align: center; }
.section-heading h2 { font: 600 clamp(48px, 6vw, 78px)/.9 var(--serif); margin: 0 0 20px; letter-spacing: -.03em; }
.section-heading p:last-child { font: 16px/1.65 var(--serif); color: var(--muted); }
.section-heading.light { color: #eee6da; }
.section-heading.light .eyebrow { color: #d4b27a; }
.section-heading.light p:last-child { color: rgba(238,230,218,.68); }

.notes-section { background: #d8c5ad; min-height: 100vh; }
.notes-section::before {
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 38px, rgba(79,55,39,.15) 39px);
}
.notes-room {
  min-height: 650px; max-width: 1150px; margin: auto; position: relative; overflow: hidden;
  border: 8px solid #593c2d; box-shadow: 0 30px 70px rgba(49,34,23,.25);
  background: linear-gradient(180deg, #53626a 0 63%, #7d5138 63% 100%);
}
.window-light { position: absolute; right: 5%; top: 4%; width: 28%; height: 37%; background: linear-gradient(135deg, rgba(255,239,192,.75), rgba(223,185,118,.12)); filter: blur(7px); transform: skew(-7deg); }
.shelf-line { position: absolute; left: 4%; right: 4%; top: 58%; height: 14px; background: #4c3023; box-shadow: 0 8px 0 rgba(34,24,18,.25); }
.note-wall { position: absolute; left: 8%; right: 8%; top: 8%; height: 50%; display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 22px; }
.note-card {
  position: relative; border: 0; padding: 25px 23px; text-align: left; cursor: pointer;
  background: #e7d6b9; color: #2c2722; box-shadow: 0 13px 18px rgba(34,25,19,.22);
  transform: rotate(-1.5deg); transition: .3s;
}
.note-card:nth-child(2) { transform: rotate(2deg); background: #eee6d8; }
.note-card:nth-child(3) { transform: rotate(-2deg); }
.note-card:nth-child(4) { transform: rotate(1.3deg); }
.note-card:nth-child(5) { transform: rotate(-.7deg); }
.note-card:hover { transform: translateY(-9px) rotate(0deg) scale(1.025); z-index: 3; box-shadow: 0 20px 28px rgba(34,25,19,.3); }
.note-card.large { grid-row: span 2; }
.note-card.blue { background: #b9c7c7; }
.note-card.pale { background: #d9d1c0; }
.note-card.narrow { background: #d2c0aa; }
.note-type { display: block; font: 600 9px var(--sans); letter-spacing: .18em; margin-bottom: 25px; opacity: .6; }
.note-card strong { display: block; font: 600 28px/1 var(--serif); }
.note-card small { display: block; margin-top: 13px; font: 12px/1.45 var(--serif); opacity: .7; }
.open-label { display: block; margin-top: 22px; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; opacity: .6; }
.pin { width: 10px; height: 10px; border-radius: 50%; background: #7c352e; position: absolute; top: 11px; left: 50%; box-shadow: 1px 2px 3px rgba(0,0,0,.25); }
.desk { position: absolute; left: 0; right: 0; bottom: 0; height: 29%; background: linear-gradient(#8e5a3e, #68422f); border-top: 10px solid #4f3226; }
.desk-paper { position: absolute; left: 10%; top: 25px; width: 210px; height: 95px; padding: 18px; background: #efe6d2; transform: rotate(-4deg); box-shadow: 0 8px 14px rgba(0,0,0,.2); font-family: var(--serif); }
.desk-paper span, .desk-paper b { display: block; }
.desk-paper span { font: 9px var(--sans); text-transform: uppercase; letter-spacing: .14em; opacity: .55; }
.desk-paper b { font-size: 21px; margin-top: 10px; }
.desk-paper i { position: absolute; right: 16px; bottom: 10px; }
.lamp { position: absolute; right: 14%; top: -100px; width: 80px; height: 120px; border-left: 4px solid #282624; transform: rotate(12deg); }
.lamp::after { content: ""; position: absolute; top: 73px; left: -18px; width: 55px; height: 30px; border-radius: 50% 50% 5px 5px; background: #252525; box-shadow: 0 12px 28px rgba(255,194,99,.5); }
.mug { position: absolute; right: 27%; top: 50px; font-size: 44px; }

.publications-section { background: #171c1f; color: white; min-height: 100vh; }
.office { position: relative; min-height: 620px; max-width: 1180px; margin: auto; overflow: hidden; background: linear-gradient(180deg, #2e3538 0 62%, #543a2b 62%); border: 7px solid #392b24; box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.office-window { position: absolute; right: 8%; top: 7%; width: 25%; height: 42%; background: linear-gradient(180deg,#8096a0,#e1b97d); border: 10px solid #392f29; opacity: .8; }
.blackboard { position: absolute; left: 7%; top: 8%; width: 32%; height: 34%; padding: 25px; border: 7px solid #4b3529; background: #1e2927; color: rgba(230,225,204,.55); display: flex; flex-wrap: wrap; align-content: center; gap: 20px; font: italic 20px var(--serif); transform: rotate(-1deg); }
.research-desk { position: absolute; bottom: 0; left: 0; right: 0; height: 41%; background: linear-gradient(#81553c,#603d2c); border-top: 12px solid #432c21; }
.monitor-wrap { position: absolute; left: 43%; top: -235px; }
.monitor { background: none; border: 0; cursor: pointer; color: white; padding: 0; transition: .3s; }
.monitor:hover { transform: translateY(-8px); }
.monitor-screen { width: 370px; height: 240px; background: #172125; border: 14px solid #292b2b; border-radius: 8px; box-shadow: 0 18px 35px rgba(0,0,0,.45); display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; overflow: hidden; }
.screen-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, rgba(181,153,104,.2), transparent 65%); }
.screen-kicker { font: 600 9px var(--sans); letter-spacing: .2em; color: #c9aa75; position: relative; }
.monitor-screen strong { font: 500 37px var(--serif); position: relative; }
.monitor-screen small { position: relative; opacity: .6; margin-top: 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }
.monitor-stand { width: 90px; height: 48px; background: #272827; margin: auto; clip-path: polygon(35% 0,65% 0,100% 100%,0 100%); }
.paper-stack { position: absolute; left: 12%; bottom: 28px; width: 270px; min-height: 145px; padding: 25px; background: #e9dfca; color: #302923; transform: rotate(-5deg); box-shadow: 0 12px 18px rgba(0,0,0,.28); }
.paper-stack span { font: 600 9px var(--sans); letter-spacing: .18em; opacity: .55; }
.paper-stack b { display: block; font: 600 24px/1.02 var(--serif); margin-top: 18px; }
.paper-stack small { display: block; margin-top: 16px; opacity: .6; }
.coffee { position: absolute; right: 16%; bottom: 50px; font-size: 52px; }
.plant { position: absolute; right: 5%; bottom: 40px; font-size: 70px; color: #64715a; }

.projects-section { background: #eee7db; }
.project-grid { max-width: 1050px; margin: auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.project-card { padding: 30px; min-height: 240px; background: #f8f3ea; border: 1px solid var(--line); transition: .25s; position: relative; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 18px 30px rgba(55,44,35,.12); }
.project-card .number { font: 12px var(--sans); opacity: .45; }
.project-card h3 { font: 600 30px var(--serif); margin: 35px 0 12px; }
.project-card p { font: 14px/1.6 var(--serif); color: var(--muted); }
.project-card a { position: absolute; bottom: 25px; font-size: 11px; text-transform: uppercase; letter-spacing: .13em; }

.cv-section { background: #cbb89d; padding-top: 90px; padding-bottom: 90px; }
.cv-card { max-width: 1050px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 50px; padding: 65px; background: #2d2925; color: #eee6da; box-shadow: 0 25px 45px rgba(47,36,27,.2); }
.cv-card h2 { font: 600 54px var(--serif); margin: 0 0 14px; }
.cv-card p:not(.eyebrow) { max-width: 620px; font: 16px/1.6 var(--serif); opacity: .72; }

.about-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: 9vw; align-items: center; max-width: 1150px; margin: auto; }
.about-photo { min-height: 500px; }
.photo-placeholder { height: 100%; min-height: 500px; background: #d7c9b5; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--muted); font-family: var(--serif); font-size: 27px; }
.photo-placeholder small { margin-top: 10px; font: 10px var(--sans); opacity: .7; }
.about-copy h2 { font: 600 62px/.9 var(--serif); margin: 0 0 25px; }
.about-copy p:not(.eyebrow):not(.signature) { font: 17px/1.7 var(--serif); color: var(--muted); }
.signature { font: italic 28px var(--serif); margin-top: 35px; }

footer { padding: 35px 7vw; background: #211e1b; color: rgba(255,255,255,.55); display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .08em; }

.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 30px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16,14,12,.76); backdrop-filter: blur(9px); }
.note-reader, .paper-reader { position: relative; z-index: 2; background: #efe6d4; color: #28231e; box-shadow: 0 35px 80px rgba(0,0,0,.45); }
.note-reader { max-width: 700px; width: 100%; padding: 70px; transform: rotate(-.3deg); }
.note-reader h2 { font: 600 66px/.85 var(--serif); margin: 0 0 20px; }
.note-reader p:not(.eyebrow) { font: 16px/1.7 var(--serif); color: #6c6156; }
.reader-actions { display: flex; gap: 12px; margin-top: 30px; }
.reader-hint { margin-top: 30px !important; font: 11px/1.5 var(--sans) !important; opacity: .55; }
.paper-reader { width: min(1100px, 96vw); max-height: 92vh; overflow: auto; padding: 55px; }
.paper-meta { max-width: 850px; margin: auto; }
.paper-meta h2 { font: 600 48px/1 var(--serif); margin: 0 0 16px; }
.paper-meta p:not(.eyebrow) { font: 15px/1.6 var(--serif); color: #6c6156; }
.pdf-placeholder { margin: 35px auto 0; min-height: 420px; border: 1px dashed #a89a86; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8a7d6d; }
.pdf-placeholder span { font: 600 11px var(--sans); letter-spacing: .2em; }
.pdf-placeholder small { margin-top: 15px; font: 12px/1.6 var(--sans); text-align: center; }
.close { position: absolute; top: 15px; right: 20px; border: 0; background: none; font-size: 34px; cursor: pointer; color: #4c4339; }

code { font-family: monospace; font-size: .9em; }

@media (max-width: 900px) {
  nav { display: none; }
  .header-links { margin-left: 20px; }
  .menu { display: block; }
  .hero-content { margin-left: 7vw; margin-right: 7vw; }
  .note-wall { left: 5%; right: 5%; gap: 12px; }
  .note-card { padding: 18px; }
  .note-card strong { font-size: 22px; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .about-section { grid-template-columns: 1fr; }
  .about-photo { min-height: 400px; }
  .photo-placeholder { min-height: 400px; }
}

@media (max-width: 650px) {
  .site-header { height: 64px; padding: 0 5vw; }
  .brand { font-size: 25px; }
  .header-links { display: none; }
  .hero-image { background-position: 63% center; }
  .hero h1 { font-size: 68px; }
  .hero-content { margin-top: 35px; }
  .section { padding: 85px 5vw; }
  .notes-room, .office { min-height: 700px; }
  .note-wall { top: 5%; height: 62%; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3,1fr); }
  .note-card.large { grid-row: span 1; }
  .note-card strong { font-size: 18px; }
  .note-card small { display: none; }
  .desk { height: 25%; }
  .monitor-wrap { left: 50%; transform: translateX(-50%); top: -160px; }
  .monitor-screen { width: 270px; height: 175px; }
  .monitor-screen strong { font-size: 28px; }
  .paper-stack { left: 6%; width: 210px; }
  .paper-stack b { font-size: 18px; }
  .project-grid { grid-template-columns: 1fr; }
  .cv-card { flex-direction: column; align-items: flex-start; padding: 38px 28px; }
  .cv-card h2 { font-size: 44px; }
  .about-copy h2 { font-size: 50px; }
  footer { flex-direction: column; gap: 10px; }
  .note-reader { padding: 55px 28px; }
  .note-reader h2 { font-size: 49px; }
  .paper-reader { padding: 45px 20px; }
  .paper-meta h2 { font-size: 38px; }
}

/* --- Scalable archive rooms --- */
.room-archive-button {
  position: absolute;
  right: 8%;
  top: 49%;
  border: 1px solid rgba(239,230,210,.35);
  background: rgba(39,29,23,.45);
  color: #f0e4d2;
  padding: 14px 18px;
  cursor: pointer;
  text-align: left;
  backdrop-filter: blur(5px);
  transition: .25s;
}
.room-archive-button:hover { transform: translateY(-4px); background: rgba(39,29,23,.7); }
.room-archive-button span { display:block; font: 600 11px var(--sans); letter-spacing:.12em; text-transform:uppercase; }
.room-archive-button strong { display:block; margin-top:5px; font: 500 18px var(--serif); }
.note-wall { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.note-card.large { grid-row: span 1; }
.note-card { min-height: 0; }
.paper-stack { border: 0; cursor: pointer; text-align:left; font: inherit; }
.paper-stack:hover { transform: rotate(-3deg) translateY(-7px); }

.archive-reader {
  position: relative;
  z-index: 2;
  width: min(1000px, 94vw);
  max-height: 88vh;
  overflow: auto;
  padding: 62px clamp(25px, 6vw, 70px);
  background: #efe6d4;
  color: #28231e;
  box-shadow: 0 35px 80px rgba(0,0,0,.5);
}
.archive-reader h2 { font: 600 clamp(48px, 6vw, 76px)/.88 var(--serif); margin: 0 0 38px; max-width: 800px; }
.archive-group { margin-top: 32px; }
.archive-group h3 { font: 600 12px var(--sans); text-transform: uppercase; letter-spacing:.17em; color:#8b765f; margin:0 0 10px; }
.archive-items { border-top: 1px solid rgba(55,44,35,.2); }
.archive-item {
  width:100%; border:0; border-bottom:1px solid rgba(55,44,35,.16); background:transparent; padding:19px 8px;
  display:grid; grid-template-columns: 1.1fr 1.6fr 30px; gap:20px; align-items:center; text-align:left; cursor:pointer; color:inherit;
  transition:.2s;
}
.archive-item:hover { background:rgba(255,255,255,.38); padding-left:15px; }
.archive-item-title { font: 600 25px/1.05 var(--serif); }
.archive-item-description { font: 13px/1.45 var(--serif); color:#74685c; }
.archive-arrow { font-size:20px; opacity:.55; text-align:right; }
.paper-authors { font-family:var(--sans) !important; font-size:12px !important; letter-spacing:.05em; text-transform:uppercase; opacity:.65; }

@media (max-width: 650px) {
  .room-archive-button { right: 7%; top: 67%; }
  .archive-reader { padding: 52px 22px; }
  .archive-item { grid-template-columns: 1fr 25px; gap:8px; }
  .archive-item-description { grid-column:1; grid-row:2; }
  .archive-arrow { grid-column:2; grid-row:1 / span 2; }
}
