:root {
  --bg: #f5eee3;
  --paper: #fcf8f1;
  --ink: #2b241f;
  --muted: #6d6158;
  --line: #e2d6c5;
  --accent: #b5653f;
  --sage: #7d8b6a;
  --mustard: #d4a24c;
  --btn: #e7ddcf;
  --cork: #d9c3a3;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: Georgia, 'Times New Roman', serif; background: var(--bg); color: var(--ink); line-height: 1.65; font-size: 17px; }
h1, h2, h3, h4, .brand, .hello, .statement { font-family: 'Literata', Georgia, serif; line-height: 1.2; }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 22px; }
.accent { color: var(--accent); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .strip-track, .wave { animation: none !important; } }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1.5px solid var(--ink); }
.nav-in { display: flex; justify-content: space-between; align-items: center; min-height: 68px; gap: 12px; flex-wrap: wrap; }
.brand { font-size: 21px; font-weight: 700; color: var(--ink); text-decoration: none; }
.links { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.links a { color: var(--ink); text-decoration: none; font-size: 15px; }
.links a:hover { color: var(--accent); }
.links a.talk { color: var(--accent); }
@media (max-width: 700px) { .links { gap: 12px; } .links a { font-size: 14px; } .nav-in { padding: 10px 22px; } }

/* buttons */
.btn { display: inline-block; background: var(--btn); color: var(--ink); font-family: Georgia, serif; font-size: 16px; padding: 12px 24px; border-radius: 99px; text-decoration: none; border: 1.5px solid transparent; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn.dark:hover { box-shadow: 0 10px 24px rgba(43, 36, 31, .2); }
.pill { display: inline-block; border: 1.5px solid var(--ink); color: var(--ink); padding: 6px 18px; border-radius: 99px; font-size: 15px; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s; }
.pill:hover { background: var(--ink); color: var(--paper); }
.btn-link { color: var(--ink); text-decoration: none; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }
.actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 30px 0 22px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 70px; padding-bottom: 56px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 36px; } .portrait { order: -1; max-width: 100%; } }
.hello { font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.hello.small { font-size: 14px; }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.6s ease-in-out infinite; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
.hero h1 { font-size: clamp(44px, 6.5vw, 68px); font-weight: 400; letter-spacing: -.5px; margin: 2px 0 12px; }
.role { font-style: italic; color: var(--accent); font-size: 19px; margin-bottom: 14px; }
.intro { color: var(--muted); max-width: 470px; }
.social { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; }
.social a { color: var(--muted); }
.portrait { position: relative; aspect-ratio: 4 / 3; width: 100%; max-width: 460px; justify-self: center; }
.portrait-glow { position: absolute; inset: -8%; border-radius: 40px; background: radial-gradient(circle, rgba(212, 162, 76, .35) 0%, rgba(181, 101, 63, .15) 45%, transparent 70%); }
.portrait-img { position: relative; width: 100%; height: 100%; border-radius: 20px; object-fit: cover; object-position: center; border: 8px solid var(--paper); box-shadow: 0 24px 50px rgba(60, 40, 20, .18); }
.placeholder { background: var(--btn); display: grid; place-items: center; font-size: 80px; color: var(--muted); font-family: 'Literata', serif; }
.badge { position: absolute; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 99px; padding: 6px 14px; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); white-space: nowrap; }
.b1 { top: 10%; left: -4%; transform: rotate(-5deg); }
.b2 { bottom: 8%; right: -2%; transform: rotate(4deg); }

/* strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; background: var(--paper); }
.strip-track { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.strip-track span { font-family: 'Literata', serif; font-weight: 600; font-size: 15px; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* sections */
.section { padding-top: 70px; }
.statement { font-size: clamp(19px, 2.4vw, 25px); font-weight: 500; line-height: 1.45; max-width: 980px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sec-head h2 { font-size: clamp(32px, 4.5vw, 44px); font-weight: 500; }
.note { font-style: italic; color: var(--sage); margin: -8px 0 24px; font-size: 18px; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.tags a { background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; padding: 6px 16px; border-radius: 99px; font-size: 15px; }
.tags a:hover { border-color: var(--accent); color: var(--accent); }
.cards { display: grid; gap: 18px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .cards.three { grid-template-columns: 1fr; } }
.card { display: block; background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; padding: 22px 24px; color: var(--ink); text-decoration: none; transition: transform .2s, border-color .2s; }
a.card:hover { transform: translateY(-4px); border-color: var(--ink); }
.kicker { font-size: 13px; color: var(--accent); font-style: italic; }
.card h3 { font-size: 18px; margin: 6px 0; font-weight: 600; }
.card p { color: var(--muted); font-size: 14.5px; }

/* resume */
.resume { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 48px; }
@media (max-width: 760px) { .resume { grid-template-columns: 1fr; } }
.resume h4 { font-size: 20px; color: var(--accent); margin: 14px 0 6px; }
.item { padding: 10px 0 10px 18px; border-left: 2px solid var(--line); position: relative; }
.item::before { content: ""; position: absolute; left: -6px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--mustard); }
.item .when { display: block; font-size: 13px; color: var(--muted); font-style: italic; }
.item b { display: block; font-family: 'Literata', serif; font-size: 17px; }
.item em { font-style: normal; color: var(--muted); font-size: 15px; }
.toolbox { color: var(--muted); font-size: 15.5px; }

/* blog: notebook cards */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.note-card { display: block; position: relative; color: var(--ink); text-decoration: none; background-color: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 22px 22px 20px 50px;
  background-image: linear-gradient(90deg, transparent 32px, rgba(181, 101, 63, .45) 32px, rgba(181, 101, 63, .45) 34px, transparent 34px), repeating-linear-gradient(transparent 0 27px, rgba(125, 139, 106, .22) 27px 28px);
  box-shadow: 0 6px 16px rgba(60, 40, 20, .07); transition: transform .2s; }
.note-card:hover { transform: translateY(-3px); }
.note-card .date { font-size: 13px; color: var(--muted); font-style: italic; }
.note-card h3 { font-size: 19px; margin: 4px 0 6px; }
.note-card p { color: var(--muted); font-size: 15px; }
.ptags { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ptags i { font-style: normal; font-size: 13px; color: var(--accent); }
.note-card.soon { opacity: .75; }

/* whimsicature: corkboard + pinned polaroids */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 40px 28px; padding: 40px 30px 34px; border-radius: 14px; border: 6px solid #b89a78;
  background-color: var(--cork);
  background-image: radial-gradient(rgba(120, 80, 40, .18) 1px, transparent 1.4px), radial-gradient(rgba(255, 255, 255, .25) 1px, transparent 1.4px);
  background-size: 9px 9px, 13px 13px; background-position: 0 0, 4px 6px;
  box-shadow: inset 0 0 30px rgba(80, 50, 20, .25); }
.polaroid { position: relative; display: block; background: #fffdf8; padding: 10px 10px 40px; box-shadow: 0 12px 22px rgba(50, 30, 10, .28); text-decoration: none; transition: transform .3s; cursor: zoom-in; }
.polaroid img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #eee; }
.polaroid span { position: absolute; left: 8px; right: 8px; bottom: 10px; text-align: center; font-family: 'Literata', serif; font-size: 14px; color: #3a2f27; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin { position: absolute; top: -10px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; z-index: 2; background: radial-gradient(circle at 35% 35%, #f08a6c, #b5392a 60%, #7a2016); box-shadow: 2px 4px 5px rgba(0, 0, 0, .35); }
.board .polaroid:nth-child(4n+1) { transform: rotate(-1.2deg); }
.board .polaroid:nth-child(4n+2) { transform: rotate(1deg); }
.board .polaroid:nth-child(4n+2) .pin { background: radial-gradient(circle at 35% 35%, #9fd0e8, #2f7fa8 60%, #1c4f6b); }
.board .polaroid:nth-child(4n+3) { transform: rotate(-.6deg); }
.board .polaroid:nth-child(4n+3) .pin { background: radial-gradient(circle at 35% 35%, #f6d58a, #d4a24c 60%, #8c6620); }
.board .polaroid:nth-child(4n) { transform: rotate(1.2deg); }
.board .polaroid:nth-child(4n) .pin { background: radial-gradient(circle at 35% 35%, #b7d3a0, #6a8a52 60%, #3e5530); }
.board .polaroid.in:hover { transform: rotate(0) scale(1.03); z-index: 3; }
.board .polaroid.reveal:not(.in) { opacity: 0; }
@media (max-width: 520px) { .board { padding: 30px 18px; gap: 34px 18px; grid-template-columns: 1fr 1fr; } }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(30, 24, 18, .92); display: none; flex-direction: column; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 80vh; border: 10px solid #fffdf8; border-bottom-width: 44px; }
.lightbox p { color: #3a2f27; font-family: 'Literata', serif; font-size: 16px; margin-top: -34px; }

/* contact */
.contact { text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 44px 24px; box-shadow: 0 10px 30px rgba(60,40,20,.08); }
.contact h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 500; max-width: 640px; margin: 8px auto 24px; }

/* footer */
.footer { margin-top: 80px; border-top: 1.5px solid var(--ink); padding: 30px 0 40px; text-align: center; color: var(--muted); font-size: 14px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-bottom: 8px; font-size: 15px; }
.foot-links a { color: var(--ink); }

/* article */
.article { max-width: 720px; padding-top: 50px; }
.article h1 { font-size: clamp(32px, 5vw, 44px); margin: 14px 0 6px; }
.article .meta { color: var(--muted); font-style: italic; margin-bottom: 26px; }
.article .body { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 30px 32px; }
.article h2 { font-size: 26px; margin: 28px 0 10px; }
.article h3 { font-size: 21px; margin: 22px 0 8px; }
.article p, .article ul, .article ol, .article blockquote, .article pre { margin-bottom: 18px; }
.article ul, .article ol { padding-left: 24px; }
.article img { border-radius: 6px; margin: 20px auto; }
.article blockquote { border-left: 3px solid var(--accent); padding-left: 16px; color: var(--muted); font-style: italic; }
.article code { background: var(--bg); padding: 2px 5px; border-radius: 4px; font-size: .88em; }
.article pre { background: var(--ink); color: var(--paper); padding: 16px; border-radius: 8px; overflow-x: auto; }
.article pre code { background: none; color: inherit; padding: 0; }
@media (max-width: 600px) { .article .body { padding: 22px 18px; } }

/* cv */
.cv { max-width: 860px; padding-top: 44px; }
.cv-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; border-bottom: 1.5px solid var(--ink); padding-bottom: 14px; }
.cv-head h1 { font-size: clamp(34px, 5vw, 48px); }
.cv-head p { color: var(--muted); }
.cv-body { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 28px 32px; margin-top: 22px; }
.cv-body h2 { font-size: 20px; color: var(--accent); margin: 24px 0 10px; border-bottom: 1px dashed var(--line); padding-bottom: 4px; }
.cv-body h2:first-child { margin-top: 0; }
.cv-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.cv-row b { font-family: 'Literata', serif; }
.cv-row span { color: var(--muted); font-size: 14.5px; font-style: italic; }
.cv-sub { color: var(--muted); font-size: 15px; }
.cv-body ul { padding-left: 20px; margin: 6px 0; }
.cv-body li { font-size: 15.5px; margin-bottom: 4px; }
@media (max-width: 600px) { .cv-body { padding: 20px 18px; } }
@media print { .nav, .footer, .no-print { display: none !important; } body { background: #fff; font-size: 12px; } .cv-body { border: 0; padding: 0; background: #fff; } }

/* professional pass */
.badge { display: none; }
.strip-track { animation: none !important; }

/* tech blog: graph-paper desk with taped notes */
.notes { gap: 42px 30px; padding: 46px 30px 36px; border-radius: 14px; border: 1px solid #dccfbb;
  background-color: #f8f4ea;
  background-image: linear-gradient(rgba(125, 139, 106, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 139, 106, .16) 1px, transparent 1px), linear-gradient(rgba(125, 139, 106, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 139, 106, .07) 1px, transparent 1px);
  background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
  box-shadow: inset 0 0 26px rgba(80, 60, 30, .08); }
.notes .note-card { border-radius: 3px; box-shadow: 0 12px 22px rgba(50, 35, 15, .16); }
.notes .note-card::before { content: ""; position: absolute; top: -13px; left: 50%; width: 104px; height: 26px; margin-left: -52px; z-index: 2;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .28) 0 6px, transparent 6px 12px), rgba(212, 162, 76, .62);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1); transform: rotate(-3deg); }
.notes .note-card:nth-child(odd) { transform: rotate(-.8deg); }
.notes .note-card:nth-child(even) { transform: rotate(.8deg); }
.notes .note-card:nth-child(even)::before { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .28) 0 6px, transparent 6px 12px), rgba(125, 139, 106, .6); transform: rotate(2.5deg); }
.notes .note-card:nth-child(3n)::before { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .28) 0 6px, transparent 6px 12px), rgba(181, 101, 63, .5); }
.notes .note-card.in:hover { transform: rotate(0) translateY(-4px); z-index: 3; }
.notes .note-card.reveal:not(.in) { opacity: 0; }
.notes .note-card .date { display: inline-block; font-style: normal; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(181, 101, 63, .45); border-radius: 3px; padding: 1px 7px; margin-bottom: 4px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; background: rgba(252, 248, 241, .8); }
@media (max-width: 520px) { .notes { padding: 36px 16px 26px; } }

/* tech blog: coloured sticky notes */
.notes .note-card { border: 0; border-radius: 2px 2px 3px 3px; padding: 30px 24px 26px;
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, .06) 0, rgba(0, 0, 0, 0) 20px);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06), 0 14px 18px -8px rgba(50, 35, 15, .28); }
.notes .note-card:nth-child(n)::before { display: none; }
.notes .note-card::after { content: ""; position: absolute; right: 0; bottom: 0; width: 34px; height: 34px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .07) 50%, rgba(255, 255, 255, .45) 100%);
  border-top-left-radius: 4px; }
.notes .note-card:nth-child(5n+1) { background-color: #fff1a6; }
.notes .note-card:nth-child(5n+2) { background-color: #ffd8de; }
.notes .note-card:nth-child(5n+3) { background-color: #d3efd3; }
.notes .note-card:nth-child(5n+4) { background-color: #d2e7f7; }
.notes .note-card:nth-child(5n) { background-color: #ffdcb9; }
.notes .note-card:nth-child(3n) { transform: rotate(-1.6deg); }
.notes .note-card p { color: #4f463f; }
.notes .note-card .date { background: rgba(255, 255, 255, .55); border-color: rgba(120, 70, 40, .35); }
.notes .note-card.in:hover { transform: rotate(0) translateY(-4px) scale(1.02); }
