@font-face {
    font-family: 'rodin';
    src: url('/css/RodinNTLGPro-DB-Extended.woff2') format('woff2'),
         url('/css/RodinNTLGPro-DB-Extended.woff') format('woff');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'rodin';
    src: url('/css/RodinNTLGPro-B-Extended.woff2') format('woff2'),
         url('/css/RodinNTLGPro-B-Extended.woff') format('woff');
    font-weight: 700;
    font-display: swap;
}

html, body {
  font-family: 'rodin', sans-serif;
}

:root {
  --bg: #f3f7fb;
  --surface: #ffffff;
  --ink: #0e1a2b;
  --muted: #53647c;
  --line: #d5e0ec;
  --a: #0a9ab0;
  --b: #5b5bf0;
  --tile: #e8f0f9;
  --shadow: 0 1px 2px rgba(14, 26, 43, .06), 0 8px 24px -12px rgba(14, 26, 43, .18);
  --blob: .35;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1220;
    --surface: #111c30;
    --ink: #e8f0fb;
    --muted: #93a6c2;
    --line: #22324d;
    --a: #3fd0e4;
    --b: #8c8cff;
    --tile: #18263f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 28px -14px rgba(0, 0, 0, .7);
    --blob: .28;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--surface); padding: .5rem 1rem; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--b); outline-offset: 3px; border-radius: 6px; }

/* drifting colour behind everything */
.blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blobs i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(80px); opacity: var(--blob); animation: drift 26s ease-in-out infinite alternate; }
.blobs i:nth-child(1) { background: var(--a); top: -18vmax; left: -12vmax; }
.blobs i:nth-child(2) { background: var(--b); top: 30vh; right: -20vmax; animation-delay: -9s; }
.blobs i:nth-child(3) { background: var(--a); bottom: -24vmax; left: 20vw; opacity: calc(var(--blob) * .6); animation-delay: -17s; }
@keyframes drift { to { transform: translate(6vmax, 5vmax) scale(1.12); } }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; text-decoration: none; letter-spacing: .04em; }
.brand img { border-radius: 50%; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(360deg); }
nav { display: flex; gap: clamp(.8rem, 3vw, 1.8rem); }
nav a { text-decoration: none; color: var(--muted); font-size: .95rem; transition: color .2s; }
nav a:hover { color: var(--ink); }

main { max-width: 1100px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

/* hero */
.hero { text-align: center; padding: clamp(4rem, 14vw, 9rem) 0 clamp(3rem, 8vw, 5rem); }
.iam {
  margin: 0; font-size: clamp(1rem, 3vw, 1.4rem);
  letter-spacing: .3em; text-indent: .3em; word-spacing: -.1em; text-transform: uppercase; color: var(--muted);
  animation: rise .9s both;
}
h1 {
  margin: .1em 0 0; font-weight: 700;
  font-size: clamp(3.6rem, 17vw, 10.5rem); line-height: 1; letter-spacing: -.03em;
}
.word {
  display: inline-block;
  background: linear-gradient(100deg, var(--a), var(--b) 55%, var(--a));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rise 1s .15s both, sheen 9s linear infinite;
}
.period { display: inline-block; color: var(--b); -webkit-text-fill-color: var(--b); animation: bounce 2.6s 1.4s ease-in-out infinite; }
.swash { display: block; width: min(60%, 420px); height: 22px; margin: .4rem auto 0; overflow: visible; }
.swash path { fill: none; stroke: var(--a); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 1.4s .8s ease-out forwards; }
.lede { margin: 1.6rem auto 0; max-width: 32ch; font-size: clamp(1.05rem, 2.6vw, 1.35rem); color: var(--muted); animation: rise 1s .5s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes sheen { to { background-position: -200% 0; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-.12em); } }

/* sections */
.block { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
h2 { margin: 0 0 1.4rem; font-size: clamp(1.7rem, 4.5vw, 2.5rem); letter-spacing: -.01em; line-height: 1.15; }
h2::after { content: ""; display: block; width: 2.4rem; height: 4px; margin-top: .6rem; border-radius: 4px; background: linear-gradient(90deg, var(--a), var(--b)); transition: width .4s; }
.block:hover h2::after { width: 4.5rem; }
.section-note { margin: -.6rem 0 1.6rem; color: var(--muted); max-width: 60ch; }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: stretch; }

/* cards */
.card {
  position: relative; padding: 1.2rem 1.2rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform .35s cubic-bezier(.3, 1.5, .5, 1), border-color .25s, box-shadow .25s;
}
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 16px; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, var(--a), var(--b));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
}
.card:hover, .card:focus-within { transform: translateY(-6px) rotate(-.6deg); }
.card:nth-child(even):hover, .card:nth-child(even):focus-within { transform: translateY(-6px) rotate(.6deg); }
.card:hover::before, .card:focus-within::before { opacity: 1; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.card-head { display: flex; align-items: center; gap: .9rem; margin-bottom: .7rem; }
h3 { margin: 0; font-size: 1.1rem; line-height: 1.25; overflow-wrap: anywhere; }
.repo { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.card p { margin: 0 0 .6rem; color: var(--muted); font-size: .96rem; }

.icon {
  flex: none; width: 56px; height: 56px; object-fit: contain; padding: 6px;
  background: var(--tile); border-radius: 14px;
  transition: transform .45s cubic-bezier(.3, 1.8, .5, 1);
}
.card:hover .icon { transform: rotate(-8deg) scale(1.12); }
.card:nth-child(even):hover .icon { transform: rotate(8deg) scale(1.12); }

/* More / Less */
details { position: relative; z-index: 2; }
summary { display: inline-block; cursor: pointer; list-style: none; font-size: .88rem; font-weight: 700; color: var(--a); padding: .15rem 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: " +"; }
details[open] summary::after { content: " -"; }
.less, details[open] .more { display: none; }
details[open] .less { display: inline; }
.full { margin: .5rem 0 .2rem; animation: rise .35s both; }
.card::after {
  content: "GitHub \2192"; position: absolute; right: 1.2rem; bottom: 1rem; font-size: .85rem; color: var(--muted);
  opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s;
}
.site { position: absolute; left: 1.2rem; bottom: 1rem; z-index: 2; font-size: .85rem; font-weight: 700; color: var(--a); text-decoration: none; }
.site:hover, .gh:hover { text-decoration: underline; }
.gh { position: absolute; right: 1.2rem; bottom: 1rem; z-index: 2; font-size: .85rem; color: var(--muted); text-decoration: none; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s; }
.card:hover .gh, .card:focus-within .gh { opacity: 1; transform: none; }
.card.web::after { content: none; }
.card:hover::after, .card:focus-within::after { opacity: 1; transform: none; }
.card { padding-bottom: 2.6rem; }

.more-work { margin: 4rem 0 0; text-align: center; font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 700; color: var(--muted); }

/* about + contact */
.about p { max-width: 62ch; font-size: clamp(1.05rem, 2.2vw, 1.2rem); margin: 0; }
.contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .9rem; }
.contact li { flex: 1 1 auto; }
.contact a {
  display: block; padding: 1rem 1.2rem; text-decoration: none; overflow-wrap: break-word;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  transition: transform .3s cubic-bezier(.3, 1.5, .5, 1), border-color .2s;
}
.contact a:hover { transform: translateY(-4px); border-color: var(--a); }
.contact span { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--a); margin-bottom: .2rem; }

