/* =========================================================
   Bruno Raphaël Siniciali — visual system
   Bauhaus colour/shape grammar · Hungarian constructivism ·
   Italian rationalism · weather-chart linework
   ========================================================= */

:root {
  --paper: #f0eadc;
  --paper-2: #f7f2e7;
  --paper-3: #e3d9c4;

  --ink: #17140f;
  --ink-2: #4a4237;
  --ink-3: #6a6153;

  --hair: rgba(23, 20, 15, 0.14);
  --hair-2: rgba(23, 20, 15, 0.28);

  --green: #13483a;
  --green-2: #0b2c23;
  --red: #8b2e27;
  --red-2: #5e1d18;
  --blue: #1b3f63;
  --blue-2: #11293f;
  --gold: #b0821f;
  --gold-ink: #7a5910;

  --accent: var(--green);
  --accent-ink: var(--green);

  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica,
    Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad-y: clamp(5rem, 11vw, 9.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.container {
  width: min(1180px, 100% - clamp(2rem, 8vw, 6rem));
  margin-inline: auto;
}

/* ---------- type primitives ---------- */
.sec-bar {
  width: 68px;
  height: 5px;
  background: var(--accent);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.origins {
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  color: var(--ink-3);
}
.origins span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.origins span::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  background: var(--gold);
}
.origins span:last-child::before {
  background: var(--green);
  border-radius: 50%;
}
.glyph {
  width: 9px;
  height: 9px;
  background: var(--accent);
  flex: none;
}
.glyph-circle {
  border-radius: 50%;
}
.glyph-tri {
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
h1,
h2,
h3,
h4 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}
.lead {
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 40ch;
}
.prose p {
  color: var(--ink-2);
  max-width: 66ch;
}
.prose p + p {
  margin-top: 1.15rem;
}

/* ---------- nav ---------- */
.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hair);
}
.nav-mark {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.nav-bear {
  width: 38px;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}
.site-nav ul a {
  display: block;
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.site-nav ul a:hover {
  color: var(--ink);
}
.site-nav ul a.current {
  color: var(--ink);
  font-weight: 600;
}
.site-nav ul a[href*="research"]:hover {
  border-color: var(--gold);
}
.site-nav ul a[href*="education"]:hover {
  border-color: var(--red);
}
.site-nav ul a[href*="experience"]:hover {
  border-color: var(--blue);
}
.site-nav ul a[href*="about"]:hover,
.site-nav ul a[href*="contact"]:hover,
.site-nav ul a[href*="blog"]:hover {
  border-color: var(--green);
}
.nav-toggle {
  display: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn-solid {
  background: var(--ink);
  color: var(--paper-2);
}
.btn-solid:hover {
  background: var(--green-2);
  border-color: var(--green-2);
}
.btn-line:hover {
  background: rgba(23, 20, 15, 0.06);
}
.btn:hover {
  transform: translateY(-1px);
}

/* ---------- isobar backdrop (weather-chart linework) ---------- */
.isobars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: var(--ink);
  opacity: 0.075;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(8rem, 16vw, 12rem) 0 0;
}
.hero > .container {
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}
.hero-name {
  font-size: clamp(2.9rem, 8.6vw, 6.6rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin-top: 1.1rem;
}
.hero-tag {
  margin-top: 1.1rem;
  font-size: clamp(1.15rem, 2.2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-2);
}
.hero-tag span {
  color: var(--gold-ink);
  font-weight: 700;
}
.hero .lead {
  margin-top: 1.6rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2.2rem;
}
.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}
.hero-art img {
  position: relative;
  width: 92%;
}
.hero-disc {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper-3);
  top: 5%;
  left: 3%;
}
.spectrum {
  display: flex;
  height: 7px;
  margin-top: clamp(3.5rem, 8vw, 6rem);
}
.spectrum span:nth-child(1) {
  flex: 3;
  background: var(--gold);
}
.spectrum span:nth-child(2) {
  flex: 4;
  background: var(--red);
}
.spectrum span:nth-child(3) {
  flex: 2;
  background: var(--blue);
}
.spectrum span:nth-child(4) {
  flex: 5;
  background: var(--green);
}

/* ---------- section scaffold ---------- */
.section {
  padding: var(--pad-y) 0;
}
.sec-head {
  display: grid;
  gap: 0.9rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.8rem);
  max-width: 46rem;
}
.sec-head .eyebrow,
.sec-head .sec-bar {
  justify-self: start;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.spec {
  border-top: 2px solid var(--green);
}
.spec div {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hair);
}
.spec dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.spec dd {
  font-size: 0.95rem;
  font-weight: 500;
}

