:root {
  --bg: #080a08;
  --panel: rgba(8, 11, 9, .82);
  --panel-strong: rgba(10, 14, 11, .94);
  --line: #202820;
  --line-bright: #354137;
  --text: #d8ddd7;
  --muted: #737c74;
  --faint: #465047;
  --accent: #9be28f;
  --accent-rgb: 155, 226, 143;
  --orange: #d97757;
  --mono: "DM Mono", Consolas, monospace;
  --pixel: "Pixelify Sans", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img, canvas { display: block; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
::selection { color: var(--bg); background: var(--accent); }
a:focus-visible, button:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }

#signal-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  image-rendering: auto;
  background: #0b090a;
}
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .2;
  background:
    radial-gradient(circle, rgba(255,255,255,.26) 0 .5px, transparent .75px) 0 0 / 3px 3px,
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 224, 235, .035) 3px 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
}
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  background: #080a08;
  transform: translateY(100%);
  transition: transform .55s steps(8), opacity .12s linear;
}
.transition-terminal { color: var(--muted); font: 12px/1.65 var(--mono); }
.transition-terminal > span { color: var(--accent); }
.transition-terminal p { margin: 3px 0 0; }
.transition-dots { animation: blink .5s steps(2) infinite; }
.page-exiting { overflow: hidden; }
.page-exiting .page-transition { pointer-events: auto; opacity: 1; transform: translateY(0); }

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 200;
  padding: 6px 10px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: var(--bg);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.shell {
  position: relative;
  z-index: 2;
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 28px;
}
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .18);
  backdrop-filter: blur(8px);
}

.profile-bar {
  min-height: 112px;
  padding: 20px 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.identity { display: flex; align-items: center; gap: 17px; }
.identity-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line-bright);
  background: #101611;
  display: grid;
  place-items: center;
  color: var(--accent);
  font: 600 24px var(--pixel);
  box-shadow: inset 0 0 18px rgba(var(--accent-rgb), .08);
}
.live-dot { position: absolute; right: 6px; bottom: 6px; width: 8px; height: 8px; z-index: 3; border: 2px solid var(--bg); border-radius: 50%; background: var(--accent); box-sizing: content-box; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; color: var(--accent); font: 600 25px/1 var(--pixel); letter-spacing: .01em; }
.cursor-blink { animation: blink .9s steps(2) infinite; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); }
nav a, nav button { padding: 0; border: 0; background: none; transition: color .16s; }
nav a:hover, nav a.active, nav button:hover { color: var(--accent); }
nav button { cursor: pointer; }

