/* lukin.be — "The agent graph". Native scroll; the graph follows sections, it never controls scrolling. */
:root {
  --teal: #4ACAA8;         /* brand (theme-color of the original) — large shapes, text on dark only */
  --teal-ink: #167A61;     /* teal for text on light (5.3:1) */
  --mint: #D2F2E9;
  --mint-2: #B7EADC;
  --ink: #0C1413;
  --ink-2: #13201E;
  --ink-3: #1C2C29;
  --paper: #F4F4F4;
  --line: #E4E4E4;
  --text: #1B2422;
  --muted: #5B6865;
  --on-dark: #E6F2EF;
  --on-dark-muted: #9FB3AE;
  --fd: "Instrument Sans", system-ui, sans-serif;
  --fm: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --side: clamp(340px, 36vw, 520px);
  --gutter: clamp(16px, 4vw, 56px);
  --t-3xl: clamp(2.8rem, 1.4rem + 4.6vw, 5.6rem);
  --t-2xl: clamp(2.1rem, 1.3rem + 2.8vw, 3.9rem);
  --t-lg: clamp(1.1rem, 1rem + .35vw, 1.3rem);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--fd); font-size: 1.0625rem; line-height: 1.65; color: var(--text); background: var(--paper); }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.04; letter-spacing: -.025em; font-weight: 650; }
p { margin: 0 0 1em; max-width: 64ch; }
a { color: var(--teal-ink); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--teal); color: var(--ink); padding: .7rem 1rem; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 1rem; }
.mono { font-family: var(--fm); }
.kicker { display: block; width: fit-content; font-family: var(--fm); font-size: .9rem; color: var(--teal-ink); margin-bottom: 1rem; letter-spacing: .02em; }
.kicker::before { content: "// "; opacity: .6; }

/* ---------- layout: fixed "control panel" (homage to the original sidebar) + scrolling content ---------- */
.panel { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--ink); color: var(--on-dark); z-index: 20; display: flex; flex-direction: column; overflow: hidden; }
.content { margin-left: var(--side); }
.graph { position: absolute; inset: 104px 0 236px 0; }
.graph canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.node { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); padding: .28rem .6rem; border-radius: 999px; font-family: var(--fm); font-size: .78rem; line-height: 1.2; white-space: nowrap; color: var(--on-dark); background: rgba(19, 32, 30, .92); border: 1px solid rgba(74, 202, 168, .35); will-change: transform; transition: opacity .6s, border-color .3s, background-color .3s, color .3s; pointer-events: none; }
.node.hub { background: var(--teal); color: var(--ink); border-color: var(--teal); font-weight: 600; }
.node.off { opacity: 0; }
.node.hot { border-color: var(--teal); background: rgba(74, 202, 168, .22); }
.panel-top { position: relative; z-index: 2; padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.4rem, 3vw, 2.6rem) 0; display: flex; align-items: center; gap: 1rem; }
.avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--teal); flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.panel-top .who b { display: block; font-size: 1.1rem; font-weight: 650; color: #fff; }
.panel-top .who span { font-family: var(--fm); font-size: .85rem; color: var(--teal); }
.nav { position: relative; z-index: 2; margin-top: auto; padding: 0 clamp(1.4rem, 3vw, 2.6rem) 1rem; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; color: var(--on-dark-muted); text-decoration: none; font-family: var(--fm); font-size: .95rem; }
.nav a::before { content: ""; width: 18px; height: 2px; background: currentColor; transition: width .35s var(--ease); }
.nav a:hover, .nav a.active { color: #fff; }
.nav a.active::before { width: 42px; background: var(--teal); }
.socials { position: relative; z-index: 2; display: flex; gap: .4rem; padding: 0 clamp(1.4rem, 3vw, 2.6rem) clamp(1.4rem, 3vw, 2.2rem); list-style: none; margin: 0; }
.socials a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--on-dark); border: 1px solid var(--ink-3); background: rgba(12, 20, 19, .7); }
.socials a:hover { background: var(--teal); color: var(--ink); border-color: var(--teal); }
.socials svg { width: 20px; height: 20px; }
.menu-btn { display: none; }