footer { text-align: center; padding: 3rem 1rem 4rem; color: var(--muted); font-size: .9rem; }
footer p { margin: 0; letter-spacing: normal; }

@media (max-width: 520px) { nav a:nth-child(n+3) { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .swash path { stroke-dashoffset: 0; }
}
.icon.bare { background: none; }

/* whimsy */
.lede { cursor: pointer; }
.word { cursor: pointer; transition: transform .3s cubic-bezier(.3, 1.8, .5, 1); }
.word:hover { transform: rotate(-1.2deg) scale(1.02); }
.word:active { transform: scale(.97); }

.confetti { position: fixed; width: 9px; height: 9px; z-index: 100; pointer-events: none; animation: burst 1.1s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes burst { to { transform: translate(var(--dx), calc(var(--dy) + 220px)) rotate(var(--r)); opacity: 0; } }
.spark { position: fixed; z-index: 100; pointer-events: none; font-style: normal; line-height: 1; animation: twinkle .8s ease-out forwards; }
@keyframes twinkle { to { transform: translate(var(--x), 26px) scale(.2) rotate(120deg); opacity: 0; } }

.reveal { opacity: 0; transform: translateY(26px) scale(.97); transition: opacity .6s var(--d, 0ms), transform .6s cubic-bezier(.3, 1.4, .5, 1) var(--d, 0ms), border-color .25s, box-shadow .25s; }
.reveal.in { opacity: 1; transform: none; }
.reveal.in:hover, .reveal.in:focus-within { transition-delay: 0ms; }
.reveal.in:hover { transform: translateY(-6px) rotate(-.6deg); }
.reveal.in:nth-child(even):hover { transform: translateY(-6px) rotate(.6deg); }

.wiggle { animation: wiggle .9s both; }
@keyframes wiggle { 15% { transform: rotate(-4deg) scale(1.05); } 30% { transform: rotate(4deg) scale(1.05); } 45% { transform: rotate(-3deg) scale(1.04); } 60% { transform: rotate(3deg); } 75% { transform: rotate(-1deg); } }

.card:hover .icon, .card:focus-within .icon { animation: boing .6s; }
@keyframes boing { 40% { transform: rotate(-10deg) scale(1.25); } 70% { transform: rotate(6deg) scale(1.08); } }
.quip { margin-top: .5rem !important; cursor: pointer; font-size: .82rem; opacity: .85; }
.quip:hover { color: var(--a); }

.party .word { animation: rise 1s .15s both, sheen 2s linear infinite; background-image: linear-gradient(100deg, #ff5d8f, #ffb703, #8ac926, #3fd0e4, #5b5bf0, #ff5d8f); background-size: 200% 100%; }
.party .icon { animation: boing 1.2s infinite; }
.party .blobs i { animation-duration: 3s; }
.party { filter: hue-rotate(0deg); }
.party body { animation: hue 6s linear infinite; }
@keyframes hue { to { filter: hue-rotate(360deg); } }
