/* === Jairo Gallo — Photography Portfolio
   Spectral (display serif) + Raleway (humanist sans)
   Palette: moss forest green / true white / lime accent
================================================================ */

:root {
  /* Brand colors */
  --moss:      #1a3a2a;
  --moss-deep: #0f2418;
  --moss-tint: #2a5240;
  --lime:      #b9d177;

  /* Surfaces — true white, not warm cream */
  --paper:      #ffffff;
  --paper-tint: #f6f6f3;   /* near-zero chroma, barely perceptible */

  /* Ink */
  --ink:      #141412;
  --ink-soft: #706e66;

  /* Rules */
  --rule:      rgba(20, 20, 18, 0.10);
  --rule-soft: rgba(20, 20, 18, 0.05);

  /* Type */
  --serif: "Spectral", "EB Garamond", Georgia, serif;
  --sans:  "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* Easing */
  --ease-out:  cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io:   cubic-bezier(0.77, 0, 0.175, 1);
}

[data-theme="dark"] {
  --paper:      #0e110d;
  --paper-tint: #141813;
  --ink:        #e8e4d8;
  --ink-soft:   #908d82;
  --rule:       rgba(232, 228, 216, 0.14);
  --rule-soft:  rgba(232, 228, 216, 0.07);
  --moss-deep:  #b9d177;   /* lime in dark for footer brand mark */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }

/* === Navigation bar ===
   Fixed + transparent over the hero photo, turns solid on scroll. */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  height: 64px;
  gap: 32px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out);
}
.topbar.solid {
  background: var(--paper);
  border-bottom-color: var(--rule);
}

.topbar .brand {
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--ink);
  transition: color 0.35s var(--ease-out);
}
.topbar .brand em { font-style: normal; color: var(--moss); transition: color 0.35s var(--ease-out); }

.topbar nav {
  display: flex;
  gap: 32px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.topbar nav a {
  position: relative;
  padding: 4px 0;
  transition: color 0.18s var(--ease-out);
}
.topbar nav a:hover { color: var(--moss); }
.topbar nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--moss);
  transition: right 0.22s var(--ease-out);
}
.topbar nav a:hover::after { right: 0; }

.topbar .tools { display: flex; align-items: center; gap: 8px; }
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  transition: border-color 0.35s var(--ease-out);
}
.lang-toggle button {
  background: transparent;
  border: 0;
  padding: 6px 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  transition: background 0.15s var(--ease-out), color 0.15s var(--ease-out);
}
.lang-toggle button:active { transform: scale(0.96); }
.lang-toggle button.active { background: var(--moss); color: var(--paper); }

/* Light treatment while transparent over the hero photo */
.topbar:not(.solid) .brand { color: #fff; }
.topbar:not(.solid) .brand em { color: var(--lime); }
.topbar:not(.solid) nav { color: rgba(255,255,255,0.82); }
.topbar:not(.solid) nav a:hover { color: #fff; }
.topbar:not(.solid) nav a::after { background: var(--lime); }
.topbar:not(.solid) .lang-toggle { border-color: rgba(255,255,255,0.45); }
.topbar:not(.solid) .lang-toggle button { color: rgba(255,255,255,0.85); }
.topbar:not(.solid) .lang-toggle button.active { background: #fff; color: var(--moss); }

/* Fixed nav: keep anchored sections clear of the bar */
section[id] { scroll-margin-top: 76px; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  background: var(--moss);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 0;
  transition: background 0.18s var(--ease-out), transform 0.12s var(--ease-out);
  cursor: pointer;
}
.btn:hover  { background: var(--moss-tint); }
.btn:active { transform: scale(0.97); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn.ghost:hover  { background: var(--ink); color: var(--paper); }
/* Light button — for use over photography */
.btn.light {
  background: var(--paper);
  color: var(--ink);
}
.btn.light:hover { background: var(--lime); color: var(--moss-deep); }
.btn.ghost.active { color: var(--moss); border-color: var(--moss); background: transparent; }
.btn .arrow {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  transition: transform 0.18s var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

/* === Photo placeholder === */
.photo {
  position: relative;
  background: var(--paper-tint);
  overflow: hidden;
  display: block;
}
.photo svg { display: block; width: 100%; height: 100%; }
.photo .cap {
  position: absolute;
  left: 14px; bottom: 14px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.9);
  display: flex;
  gap: 10px;
  align-items: center;
}
.photo .cap .dot {
  width: 5px; height: 5px;
  background: var(--lime);
  display: inline-block;
  border-radius: 50%;
}
.photo .num {
  position: absolute;
  right: 14px; top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.1em;
}

/* === Footer === */
footer.site-foot {
  background: var(--moss-deep);
  color: var(--paper);
  padding: 72px 40px 48px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 48px 56px;
}
[data-theme="dark"] footer.site-foot { background: #060806; }
footer.site-foot .foot-brand { display: flex; flex-direction: column; gap: 0; }
footer.site-foot .brand-mark {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
footer.site-foot .brand-mark em { font-style: normal; color: var(--lime); }
footer.site-foot .sub {
  font-size: 12px;
  font-weight: 300;
  opacity: 0.5;
  letter-spacing: 0.04em;
}
footer.site-foot .foot-tagline {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  opacity: 0.35;
  margin-top: 20px;
  letter-spacing: 0.04em;
}
footer.site-foot h4 {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 18px;
  opacity: 0.45;
}
footer.site-foot ul { list-style: none; margin: 0; padding: 0; }
footer.site-foot li {
  padding: 6px 0;
  font-size: 15px;
  font-weight: 300;
  opacity: 0.8;
}
footer.site-foot li.foot-city {
  font-size: 12px;
  opacity: 0.4;
  margin-top: 8px;
  letter-spacing: 0.03em;
}
footer.site-foot li a {
  transition: opacity 0.15s var(--ease-out), color 0.15s var(--ease-out);
}
footer.site-foot li a:hover { opacity: 1; color: var(--lime); }
footer.site-foot .colophon {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 32px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.3;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--paper-tint); }
::-webkit-scrollbar-thumb { background: var(--moss); }

/* === Scroll reveal === */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}
