/* =========================================================
   Alex Sicart Ramos — personal site
   Editorial landing · warm paper · serif display · bronze accent.
   Visual DNA shared with bennu.app & unicornpay.app.
   ========================================================= */

:root {
  --paper:     #f4f1ea;   /* warm paper */
  --paper-2:   #efeae0;
  --ink:       #1b1813;   /* warm near-black */
  --ink-soft:  #423c32;
  --muted:     #756d5f;   /* secondary text */
  --faint:     #9b9180;   /* tertiary */
  --line:      #e3ddd0;   /* hairlines */
  --line-2:    #d6cdba;
  --gold:      #a9802f;   /* bronze accent — the signature */
  --gold-2:    #c9a253;
  --gold-deep: #8a6a26;
  --gold-soft: rgba(169, 128, 47, 0.12);

  --shadow-sm: 0 14px 30px -16px rgba(50, 38, 20, 0.30);
  --shadow-lg: 0 50px 100px -40px rgba(50, 38, 20, 0.42);

  --maxw:      1200px;
  --gutter:    clamp(20px, 5vw, 72px);
  --ease:      cubic-bezier(.2, .8, .2, 1);

  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; }

/* ---------- Ambient background ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(40% 30% at 12% 4%, rgba(201, 162, 83, 0.14), transparent 70%),
    radial-gradient(38% 32% at 92% 2%, rgba(120, 105, 80, 0.08), transparent 72%),
    radial-gradient(50% 40% at 80% 100%, rgba(169, 128, 47, 0.08), transparent 70%);
}
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(27, 24, 19, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 24, 19, 0.032) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(140% 100% at 50% 0%, #000 25%, transparent 80%);
  mask-image: radial-gradient(140% 100% at 50% 0%, #000 25%, transparent 80%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Shared mono label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 26px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .sep { color: var(--line-2); margin: 0 0.7em; }
.dot-mark {
  width: 6px; height: 6px;
  margin-right: 0.9em;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.ital {
  font-style: italic;
  color: var(--gold);
  background: linear-gradient(96deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================= NAV ================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  background: linear-gradient(180deg, rgba(244, 241, 234, 0.86), rgba(244, 241, 234, 0));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-decoration: none;
}
.nav-mark-glyph { color: var(--gold); font-size: 13px; transition: transform 0.6s var(--ease); }
.nav-mark:hover .nav-mark-glyph { transform: rotate(180deg); }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--gold); }
.nav-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  letter-spacing: 0.05em;
}

.nav-tools { display: flex; align-items: center; gap: 16px; }
.lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--faint);
}
.lang-opt { transition: color 0.2s ease; }
.lang-opt.is-active { color: var(--ink); }
.lang-sep { color: var(--line-2); }

.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s ease;
}
.nav-cta:hover { transform: translateY(-1px); background: #2a251d; }

/* ================= RAIL (section index) ================= */
.rail {
  position: fixed;
  top: 50%;
  right: clamp(16px, 2.4vw, 34px);
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.rail a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--faint);
  text-decoration: none;
  opacity: 0.7;
  transition: color 0.25s ease, opacity 0.25s ease;
}
.rail a i {
  display: block;
  width: 22px; height: 1px;
  background: var(--line-2);
  transition: width 0.3s var(--ease), background 0.25s ease;
}
.rail a:hover { opacity: 1; color: var(--ink); }
.rail a.is-active { opacity: 1; color: var(--gold); }
.rail a.is-active i { width: 38px; background: var(--gold); }

/* ================= LAYOUT PRIMITIVES ================= */
main { display: block; }
.block {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 150px) var(--gutter);
  border-top: 1px solid var(--line);
}

.block-head { margin-bottom: clamp(40px, 6vw, 72px); }
.block-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.block-label i {
  font-style: normal;
  color: var(--gold);
  padding: 3px 7px;
  border: 1px solid var(--gold-soft);
  border-radius: 5px;
  background: var(--gold-soft);
}
.block-title {
  margin: 0;
  max-width: 18ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

/* ================= HERO ================= */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(130px, 18vh, 200px) var(--gutter) clamp(60px, 8vh, 90px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 8.4vw, 116px);
  line-height: 0.96;
  letter-spacing: -0.022em;
}

.hero .lede {
  margin: 30px 0 0;
  max-width: 46ch;
  font-size: clamp(16px, 1.4vw, 18.5px);
  font-weight: 450;
  color: var(--ink-soft);
}

