/* dundysm.github.io — single-page portfolio. All values are the final design. */
:root {
  --bg: #1b1a19;
  --surface: #232221;      /* empty thumbnail / painting backdrop */
  --hover-plate: #242322;  /* card hover background */
  --line: #2e2c2b;         /* tag borders */
  --rule: #3a3836;         /* contact rules */
  --ink: #f4f1eb;          /* name */
  --text: #e8e5df;         /* tagline, card titles */
  --muted: #9b9891;        /* skills, labels, icons */
  --faint: #55524d;        /* separators */
  --gold: #d4af37;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'URW Palladio L', P052, Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
  font-family: var(--mono);
  color: var(--text);
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

#fireflies { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 0; }

.page { min-height: 100vh; display: flex; align-items: center; }
.layout {
  position: relative; z-index: 1; width: 100%; padding: 0 20px;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  column-gap: clamp(64px, 9vw, 240px); row-gap: 48px;
}
main {
  flex: 0 1 960px; min-width: 0;
  height: min(calc(100vh - 128px), 1200px);
  display: flex; flex-direction: column;
}

/* Header */
.name {
  margin: 0; font-family: var(--serif); font-size: 42.4px; line-height: 48px;
  font-weight: 400; color: var(--ink); letter-spacing: -0.01em;
}
.name .at {
  font-family: var(--mono); font-size: 0.4em; color: var(--gold);
  position: relative; top: -1.1em; margin-right: 4px;
}
.tagline { margin: 6px 0 0; font-size: 14px; line-height: 24px; color: var(--text); text-wrap: pretty; }
.skills { margin: 14px 0 0; max-width: 720px; font-size: 12.5px; line-height: 22px; color: var(--muted); text-wrap: pretty; text-transform: none; } /* keep real casing: CUDA, vLLM */
.skills .sep { color: var(--faint); }
.nw { white-space: nowrap; }

.section-label {
  margin: 57px 0 0; padding-bottom: 14px;
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted);
}

/* Scrollable project area */
.scroll-wrap { flex: 1; min-height: 0; display: flex; gap: 12px; margin: 0 -14px; }
.scroller {
  flex: 1; min-width: 0; overflow-y: auto; scrollbar-width: none;
  padding: 24px 14px 28px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 28px), transparent 100%);
}
.scroller::-webkit-scrollbar { display: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); column-gap: 28px; row-gap: 36px; }

/* Scroll indicator: 20px gold dash + fading trail, visible only while scrolling */
.rail { position: relative; flex: none; width: 1px; margin: 24px 0 28px; opacity: 0; transition: opacity .35s; }
.rail-trail { position: absolute; left: 0; top: 0; width: 1px; height: 0; will-change: transform, height; }
.rail-dash {
  position: absolute; left: 0; top: 0; width: 1px; height: 20px;
  background: var(--gold); opacity: .6; box-shadow: 0 0 3px rgba(212,175,55,.35); will-change: transform;
}

/* Project card (YouTube-style hover) */
.card { position: relative; display: block; color: inherit; text-decoration: none; outline: none; }
.card::before {
  content: ""; position: absolute; inset: -10px; border-radius: 16px; background: var(--hover-plate);
  opacity: 0; transform: scale(.96); transition: opacity .2s ease, transform .25s ease; pointer-events: none;
}
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface); transition: border-radius .2s ease; }
.zoom { position: absolute; inset: 0; transition: transform .3s ease; }
.zoom img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card:hover::before, .card:focus-visible::before { opacity: 1; transform: scale(1); }
.card:hover .thumb, .card:focus-visible .thumb { border-radius: 4px; }
.card:hover .zoom, .card:focus-visible .zoom { transform: scale(1.06); transition: transform 6s linear; }
.meta { position: relative; margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.title { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--text); }
.desc { font-size: 12.5px; line-height: 19px; color: var(--muted); }
.tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { white-space: nowrap; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 18px; }

/* Contact */
.contact { flex: none; margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 20px; }
.contact .rule { width: 40px; height: 1px; background: var(--rule); }
.contact .rule:first-child { margin-right: 4px; }
.contact .rule:last-child { margin-left: 4px; }
.contact a { display: flex; color: var(--muted); text-decoration: none; transition: color .15s, filter .15s; }
.contact a:hover, .contact a:focus-visible { color: #fff; filter: drop-shadow(0 0 1.5px rgba(255,255,255,.3)); outline: none; }

/* Banner */
aside { flex: none; }
.painting {
  position: relative; height: calc(100vh - 128px); max-height: 1200px;
  aspect-ratio: 824 / 1909; border-radius: 10px; overflow: hidden; background: var(--surface);
}
.painting img, .painting canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.painting canvas { opacity: 0; }

/* Narrow screens (below where content + banner fit side by side): page scrolls normally, banner sits below */
@media (max-width: 1100px) {
  .page { align-items: flex-start; }
  .layout { padding: 48px 20px 64px; row-gap: 56px; }
  main { flex: 1 1 100%; height: auto; }
  .name { font-size: 36px; line-height: 42px; }
  .section-label { margin-top: 44px; }
  .scroll-wrap { margin: 0; display: block; }
  .scroller { overflow: visible; padding: 16px 0 0; -webkit-mask-image: none; mask-image: none; }
  .rail { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); row-gap: 32px; }
  .contact { margin-top: 48px; }
  aside { width: 100%; display: flex; justify-content: center; }
  .painting { height: auto; width: min(100%, 420px); }
}
@media (prefers-reduced-motion: reduce) {
  .card:hover .zoom, .card:focus-visible .zoom { transform: none; }
}
