/* ==========================================================================
   골골소프트 · golgol.kr
   Styles shared by the home and portfolio pages
   ========================================================================== */

/* Tokens
   ========================================================================== */

:root {
  color-scheme: light dark;

  --paper: oklch(0.972 0.008 85);
  --card: oklch(0.99 0.005 85);
  --white: oklch(0.995 0.004 85);
  --ink: oklch(0.26 0.018 258);
  --on-ink: oklch(0.96 0.008 85);
  --on-ink-2: oklch(0.82 0.015 255);

  --text-2: oklch(0.42 0.025 255);
  --text-soft: oklch(0.47 0.025 255);
  --muted: oklch(0.55 0.03 252);
  --faint: oklch(0.6 0.03 252);
  --link: oklch(0.42 0.05 258);
  --line: oklch(0.9 0.01 255);
  --line-soft: oklch(0.93 0.008 255);

  --accent: oklch(0.58 0.14 68);
  --amber: oklch(0.8 0.14 74);
  --amber-2: oklch(0.78 0.14 72);
  --amber-hover: oklch(0.84 0.13 78);
  --on-amber: oklch(0.22 0.04 60);
  --slate: oklch(0.64 0.026 252);
  --soft: oklch(0.9 0.012 252);
  --soft-2: oklch(0.82 0.018 252);
  --chip-bg: oklch(0.93 0.05 78);
  --chip-fg: oklch(0.42 0.09 62);

  --cat-gray: oklch(0.66 0.011 267);
  --cat-gray-eye: oklch(0.306 0.021 269);
  --cat-cheese: oklch(0.809 0.14 85);
  --cat-cheese-eye: oklch(0.358 0.052 83);
  --note-1: oklch(0.568 0.12 72);
  --note-2: oklch(0.493 0.02 271);

  --stripe: oklch(0.955 0.012 82);
  --stripe-line: oklch(0.9 0.02 80);
  --stripe-gap: 10px;
  --stripes: repeating-linear-gradient(135deg, var(--stripe-line) 0 1px, transparent 1px var(--stripe-gap));

  /* blocks that stay dark in both themes, and details that change with the theme */
  --block: oklch(0.26 0.018 258);
  --on-block: oklch(0.96 0.008 85);
  --card-hover: oklch(0.985 0.012 82);
  --line-strong: oklch(0.85 0.012 255);
  --line-hover: oklch(0.85 0.06 76);
  --caption-bg: oklch(0.955 0.012 82 / 0.7);
  --caption-bg-solid: oklch(0.94 0.016 82);
  --halo: oklch(1 0 0 / 0.85);
  --highlight: oklch(1 0 0);

  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* Dark theme: the same design on a warm dark palette. Declaring it also keeps
   browser and extension dark modes from recolouring the page on their own. */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: oklch(0.19 0.008 75);
    --card: oklch(0.225 0.009 75);
    --white: oklch(0.255 0.009 75);
    --ink: oklch(0.93 0.008 85);
    --on-ink: oklch(0.2 0.01 75);

    --text-2: oklch(0.8 0.012 85);
    --text-soft: oklch(0.72 0.012 85);
    --muted: oklch(0.66 0.015 80);
    --faint: oklch(0.6 0.015 80);
    --link: oklch(0.84 0.03 80);
    --line: oklch(0.32 0.01 75);
    --line-soft: oklch(0.28 0.009 75);

    --accent: oklch(0.8 0.13 74);
    --slate: oklch(0.5 0.02 252);
    --soft: oklch(0.33 0.01 252);
    --soft-2: oklch(0.43 0.015 252);
    --chip-bg: oklch(0.33 0.06 70);
    --chip-fg: oklch(0.88 0.09 80);
    --note-2: oklch(0.72 0.02 271);

    --stripe: oklch(0.215 0.01 75);
    --stripe-line: oklch(0.285 0.014 78);

    --block: oklch(0.255 0.014 258);
    --card-hover: oklch(0.25 0.012 78);
    --line-strong: oklch(0.42 0.012 75);
    --line-hover: oklch(0.55 0.09 76);
    --caption-bg: oklch(0.255 0.012 78 / 0.85);
    --caption-bg-solid: oklch(0.255 0.012 78);
    --halo: oklch(0.19 0.008 75 / 0.85);
    --highlight: oklch(1 0 0 / 0.06);
  }
}

/* Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans KR", system-ui, sans-serif;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a:focus-visible {
  border-radius: 6px;
}

.mono {
  font-family: var(--mono);
}

/* Stroke icons injected by main.js */
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Layout, header, footer
   ========================================================================== */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px 120px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: inherit;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
}

.nav [aria-current="page"] {
  color: var(--accent);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer .mono {
  font-size: 11px;
}

/* Logo: a gray cat and a cheese cat purring to floating notes (골골송).
   Sized in em so .cats--lg scales the whole drawing. */
.cats {
  position: relative;
  display: inline-block;
  flex: none;
  width: 4.6em;
  height: 2.8em;
  font-size: 10px;
}

/* Large still version (portfolio heading): no purring */
.cats--lg {
  font-size: 16px;
}

.cats--lg .cat {
  animation: none;
}

.cat {
  position: absolute;
  border-radius: 50%;
  background: var(--c);
}

.cat::before,
.cat::after {
  content: "";
  position: absolute;
  top: -0.4em;
  width: var(--ear-w);
  height: var(--ear-h);
  background: var(--c);
}

/* ear bases sit inside the head so the outline flows without a step */
.cat::before {
  left: 0.325em;
  clip-path: polygon(70% 0, 100% 100%, 0 100%);
}

.cat::after {
  right: 0.325em;
  clip-path: polygon(30% 0, 100% 100%, 0 100%);
}

/* Face width, eye size and eye offset snap to whole pixels, so the two eyes
   share a sub-pixel position and render identically at every scale */
.cat i {
  position: absolute;
  top: var(--eye-top);
  width: round(var(--eye), 1px);
  height: round(var(--eye), 1px);
  border-radius: 50%;
  background: var(--eye-c);
}

.cat i:first-child {
  left: round(var(--eye-x), 1px);
}

.cat i:last-child {
  right: round(var(--eye-x), 1px);
}

.cat--gray {
  --c: var(--cat-gray);
  --ear-w: 0.95em;
  --ear-h: 1.1em;
  --eye: 0.35em;
  --eye-x: 0.8em;
  --eye-top: 0.9em;
  --eye-c: var(--cat-gray-eye);
  left: 0;
  bottom: 0.3em;
  width: round(2.8em, 1px);
  height: round(2.3em, 1px);
  animation: purr 0.16s steps(2, end) infinite;
}

.cat--cheese {
  --c: var(--cat-cheese);
  --ear-w: 0.85em;
  --ear-h: 1em;
  --eye: 0.3em;
  --eye-x: 0.7em;
  --eye-top: 0.8em;
  --eye-c: var(--cat-cheese-eye);
  z-index: 1;
  left: 2.2em;
  bottom: 0;
  width: round(2.4em, 1px);
  height: round(2em, 1px);
  animation: purr 0.2s steps(2, end) infinite;
}

.note {
  position: absolute;
  line-height: 1;
  pointer-events: none;
  animation: note 2.6s ease-in-out infinite;
}

.note--1 {
  top: -32%;
  left: 65%;
  color: var(--note-1);
  font-size: 1.5em;
  font-weight: 700;
}

.note--2 {
  top: -11%;
  left: 85%;
  color: var(--note-2);
  font-size: 1em;
  animation-delay: 1.3s;
}

/* Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
}

.nav .btn {
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 400;
}

.btn-dark {
  background: var(--ink);
  color: var(--on-ink);
}

.btn-dark:hover {
  background: var(--accent);
  color: var(--card);
}

.btn-line {
  border: 1px solid var(--line-strong);
}

.btn-line:hover {
  border-color: var(--accent);
}

.btn-amber {
  background: var(--amber-2);
  color: var(--on-amber);
  font-weight: 600;
}

.btn-amber:hover {
  background: var(--amber-hover);
  color: var(--on-amber);
}

/* Home · hero
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr);
  align-items: center;
  gap: 48px;
  padding: 96px 0 84px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber-2);
}

.hero h1 {
  margin-bottom: 28px;
  font-size: clamp(38px, 4.6vw, 56px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-copy {
  display: grid;
  gap: 14px;
  max-width: 30em;
  margin-bottom: 40px;
}

.hero-copy p {
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.8;
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Hero illustration: a browser window, a phone and a platform badge drawn in CSS */
.art-wrap {
  display: flex;
  justify-content: center;
}

.art {
  position: relative;
  width: 340px;
  height: 300px;
  animation: drift 6s ease-in-out infinite;
}

:where(.art) span {
  display: block;
}

.win {
  position: absolute;
  top: 18px;
  left: 0;
  width: 268px;
  height: 196px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 24px 48px -28px oklch(0.3 0.02 258 / 0.35);
}

.win-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.win-bar .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--soft-2);
}

