/* ------------------------------------------------------------
   Ege Ringo — portfolio
   Typeface: Inter Tight (self-hosted, see /fonts)
   Colors and spacing are set as variables here, so they are
   easy to change in one place.
------------------------------------------------------------ */

@font-face { font-family: "Inter Tight"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("../fonts/inter-tight-latin-300.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-weight: 300; font-style: normal; font-display: swap;
  src: url("../fonts/inter-tight-latin-ext-300.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/inter-tight-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/inter-tight-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/inter-tight-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/inter-tight-latin-ext-700.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #1b1b1b;
  --mute: #6d6d6d;
  --line: #dedede;
  --accent: var(--ink);
  --pad: clamp(20px, 4vw, 56px);
  --max: 1480px;
  --head: 60px;
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
b, strong { font-weight: 700; }
h1, h2, h3, p, dl, dd, figure, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--pad); top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; text-decoration: none; }
.skip:focus { top: 10px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--head);
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { font-weight: 700; font-size: 20px; letter-spacing: -.03em; text-decoration: none; }
.nav { display: flex; gap: clamp(18px, 3vw, 40px); font-size: 15px; }
.nav a { text-decoration: none; position: relative; padding-block: 4px; color: var(--mute); transition: color .2s; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); }
.nav a[aria-current="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--ink);
}

/* ---------- hero ---------- */
.hero { padding-top: calc(var(--head) + clamp(28px, 6vw, 80px)); }
.hero-top { position: relative; padding-bottom: clamp(24px, 3.5vw, 48px); }
.name {
  font-weight: 700; text-transform: lowercase; white-space: nowrap;
  /* sized so the name spans the full content width */
  font-size: calc((min(100vw, var(--max)) - 2 * var(--pad)) / 3.86);
  line-height: .86; letter-spacing: -.055em;
  margin-left: -.045em; padding-bottom: .27em;
}
.hero-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 32px; margin-top: 0; padding-top: 14px; border-top: 1px solid var(--ink); font-size: 15px; }
.hero-note b { font-weight: 700; letter-spacing: -.01em; }
.hero-note span { color: var(--mute); }

/* the little squares echo the cover of the printed portfolio */
.dot { position: absolute; width: clamp(9px, 1.1vw, 16px); aspect-ratio: 1; background: var(--ink); pointer-events: none; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.dot:nth-of-type(1) { top: calc(-1 * clamp(20px, 3.4vw, 48px)); left: 44%; }
.dot:nth-of-type(2) { top: calc(-1 * clamp(8px, 1.6vw, 22px)); left: 73%; }
.dot:nth-of-type(3) { top: calc(-1 * clamp(14px, 2.4vw, 34px)); left: 14%; }

.stage { position: relative; }
.stage-frame { position: relative; aspect-ratio: 2306 / 1066; overflow: hidden; background: #f3f3f3; }
.stage-frame a { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity 1.2s ease; }
.stage-frame a.is-on { opacity: 1; z-index: 1; }
.stage-frame img { width: 100%; height: 100%; object-fit: cover; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; font-size: 14px; }
.stage-cap { color: var(--mute); }
.stage-cap b { color: var(--ink); font-weight: 400; }
.stage-dots { display: flex; gap: 8px; }
.stage-dots button { width: 34px; height: 20px; position: relative; }
.stage-dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--line); transition: background .3s; }
.stage-dots button[aria-current="true"]::before { background: var(--ink); }