.actions { margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 16px 30px -14px rgba(27, 24, 19, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); background: #2a251d; box-shadow: 0 22px 40px -14px rgba(27, 24, 19, 0.6); }
.btn-primary svg { transition: transform 0.25s var(--ease); }
.btn-primary:hover svg { transform: translateY(2px); }
.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { transform: translateY(-2px); background: #fff; border-color: var(--gold); color: var(--gold); }
.btn-ghost svg { transition: transform 0.25s var(--ease); }
.btn-ghost:hover svg { transform: translate(2px, -2px); }

.hero-stats {
  margin: clamp(40px, 6vw, 64px) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 56px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-stats div { display: flex; flex-direction: column; gap: 5px; }
.hero-stats dt {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.hero-stats dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

/* Hero portrait */
.hero-portrait { margin: 0; }
.portrait-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  background: var(--paper-2);
}
.portrait-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  /* New photo has perfect bronze rim light — preserve colour, just polish subtly */
  filter: contrast(1.02) brightness(1.01) saturate(0.95);
  transition: filter 0.7s var(--ease), transform 0.9s var(--ease);
}
.hero-portrait:hover .portrait-frame img { filter: contrast(1.03) brightness(1.02) saturate(1.05); transform: scale(1.03); }
.portrait-tick {
  position: absolute;
  width: 16px; height: 16px;
  border: 1px solid rgba(255,255,255,0.6);
  pointer-events: none;
  mix-blend-mode: overlay;
}
.portrait-tick.tl { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.portrait-tick.br { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.hero-portrait figcaption {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 16px;
  padding-left: 2px;
}
.pc-name { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink); }
.pc-role { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--muted); }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(48px, 7vw, 80px);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  text-decoration: none;
}
.scroll-cue i {
  display: block;
  width: 46px; height: 1px;
  background: var(--line-2);
  position: relative;
  overflow: hidden;
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--gold);
  animation: trace 2.4s var(--ease) infinite;
}
@keyframes trace {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(280%); }
}

/* ================= MANIFESTO ================= */
.manifesto {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(70px, 12vh, 140px) var(--gutter);
  border-top: 1px solid var(--line);
}
.manifesto-text {
  margin: 0;
  max-width: 22ch;
  margin-inline: auto;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.manifesto-text span { display: inline; }
.manifesto-text .ital { display: inline; }

/* ================= ABOUT ================= */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.about-lede p {
  margin: 0 0 18px;
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--ink-soft);
  max-width: 38ch;
}
.about-lede p:last-child { margin-bottom: 0; color: var(--muted); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.tl-year {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.tl-body h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.tl-body p { margin: 0; font-size: 15px; color: var(--muted); max-width: 44ch; }

/* ================= VENTURES ================= */
.ventures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.venture {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.2vw, 40px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.venture:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
}
.venture-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.venture-name {
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.venture-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}
.venture-desc { margin: 0 0 24px; font-size: 15px; color: var(--ink-soft); max-width: 42ch; }
.venture-go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.venture-go svg { transition: transform 0.25s var(--ease); }
.venture:hover .venture-go svg { transform: translate(2px, -2px); }

/* ================= AWARDS ================= */
.awards { list-style: none; margin: 0; padding: 0; }
.awards li {
  position: relative;
  display: grid;
  grid-template-columns: 60px 1fr auto 28px;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(22px, 2.6vw, 32px) 4px;
  border-top: 1px solid var(--line);
  transition: padding 0.3s var(--ease);
}
.awards li:last-child { border-bottom: 1px solid var(--line); }
.awards li a { display: contents; text-decoration: none; color: inherit; }
.awards li:hover { padding-left: 14px; }
.aw-num { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.aw-name {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.aw-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.aw-arrow { color: var(--gold); opacity: 0; transform: translateX(-6px); transition: opacity 0.3s ease, transform 0.3s var(--ease); }
.awards li:hover .aw-arrow { opacity: 1; transform: translateX(0); }
.awards li:hover .aw-name { color: var(--gold); }

/* ================= CONTACT ================= */
.contact { text-align: center; }
.contact .block-label { justify-content: center; }
.contact-title {
  margin: 22px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 1.0;
  letter-spacing: -0.02em;
}
.contact-title span { display: block; }
.contact-mail {
  display: inline-block;
  margin: clamp(30px, 4vw, 46px) 0 0;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1.5px;
  padding-bottom: 3px;
  transition: background-size 0.3s var(--ease), color 0.3s ease;
}
.contact-mail:hover { background-size: 100% calc(100% - 2px); color: var(--gold); }

.socials {
  margin: clamp(38px, 5vw, 56px) 0 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.socials a {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.45);
  transition: transform 0.25s var(--ease), color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.socials a:hover {
  color: var(--ink);
  background: #fff;
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 16px 26px -14px rgba(50, 38, 20, 0.4);
}
.socials a::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.socials a:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= FOOTER ================= */
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.foot a { color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
.foot a:hover { color: var(--gold); }
.foot-mid { color: var(--faint); }

/* ================= REVEAL ================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ================= RESPONSIVE ================= */
@media (max-width: 920px) {
  .rail { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; max-width: 340px; width: 100%; justify-self: center; }
  .about-grid { grid-template-columns: 1fr; }
  .ventures { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 560px) {
  .nav { padding: 14px var(--gutter); }

  /* Hero portrait: compact square on small screens */
  .hero-portrait { max-width: 200px; }
  .portrait-frame img { aspect-ratio: 1 / 1; }

  /* Hero display text: tighter */
  .display { font-size: clamp(44px, 13vw, 72px); }
  .hero .lede { font-size: 15.5px; }
  .hero-stats { gap: 22px; }

  /* Timeline */
  .timeline li { grid-template-columns: 64px 1fr; gap: 16px; }

  /* Awards */
  .awards li { grid-template-columns: 38px 1fr; row-gap: 4px; }
  .aw-meta { grid-column: 2; text-align: left; }
  .aw-arrow { display: none; }

  /* Contact title */
  .contact-title { font-size: clamp(36px, 11vw, 56px); }

  /* Footer: stack centered */
  .foot { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue i::after { animation: none; }
  * { transition-duration: 0.001ms !important; }
}
