/* ==========================================================================
   dpvisualworks.com — shared stylesheet
   Linked from every page as styles.css?v=N. Bump N in the <link> whenever
   this file changes, or returning visitors keep the old copy.
   ========================================================================== */

/* --- colours, type and layout settings -------------------------------- */
:root {
  color-scheme: dark;

  --ink:        #08080a;   /* page background */
  --ink-raised: #101014;   /* reel frame, raised surfaces */
  --line:       #1e1e26;   /* hairlines */
  --line-lit:   #34343f;
  --accent:     #a47cff;   /* purple: links and interaction only */
  --accent-lit: #c9b0ff;   /* hover */
  --accent-dim: rgba(164, 124, 255, 0.55);

  --paper:      #eae9ee;   /* main text */
  --paper-dim:  #9c99a6;
  --paper-mute: #6d6a78;

  --display: 'Geologica', -apple-system, sans-serif;
  --body:    'Instrument Sans', -apple-system, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, monospace;

  --measure: 1100px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }

.label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-mute);
}

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* --- masthead --------------------------------------------------------- */
.masthead { padding-block: clamp(1.4rem, 3.4vw, 2.3rem) 0; text-align: center; }

.logomark {
  position: relative; display: inline-block; width: 54px; height: 54px;
  border: 1px solid var(--line); border-radius: 50%;
  transition: border-color 300ms ease;
}
.logomark:hover,
.logomark:focus-visible { border-color: var(--accent); outline: none; }

.lm-load {
  display: block; width: 100%; height: 100%; transform-origin: 50% 50%;
  animation: half-turn 1400ms cubic-bezier(.2,.8,.2,1) 250ms 1 backwards;
}
@keyframes half-turn { from { transform: rotate(-180deg); } to { transform: rotate(0deg); } }

.lm {
  display: block; width: 100%; height: 100%; color: var(--paper-dim);
  transform-origin: 50% 50%; transform: translateZ(0);
  transition: transform 900ms cubic-bezier(.2,.8,.2,1), color 300ms ease;
}
.logomark:hover .lm,
.logomark:focus-visible .lm { transform: rotate(180deg) translateZ(0); color: var(--paper); }

/* --- hero ------------------------------------------------------------- */
.hero { text-align: center; padding-block: clamp(1.1rem, 2.8vw, 1.7rem) clamp(1.3rem, 3vw, 1.9rem); }

.hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.05rem, 5.8vw, 3.6rem);
  line-height: 1.04; letter-spacing: -0.022em; margin: 0 0 0.7rem;
}

.disciplines {
  font-family: var(--mono); font-size: clamp(0.66rem, 1.6vw, 0.76rem);
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-dim); margin: 0;
}
.disciplines .sep { color: var(--paper-mute); padding-inline: 0.35em; }

.status { margin: 1.15rem 0 0; font-size: 0.9rem; color: var(--paper-dim); }
.status .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-right: 0.6em; vertical-align: 0.05em;
}

/* --- reel: the centrepiece -------------------------------------------- */
/* Capped ~10% narrower than the page measure so the player doesn't fill the
   viewport. Something should always be visible below it, otherwise nobody
   knows the page continues. */
.reel { padding-bottom: clamp(1.75rem, 4vw, 2.75rem); max-width: 990px; }

.reel-frame {
  position: relative; aspect-ratio: 16 / 9;
  background: var(--ink-raised);
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
}
/* The dark background matters: an iframe defaults to white, so a slow or
   blocked Vimeo load flashes a white rectangle on a near-black page.
   color-scheme: light matches the Vimeo player's own (light) scheme. When the
   two differ (this page is dark), browsers paint an opaque white backdrop
   behind the player, which showed as hairline white edges wherever the video
   stops a fraction of a pixel short of the frame. Matching them makes that
   backdrop transparent, so the dark background above shows instead. */
.reel-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  background: var(--ink-raised);
  color-scheme: light;
}

.reel-caption {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; margin-top: 0.85rem; flex-wrap: wrap;
}

/* Fallback link to the reel on vimeo.com. Hidden unless the embedded player
   fails to report "ready" in time; see the script under the reel. */
.reel-fallback { transition: color 250ms ease; }
.reel-fallback:hover,
.reel-fallback:focus-visible { color: var(--paper-dim); }

/* --- credits: a line under the reel, not a section of its own ---------- */
/* Currently unused: the credits line is pinned in a comment in index.html. */
.credits-line {
  max-width: 990px;
  margin: 1.1rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--paper-dim);
}
.credits-line strong { color: var(--paper); font-weight: 500; }
.credits-line .via { color: var(--paper-mute); }

/* --- resume ----------------------------------------------------------- */
.resume { padding-block: clamp(2.25rem, 5vw, 3.25rem); text-align: center; }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent-dim); border-radius: 3px;
  padding: 0.75rem 1.4rem; margin-top: 1rem;
  transition: border-color 250ms ease, color 250ms ease, background 250ms ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent-lit); background: rgba(164, 124, 255, 0.07); }
.btn svg { width: 15px; height: 15px; }

/* --- contact ---------------------------------------------------------- */
.contact { text-align: center; padding-block: clamp(2.5rem, 6vw, 4rem); }

.contact p {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem); letter-spacing: -0.012em;
  margin: 0 0 1.5rem;
}

.channels { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.9rem 1.6rem; }

.channel {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.92rem; letter-spacing: 0.04em;
  color: var(--accent); border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 4px; transition: color 250ms ease, border-color 250ms ease;
}
.channel:hover { color: var(--accent-lit); border-bottom-color: var(--accent-lit); }
.channel svg { width: 16px; height: 16px; flex: 0 0 auto; }

.channel--quiet {
  margin-top: 1.3rem; font-size: 0.78rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--paper-mute); border-bottom-color: transparent; gap: 0.4rem;
}
.channel--quiet:hover { color: var(--paper-dim); border-bottom-color: transparent; }
.channel--quiet svg { width: 12px; height: 12px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 1.5rem; padding-block: 1.75rem 2.5rem; }

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