/* ---------- sections ---------- */
.section { padding-block: clamp(72px, 11vw, 160px) 0; scroll-margin-top: calc(var(--head) - 10px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.section-head h2 { font-size: 15px; font-weight: 700; letter-spacing: 0; }
.section-head span { font-size: 15px; color: var(--mute); }

/* ---------- index of works ---------- */
.index a {
  display: grid; align-items: baseline;
  grid-template-columns: 4.5rem 1fr;
  gap: 4px 16px;
  padding-block: clamp(16px, 2.2vw, 28px);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left .35s cubic-bezier(.2, .7, .2, 1);
}
.index .yr { color: var(--mute); font-size: 15px; }
.index .ttl { font-weight: 700; font-size: clamp(28px, 4.6vw, 64px); line-height: 1; letter-spacing: -.04em; transition: color .25s; }
.index .sub { grid-column: 2; color: var(--mute); font-size: 15px; }
.index .go { display: none; }
@media (min-width: 900px) {
  .index a { grid-template-columns: 6rem 1fr 22rem 8rem; }
  .index .sub { grid-column: auto; }
  .index .go { display: block; text-align: right; font-size: 15px; color: var(--mute); }
}
@media (hover: hover) {
  .index a:hover { padding-left: 14px; }
  .index a:hover .ttl { color: var(--c); }
}
.index a:focus-visible .ttl { color: var(--c); }

.peek { position: fixed; left: 0; top: 0; z-index: 40; width: min(340px, 26vw); pointer-events: none; opacity: 0; transform: translate3d(0, 0, 0) scale(.96); transition: opacity .2s, scale .2s; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .14); }
.peek.is-on { opacity: 1; }
.peek img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (hover: none), (max-width: 899px) { .peek { display: none; } }

/* ---------- projects ---------- */
.project { padding-top: clamp(88px, 12vw, 180px); scroll-margin-top: calc(var(--head) - 10px); }
.p-head { display: grid; gap: 36px; }
@media (min-width: 960px) {
  .p-head { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
  .p-visual { position: sticky; top: calc(var(--head) + 28px); }
}
.p-num {
  display: block; font-weight: 700; line-height: .9;
  font-size: clamp(64px, 8vw, 112px); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent);
  margin-bottom: 20px;
}
.p-title { font-weight: 700; font-size: clamp(34px, 4.4vw, 60px); line-height: 1; letter-spacing: -.045em; }
.p-sub { margin-top: 8px; font-size: 19px; color: var(--mute); }
.p-meta { display: flex; justify-content: flex-end; gap: 28px; margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--ink); font-size: 14px; color: var(--mute); }
.p-meta div { display: flex; gap: 6px; }
.p-meta dt::after { content: ":"; }
.p-meta dd { color: var(--ink); }
.p-text { margin-top: 30px; max-width: 34em; }
.p-text p + p { margin-top: 1em; }
.p-text em { font-style: italic; }
.p-text b { color: var(--accent); }
.p-links { margin-top: 24px; font-size: 15px; }
.p-links a, .stage-3d a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.stage-3d { color: var(--ink); }

.figs { margin-top: clamp(44px, 6vw, 88px); display: grid; gap: clamp(36px, 5vw, 72px); }
.pair { display: flex; gap: clamp(16px, 3vw, 44px); align-items: flex-start; }
.pair > figure { flex: var(--ar, 1) 1 0; min-width: 0; }
.stack { display: grid; gap: clamp(20px, 3vw, 36px); }
.pair > .stack { flex: var(--ar, 1) 1 0; min-width: 0; }
@media (max-width: 720px) {
  .pair { flex-direction: column; align-items: stretch; }
  .pair > figure, .pair > .stack { flex: none; width: 100%; }
}

figure { position: relative; }
.zoom { display: block; width: 100%; cursor: zoom-in; position: relative; }
.zoom img { width: 100%; height: auto; transition: opacity .3s; }
@media (hover: hover) { .zoom:hover img { opacity: .9; } }
.zoom::after {
  content: "+"; position: absolute; right: 10px; bottom: 10px;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-size: 18px; line-height: 1; font-weight: 400;
  opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s;
}
@media (hover: hover) { .zoom:hover::after, .zoom:focus-visible::after { opacity: 1; transform: none; } }
figcaption { margin-top: 10px; font-size: 13.5px; color: var(--mute); display: flex; gap: 8px; align-items: baseline; }
figcaption::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--accent); transform: translateY(-1px); }