.win-bar .dot--amber {
  background: var(--amber);
}

.win-bar .url {
  flex: 1;
  height: 8px;
  margin-left: 10px;
  border-radius: 4px;
  background: var(--soft);
}

.win-body {
  display: grid;
  grid-template-columns: 64px 1fr;
  height: 165px;
}

.win-side {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
}

.win-side .sk:nth-child(1) { width: 70%; }
.win-side .sk:nth-child(3) { width: 80%; }
.win-side .sk:nth-child(4) { width: 60%; }

.sk {
  height: 6px;
  border-radius: 3px;
  background: var(--soft);
}

.sk--ink {
  height: 8px;
  border-radius: 4px;
  background: var(--ink);
}

.win-main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: start;
  gap: 10px;
  padding: 16px;
}

.win-main .title {
  grid-column: 1 / -1;
  width: 46%;
  height: 10px;
  border-radius: 5px;
  background: var(--ink);
}

.win-main .tile {
  height: 44px;
  border-radius: 8px;
  background: var(--soft);
}

.win-main .tile--amber {
  background: var(--amber);
}

.win-main .chart {
  display: flex;
  grid-column: 1 / -1;
  align-items: flex-end;
  gap: 5px;
  height: 38px;
  padding: 0 10px 6px;
  border-radius: 8px;
  background: var(--soft);
}

.win-main .chart span {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--soft-2);
}

.win-main .chart span:nth-child(1) { height: 10px; }
.win-main .chart span:nth-child(2) { height: 18px; }
.win-main .chart span:nth-child(3) { height: 14px; }
.win-main .chart span:nth-child(4) { height: 24px; }
.win-main .chart span:nth-child(5) { height: 20px; }

.win-main .chart .hi {
  background: var(--amber);
}

.platforms {
  position: absolute;
  z-index: 3;
  bottom: 28px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: color-mix(in oklch, var(--white) 92%, transparent);
  box-shadow: 0 18px 36px -22px oklch(0.3 0.02 258 / 0.45), 0 1px 0 var(--highlight) inset;
  backdrop-filter: blur(8px);
}

.avatars {
  display: flex;
}

.avatars span {
  width: 20px;
  height: 20px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--slate);
}

.avatars span + span {
  margin-left: -7px;
}

.avatars span:nth-child(2) {
  background: var(--amber);
}

.avatars span:nth-child(3) {
  background: var(--ink);
}

