@import url('/fonts/fonts.css');

/* ============================================================
   ilyyya.com — static rebuild
   Tokens resolved from the live Framer build:
   - UI / body font: Switzer (500 medium, 400 regular)
   - captions / labels: Fragment Mono
   - light pages: #fff bg / #000 text; Info page: inverted (#000 / #fff)
   ============================================================ */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --muted: rgba(0, 0, 0, 0.4);
  --line: rgba(0, 0, 0, 0.2);
  --accent: #0099ff;
  --maxw: 1200px;
  --gutter: 15px;
  --ui: 'Switzer', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Fragment Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

html.dark {
  --bg: #000000;
  --fg: #ffffff;
  --muted: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* animated underline element */
.ul {
  position: absolute; left: 0; bottom: 0;
  height: 1px; width: 100%;
  background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- layout frame ---------- */
.frame {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 200px var(--gutter) 0;
}
.frame--center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 100;
  background: var(--bg);
}
.nav__in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 15px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.nav__brand { letter-spacing: -0.02em; position: relative; z-index: 101; }

/* burger toggle (morphs to ✕ when open) */
.nav__toggle {
  position: relative; z-index: 101;
  width: 26px; height: 14px;
  background: none; border: none; padding: 0; margin: 0;
  cursor: pointer; color: var(--fg);
}
.nav__toggle span {
  position: absolute; left: 0; right: 0; height: 1.5px;
  background: currentColor;
  transition: transform 0.35s ease, top 0.35s ease, bottom 0.35s ease;
}
.nav__toggle span:nth-child(1) { top: 3px; }
.nav__toggle span:nth-child(2) { bottom: 3px; }
.nav__toggle.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* fullscreen menu overlay (adopts the page palette via --bg/--fg) */
.menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.menu.open { opacity: 1; visibility: visible; }
.menu__in {
  max-width: var(--maxw); height: 100%;
  margin: 0 auto; padding: 0 var(--gutter);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
}
.menu__links { display: flex; flex-direction: column; gap: 2px; }
.menu__links a { font-size: 48px; font-weight: 500; line-height: 1.2; letter-spacing: -0.03em; }
.menu__links a:hover { opacity: 0.5; }
.menu__time { margin-top: 64px; font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- hero ---------- */
.hero h1 {
  font-weight: 500;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 520px;
}

/* ---------- home: projects ---------- */
.projects { margin-top: 130px; }
.project { background: var(--bg); }

.p__bar {
  position: sticky; top: 42px; z-index: 8;
  background: var(--bg);
  padding-top: 42px;
}
.p__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 5px 0;
}
.p__meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.p__title { letter-spacing: -0.01em; }
.p__sep, .p__cat, .p__years { color: var(--muted); letter-spacing: -0.01em; }
.p__plus {
  background: none; border: none; padding: 0; margin-left: 5px;
  cursor: pointer; color: var(--fg);
  display: inline-flex; align-items: center;
}
.p__plus .ic { transition: transform 0.3s ease; }
.project.open .p__plus .ic { transform: rotate(45deg); }
.p__desc {
  display: none;              /* hidden by default — revealed by the + */
  font-weight: 400;
  max-width: 500px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  padding: 8px 0 30px;
}
.project.open .p__desc { display: block; }
.p__desc p + p { margin-top: 1.2em; }

.p__ctrl { display: flex; align-items: center; gap: 12px; color: var(--fg); }
.ic { stroke: currentColor; stroke-width: 1; fill: none; transition: transform 0.3s ease; }
.ic.toggle { fill: currentColor; stroke: none; opacity: 0.3; cursor: pointer; outline: none; }
.ic.toggle:hover { opacity: 0.6; }
.ic.toggle.on { opacity: 1; }
.bar__toggle { display: inline-flex; gap: 6px; }

/* ---------- galleries ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(20px, 1fr));
  grid-auto-rows: min-content;
  justify-content: center;
  gap: 20px 10px;
  padding: 0 0 100px;
}
/* density toggle overrides (tap the project-bar icons) */
.grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(20px, 1fr)); }
.grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(20px, 1fr)); }
.grid[data-cols="6"] { grid-template-columns: repeat(6, minmax(20px, 1fr)); }
.tile { display: flex; flex-direction: column; }
.tile img, .tile video { display: block; width: 100%; height: auto; object-fit: cover; object-position: center; }
.tile--portrait  img, .tile--portrait  video { aspect-ratio: 4 / 5; }
.tile--square    img, .tile--square    video { aspect-ratio: 1 / 1; }
.tile--landscape img, .tile--landscape video { aspect-ratio: 4 / 3; }
.tile__cap {
  font-family: var(--mono);
  font-weight: 400; font-size: 11px; line-height: 1;
  letter-spacing: 0; margin-top: 6px;
}

