/* jiyeonhan.com — portfolio */
:root {
  --bg: #ffffff;
  --ink: #191919;
  --ink-soft: #4a4a4a;
  --line: #e3e3e3;
  --mark: #ffb7e9;
  --yardie: #ffb7e9;
  --yardie-soft: #fff0fa;
  --payrun: #e3eddd;
  --wide: 1040px;
  --prose: 800px;
  --bleed: min(1280px, 94vw);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

::selection { background: var(--mark); }

mark {
  background-color: transparent;
  padding: 0 0.05em 0.22em;
  color: inherit;
  position: relative;
  text-decoration: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0 6 Q 12.5 2.6, 25 6 T 50 6 T 75 6 T 100 6' fill='none' stroke='%23c9c9c9' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 0 100%;
  background-size: 5.5em 0;
  transition: background-size 0.28s ease;
}
mark:hover {
  background-size: 5.5em 0.34em;
}
mark::before,
mark::after {
  content: "\2726"; /* ✦ */
  position: absolute;
  font-size: 0.45em;
  line-height: 1;
  color: #c9c9c9;
  opacity: 0;
  transform: scale(0.3) rotate(0deg);
  transition: opacity 0.22s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
mark::before { top: -0.6em; left: -0.45em; }
mark::after { bottom: -0.25em; right: -0.5em; }
mark:hover::before {
  opacity: 1;
  transform: scale(1) rotate(18deg);
  animation: sparkle-twinkle 1.1s ease-in-out 0.35s infinite;
}
mark:hover::after {
  opacity: 1;
  transform: scale(1) rotate(-14deg);
  transition-delay: 0.08s;
  animation: sparkle-twinkle 1.1s ease-in-out 0.7s infinite;
}
@keyframes sparkle-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  mark:hover::before, mark:hover::after { animation: none; }
}
/* hero marks: black living wave, no sparkles */
.hero h1 mark {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0 6 Q 6.25 1.8, 12.5 6 T 25 6 T 37.5 6 T 50 6 T 62.5 6 T 75 6 T 87.5 6 T 100 6' fill='none' stroke='%23191919' stroke-width='0.7' stroke-linecap='round'/%3E%3C/svg%3E");
}
.hero h1 mark:hover {
  animation: wave-drift 5s linear infinite;
}
.hero h1 mark::before,
.hero h1 mark::after {
  content: none;
}
@keyframes wave-drift {
  from { background-position: 0 100%; }
  to { background-position: -5.5em 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero h1 mark:hover { animation: none; }
}

/* ---------- header ---------- */
header {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

nav.site { margin-left: auto; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.status-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
}

nav.site { display: flex; gap: 1.6rem; }
nav.site a {
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  line-height: 1.5rem;
  display: inline-grid;
  justify-items: center;
  align-items: baseline;
}
nav.site a .nv,
nav.site a .nvi {
  grid-area: 1 / 1;
  line-height: 1.5rem;
}
nav.site a .nvi {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: 0.035em;
  opacity: 0;
}
nav.site a:hover .nv { opacity: 0; }
nav.site a:hover .nvi { opacity: 1; }
nav.site a[aria-current="page"] { border-bottom-color: var(--ink); }

/* ---------- shared layout ---------- */
main { display: block; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: var(--prose); margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3 { line-height: 1.15; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin-bottom: 1.2rem; }
h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 0.5rem; }

p { text-wrap: pretty; }
p + p { margin-top: 1em; }

.muted { color: var(--ink-soft); }

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .rise-2 { animation: rise 0.7s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- home ---------- */
.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) 1.5rem 1.2rem;
  min-height: calc(100svh - 105px);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.hero h1 {
  font-size: clamp(1.95rem, 4.2vw, 2.9rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.hero-hi {
  font-size: clamp(1.95rem, 4.2vw, 2.9rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #9b9b9b;
  margin-bottom: 0.2rem;
}
.hero-hi .nowrap { white-space: nowrap; }
.hero-hi img {
  display: inline-block;
  height: 1em;
  width: auto;
  vertical-align: -0.12em;
  margin: 0 0.6rem;
}

.serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
}
.factlists {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  margin-top: clamp(2.2rem, 5vh, 3.2rem);
}
.factlists .pair { display: grid; grid-template-columns: 84px 1fr; gap: 0.9rem; align-items: start; }
.factlists .pair .serif { font-size: 0.92rem; }
.factlists ul { list-style: none; padding: 0; }
.factlists li { font-weight: 500; font-size: 0.9rem; padding: 0.16rem 0; }
.factlists li span { color: var(--ink-soft); font-weight: 400; }
@media (max-width: 760px) { .factlists { grid-template-columns: 1fr; } }

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin: auto auto 0.6rem;
  padding-top: 2rem;
  width: fit-content;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
}
.scroll-cue svg { color: var(--ink-soft); animation: cue-bob 1.7s ease-in-out infinite; }
.scroll-cue:hover svg { color: var(--ink); }
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue svg { animation: none; }
}

.projects { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem 5rem; }

.project-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(3.8rem, 9vh, 6.5rem) 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.project-row:first-child { border-top: none; }
.project-info h2 { font-size: clamp(2.4rem, 4.8vw, 3.4rem); font-weight: 800; letter-spacing: -0.025em; }
.project-row:hover h2 { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; }
.project-row:nth-child(even) .project-media { order: -1; }

.project-info .tag {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
  color: var(--ink-soft);
}
.project-info p { margin-top: 0.7rem; color: var(--ink-soft); max-width: 44ch; font-size: 1.3rem; }
.project-info .go { display: inline-block; margin-top: 1.2rem; font-weight: 700; font-size: 1.15rem; }

.project-media img {
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 12px 32px rgba(0,0,0,0.07);
}
.project-media.on-tint {
  border-radius: 0;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(240px, 32vw, 340px);
}
.project-media.on-tint img {
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.tint-yardie, .tint-payrun, .tint-plain { background: #f4f4f4; }

.belief {
  border-top: 1px solid var(--line);
  max-width: var(--wide);
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
  font-size: clamp(1.4rem, 2.7vw, 1.8rem);
  font-weight: 500;
  line-height: 1.5;
}

blockquote { font-style: italic; }

/* tidy figures: constrained to text width, centered captions */
.figure-wide.tidy { max-width: var(--prose); }
.figure-wide.tidy figure { margin-inline: auto; }
.figure-wide.tidy figcaption { text-align: center; }

/* ---------- case pages ---------- */
.case-hero { max-width: var(--prose); margin: 0 auto; padding: clamp(3.5rem, 9vh, 6rem) 1.5rem 2.2rem; }
.case-hero .kicker { font-weight: 500; color: var(--ink-soft); margin-bottom: 0.9rem; }
.case-hero p.lede { margin-top: 1.4rem; font-size: 1.24rem; }

.glance {
  max-width: var(--prose);
  margin: 2.2rem auto 0;
  padding: 1.6rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.4rem 2rem;
  border-block: 1px solid var(--line);
}
.glance div dt { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.25rem; }
.glance div dd { font-size: 0.95rem; color: var(--ink-soft); }

section.case {
  max-width: var(--prose);
  margin: 0 auto;
  padding: clamp(4.5rem, 11vh, 7rem) 1.5rem 0;
  font-size: 1.22rem;
}
section.case h2 { margin-bottom: 1.6rem; }
section.case p, section.case ul { max-width: 70ch; }
.case-hero .lede { max-width: 70ch; }
section.case:last-of-type { padding-bottom: clamp(3rem, 8vh, 5rem); }
section.case ul { padding-left: 1.2rem; margin-top: 0.8em; }
section.case li + li { margin-top: 0.55em; }

.figure-wide { max-width: var(--prose); margin: 2.2rem auto 0; padding: 0 1.5rem; }
.figure-wide figcaption, figure figcaption {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-top: 0.8rem;
  text-align: center;
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}
.shots figure img {
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}
/* phone screenshots: span wider than the text column */
.shots.phones {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-inline: auto;
}
.shots.phones figure { text-align: center; }
/* 2x2 phone grid for step sequences */
.shots.phones.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; }
.shots.phones figure img {
  max-width: 230px;
  margin-inline: auto;
}
.shots.phones figure video {
  display: block;
  width: 100%;
  max-width: 230px;
  margin-inline: auto;
  /* radius matches the recorded screen's corner arc (96px @ 600px width), scale-proof */
  border-radius: 16.6% / 7.7%;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.frame { border: 1px solid var(--line); border-radius: 0; box-shadow: 0 12px 32px rgba(0,0,0,0.07); }

.decision { margin-top: 2.6rem; }
.decision h3 { margin-bottom: 0.7rem; }
.decision h3 span {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  width: 1.7em; height: 1.7em;
  line-height: 1.7em;
  text-align: center;
  margin-right: 0.5em;
}

.impact {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}
.impact article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
}
.impact article strong { display: block; font-size: 1.35rem; letter-spacing: -0.02em; }
.impact article span { color: var(--ink-soft); font-size: 0.92rem; }

.note {
  background: #f7f7f7;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-top: 1.4rem;
}

.case-nav {
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 8vh, 5rem);
}
.case-nav .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem;
}
.case-nav a { text-decoration: none; font-weight: 700; }
.case-nav a small { display: block; font-weight: 500; color: var(--ink-soft); }
.case-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- contact / footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
}
footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem;
  padding-block: 2rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
footer.site a { color: var(--ink); font-weight: 500; }

.contact-hero {
  max-width: var(--prose);
  margin: 0 auto;
  padding: clamp(4rem, 12vh, 8rem) 1.5rem;
}
.contact-hero a.big {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .project-row { grid-template-columns: 1fr; }
  .project-row:nth-child(even) .project-media { order: 0; }
  nav.site { gap: 1.1rem; }
  .hero h1, .hero-hi { font-size: 2.4rem; }
}


/* ---------- design system display ---------- */
.ds {
  margin-top: 2.4rem;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.4rem 2.2rem 2.2rem;
}
.ds .ds-font {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.2rem 0 0.4rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.ds .specimen {
  font-size: clamp(3rem, 8vw, 5.2rem);
  line-height: 1.1;
  text-align: center;
  padding: 1.5rem 0 2.5rem;
}
.specimen.knewave { font-family: "Knewave", cursive; color: #313131; }
.specimen.inter { font-family: "Inter", sans-serif; font-weight: 700; letter-spacing: -0.03em; color: #313131; }
.ds .scale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 1.4rem 0 2.4rem;
  border-top: 1px solid var(--line);
}
.ds .scale .spec-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}
.ds .scale .s1 { font-family: "Knewave", cursive; font-size: 2rem; color: #313131; }
.ds .scale .s2 { font-family: "Inter", sans-serif; font-weight: 600; font-size: 1.4rem; color: #313131; }
.ds .scale .s3 { font-family: "Inter", sans-serif; font-size: 1rem; color: #313131; }
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1.6rem 0 0;
  border-top: 1px solid var(--line);
}
.swatches .chip {
  height: 190px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}
.swatches .chip strong { font-size: 0.92rem; font-weight: 600; }
.swatches .chip span { font-size: 0.85rem; opacity: 0.75; }

/* ---------- live loading dots on the eSIM hero ---------- */
.live-hero { position: relative; }
.live-hero .s-loader {
  position: absolute;
  left: 49.6%; top: 50.8%;
  width: 6.5%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fbfbfb 70%, rgba(251,251,251,0) 100%);
}
.live-hero .s-dots {
  position: absolute; inset: 0;
  animation: s-spin 1.6s linear infinite;
}
.live-hero .s-orbit { position: absolute; inset: 0; }
/* each dot slides along its own spoke toward the middle; size never changes */
.live-hero .s-orbit i {
  position: absolute;
  width: 11%; aspect-ratio: 1;
  border-radius: 50%;
  background: #2277f0;
  animation: s-gather 1.6s ease-in-out infinite;
}
.live-hero .s-orbit i:nth-child(1) { left: 44.5%; top: 23.3%; --tx: 0%;    --ty: 105%; }
.live-hero .s-orbit i:nth-child(2) { left: 65.7%; top: 44.5%; --tx: -105%; --ty: 0%; background: #23c46f; }
.live-hero .s-orbit i:nth-child(3) { left: 44.5%; top: 65.7%; --tx: 0%;    --ty: -105%; }
.live-hero .s-orbit i:nth-child(4) { left: 23.3%; top: 44.5%; --tx: 105%;  --ty: 0%; }
@keyframes s-spin { to { transform: rotate(360deg); } }
@keyframes s-gather {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(var(--tx), var(--ty)); }
}
@media (prefers-reduced-motion: reduce) {
  .live-hero .s-dots, .live-hero .s-orbit i { animation: none; }
}
