/* ==========================================================================
   v2 preview — Ri Lomako
   Shares nothing with the live stylesheet on purpose, so experimenting here
   cannot affect the published site.
   ========================================================================== */

:root {
  --bg: #14161c;
  --bg-deep: #0a0c11;
  --text: #e9eaf0;
  --muted: rgba(233, 234, 240, 0.62);
  --line: rgba(233, 234, 240, 0.12);
  --gutter: 18px;
  --cloud-gap: 12px;        /* the "marge" between photographs */
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid rgba(233,234,240,.4); outline-offset: 3px; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- home ------------------------------------------------------------------
   Clicking anywhere opens the gallery. The only writing is the wordmark, the
   two nav links, and the hint along the bottom.
   -------------------------------------------------------------------------- */

.enter {
  position: relative;
  display: grid;
  place-items: center;
  height: 100svh;
  min-height: 460px;
  overflow: hidden;
  background: var(--bg-deep) center / cover no-repeat;
  background-image: url("/assets/img/moon.webp");
}

#smoke-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.enter-nav {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  display: flex;
  gap: 22px;
  padding: 20px var(--gutter);
}
.enter-nav a {
  font-size: .82rem;
  letter-spacing: 1.6px;
  text-transform: lowercase;
  color: rgba(255,255,255,.85);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  text-shadow: 0 1px 14px rgba(0,0,0,.9), 0 0 3px rgba(0,0,0,.7);
}
.enter-nav a:hover { color: #fff; border-bottom-color: rgba(255,255,255,.5); }

.wordmark {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 var(--gutter);
  pointer-events: none;          /* never intercept a drag */
  text-shadow: 0 2px 30px rgba(0,0,0,.8), 0 0 4px rgba(0,0,0,.6);
}
.wordmark h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 4.2rem);
  font-weight: 300;
  letter-spacing: 3px;
}
.wordmark p {
  margin: 14px 0 0;
  font-size: clamp(0.72rem, 2vw, 0.9rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.88);
}

/* The gesture hint, along the bottom. */
.hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  margin: 0;
  padding: 0 var(--gutter) 28px;
  text-align: center;
  pointer-events: none;
  font-size: clamp(0.66rem, 1.7vw, 0.78rem);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
  text-shadow: 0 1px 14px rgba(0,0,0,.9), 0 0 3px rgba(0,0,0,.7);
}

/* Default to the mouse wording; swap it on genuine touch devices. */
.hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .hint-pointer { display: none; }
  .hint-touch { display: inline; }
}

/* --- inner pages ------------------------------------------------------------ */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(20,22,28,.9);
  backdrop-filter: blur(12px);
}
.bar .brand { font-size: .95rem; letter-spacing: 1.4px; }
.bar nav { display: flex; gap: 20px; }
.bar nav a {
  font-size: .82rem;
  letter-spacing: 1.6px;
  text-transform: lowercase;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.bar nav a:hover, .bar nav a[aria-current] { color: var(--text); border-bottom-color: rgba(233,234,240,.35); }

/* --- the cloud --------------------------------------------------------------
   Columns are built in JavaScript rather than with CSS columns: CSS fills one
   column completely before starting the next, which would scramble the order
   set in order.txt. Placing each photograph into whichever column is currently
   shortest keeps the order readable and still packs tightly.
   -------------------------------------------------------------------------- */

/* The side margin is a percentage, so it opens up as the window widens
   instead of the layout adding columns. Measured from the reference: the
   photographs occupy about 81% of a desktop viewport and 89% of a phone. */
.cloud {
  display: flex;
  align-items: flex-start;
  gap: var(--cloud-gap);
  padding: 5.5% 5.5% 7%;
}

@media (min-width: 620px) {
  .cloud { padding: 4% 9.5% 6%; }
}
.cloud-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: var(--cloud-gap);
  min-width: 0;
}
.cloud figure { margin: 0; }
.cloud img {
  width: 100%;
  height: auto;
  background: #1b1e26;
}

.cloud-empty {
  padding: 60px var(--gutter);
  text-align: center;
  color: var(--muted);
}

/* --- contact ---------------------------------------------------------------- */

.page { padding: 44px var(--gutter) 80px; max-width: 620px; margin-inline: auto; }
.page h1 { font-weight: 300; letter-spacing: 1px; font-size: 1.5rem; margin: 0 0 6px; }
.page .lead { color: rgba(233,234,240,.85); margin: 0 0 34px; }
.field-group { display: grid; gap: 26px; }
.field-group .label {
  font-size: .72rem; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.field-group a { font-size: 1.05rem; }

/* --- bio and education -------------------------------------------------- */

.block {
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.block h2 {
  margin: 0 0 18px;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}
.block p {
  margin: 0 0 1em;
  max-width: 54ch;           /* a comfortable line length for reading */
  color: rgba(233, 234, 240, .88);
}
.block p:last-child { margin-bottom: 0; }

/* Education: a year column beside each entry, stacking on a narrow screen
   where two columns would leave the entries too cramped. */
.cv {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 20px;
}
.cv dt {
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .6px;
}
.cv dd {
  margin: 0 0 14px;
  color: rgba(233, 234, 240, .88);
}
.cv dd:last-of-type { margin-bottom: 0; }

@media (min-width: 560px) {
  .cv {
    grid-template-columns: 7.5rem 1fr;
    gap: 0 24px;
  }
  .cv dt { padding-top: 1px; }
  .cv dd { margin-bottom: 16px; }
}

.foot {
  padding: 24px var(--gutter) 34px;
  border-top: 1px solid var(--line);
  text-align: center;
}