.social-block { display: grid; gap: 10px; justify-items: end; }
.social-icons { display: flex; align-items: center; gap: 13px; }
.social-icons a { width: 20px; height: 20px; display: grid; place-items: center; color: #a0a7a1; transition: transform .16s, color .16s; }
.social-icons a:hover { color: var(--text); transform: translateY(-2px); }
.social-icons svg { width: 17px; height: 17px; display: block; fill: currentColor; }
.resume-link { min-width: 142px; padding: 6px 12px; border: 1px solid var(--line-bright); text-align: center; color: var(--muted); transition: color .16s, border-color .16s, background .16s; }
.resume-link span { color: var(--accent); }
.resume-link:hover { color: var(--text); border-color: var(--accent); background: rgba(var(--accent-rgb), .04); }
[data-missing="true"] { opacity: .4; cursor: help; }

main { display: grid; gap: 22px; margin-top: 22px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 22px; }
.intro {
  min-height: 420px;
  padding: 24px 21px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 266px;
  gap: 20px;
  align-items: center;
  background: rgba(8, 11, 9, .62);
}
.intro-copy { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.intro-copy > p { max-width: 520px; margin-bottom: 17px; color: #b9c0b9; }
.intro-copy strong { color: var(--accent); font-weight: 400; }
.availability { display: flex; align-items: center; gap: 9px; margin: 6px 0 0 !important; color: var(--muted) !important; }
.availability i, .footer-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(var(--accent-rgb), .75); animation: pulse 1.7s steps(2) infinite; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.section-title h2 { margin: 0; color: var(--accent); font: 500 21px/1.1 var(--pixel); }
.section-title > span, .section-title > a { color: var(--muted); font-size: 12px; }
.section-title > a:hover { color: var(--accent); }
.section-title.compact { margin-bottom: 18px; }
.section-title.compact h2 { font-size: 18px; }
.section-title.compact img, .title-with-icon img, .title-with-icon svg { width: 19px; height: 19px; }
.title-with-icon { display: flex; align-items: center; gap: 9px; }
.title-with-icon svg { display: block; flex: 0 0 auto; fill: currentColor; }

.tv-area { position: relative; min-height: 278px; display: grid; place-items: center; isolation: isolate; }
.tv-caption { position: absolute; right: 0; bottom: 0; margin: 0; color: var(--faint); font-size: 10px; }
.mini-tv { position: relative; width: 220px; z-index: 3; transition: transform .15s linear; transform-style: preserve-3d; }
.tv-body {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 8px;
  padding: 11px;
  border: 2px solid #3c463d;
  border-radius: 14px 14px 18px 18px;
  background: #252d26;
  box-shadow: 5px 7px 0 rgba(0,0,0,.62), 0 16px 32px rgba(0,0,0,.25), inset 0 0 0 2px #151a16;
}
.tv-screen { position: relative; aspect-ratio: 509 / 409; overflow: hidden; border: 4px solid #111512; border-radius: 22% / 9%; background: #e7dfcb; box-shadow: inset 0 0 24px #0e1712; }
#patrick { width: 100%; height: 100%; filter: saturate(.78) contrast(1.06) sepia(.07); }
.screen-lines { position: absolute; inset: 0; pointer-events: none; opacity: .42; background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(12, 20, 14, .22) 2px 3px); }
.tv-glare { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--glare-x, 28%) var(--glare-y, 18%), rgba(255,255,255,.24), transparent 23%); mix-blend-mode: screen; }
.channel { position: absolute; right: 10px; top: 7px; color: #262e26; font-size: 8px; text-shadow: 0 1px rgba(255,255,255,.5); }
.tv-side { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 1px; }
.tv-side b { color: #859087; font: 500 7px/.85 var(--pixel); text-align: center; text-transform: uppercase; }
.knob { position: relative; width: 29px; height: 29px; border: 2px solid #0d110e; border-radius: 50%; background: #798379; box-shadow: inset 0 0 0 4px #39433a; }
.knob::after { content: ""; position: absolute; left: 50%; top: 3px; width: 2px; height: 9px; background: #101511; transform: translateX(-50%); }
.knob.small { width: 23px; height: 23px; }
.knob.small::after { height: 6px; }
.vents { margin-top: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.vents span { width: 5px; height: 5px; border-radius: 50%; background: #0d120e; }
.tv-aerial { position: absolute; left: 50%; top: -42px; width: 90px; height: 46px; transform: translateX(-50%); z-index: -1; }
.tv-aerial i { position: absolute; left: 50%; bottom: 0; width: 2px; height: 48px; background: #505b52; transform-origin: bottom; }
.tv-aerial i:first-child { transform: rotate(-43deg); }
.tv-aerial i:last-child { transform: rotate(43deg); }
.tv-aerial i::before { content: ""; position: absolute; top: -3px; left: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px #1b211c; }

.logo-orbit { position: absolute; inset: 0; z-index: auto; pointer-events: none; }
.logo-orbit::before { content: ""; position: absolute; left: 50%; top: 50%; z-index: 0; width: 94%; height: 53%; border: 1px dashed rgba(var(--accent-rgb), .1); border-radius: 50%; transform: translate(-50%, -50%); }
.logo-orbit a { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(213,220,214,.16); border-radius: 50%; color: #ededdf; background: rgba(8,11,9,.86); box-shadow: 0 5px 12px rgba(0,0,0,.36); pointer-events: auto; will-change: transform, opacity; transition: border-color .15s, box-shadow .15s; }
.logo-orbit a:hover { border-color: currentColor; box-shadow: 0 0 14px rgba(var(--accent-rgb), .3); }
.logo-orbit svg { width: 17px; height: 17px; display: block; fill: currentColor; }
.logo-orbit .brand-github, .logo-orbit .brand-openai, .logo-orbit .brand-medium { color: #e7e9e3; }
.logo-orbit .brand-supabase { color: #3ecf8e; }
.logo-orbit .brand-anthropic { color: #d97757; }
.logo-orbit .brand-arxiv { color: #b31b1b; }

.profile-display { position: relative; margin: 0; padding: 0; display: grid; grid-template-rows: 24px auto 28px auto; overflow: hidden; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.photo-toolbar, .photo-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--faint); font-size: 8px; text-transform: uppercase; letter-spacing: .04em; }
.photo-window { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: 0; background: transparent; }
.photo-window::after { display: none; }
.photo-window img { width: 100%; height: 100%; object-fit: contain; object-position: center; filter: saturate(.86) contrast(1.04); }
.photo-window > span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 9px; }
.profile-display.has-photo .photo-window > span { display: none; }
.photo-reticle { display: none; }
.photo-reticle i { position: absolute; width: 13px; height: 13px; border-color: rgba(255,255,255,.45); border-style: solid; }
.photo-reticle i:nth-child(1) { left: 0; top: 0; border-width: 1px 0 0 1px; }
.photo-reticle i:nth-child(2) { right: 0; top: 0; border-width: 1px 1px 0 0; }
.photo-reticle i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 1px 1px; }
.photo-reticle i:nth-child(4) { right: 0; bottom: 0; border-width: 0 1px 1px 0; }
.claude-code-status {
  min-height: 28px;
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8e908b;
  font: 400 12px/1 var(--mono);
  letter-spacing: -.02em;
}
.claude-spinner {
  width: 14px;
  color: #d97757;
  font-size: 16px;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 9px rgba(217, 119, 87, .25);
}

.section { padding: 25px 24px; }
.work-list { border-top: 1px solid var(--line); }
.work-item { min-height: 86px; padding: 16px 4px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); transition: padding .18s, background .18s; }
.work-item:hover { padding-left: 12px; padding-right: 12px; background: rgba(var(--accent-rgb), .025); }
.work-item h3 { margin: 0 0 3px; color: var(--text); font: 500 17px/1.2 var(--pixel); }
.work-item p { margin: 0; color: var(--muted); font-size: 12px; }
.work-item > span { color: var(--faint); font-size: 10px; white-space: nowrap; }
.work-item:hover h3, .work-item:hover > span { color: var(--accent); }

.two-column { display: grid; grid-template-columns: 1.05fr .95fr; align-items: start; gap: 22px; }
.spotify-panel, .now-panel { min-height: 255px; padding: 23px; }
.spotify-empty { position: relative; min-height: 174px; padding: 18px; display: grid; grid-template-columns: 68px 1fr; align-items: center; gap: 17px; border: 1px solid #1d3324; background: linear-gradient(135deg, rgba(30, 215, 96, .075), transparent 70%); }
.spotify-empty h3 { margin: 2px 0 6px; color: var(--text); font: 500 16px var(--pixel); }
.spotify-empty p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.spotify-empty .muted { color: #1ed760; }
.record { position: relative; width: 60px; height: 60px; display: grid; place-items: center; border: 1px solid #334138; border-radius: 50%; background: repeating-radial-gradient(circle, #111713 0 3px, #1b221d 3px 5px); animation: spin 8s linear infinite; }
.record i { width: 17px; height: 17px; border-radius: 50%; background: #1ed760; box-shadow: inset 0 0 0 5px #121713; }
.equalizer { position: absolute; right: 13px; bottom: 12px; height: 18px; display: flex; align-items: flex-end; gap: 2px; }
.equalizer i { width: 3px; height: 5px; background: #1ed760; animation: equalize .7s steps(4) infinite alternate; }
.equalizer i:nth-child(2) { animation-delay: -.5s; }.equalizer i:nth-child(3) { animation-delay: -.25s; }.equalizer i:nth-child(4) { animation-delay: -.6s; }.equalizer i:nth-child(5) { animation-delay: -.15s; }
#spotify-embed { width: 100%; height: 352px; border: 0; border-radius: 12px; }
.now-panel dl { margin: 0; border-top: 1px solid var(--line); }
.now-panel dl > div { padding: 13px 2px; display: grid; grid-template-columns: 78px 1fr; gap: 12px; border-bottom: 1px solid var(--line); }
.now-panel dt { color: var(--accent); font-size: 10px; }
.now-panel dd { margin: 0; color: var(--muted); font-size: 11px; }
.now-panel .reading-now { align-items: start; }
.alphaxiv-folder { display: block; transition: color .16s; }
.alphaxiv-folder:hover { color: var(--text); }
.alphaxiv-folder small { display: block; margin-top: 2px; color: var(--faint); font-size: 8px; letter-spacing: .02em; }
.alphaxiv-folder[data-state="loading"] small { color: var(--accent); animation: blink 1.1s steps(2) infinite; }

.blog-list { border-top: 1px solid var(--line); }
.blog-post { min-height: 74px; padding: 14px 4px; display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.blog-post time, .blog-post > span { color: var(--faint); font-size: 10px; }
.blog-post h3 { margin: 0; font: 500 16px var(--pixel); }
.blog-post p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.blog-post:hover h3, .blog-post:hover > span { color: var(--accent); }
.blog-empty { min-height: 94px; display: flex; align-items: center; justify-content: center; gap: 13px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.blog-empty span { color: var(--accent); font: 500 24px var(--pixel); }
.blog-empty p { margin: 0; font-size: 11px; }
.blog-empty a { color: var(--accent); }
code { padding: 2px 4px; color: var(--accent); background: rgba(var(--accent-rgb), .06); font-family: var(--mono); }

footer { min-height: 72px; padding: 0 4px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; color: var(--faint); font-size: 10px; }
footer b { font-weight: 400; }
footer a { justify-self: end; }
footer a:hover { color: var(--accent); }
.footer-status { display: flex; align-items: center; gap: 8px; }
.footer-status i { display: block; flex: 0 0 auto; width: 5px; height: 5px; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes equalize { to { height: 18px; } }

@media (max-width: 780px) {
  .shell { width: min(620px, calc(100% - 24px)); padding-top: 12px; }
  .profile-bar { align-items: flex-start; padding: 16px; }
  .identity-mark { width: 38px; height: 38px; }
  .social-block { align-self: stretch; }
  .social-icons { gap: 9px; }
  .resume-link { min-width: 112px; }
  .hero-grid { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1fr; gap: 28px; padding: 22px 18px; }
  .intro-copy > p { max-width: none; }
  .tv-area { min-height: 330px; }
  .mini-tv { width: 218px; }
  .two-column { grid-template-columns: 1fr; }
  footer { grid-template-columns: 1fr auto; }
  .footer-status { display: none; }
}

@media (max-width: 500px) {
  body { font-size: 12px; }
  .profile-bar { flex-direction: column; }
  .social-block { width: auto; align-self: stretch; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .social-icons { min-width: 0; gap: 12px; }
  .resume-link { width: 108px; min-width: 0; flex: 0 0 108px; }
  .section { padding: 21px 16px; }
  .mini-tv { width: min(208px, 64vw); }
  .tv-area { min-height: 258px; }
  .tv-caption { right: 2px; max-width: 100%; font-size: 8px; text-align: right; }
  .logo-orbit { inset: 4px -3px; }
  .work-item { grid-template-columns: 1fr; gap: 6px; }
  .work-item > span { justify-self: start; }
  .spotify-panel, .now-panel { padding: 18px 16px; }
  .spotify-empty { grid-template-columns: 56px 1fr; padding: 13px; }
  .record { width: 50px; height: 50px; }
  .blog-post { grid-template-columns: 1fr auto; gap: 5px 10px; }
  .blog-post time { grid-column: 1 / -1; }
  .blog-empty { align-items: flex-start; padding: 18px 2px; }
  footer { min-height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