/* ============================================================
   Blog — index rows + reading page.
   Same tokens as the archive: Switzer for text, Fragment Mono for
   dates and labels, hairlines instead of boxes.
   ============================================================ */

.blog { margin-top: 130px; padding-bottom: 120px; }
.p__count { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.rows { display: flex; flex-direction: column; }
.rows__empty { color: var(--muted); padding: 30px 0 60px; letter-spacing: -0.02em; }

.row {
  position: relative;
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row__left { display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.row__title { letter-spacing: -0.02em; }
.row__sum { font-weight: 400; color: var(--muted); letter-spacing: -0.02em; line-height: 1.3; }
.row__date {
  font-family: var(--mono); font-weight: 400; font-size: 11px; line-height: 1;
  letter-spacing: 0; color: var(--muted); white-space: nowrap; flex: none;
}
.row:hover .ul { transform: scaleX(1); }
.row:hover .row__date { color: var(--fg); }

/* ---------- reading page ---------- */
.frame--read { padding-bottom: 40px; }
.post { max-width: 620px; }
.post__head { padding-bottom: 40px; }
.post__meta {
  font-family: var(--mono); font-weight: 400; font-size: 11px; line-height: 1;
  letter-spacing: 0; text-transform: uppercase; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 14px;
}
.post__tags { color: var(--muted); opacity: 0.7; }
.post__title {
  margin-top: 18px;
  font-weight: 500; font-size: 32px; line-height: 1.1; letter-spacing: -0.03em;
}

.post__body { font-weight: 400; font-size: 17px; line-height: 1.55; letter-spacing: -0.015em; }
.post__body > * + * { margin-top: 1.3em; }
.post__body h2 { font-weight: 500; font-size: 22px; line-height: 1.2; letter-spacing: -0.03em; margin-top: 2.2em; }
.post__body h3 { font-weight: 500; font-size: 17px; line-height: 1.3; letter-spacing: -0.02em; margin-top: 2em; }
.post__body h4 { font-weight: 500; font-size: 17px; letter-spacing: -0.02em; color: var(--muted); margin-top: 2em; }
.post__body h2 + *, .post__body h3 + *, .post__body h4 + * { margin-top: 0.6em; }

.post__body a.link { border-bottom: 1px solid var(--line); transition: border-color 0.3s ease; }
.post__body a.link:hover { border-color: var(--fg); }

.post__list { display: flex; flex-direction: column; gap: 0.5em; }
.post__list li { position: relative; padding-left: 24px; }
.post__list li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.post__list li + li { margin-top: 0; }

.post__body blockquote { border-left: 1px solid var(--line); padding-left: 24px; color: var(--muted); }
.post__body hr { border: none; border-top: 1px solid var(--line); margin: 3em 0; }
.post__body code {
  font-family: var(--mono); font-size: 0.88em;
  background: rgba(0, 0, 0, 0.05); padding: 2px 5px;
}
.post__body pre {
  background: rgba(0, 0, 0, 0.05); padding: 18px 20px; overflow-x: auto;
  font-size: 13px; line-height: 1.5;
}
.post__body pre code { background: none; padding: 0; font-size: 13px; }

.post__fig { margin: 2.4em 0; }
.post__fig img { width: 100%; height: auto; }
.post__fig figcaption {
  font-family: var(--mono); font-weight: 400; font-size: 11px; line-height: 1.3;
  letter-spacing: 0; color: var(--muted); margin-top: 8px;
}

.post .back { margin-top: 80px; display: inline-flex; }

/* previous / next */
.pn {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-top: 40px; padding: 24px 0 0;
  border-top: 1px solid var(--line);
}
.pn__item { display: flex; flex-direction: column; gap: 8px; }
.pn__item--r { align-items: flex-end; text-align: right; }
.pn__lab {
  font-family: var(--mono); font-size: 10px; line-height: 1;
  letter-spacing: 0; text-transform: uppercase; color: var(--muted);
}
.pn__t { letter-spacing: -0.02em; line-height: 1.2; }
.pn__item:hover .pn__t { opacity: 0.5; }

/* ---------- Info page flowers (cursor-follow parallax) ---------- */
.flowers { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.flower {
  position: absolute; display: block;
  transform: translate(-50%, -50%);
  opacity: 0; will-change: transform;
  transition: opacity 0.9s ease;
}
.flower.in { opacity: 1; }
.flower svg { display: block; width: 100%; height: auto; }
/* keep text / footer above the flower layer on the Info page */
html.dark .frame, html.dark .footer { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .flower { transition: none; } }

/* ---------- Info page (dark) ---------- */
.info { display: flex; align-items: flex-start; gap: 10px; padding: 60px 0 60px; }
.info__col { flex: 1 1 0; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.info__label {
  font-family: var(--mono);
  font-weight: 400; font-size: 10px; line-height: 1;
  letter-spacing: 0; text-transform: uppercase;
}
.info__list { display: flex; flex-direction: column; gap: 1px; margin-top: 20px; }
.info__list li { font-weight: 400; font-size: 13px; line-height: 1.3; letter-spacing: 0; }

/* ---------- Contact ---------- */
.contact { display: flex; align-items: flex-start; gap: 10px; padding-bottom: 150px; }
.contact__left { flex: 1 1 0; display: flex; flex-direction: column; gap: 100px; min-width: 0; }
.contact__right { flex: 1 1 0; display: flex; flex-direction: column; gap: 70px; min-width: 0; }

.form { display: flex; flex-direction: column; gap: 20px; width: 65%; max-width: 450px; }
.field { position: relative; border-bottom: 1px solid var(--line); transition: border-color 0.5s; }
.field:focus-within { border-color: var(--fg); }
.field input, .field textarea {
  width: 100%; border: none; background: none; outline: none;
  font-family: var(--ui); font-weight: 500; font-size: 16px; color: var(--fg);
  padding: 8px 0; resize: none; line-height: 1.4;
}
.field textarea { min-height: 100px; }
.field ::placeholder { color: var(--muted); opacity: 1; }
.field .ul { display: none; }
.send {
  align-self: flex-start;
  border: none; background: none; cursor: pointer; padding: 0;
  font-family: var(--ui); font-weight: 500; font-size: 16px; color: var(--fg);
  letter-spacing: -0.02em;
}
.form__status { font-size: 13px; color: var(--muted); min-height: 1em; }

.loc { display: flex; flex-direction: column; gap: 30px; }
.clock { width: 120px; height: 120px; }
.loc__txt { display: flex; flex-direction: column; gap: 5px; letter-spacing: -0.02em; }
.muted { color: var(--muted); letter-spacing: -0.02em; }

.socials { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.social { position: relative; padding: 4px 0; letter-spacing: -0.01em; }
.social:hover .ul { transform: scaleX(1); }

/* ---------- 404 ---------- */
.notfound { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; }
.notfound h1 { font-weight: 500; font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; max-width: 270px; }
.back { position: relative; padding: 4px 0; opacity: 0.4; transition: opacity 0.3s; }
.back:hover { opacity: 1; }
.back:hover .ul { transform: scaleX(1); }

/* ---------- footer ---------- */
.footer { margin-top: 40px; }
.footer__in {
  max-width: var(--maxw); margin: 0 auto;
  padding: 15px var(--gutter);
  display: flex; justify-content: flex-end; gap: 40px;
}

/* ---------- appear animation ---------- */
.reveal { opacity: 0.001; transform: translateY(40px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 809.98px) {
  .frame { padding-top: 140px; }
  .grid { grid-template-columns: repeat(4, minmax(20px, 1fr)); }
  .tile__cap { font-size: 9px; }
  .info { flex-direction: column; gap: 60px; }
  .contact { flex-direction: column; gap: 60px; padding-bottom: 80px; }
  .contact__left { gap: 40px; }
  .form { width: 100%; max-width: none; }
  .footer__in { flex-direction: column; align-items: flex-end; gap: 8px; }
  .blog { margin-top: 90px; }
  .row { padding: 15px 0; }
  .post__title { font-size: 26px; }
  .post__body { font-size: 16px; }
  .pn { grid-template-columns: 1fr; gap: 28px; }
  .pn__item--r { align-items: flex-start; text-align: left; }
}
@media (min-width: 810px) and (max-width: 1199.98px) {
  .tile__cap { font-size: 10px; }
}
