/* romangcla.com — shared styles */

:root {
  --paper: #e6eae7;      /* pale water */
  --milk: #f4f3ee;       /* marbling bath */
  --ink: #1c1e27;
  --ink-soft: #4b4f5c;
  --rule: #c4cac6;
  --ultramarine: #26358a;
  --teal: #1d7079;
  --rose: #b8345a;
  --ochre: #d29b3a;

  --serif: "Bodoni Moda", "Times New Roman", serif;
  --sans: "IBM Plex Sans KR", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ultramarine); }

:focus-visible { outline: 2px solid var(--ultramarine); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- header ---------- */

.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--gutter);
}

.wordmark {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.site-nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); font-size: 0.95rem; }
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- home: marbling ---------- */

.bath {
  position: relative;
  height: min(60vh, 600px);
  min-height: 340px;
  background: var(--milk);
  touch-action: none;
  cursor: crosshair;
}
.bath canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.name {
  margin: 0;
  padding: 0 var(--gutter);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.25rem, 11.5vw, 10.5rem);
  font-variation-settings: "opsz" 30;
  line-height: 0.82;
  letter-spacing: -0.02em;
  padding-top: 0.12em;
  margin-bottom: 0.35em;
}

.bath-note {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--gutter);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.bath-note button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* ---------- home: about ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(3rem, 8vw, 6.5rem) var(--gutter) 0;
  align-items: start;
}

.about figure { margin: 0; }
.about figure img { width: 100%; }

.lead {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.3;
  margin: 0 0 1.5rem;
  max-width: 30ch;
}
.about p { max-width: var(--measure); }

.now {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  max-width: var(--measure);
}
.now h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}
.now p { margin: 0 0 0.5rem; }
.now a { font-size: 0.95rem; }

/* ---------- home: follow + index ---------- */

.follow {
  padding: clamp(4rem, 10vw, 8rem) var(--gutter) 0;
}
.follow h2, .index h2 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 1rem;
  color: var(--ink-soft);
}
.follow ul { list-style: none; margin: 0; padding: 0; }
.follow li { border-top: 1px solid var(--rule); }
.follow li:last-child { border-bottom: 1px solid var(--rule); }
.follow a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0 1.1rem;
  text-decoration: none;
}
.follow .channel {
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 4.25rem);
  line-height: 1.05;
}
.follow .handle { color: var(--ink-soft); }
.follow a:hover .channel { color: var(--ultramarine); }
.follow a:hover .handle { color: var(--ultramarine); }

.index {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(4rem, 10vw, 7rem) var(--gutter) 0;
}
.index a { text-decoration: none; display: block; }
.index img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.index h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  margin: 1rem 0 0.25rem;
}
.index p { margin: 0; color: var(--ink-soft); max-width: 34ch; }
.index a:hover h3 { color: var(--ultramarine); }

/* channel icons: sized to the text they sit beside */
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.follow .channel { display: inline-flex; align-items: center; gap: 0.3em; }
.follow .channel .icon { width: 0.62em; height: 0.62em; }

/* ---------- home: contact ---------- */

.contact {
  padding: clamp(5rem, 12vw, 9rem) var(--gutter) 0;
}
.contact h2 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 1rem;
  color: var(--ink-soft);
}
.contact p { margin: 0 0 0.5rem; max-width: var(--measure); }
.contact .mail {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 6.2vw, 5rem);
  line-height: 1.1;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact .mail:hover { color: var(--ultramarine); }

/* ---------- inner pages ---------- */

.page-title {
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--gutter) clamp(2rem, 5vw, 4rem);
  max-width: 60rem;
}
.page-title h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 7rem);
  font-variation-settings: "opsz" 30;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}
.page-title p { margin: 0; max-width: var(--measure); color: var(--ink-soft); }

/* ---------- artworks ---------- */

.works { list-style: none; margin: 0; padding: 0 var(--gutter); }

.work {
  display: grid;
  grid-template-columns: minmax(5rem, 1.3fr) minmax(0, 5fr) minmax(0, 4fr);
  gap: clamp(1.25rem, 3.5vw, 3rem);
  padding: clamp(2rem, 5vw, 3.5rem) 0;
  border-top: 1px solid var(--rule);
}

.work .year {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1;
  font-variant-numeric: lining-nums;
}

.work figure { margin: 0; }
.work figure img { width: 100%; }

.work h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  margin: 0 0 0.35rem;
}
.work .where { margin: 0 0 1.1rem; color: var(--ink-soft); font-size: 0.95rem; }
.work .text p { margin: 0 0 0.9rem; max-width: var(--measure); }

.work--text { grid-template-columns: minmax(5rem, 1.3fr) minmax(0, 9fr); }
.work--text .text { max-width: 44rem; }
.status {
  display: inline-block;
  font-size: 0.85rem;
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--teal);
  color: var(--teal);
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

/* ---------- projects: the wall ---------- */

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
  gap: clamp(3rem, 7vw, 6rem) clamp(2rem, 5vw, 4.5rem);
  padding: clamp(1rem, 3vw, 2rem) var(--gutter) 0;
  align-items: start;
}

.piece { margin: 0; }

/* a thin frame and a white mat, like a print hung on a wall */
.frame {
  display: block;
  background: var(--milk);
  padding: clamp(14px, 2.4vw, 28px);
  border: 6px solid var(--ink);
  box-shadow: 0 18px 30px -22px rgba(28, 30, 39, 0.55);
}
.frame img { aspect-ratio: 16 / 10.75; object-fit: cover; object-position: top; width: 100%; }
a.frame:hover { border-color: var(--ultramarine); }

.label {
  margin-top: 1.5rem;
  max-width: 28rem;
  font-size: 0.95rem;
}
.label h2 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.15;
  margin: 0;
}
.label .medium { margin: 0.15rem 0 0.75rem; color: var(--ink-soft); }
.label p { margin: 0 0 0.9rem; }
.open {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
}
.open:hover { background: var(--ink); color: var(--milk); }
.label .url { margin-left: 0.75rem; color: var(--ink-soft); font-size: 0.85rem; }

/* ---------- footer ---------- */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(5rem, 12vw, 9rem);
  padding: 1.5rem var(--gutter) 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.site-foot p { margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-foot .social { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-foot .social a { display: block; padding: 0.15rem; }
.site-foot .social .icon { width: 1.25rem; height: 1.25rem; }

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .site-nav { gap: 1rem; }
  .about { grid-template-columns: 1fr; }
  .about figure { max-width: 26rem; }
  .index { grid-template-columns: 1fr; }
  .work, .work--text { grid-template-columns: 1fr; gap: 1rem; }
  .bath-note { flex-direction: column; gap: 0.25rem; }
  .label .url { display: block; margin: 0.5rem 0 0; }
}