/* ---------- research ---------- */
.research {
  --accent: var(--gold);
  --accent-ink: var(--gold-ink);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--hair);
  border-top: 4px solid var(--gold);
  border-bottom: 1px solid var(--hair);
}
.card {
  background: var(--paper);
  padding: clamp(1.6rem, 2.6vw, 2.3rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.22s ease;
}
.card:hover {
  background: var(--paper-2);
}
.card h3 {
  font-size: 1.18rem;
  letter-spacing: -0.025em;
  line-height: 1.24;
}
.card p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-2);
}
.card-link {
  margin-top: auto;
  padding-top: 0.5rem;
  align-self: start;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity 0.18s ease;
}
.card-link:hover {
  opacity: 0.65;
}

/* ---------- statement ---------- */
.statement {
  background: var(--green-2);
  color: var(--paper-2);
  padding: clamp(5.5rem, 12vw, 9rem) 0;
}
.statement blockquote {
  font-size: clamp(1.5rem, 3.6vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.16;
  max-width: 22ch;
  text-wrap: balance;
}
.statement cite {
  display: block;
  margin-top: 1.6rem;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #97b3a4;
}

/* ---------- education ---------- */
.education {
  --accent: var(--red);
  --accent-ink: var(--red);
  background: var(--paper-2);
}
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.6rem);
}
.edu {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding-top: 1.1rem;
  border-top: 4px solid var(--red);
}
.edu .when {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--red);
}
.edu h3 {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.edu p {
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--ink-2);
}

/* ---------- experience (deep blue ground) ---------- */
.experience {
  --accent: #7fa3c7;
  --accent-ink: #9db8d2;
  background: var(--blue-2);
  color: var(--paper-2);
}
.timeline {
  display: grid;
  gap: clamp(2.2rem, 4vw, 3.2rem);
  border-left: 1px solid rgba(247, 242, 231, 0.22);
  padding-left: clamp(1.4rem, 3vw, 2.6rem);
}
.t-item {
  position: relative;
  display: grid;
  gap: 0.4rem;
}
.t-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(1.4rem, 3vw, 2.6rem) - 5px);
  top: 0.6rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7fa3c7;
}
.t-item .when {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9db8d2;
}
.t-item h3 {
  font-size: 1.12rem;
  letter-spacing: -0.022em;
  line-height: 1.3;
}
.t-org {
  font-size: 0.9rem;
  font-weight: 500;
  color: #b9cee0;
}
.t-item p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #dae4ee;
  max-width: 62ch;
}
.t-item .card-link {
  margin-top: 0.35rem;
  justify-self: start;
}

/* ---------- recognition ---------- */
.rec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.rec-grid h3 {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.2rem;
}
.rows {
  list-style: none;
}
.rows li {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--hair);
}
.rows li:last-child {
  border-bottom: 1px solid var(--hair);
}
.rows b {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.35;
}
.rows .meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.rows p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 52ch;
}