/* ---------- about ---------- */
.about { display: grid; gap: clamp(40px, 6vw, 96px); padding-top: clamp(32px, 5vw, 64px); }
@media (min-width: 960px) { .about { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.id-card { display: grid; grid-template-columns: auto 1fr; align-items: end; max-width: 520px; }
.id-card img { width: clamp(120px, 15vw, 168px); grid-row: 1; grid-column: 1; }
.id-card .rule { grid-column: 1 / -1; grid-row: 2; height: 0; border-top: 1px solid var(--ink); margin-top: -1px; }
.id-card .who { grid-column: 2; grid-row: 1; align-self: end; padding-left: 20px; transform: translateY(14px); font-weight: 700; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.05em; line-height: 1; white-space: nowrap; background: var(--bg); position: relative; z-index: 1; width: max-content; margin-left: auto; }
.id-card .role { grid-column: 1 / -1; margin-top: 14px; font-weight: 700; font-size: 17px; line-height: 1.3; letter-spacing: -.01em; }
.bio { margin-top: 32px; max-width: 30em; font-size: 19px; line-height: 1.5; }
.bio p + p { margin-top: 1em; }
.bio p:first-child { font-size: clamp(21px, 2.1vw, 26px); line-height: 1.35; letter-spacing: -.015em; }

.cv > div { display: grid; grid-template-columns: 1fr; gap: 6px 24px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.cv > div:first-child { padding-top: 0; }
@media (min-width: 640px) { .cv > div { grid-template-columns: 10rem 1fr; } }
.cv dt { font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.cv dd { font-size: 15.5px; }
.cv ul li { display: grid; grid-template-columns: 6.2rem 1fr; gap: 12px; padding-block: 2px; }
.cv ul .y { color: var(--mute); font-variant-numeric: tabular-nums; }
.cv .sk { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 20px; }
.cv .sk li { display: block; }
.cv .lang { display: flex; flex-wrap: wrap; gap: 4px 36px; }
.cv .lang em { color: var(--mute); font-style: normal; }
.cv a { text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- contact ---------- */
.contact { padding-block: clamp(32px, 5vw, 64px) clamp(72px, 10vw, 140px); display: grid; gap: 28px; }
.contact .big { font-weight: 700; font-size: clamp(36px, 8.2vw, 128px); line-height: .95; letter-spacing: -.055em; text-decoration: none; overflow-wrap: anywhere; display: inline-block; transition: color .25s; }
@media (hover: hover) { .contact .big:hover { color: var(--mute); } }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; font-size: 16px; }
.btn { border: 1px solid var(--ink); padding: 9px 18px; font-size: 14px; transition: background .2s, color .2s; }
.btn:hover { background: var(--ink); color: var(--bg); }
.contact-row a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.thanks { color: var(--mute); }

.site-footer { border-top: 1px solid var(--line); padding-block: 22px; font-size: 13.5px; color: var(--mute); }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- lightbox ---------- */
dialog.lb { padding: 0; border: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; background: #fff; color: var(--ink); overflow: hidden; }
dialog.lb::backdrop { background: #fff; }
.lb-bar { position: absolute; inset: 0 0 auto 0; z-index: 3; height: var(--head); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-inline: var(--pad); background: rgba(255, 255, 255, .9); font-size: 14px; }
.lb-cap b { font-weight: 700; margin-right: 10px; }
.lb-cap span { color: var(--mute); }
.lb-tools { display: flex; align-items: center; gap: 20px; }
.lb-count { color: var(--mute); font-variant-numeric: tabular-nums; }
.lb-btn { padding: 8px 4px; }
.lb-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
.lb-stage { position: absolute; inset: var(--head) 0 0 0; overflow: auto; display: grid; place-items: center; padding: 8px var(--pad) 28px; overscroll-behavior: contain; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.lb-stage.is-zoomed { display: block; place-items: unset; cursor: grab; }
.lb-stage.is-zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.lb-stage.is-dragging { cursor: grabbing; }
.lb-nav { position: absolute; top: 50%; z-index: 2; width: 52px; height: 52px; display: grid; place-items: center; font-size: 26px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); transform: translateY(-50%); transition: background .2s, color .2s; }
.lb-nav:hover { background: var(--ink); color: #fff; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb.is-zoomed .lb-hint { display: none; }
.lb-hint { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 12.5px; color: var(--mute); pointer-events: none; }
@media (max-width: 720px) { .lb-nav { top: auto; bottom: 22px; transform: none; } .lb-hint { display: none; } }
body.lb-open { overflow: hidden; }

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