.platforms-text {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.platforms-text small {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.platforms-text b {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 132px;
  height: 250px;
  padding: 8px;
  border-radius: 26px;
  background: var(--ink);
  box-shadow: 0 30px 50px -26px oklch(0.2 0.02 258 / 0.5);
}

.screen {
  height: 100%;
  overflow: hidden;
  border-radius: 19px;
  background: var(--white);
}

.notch {
  display: flex;
  justify-content: center;
  height: 22px;
  padding-top: 6px;
}

.notch span {
  width: 36px;
  height: 6px;
  border-radius: 3px;
  background: var(--ink);
}

.screen-body {
  display: grid;
  gap: 8px;
  padding: 8px 12px;
}

.screen-body .sk:nth-child(1) { width: 58%; }
.screen-body .sk:nth-child(2) { width: 84%; }

.screen-body .banner {
  display: flex;
  align-items: flex-end;
  height: 70px;
  margin-top: 4px;
  padding: 8px;
  border-radius: 10px;
  background: var(--slate);
}

.screen-body .banner span {
  width: 40%;
  height: 7px;
  border-radius: 3px;
  background: var(--white);
}

.screen-body .tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.screen-body .tiles span {
  height: 36px;
  border-radius: 8px;
  background: var(--soft);
}

.screen-body .cta-bar {
  height: 30px;
  margin-top: 2px;
  border-radius: 8px;
  background: var(--amber);
}

/* Home · sections
   ========================================================================== */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 48px;
}

.label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.split > .label {
  padding-top: 8px;
}

.lead {
  max-width: 22em;
  margin-bottom: 28px;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.body {
  margin-bottom: 40px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.85;
  text-wrap: pretty;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
}

.stat {
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.stat b {
  display: block;
  color: var(--accent);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stat span {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 14px;
}

.services {
  display: grid;
  gap: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}

.service {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 1.9fr);
  gap: 32px;
  padding: 28px 26px;
  background: var(--card);
}

.service:hover {
  background: var(--card-hover);
}

.service h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.service .stack {
  margin-top: 8px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.service p {
  max-width: 34em;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.85;
  text-wrap: pretty;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  font-size: 14px;
}

.works {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.work {
  display: block;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: inherit;
}

.work:hover {
  border-color: var(--amber-2);
  color: inherit;
}

/* Three phone screenshots side by side on a striped ground */
.shot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 112px;
  padding: 10px;
  border-radius: 10px;
  background-color: var(--stripe);
  background-image: var(--stripes);
}

.shot img {
  width: auto;
  min-width: 0;
  height: 100%;
  object-fit: contain;
}

.work-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.work-title b {
  font-size: 16px;
  font-weight: 600;
}

.work p {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.status {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-family: var(--mono);
  font-size: 10px;
}

.contact {
  margin-top: 72px;
  padding: 56px 48px;
  border-radius: 24px;
  background: var(--block);
  color: var(--on-block);
  scroll-margin-top: 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.contact h2 {
  max-width: 16em;
  margin-bottom: 18px;
  font-size: 34px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.contact p {
  max-width: 30em;
  color: var(--on-ink-2);
  font-size: 16px;
  line-height: 1.85;
  text-wrap: pretty;
}

.contact-links {
  display: grid;
  gap: 12px;
}

.clink {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 18px 22px;
  border: 1px solid oklch(0.42 0.02 258);
  border-radius: 14px;
  color: var(--on-block);
}

.clink:hover {
  border-color: var(--amber-2);
  color: var(--on-block);
}

.clink .mono {
  color: oklch(0.72 0.02 255);
  font-size: 13px;
}

.clink--primary {
  border-color: var(--amber-2);
  background: var(--amber-2);
  color: var(--on-amber);
  font-weight: 600;
}

.clink--primary:hover {
  border-color: var(--amber-hover);
  background: var(--amber-hover);
  color: var(--on-amber);
}

.clink--primary .mono {
  color: inherit;
  font-weight: 400;
}

/* Portfolio · intro and project cards
   ========================================================================== */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  padding: 84px 0 56px;
}

.intro .label {
  display: block;
  margin-bottom: 22px;
}

.intro h1 {
  margin-bottom: 20px;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.intro h1 .logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-right: 4px;
  vertical-align: -6px;
}

.intro p {
  max-width: 30em;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.85;
  text-wrap: pretty;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 40px;
  padding-bottom: 8px;
}

.bars span {
  width: 4px;
  height: 40px;
  border-radius: 2px;
  background: oklch(0.72 0.03 252);
  transform-origin: bottom;
  animation: bar 0.9s ease-in-out infinite;
}

.bars span:nth-child(even) {
  background: var(--amber-2);
}

.bars span:nth-child(2) { animation-delay: 0.12s; }
.bars span:nth-child(3) { animation-delay: 0.24s; }
.bars span:nth-child(4) { animation-delay: 0.36s; }

.projects {
  display: grid;
  gap: 28px;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  scroll-margin-top: 24px;
}

.project:hover {
  border-color: var(--line-hover);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.meta .status {
  padding: 4px 9px;
  font-size: 11px;
}

.meta .year {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

.project h2 {
  margin-bottom: 12px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.project .desc {
  max-width: 32em;
  margin-bottom: 22px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.85;
  text-wrap: pretty;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tags span {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 12px;
}

.points {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line-soft);
  list-style: none;
}

.points li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}

.points li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber-2);
  transform: translateY(-2px);
}

.points .is-key {
  color: var(--ink);
  font-weight: 600;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 56px;
  padding: 48px;
  border-radius: 24px;
  background: var(--block);
  color: var(--on-block);
}

.cta h2 {
  margin-bottom: 10px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.cta p {
  color: var(--on-ink-2);
  font-size: 15px;
  line-height: 1.75;
}

.cta .btn {
  padding: 15px 26px;
}

/* Portfolio · screenshot gallery
   The centre shot is in focus with its neighbours peeking in; each edge fades
   only while there is more to scroll that way (.can-left / .can-right).
   ========================================================================== */

.gallery {
  --shot-h: 540px;
  --shot-w: calc(var(--shot-h) * 496 / 970);
  --fade-l: 0px;
  --fade-r: 0px;
  position: relative;
  min-width: 0;
  border-radius: 14px;
  background-color: var(--stripe);
  background-image: var(--stripes);
}

.gallery.can-left {
  --fade-l: 64px;
}

.gallery.can-right {
  --fade-r: 64px;
}

.shot-track {
  --fade: linear-gradient(to right, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px calc((100% - var(--shot-w)) / 2);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-mask-image: var(--fade);
  mask-image: var(--fade);
}

.shot-track::-webkit-scrollbar {
  display: none;
}

.shot-track:focus-visible {
  outline-offset: -2px;
}

.shot-track img {
  flex: none;
  width: var(--shot-w);
  height: var(--shot-h);
  object-fit: contain;
  scroll-snap-align: center;
  transition: opacity 0.35s, transform 0.35s;
}

.gallery.is-ready .shot-track img {
  opacity: 0.45;
  transform: scale(0.9);
  cursor: pointer;
}

.gallery.is-ready .shot-track img.is-focus {
  opacity: 1;
  transform: none;
}

/* Side arrows: dark discs with a white halo so they stand out on both the
   striped ground and the phone bezels */
.shot-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 0 0 4px var(--halo), 0 14px 30px -10px oklch(0.2 0.02 258 / 0.55);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) scale(0.8);
  transition:
    opacity 0.25s,
    visibility 0.25s,
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.shot-arrow .icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.6;
}

.shot-arrow--prev {
  left: 18px;
}

.shot-arrow--next {
  right: 18px;
}

.gallery.can-left .shot-arrow--prev,
.gallery.can-right .shot-arrow--next {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%);
}

.gallery .shot-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.shot-arrow:focus-visible {
  outline-offset: 5px;
}

@media (hover: hover) {
  .gallery .shot-arrow:hover {
    background: var(--amber-2);
    color: var(--on-amber);
    box-shadow: 0 0 0 4px var(--halo), 0 16px 34px -10px oklch(0.55 0.14 68 / 0.6);
    transform: translateY(-50%) scale(1.08);
  }
}

/* "크게 보기" opens the full-screen viewer; shown on phones only */
.shot-zoom {
  display: none;
}

/* Caption of the focused shot; main.js crossfades it with .is-changing */
.shot-caption {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 104px;
  margin: 0 0 22px;
  padding: 14px 16px;
  border-left: 3px solid var(--amber-2);
  border-radius: 0 12px 12px 0;
  background: var(--caption-bg);
}

.shot-caption > * {
  transition: opacity 0.22s, transform 0.22s;
}

.shot-caption.is-changing > * {
  opacity: 0;
  transform: translateY(4px);
}

.shot-caption small {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

.shot-caption b {
  font-size: 15px;
  font-weight: 600;
}

.shot-caption mark {
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber-2);
  color: var(--on-amber);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 2px;
}

.shot-caption span {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}

/* Portfolio · full-screen viewer (a <dialog> built by main.js)
   ========================================================================== */

.viewer {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: oklch(0.17 0.015 258 / 0.97);
  color: var(--on-block);
}

.viewer::backdrop {
  background: oklch(0.17 0.015 258 / 0.6);
}

.viewer-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.viewer-track::-webkit-scrollbar {
  display: none;
}

.viewer-track img {
  flex: none;
  width: 100%;
  max-width: none;
  height: 100%;
  padding: 58px 6px 74px;
  object-fit: contain;
  scroll-snap-align: center;
}

.viewer-meta {
  position: absolute;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  pointer-events: none;
}

.viewer-meta small {
  color: var(--on-ink-2);
  font-family: var(--mono);
  font-size: 12px;
}

.viewer-meta b {
  font-size: 15px;
  font-weight: 600;
}

.viewer-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.16);
  color: var(--on-block);
  cursor: pointer;
}

.viewer-close:focus-visible,
.shot-zoom:focus-visible {
  outline-color: var(--amber-2);
}

html.viewer-open {
  overflow: hidden;
}

/* Motion
   ========================================================================== */

@keyframes purr {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(0.7px, -0.6px); }
  40% { transform: translate(-0.6px, 0.5px); }
  60% { transform: translate(0.5px, 0.6px); }
  80% { transform: translate(-0.5px, -0.4px); }
}

@keyframes note {
  0% { opacity: 0; transform: translate(0, 2px) rotate(-14deg); }
  18% { opacity: 1; }
  40% { transform: translate(5px, -9px) rotate(12deg); }
  70% { opacity: 0.85; transform: translate(1px, -19px) rotate(-10deg); }
  100% { opacity: 0; transform: translate(7px, -30px) rotate(10deg); }
}

@keyframes bar {
  0%, 100% { transform: scaleY(0.35); }
  50% { transform: scaleY(1); }
}

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Scroll reveal only hides content once main.js has marked the page with .js */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }

  .note {
    opacity: 0.9;
  }
}