/* ---------- sections ---------- */
.sec { padding: clamp(5rem, 11vw, 9rem) var(--gutter); position: relative; }
.sec > .in { max-width: 860px; }
.sec.white { background: #fff; }
.sec.dark { background: var(--ink-2); color: var(--on-dark); }
.sec.dark h2, .sec.dark h3, .sec.dark h4 { color: #fff; }
.sec.dark a:not(.btn) { color: var(--teal); }
.sec.dark .kicker { color: var(--teal); }
.sec.teal { background: var(--teal); color: var(--ink); }
.sec.teal .kicker { color: var(--ink); }
.sec.teal a:not(.btn) { color: var(--ink); }
h2 { font-size: var(--t-2xl); }

/* hero */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: clamp(4rem, 9vw, 8rem) var(--gutter); background: var(--paper); position: relative; }
.hero .handle { font-family: var(--fm); font-size: clamp(1rem, .9rem + .5vw, 1.25rem); color: var(--teal-ink); margin-bottom: 1.4rem; min-height: 1.6em; }
.hero .handle .cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--teal); vertical-align: -.15em; margin-left: 2px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero h1 { font-size: var(--t-3xl); line-height: .95; letter-spacing: -.045em; font-weight: 700; color: var(--ink); margin-bottom: 1.6rem; }
.hero h1 .l2 { display: block; color: var(--teal-ink); }
.hero .roles { font-size: var(--t-lg); color: var(--text); max-width: 46ch; margin-bottom: .4rem; }
.hero .stack { font-family: var(--fm); font-size: clamp(1rem, .9rem + .4vw, 1.2rem); color: var(--muted); }
.hero .stack b { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn { display: inline-flex; align-items: center; gap: .55rem; min-height: 50px; padding: .8rem 1.4rem; border-radius: 12px; font-weight: 650; text-decoration: none; font-size: 1rem; border: 2px solid transparent; transition: transform .25s var(--ease), background-color .25s, color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { color: var(--teal); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; }
.scroll-hint { position: absolute; left: var(--gutter); bottom: 2rem; font-family: var(--fm); font-size: .85rem; color: var(--muted); }

/* intro (play once on load) */
.js .intro > * { opacity: 0; transform: translateY(22px); animation: rise .9s var(--ease) forwards; }
.js .intro > :nth-child(2) { animation-delay: .5s; } .js .intro > :nth-child(3) { animation-delay: .65s; } .js .intro > :nth-child(4) { animation-delay: .8s; } .js .intro > :nth-child(5) { animation-delay: .95s; }
.js .intro > .handle { opacity: 1; transform: none; animation: none; }
@keyframes rise { to { opacity: 1; transform: none; } }
.js [data-rise] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-rise].in { opacity: 1; transform: none; }

/* about */
.about-lede { font-size: clamp(1.35rem, 1.05rem + 1.1vw, 2rem); line-height: 1.35; letter-spacing: -.015em; color: var(--ink); max-width: 30ch; font-weight: 500; }
.about-lede em { font-style: normal; color: var(--teal-ink); }
.about p.rest { margin-top: 1.4rem; font-size: var(--t-lg); color: var(--muted); max-width: 52ch; }

/* toolbelt: the tech from the "Things I Can Do" paragraph, lighting up once */
.belt { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 2.6rem; padding: 0; list-style: none; }
.belt a { display: inline-flex; align-items: baseline; gap: .45rem; padding: .55rem .95rem; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); font-family: var(--fm); font-size: 1rem; color: var(--ink); text-decoration: none; transition: background-color .5s, color .5s, border-color .5s; }
.belt a small { font-size: .72rem; color: var(--muted); }
.belt a:hover { border-color: var(--teal-ink); }
.js .belt.in a { animation: lit 1.4s var(--ease) both; animation-delay: calc(var(--i) * .12s); }
@keyframes lit { 0% { background: var(--paper); } 30% { background: var(--teal); border-color: var(--teal); } 100% { background: var(--paper); } }
.caps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.caps li { background: var(--paper); border-radius: 18px; padding: 1.4rem 1.3rem 1.3rem; max-width: none; font-weight: 600; font-size: 1.12rem; color: var(--ink); line-height: 1.3; }
.caps svg { width: 40px; height: 40px; color: var(--teal-ink); margin-bottom: 1.1rem; }
.caps svg * { stroke-dasharray: 120; stroke-dashoffset: 0; }
.js .caps li:not(.in) svg * { stroke-dashoffset: 120; }
.js .caps li svg * { transition: stroke-dashoffset 1.2s var(--ease) .2s; }
.caps li.coffee { background: var(--ink); color: #fff; }
.caps li.coffee svg { color: var(--teal); }
@media (max-width: 900px) { .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .caps li { font-size: 1rem; padding: 1.1rem 1rem; } }

/* work */
.work-intro { font-size: var(--t-lg); color: var(--on-dark); }
.projects { display: grid; gap: 1.2rem; margin-top: 2.4rem; }
.project { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.8rem; background: var(--ink); border: 1px solid var(--ink-3); border-radius: 22px; padding: clamp(1.3rem, 2.6vw, 2rem); }
.project .logo { display: grid; place-items: center; background: #fff; border-radius: 16px; padding: 1.2rem; aspect-ratio: 4 / 3; }
.project .logo img { width: 100%; height: auto; max-height: 90px; object-fit: contain; }
.project h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin-bottom: .25rem; }
.project .role { font-family: var(--fm); font-size: .9rem; color: var(--on-dark-muted); margin-bottom: 1rem; }
.project p { color: var(--on-dark); }
.project strong { color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 1.2rem 0 0; }
.chips li { font-family: var(--fm); font-size: .85rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid rgba(74, 202, 168, .5); color: var(--teal); max-width: none; transition: background-color .25s, color .25s; }
.chips li:hover { background: var(--teal); color: var(--ink); }
@media (max-width: 720px) { .project { grid-template-columns: 1fr; } .project .logo { aspect-ratio: auto; max-width: 260px; } }

/* contact payoff */
.contact h2 { font-size: var(--t-2xl); }
.mail { display: inline-block; font-family: var(--fm); font-weight: 600; font-size: clamp(1.45rem, .8rem + 3.4vw, 3.6rem); color: var(--ink); text-decoration: none; letter-spacing: -.03em; line-height: 1.1; overflow-wrap: anywhere; border-bottom: 4px solid var(--ink); padding-bottom: .1em; }
.mail .cursor { display: inline-block; width: .5em; height: .9em; background: var(--ink); vertical-align: -.08em; margin-left: .08em; animation: blink 1.05s steps(1) infinite; }
.contact .socials-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.2rem; list-style: none; padding: 0; }
.sec.contact .socials-row a { display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; padding: .6rem 1.1rem; border-radius: 12px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; }
.sec.contact .socials-row a:hover { background: #fff; color: var(--ink); }
.contact .socials-row svg { width: 18px; height: 18px; }
.foot { padding: 1.6rem var(--gutter); font-family: var(--fm); font-size: .85rem; color: var(--muted); background: var(--paper); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* ---------- mobile: panel becomes a compact header with a menu ---------- */
@media (max-width: 980px) {
  .panel { inset: auto; position: sticky; top: 0; width: 100%; height: 64px; flex-direction: row; align-items: center; overflow: visible; z-index: 50; }
  .panel .graph { display: none; }
  .content { margin-left: 0; }
  .panel-top { padding: 0 var(--gutter); flex: 1; gap: .7rem; }
  .avatar { width: 38px; height: 38px; box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--teal); }
  .panel-top .who b { font-size: .98rem; } .panel-top .who span { font-size: .75rem; }
  .menu-btn { display: grid; place-items: center; width: 48px; height: 48px; margin-right: calc(var(--gutter) - 4px); border: 0; border-radius: 12px; background: var(--teal); color: var(--ink); cursor: pointer; }
  .menu-btn svg { width: 24px; height: 24px; }
  .menu-btn .i-close { display: none; }
  .menu-btn[aria-expanded="true"] .i-open { display: none; }
  .menu-btn[aria-expanded="true"] .i-close { display: inline; }
  .nav { position: fixed; inset: 64px 0 0 0; margin: 0; background: var(--ink); padding: 1.5rem var(--gutter) 2rem; display: none; overflow-y: auto; overscroll-behavior: contain; }
  .nav.open { display: block; }
  .nav a { font-size: 1.4rem; padding: 1rem 0; border-bottom: 1px solid var(--ink-3); color: #fff; }
  .nav .m-social { display: flex; gap: .5rem; margin-top: 1.5rem; }
  .socials { display: none; }
  .hero { min-height: auto; padding-top: 3rem; }
  .hero-graph { display: block; }
  .scroll-hint { display: none; }
}
html.menu-open { overflow: hidden; }
.nav .m-social { display: none; }
@media (max-width: 980px) { .nav .m-social { display: flex; } .nav .m-social a { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--ink-3); border-radius: 12px; padding: 0; color: #fff; } .nav .m-social a::before { display: none; } .nav .m-social svg { width: 20px; height: 20px; } }

/* phone version of the graph: a small static-ish constellation inside the hero */
.hero-graph { display: none; position: relative; height: 210px; margin: 0 calc(var(--gutter) * -1) 2rem; background: var(--ink); overflow: hidden; }
.hero-graph .node { font-size: .72rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-rise], .js .intro > * { opacity: 1 !important; transform: none !important; }
  .js .caps li svg * { stroke-dashoffset: 0 !important; }
}
@media print { .panel { display: none; } .content { margin: 0; } }
@media (max-width: 980px) { .hero-graph { display: block; margin-top: -3rem; } }
