/* Shared dial styles: homepage and the menu overlay on every other page */
.dial {
  --ink: #F3EFE7; --text: #A9AEB6; --muted: #6E747D; --accent: #D4B483;
  --ease: cubic-bezier(.22, 1, .36, 1); /* quick start, soft landing */
  font-family: 'Geist', 'Helvetica Neue', sans-serif;
}
/* as big as the screen allows, leaving room for the welcome band above (--band, index.html) and the button, hint and footer below
   (svh: the height with a phone's address bar showing, so the homepage never needs a scroll) */
.dial { position: relative; width: min(620px, 92vw, max(240px, calc(100vh - 124px - var(--band, 0px)))); width: min(620px, 92vw, max(240px, calc(100svh - 124px - var(--band, 0px)))); aspect-ratio: 1 / 1; }
.dial-glow { position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(212,180,131,0.07) 0%, transparent 68%); pointer-events: none; }
/* the watch case: a polished ring of brushed gold and steel, catching the light in bands */
.dial-ring {
  position: absolute; inset: -1.6%; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 210deg, #3A3022, #F2DFB4 9%, #7A6440 19%, #241F18 31%, #B8996A 45%, #3E3426 57%, #EAD5A8 70%, #6B5634 82%, #2A241B 92%, #3A3022);
  -webkit-mask: radial-gradient(closest-side, transparent 97%, #000 97.4%, #000 99.4%, transparent 100%);
  mask: radial-gradient(closest-side, transparent 97%, #000 97.4%, #000 99.4%, transparent 100%);
  opacity: .85;
}
.ticks {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(212,180,131,0.35) 0deg 0.5deg, transparent 0.5deg 6deg);
  -webkit-mask: radial-gradient(closest-side, transparent 90%, #000 91%, #000 97%, transparent 98%);
  mask: radial-gradient(closest-side, transparent 90%, #000 91%, #000 97%, transparent 98%);
  animation: spin 120s linear infinite;
}
/* A dark disc behind the wedges so the moving network doesn't show through. (A live blur here cost ~25% of the frame budget.) */
.dial-glass { position: absolute; inset: 0; border-radius: 50%; background: rgba(6, 8, 11, 0.62); pointer-events: none;
  box-shadow: 0 28px 60px -14px rgba(0,0,0,0.75), 0 8px 18px -6px rgba(0,0,0,0.6); } /* the watch sits on the page */
/* a fixed light over the bezel: lit from the top left, in shadow at the bottom right; it doesn't
   turn with the sections, so they move under it like a real bezel */
.dial-light {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 30% 12%, rgba(255,246,228,0.10), transparent 70%),
    linear-gradient(140deg, rgba(255,255,255,0.05) 0%, transparent 45%, rgba(0,0,0,0.32) 100%);
}
.rotor { position: absolute; inset: 0; transition: transform .55s var(--ease); will-change: transform; }
.dial-nav { position: absolute; inset: 0; }
.wedge {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; font: inherit; text-align: center; text-decoration: none; cursor: pointer;
  background-color: rgba(31,34,39,0.94);
  /* ceramic bezel: a fine radial grain, a little lighter towards the outer edge */
  background-image:
    repeating-conic-gradient(rgba(255,255,255,0.022) 0deg 0.6deg, rgba(0,0,0,0.05) 0.6deg 1.2deg),
    radial-gradient(circle at 50% 50%, rgba(0,0,0,0.25) 50%, rgba(255,255,255,0.06) 100%);
  color: #E6E1D8;
  transition: clip-path .45s var(--ease), background-color .2s ease, color .2s ease, transform .3s var(--ease), filter .3s ease;
  outline: none;
}
/* hovered: the section lifts a touch towards you and catches more light */
.wedge:hover, .wedge:focus-visible { transform: scale(1.012); filter: brightness(1.12); }
.wedge .edge { position: absolute; inset: 0; background: var(--accent); opacity: 0; transition: clip-path .45s var(--ease), opacity .2s ease, background .2s ease; }
/* hover-to-open countdown: fills the wedge with the "selected" gold as it runs (dial.js) */
.wedge .sweep { position: absolute; inset: 0; background: rgba(212,180,131,0.2); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.labels { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; transition: opacity .16s ease; }
.labels text { font-family: 'Geist', 'Helvetica Neue', sans-serif; font-weight: 500; text-anchor: middle; dominant-baseline: central; transition: fill .25s ease; }
/* label looks: data-label on #dial */
.labels text { paint-order: stroke; stroke: rgba(6,8,11,0.55); stroke-width: 0.12px; }
#dial[data-label="gold"] .labels text { font-weight: 600; }
#dial[data-label="serif"] .labels text { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.morph { transition: left .45s var(--ease), top .45s var(--ease), width .45s var(--ease), height .45s var(--ease), border-color .2s ease; }

.core {
  position: absolute; border-radius: 50%; overflow: hidden;
  background: rgba(9,12,16,0.78);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(243,239,231,0.12);
  display: flex; align-items: center; justify-content: center;
}
/* Everything inside the centre circle scales with --s, set by dial.js so the content always fits the circle */
.core-inner {
  --s: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: calc(9px * var(--s));
  flex: none;
}
.core-title { font-size: calc(29px * var(--s)); font-weight: 300; letter-spacing: -0.02em; line-height: 1.08; color: var(--ink); }
.core-text { font-size: calc(13.5px * var(--s)); line-height: 1.45; color: var(--text); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.core-meta[hidden] { display: none; }
/* "Show me everything": a small text link under the dial (dial.js) */
.dial-all {
  margin: -12px 0 -10px; padding: 6px 4px; background: none; border: 0; cursor: pointer;
  font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent, #D4B483); opacity: .75; transition: opacity .25s ease, visibility .25s;
  text-decoration: underline; text-decoration-color: rgba(212,180,131,0.35); text-underline-offset: 5px;
}
.dial-all:hover, .dial-all:focus-visible { opacity: 1; text-decoration-color: currentColor; }
.dial-all.is-off { opacity: 0; visibility: hidden; }
.core-meta { font-family: 'Geist Mono', monospace; font-size: calc(10px * var(--s)); letter-spacing: 0.04em; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.core-back {
  margin-top: calc(2px * var(--s)); height: calc(34px * var(--s)); min-height: 28px; padding: 0 calc(18px * var(--s)); border-radius: 999px;
  border: 1px solid var(--accent); background: transparent; color: var(--accent);
  font-family: 'Geist', sans-serif; font-size: calc(11px * var(--s)); letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer;
}
.core-back:hover { background: rgba(212,180,131,0.1); }
.core-back[hidden] { display: none; }


@keyframes spin { to { transform: rotate(360deg); } }
/* ---------- Entrance (homepage only; dial.js adds .intro and removes it when done) ----------
   ring and glow -> ticks spin in and settle -> wedges, clockwise from Projects -> centre -> text */
@keyframes intro-fade { from { opacity: 0; } }
@keyframes intro-grow { from { opacity: 0; scale: .9; } }
@keyframes intro-ticks { from { opacity: 0; rotate: -160deg; } }
@keyframes intro-wedge { from { opacity: 0; rotate: -14deg; scale: .94; } }
@keyframes intro-core { from { opacity: 0; scale: .7; } }
@keyframes intro-rise { from { opacity: 0; translate: 0 6px; } }
.dial.intro .dial-glow, .dial.intro .dial-ring, .dial.intro .dial-glass { animation: intro-grow .7s var(--ease) both; }
.dial.intro .ticks { animation: spin 120s linear infinite, intro-ticks 1.2s var(--ease) .1s both; }
.dial.intro .wedge { animation: intro-wedge .6s var(--ease) calc(.25s + var(--i, 0) * .09s) both; }
.dial.intro .core { animation: intro-core .7s var(--ease) .35s both; }
.dial.intro .core-inner { animation: intro-rise .5s var(--ease) .75s both; }
.dial.intro .labels { animation: intro-fade .5s ease .8s both; }
/* while the opening demo plays (dial.js), the wedges carry no text */
.dial.quiet .labels { opacity: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  .ticks { animation: none; }
  .wedge, .wedge .edge, .labels, .morph, .rotor { transition: none; }
}

/* ---------- CV paper (homepage; dial.js + network-bg.js) ----------
   The network forms the sheet first; .show then brings the real page in, from blurred to sharp.
   The top-right corner is cut to match the folded corner the nodes draw. */
.cv-paper {
  position: fixed; z-index: 4; display: block; background: #fff; border-radius: 2px;
  clip-path: polygon(0 0, 87% 0, 100% 9.2%, 100% 100%, 0 100%);
  opacity: 0; visibility: hidden; filter: blur(10px); transform: scale(.97);
  transition: opacity .4s ease, filter .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .4s;
}
.cv-paper.armed { visibility: visible; transition: opacity .4s ease, filter .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1); }
.cv-paper.show { opacity: .97; filter: none; transform: none; }
.cv-paper img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* phones: while the paper is up the dial sits small at the bottom (dial.js), so the page holds still
   and the hint and footer under it step aside */
body.cv-stacked { overflow: hidden; }
body.cv-stacked .hint, body.cv-stacked footer { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .cv-paper, .cv-paper.armed { filter: none; transform: none; transition: opacity .2s ease; } }

/* Projects, About me and Contact (homepage): the nodes draw two pictures (network-bg.js); these links sit
   over them, with a caption fading in underneath each. The SVGs only show
   with reduced motion, when the nodes don't move. */
.pair-card {
  position: fixed; z-index: 4; display: block; text-decoration: none; color: var(--accent, #D4B483);
  visibility: hidden; pointer-events: none;
}
.pair-card.armed { visibility: visible; pointer-events: auto; }
.pair-mark { display: block; width: 100%; }
.pair-mark svg { display: none; width: 100%; height: 100%; overflow: visible; }
.pair-cap {
  position: absolute; left: 50%; top: 100%; margin-top: 14px; width: max-content;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  opacity: 0; transform: translate(-50%, 6px);
  transition: opacity .5s ease, transform .6s cubic-bezier(.22, 1, .36, 1);
}
.pair-card.show .pair-cap { opacity: 1; transform: translate(-50%, 0); }
.pair-kind { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent, #D4B483); }
.pair-addr { font-family: 'Geist Mono', monospace; font-size: var(--cap, 13px); letter-spacing: .02em; color: var(--text, #A9AEB6); transition: color .25s ease; }
.pair-card.lit .pair-addr, .pair-card:focus-visible .pair-addr { color: var(--ink, #F3EFE7); }
.pair-card:focus-visible { outline: 1px solid var(--accent, #D4B483); outline-offset: 8px; }
@media (prefers-reduced-motion: reduce) {
  .pair-mark svg { display: block; }
  .pair-cap { transition: opacity .2s ease; transform: translate(-50%, 0); }
}

/* ---------- Menu overlay (every page except the homepage) ---------- */
.menu-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 16px;
  background: rgba(6, 8, 11, 0.92); /* no live blur: it made the menu animation stutter over the moving background */
  opacity: 0; visibility: hidden;
  transition: opacity .3s ease, visibility 0s linear .3s;
}
.menu-overlay.open { opacity: 1; visibility: visible; transition: opacity .3s ease; }
.menu-overlay .dial { width: min(480px, 88vw, calc(100vh - 210px)); transform: scale(.94); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.menu-overlay.open .dial { transform: scale(1); }
.menu-close {
  position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid rgba(243, 239, 231, 0.14); color: #A9AEB6; cursor: pointer;
}
.menu-close:hover { color: #D4B483; border-color: rgba(212, 180, 131, 0.5); }
/* The way home: a house over the label, big enough to find and tap easily */
.menu-home {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 150px;
  padding: 11px 22px 10px; border-radius: 14px; border: 1px solid rgba(212, 180, 131, 0.4);
  background: rgba(212, 180, 131, 0.06); color: #D4B483; text-decoration: none;
  font-family: 'Geist', sans-serif; font-size: 13px; letter-spacing: 0.06em;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.menu-home:hover, .menu-home:focus-visible { background: rgba(212, 180, 131, 0.14); border-color: rgba(212, 180, 131, 0.85); color: #F2DFB4; transform: translateY(-2px); outline: none; }
.menu-home:focus-visible { box-shadow: 0 0 0 2px #F2DFB4; }
.menu-home-icon { display: block; }

/* The name in the top left that opens the menu */
.menu-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 8px 0; cursor: pointer;
  font-family: 'Geist', 'Helvetica Neue', sans-serif; font-size: 17px; font-weight: 500; letter-spacing: 0.02em; color: #D4B483;
}
.menu-trigger .menu-icon { flex: none; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.menu-trigger:hover .menu-icon, .menu-trigger:focus-visible .menu-icon { transform: rotate(90deg); }
.menu-trigger .menu-label { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: #6E747D; margin-left: 4px; }
.menu-trigger:hover .menu-label { color: #A9AEB6; }
@media (prefers-reduced-motion: reduce) {
  .menu-overlay, .menu-overlay .dial, .menu-trigger .menu-icon { transition: none; }
}

/* Breadcrumbs in the header of every other page */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; margin: 0; padding: 0; list-style: none;
  font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: #6E747D; }
.crumbs li + li::before { content: '/'; margin: 0 10px; color: #3A4048; }
.crumbs a { color: #8A8F98; text-decoration: none; padding: 6px 0; }
.crumbs a:hover { color: #D4B483; }
.crumbs [aria-current] { color: #E6E1D8; }