/* Responsive
   ========================================================================== */

@media (max-width: 768px) {
  /* finer stripes behind screenshots on small screens */
  :root {
    --stripe-gap: 6px;
  }

  .wrap {
    padding: 0 16px 80px;
  }

  .nav a:not(.btn) {
    padding-block: 10px;
  }

  .hero,
  .split,
  .service,
  .contact-grid,
  .intro,
  .project {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    gap: 40px;
    padding: 56px 0 64px;
  }

  .section {
    padding: 56px 0;
  }

  .split {
    gap: 20px;
  }

  .service {
    gap: 10px;
    padding: 24px 20px;
  }

  .service .stack {
    white-space: normal;
  }

  .shot {
    height: 220px;
  }

  .contact {
    padding: 36px 22px;
  }

  .contact h2 {
    font-size: 26px;
  }

  .intro {
    padding: 56px 0 40px;
  }

  .intro h1 {
    font-size: 34px;
  }

  .intro h1 .logo {
    display: inline;
    margin-right: 0;
    vertical-align: baseline;
  }

  .intro h1 .cats,
  .bars {
    display: none;
  }

  .cta {
    padding: 32px 22px;
  }

  .cta h2 {
    font-size: 23px;
  }

  /* Project cards stack into three blocks: header (meta, title) /
     screens (gallery joined to its caption) / details (intro, tags, features) */
  .projects {
    gap: 40px;
  }

  .project {
    gap: 0;
    padding: 20px;
    box-shadow: 0 18px 40px -28px oklch(0.3 0.02 258 / 0.4);
  }

  .project > div:last-child {
    display: contents;
  }

  .project .meta {
    order: -4;
  }

  .project h2 {
    order: -3;
    margin-bottom: 16px;
    font-size: 23px;
  }

  .project .gallery {
    order: -2;
    border-radius: 14px 14px 0 0;
  }

  .project .shot-caption {
    order: -1;
    margin: 0;
    border-top: 3px solid var(--amber-2);
    border-left: 0;
    border-radius: 0 0 14px 14px;
    background: var(--caption-bg-solid);
  }

  .project .desc {
    margin: 28px 0 18px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
  }

  .project .desc::before,
  .project .points::before {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  .project .desc::before {
    content: "프로젝트 소개";
  }

  .project .points {
    margin-top: 6px;
    padding-top: 22px;
  }

  .project .points::before {
    content: "주요 기능";
    margin-bottom: 2px;
  }

  .gallery {
    --shot-h: 400px;
  }

  .gallery.can-left {
    --fade-l: 36px;
  }

  .gallery.can-right {
    --fade-r: 36px;
  }

  .shot-track {
    gap: 10px;
    padding-block: 16px;
  }

  .shot-arrow {
    width: 44px;
    height: 44px;
    box-shadow: 0 0 0 3px var(--halo), 0 10px 24px -10px oklch(0.2 0.02 258 / 0.55);
  }

  .shot-arrow .icon {
    width: 19px;
    height: 19px;
  }

  .shot-arrow--prev {
    left: 10px;
  }

  .shot-arrow--next {
    right: 10px;
  }

  .shot-zoom {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 0 0 3px var(--halo);
    cursor: pointer;
  }

  .shot-zoom .icon {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 520px) {
  .nav {
    gap: 16px;
  }

  .nav-sub {
    display: none;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
  }

  .stat b {
    flex: none;
    font-size: 22px;
  }

  .stat span {
    margin-top: 0;
    text-align: right;
  }
}

@media (max-width: 400px) {
  .site-header {
    gap: 12px;
  }

  .brand .cats {
    font-size: 8px;
  }

  .nav {
    gap: 12px;
  }

  .nav .btn {
    padding: 8px 12px;
  }

  .art {
    zoom: 0.84;
  }
}
