/* ------------------------------------------------------------------
   Daniel E. González Limas — danielgonzalezlimas.com
   Matte black aluminium. Typography-driven. Mobile-first.
   ------------------------------------------------------------------ */

:root {
  --bg:        #0a0a0a;
  --bg-raised: #111111;
  --rule:      #232323;
  --rule-soft: #1a1a1a;

  --text:      #e6e6e3;   /* light silver  */
  --text-dim:  #9a9a94;   /* secondary     */
  --text-faint:#7f7f7a;   /* tertiary — 4.9:1 on --bg, clears AA at small sizes */

  --accent:      #7fa8d4; /* steel blue — the single accent */
  --accent-soft: #a9c6e2;

  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;

  --measure: 34rem;   /* reading width */
  --gutter:  1.5rem;
  --shell:   44rem;   /* page max width */
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------------------------------------------------- accessibility */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0a0a0a;
  padding: 0.6rem 1rem;
  z-index: 10;
  font-weight: 500;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------------------------------------------- shell */

.site-header,
main,
.site-footer {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.serif { font-family: var(--serif); font-style: italic; }

/* ---------------------------------------------------- header mark */

.site-header {
  padding-block: 2rem 0;
}

.mark {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--accent);
  text-decoration: none;
  transition: color 160ms ease;
}
.mark:hover { color: var(--accent-soft); }

/* ---------------------------------------------------- hero */

.hero {
  padding-block: 3.5rem 4rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 11vw, 3.9rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.033em;
  color: #f2f2ef;
}

.tagline {
  margin: 1.4rem 0 0;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.hero-meta {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-dim);
  max-width: var(--measure);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent-soft);
}

.btn-primary {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent);
  color: #0a0a0a;
}

/* ---------------------------------------------------- sections */

.section {
  padding-block: 3rem;
  border-top: 1px solid var(--rule-soft);
}

h2 {
  margin: 0 0 2rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.19em;
  color: var(--text-faint);
}
/* the Euler heading opts out of the uppercase treatment */
h2 .serif {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1rem; color: var(--text-dim); }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 500; }
.prose em { font-family: var(--serif); font-size: 1.08em; color: var(--text); }

/* ---------------------------------------------------- project cards */

.card {
  max-width: var(--measure);
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule-soft);
}
.card:first-of-type { border-top: none; padding-top: 0; }
.card:last-of-type  { padding-bottom: 0; }

.card-head { margin-bottom: 0.9rem; }

.card h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--text);
}

.card-org {
  margin: 0.3rem 0 0;
  font-size: 0.8125rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.card p {
  margin: 0;
  color: var(--text-dim);
}
.card p strong { color: var(--text); font-weight: 500; }

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}
.stack li {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--text-faint);
  white-space: nowrap;
}

/* ---------------------------------------------------- videos */

.videos {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* click-to-load facade: no YouTube request until the visitor asks for one */
.video-facade {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent center / cover no-repeat;
  cursor: pointer;
}
.video-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.45);
  transition: background-color 200ms ease;
}
.video-facade:hover::after { background: rgba(10, 10, 10, 0.22); }

.video-play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.6);
  color: var(--accent);
  font-size: 1rem;
  line-height: 1;
  padding-left: 0.22em;   /* optical centring of the triangle */
  transition: background-color 200ms ease, color 200ms ease;
}
.video-facade:hover .video-play { background: var(--accent); color: #0a0a0a; }

.video-missing {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.section-link { margin: 1.5rem 0 0; font-size: 0.9375rem; }
.section-link a { color: var(--accent); text-decoration: none; }
.section-link a:hover { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 0.25em; }

/* ---------------------------------------------------- footer */

.site-footer {
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--rule-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  color: var(--text-dim);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 160ms ease;
}
.footer-links a:hover { color: var(--accent); }

.colophon {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 2.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-faint);
}
.footer-mark { font-size: 1.15rem; color: var(--accent); }

/* ---------------------------------------------------- wider screens */

@media (min-width: 40rem) {
  .site-header { padding-block: 2.75rem 0; }
  .hero { padding-block: 4.5rem 5rem; }
  .section { padding-block: 4rem; }
  .videos { grid-template-columns: 1fr 1fr; }
}

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