/* ryandonofrio.com: black + chrome
   Palette
   --black    #000000  ground
   --chrome   #F2F4F7  brightest highlight, primary text
   --steel    #A6ACB4  secondary text
   --gunmetal #71777F  tertiary text, labels (4.6:1 on black)
   --iron     #1B1D20  hairlines
*/

/* fonts: self-hosted (SIL OFL), latin subset */
@font-face {
  font-family: "Michroma";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/michroma-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/geist-latin.woff2") format("woff2");
}

:root {
  --black: #000000;
  --chrome: #f2f4f7;
  --steel: #a6acb4;
  --gunmetal: #71777f;
  --iron: #1b1d20;

  --display: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --text: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --pad: clamp(1.25rem, 4vw, 3.5rem);

  /* pointer position, updated by js (0..1) */
  --mx: 0.5;
  --my: 0.3;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--steel);
  font-family: var(--text);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100svh;
}

::selection { background: var(--chrome); color: var(--black); }

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

a:focus-visible {
  outline: 1px solid var(--chrome);
  outline-offset: 4px;
}

/* ---------- ambient light: a faint lamp that follows the pointer ---------- */
.light {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      60vmax 40vmax at calc(var(--mx) * 100%) calc(var(--my) * 100%),
      rgba(200, 208, 220, 0.075),
      transparent 70%
    );
}

header, main, footer { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--pad);
  z-index: 10;
  mix-blend-mode: difference;
}

.mark {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--chrome);
}

/* ---------- hero ---------- */
.stage {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: var(--pad);
}

.hero {
  align-self: end;
  padding-bottom: clamp(2.5rem, 9vh, 6rem);
}

.chrome {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(2.4rem, 10.6vw, 10rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
}

.chrome__line {
  display: block;
  width: fit-content;
  color: var(--chrome);
  /* top layer: specular band that tracks the pointer
     bottom layer: polished chrome with a horizon line */
  background-image:
    linear-gradient(
      105deg,
      transparent calc(var(--sx, 50%) - 14%),
      rgba(255, 255, 255, 0.9) var(--sx, 50%),
      transparent calc(var(--sx, 50%) + 14%)
    ),
    linear-gradient(
      180deg,
      #ffffff 0%,
      #dfe3e8 22%,
      #9aa1aa 44%,
      #2a2d31 50%,
      #4b5058 53%,
      #b9bfc7 68%,
      #f4f6f8 84%,
      #8d939b 100%
    );
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__line {
  margin: clamp(1.25rem, 3vh, 2rem) 0 0;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: var(--steel);
  letter-spacing: 0.01em;
}

/* load: one slow sweep of light across the name */
@media (prefers-reduced-motion: no-preference) {
  .chrome__line {
    animation: sweep 2.4s cubic-bezier(.22, .7, .2, 1) 0.2s backwards;
  }
  .chrome__line + .chrome__line { animation-delay: 0.35s; }
  .hero__line { animation: fade 1.2s ease 1.4s both; }
}

@keyframes sweep {
  from { --sx: -20%; opacity: 0; }
  20%  { opacity: 1; }
  to   { --sx: 50%; opacity: 1; }
}
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* registered so the sweep can animate the gradient stop */
@property --sx {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 50%;
}

/* ---------- links: one quiet line at the bottom ---------- */
.links {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--iron);
  font-size: 0.9375rem;
}

.plain {
  color: var(--steel);
  transition: color 0.2s ease;
}
.plain:hover { color: var(--chrome); }

.venture {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.venture__name {
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--chrome);
}

.venture__note {
  color: var(--gunmetal);
  transition: color 0.25s ease;
}

.venture:hover .venture__note,
.venture:focus-visible .venture__note { color: var(--steel); }

.reach {
  display: inline-flex;
  gap: 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  .links { animation: fade 1.2s ease 1.8s both; }
}

/* ---------- about page (ryandonofrio.com/about/) ---------- */
.page {
  padding-top: clamp(6rem, 16vh, 10rem);
}

.about__body {
  max-width: 54rem;
  padding: 0 var(--pad) clamp(4rem, 12vh, 8rem);
}

.about__title {
  margin: 0 0 1.75rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--chrome);
}

.about__bio { margin-bottom: 2.5rem; }
.about__bio p {
  margin: 0 0 1rem;
  max-width: 40rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--steel);
}

.arow {
  display: grid;
  grid-template-columns: clamp(5.5rem, 14vw, 9rem) 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--iron);
}

.arow__label {
  margin: 0;
  padding-top: 0.15rem;
  font-family: var(--text);
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--gunmetal);
}

.arow__text {
  margin: 0;
  max-width: 38rem;
  line-height: 1.7;
}

.alist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}

.aitem { display: block; }

.aitem__name {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--chrome);
}

.aitem__text {
  display: block;
  max-width: 38rem;
  line-height: 1.6;
  color: var(--steel);
  transition: color 0.2s ease;
}
a.aitem:hover .aitem__text,
a.aitem:focus-visible .aitem__text { color: var(--chrome); }

@media (max-width: 720px) {
  .arow {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.aitem__more {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: var(--gunmetal);
}
.aitem__more .plain { color: var(--steel); text-decoration: underline; text-decoration-color: var(--iron); text-underline-offset: 3px; }
.aitem__more .plain:hover { color: var(--chrome); text-decoration-color: var(--steel); }