/* ---------- writing ---------- */
.writing {
  background: var(--paper-2);
}
.writing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1px;
  background: var(--hair);
  border-top: 4px solid var(--green);
  border-bottom: 1px solid var(--hair);
}
.post-card {
  background: var(--paper-2);
  padding: clamp(1.6rem, 2.6vw, 2.2rem);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.22s ease;
}
.post-card:hover {
  background: var(--paper);
}
.post-card .when {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.post-card h3 {
  font-size: 1.1rem;
  letter-spacing: -0.024em;
  line-height: 1.28;
}
.post-card p {
  font-size: 0.93rem;
  line-height: 1.62;
  color: var(--ink-2);
}
.post-card .more {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
}

/* ---------- lineage / colophon ---------- */
.lineage {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border-top: 1px solid var(--hair);
}
.lineage > .container {
  position: relative;
}
.lineage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 1px;
  background: var(--hair);
  border-block: 1px solid var(--hair);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.swatch {
  background: var(--paper);
  padding: 1.4rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}
.chip {
  height: 92px;
  display: grid;
  place-items: center;
}
.chip svg {
  width: 46px;
  height: 46px;
}
.swatch .name {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.swatch b {
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.swatch p {
  font-size: 0.86rem;
  line-height: 1.58;
  color: var(--ink-2);
}
.tree-wrap {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  overflow-x: auto;
}
.tree {
  min-width: 780px;
  width: 100%;
  height: auto;
}
.tree text {
  font-family: var(--mono);
  font-size: 13px;
  fill: var(--ink-2);
  letter-spacing: 0.02em;
}
.tree .node {
  fill: var(--ink);
  font-weight: 500;
}
.tree line,
.tree path {
  stroke: var(--hair-2);
  stroke-width: 1.25;
  fill: none;
}

/* ---------- contact ---------- */
.contact .big-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: clamp(1.5rem, 4.6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 3px solid var(--gold);
  transition: border-color 0.2s ease;
}
.contact .big-link:hover {
  border-color: var(--green);
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hair);
}
.links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}
.links a:hover {
  color: var(--ink);
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--hair);
  padding: 2.2rem 0;
  font-size: 0.82rem;
  color: var(--ink-3);
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
footer a {
  text-decoration: none;
}
footer a:hover {
  color: var(--ink);
}
.geo {
  display: flex;
  gap: 6px;
}
.geo span {
  width: 9px;
  height: 9px;
}
.geo span:nth-child(1) {
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.geo span:nth-child(2) {
  background: var(--red);
}
.geo span:nth-child(3) {
  background: var(--blue);
  border-radius: 50%;
}

/* ---------- blog index + article ---------- */
.page-head {
  padding: clamp(8rem, 15vw, 11rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.page-head h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  letter-spacing: -0.04em;
  margin-top: 1rem;
  max-width: 18ch;
}
.page-head .lead {
  margin-top: 1.3rem;
  max-width: 50ch;
}
.post-hero {
  padding: clamp(8rem, 15vw, 11rem) 0 clamp(2rem, 4vw, 3rem);
}
.post-hero .container {
  max-width: 46rem;
}
.post-hero .blog-date {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.post-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -0.04em;
  margin-top: 0.9rem;
}
.post-dek {
  margin-top: 1.2rem;
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.6;
  color: var(--ink-2);
}
.post-body {
  width: min(46rem, 100% - clamp(2rem, 8vw, 6rem));
  margin-inline: auto;
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-bottom: clamp(5rem, 10vw, 8rem);
  border-top: 1px solid var(--hair);
}
.post-body p {
  color: var(--ink-2);
  margin-bottom: 1.3rem;
}
.post-body h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  letter-spacing: -0.03em;
  margin: 2.6rem 0 1rem;
}
.post-body blockquote {
  margin: 2rem 0;
  padding-left: 1.3rem;
  border-left: 3px solid var(--gold);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.45;
  color: var(--ink);
}
.post-body a {
  color: var(--green);
  text-underline-offset: 3px;
}
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
}
.back-link:hover {
  color: var(--ink);
}

/* ---------- motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.rise {
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.d1 {
  animation-delay: 0.05s;
}
.d2 {
  animation-delay: 0.13s;
}
.d3 {
  animation-delay: 0.21s;
}
.d4 {
  animation-delay: 0.29s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner,
  .about-grid,
  .rec-grid,
  .lineage-grid {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
    max-width: 280px;
    justify-self: start;
  }
}
@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 34px;
    background: none;
    border: 1px solid var(--hair-2);
    color: var(--ink);
    font-size: 1rem;
    cursor: pointer;
  }
  .site-nav ul {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper-2);
    border-bottom: 1px solid var(--hair);
    padding: 0.4rem clamp(1rem, 4vw, 3rem) 1rem;
  }
  .site-nav ul.open {
    display: flex;
  }
  .site-nav ul a {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--hair);
    font-size: 0.95rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .rise {
    animation: none;
  }
  .btn:hover {
    transform: none;
  }
}
