/* style.css — zar.nyc | photo backplate | dusk restraint */

:root {
  /* Palette pulled from the photo's dark film-green corners */
  --bg:        #22371f;   /* film-black green (sampled from photo shadows) */
  --bg-2:      #2a3f26;
  --bg-3:      #34482f;

  /* Sunset foreground — everything text sits in this warm hue */
  --fg:        #f0b085;   /* peach-cream — primary text on hero */
  --fg-soft:   #d99065;   /* deeper peach for secondary */
  --muted:     #9b7458;   /* dusty peach-brown for eyebrows/labels */

  --line:      #3d3126;   /* warm hairline */
  --line-soft: #4a3b2e;

  --accent:    #ee8a52;   /* the sunset itself — CTAs, underlines, hovers */
  --accent-2:  #f5b489;   /* softer sunset for hover states */

  --serif: "Newsreader", "Times New Roman", Times, Georgia, serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --max: 1200px;
}

html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Subtle film grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 30;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .28 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
}

::selection { background: var(--accent); color: var(--bg); }

/* ============ LAYOUT SHELL ============ */
main { flex: 1; position: relative; z-index: 2; }

/* ============ NAV ============ */
.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
}
.nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.nav__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--fg);
}
.nav__brand-name {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  font-weight: 700;
  color: var(--fg);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.nav__brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--muted);
}
.nav__links { display: inline-flex; gap: 24px; }
.nav__link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
  transition: color .2s ease;
}
.nav__link:hover { color: var(--accent-2); }

/* ============ HERO — photo backplate ============ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: end;          /* content anchored to bottom */
  overflow: hidden;
  isolation: isolate;
}

.hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--bg);
  background-image: url("./assets/bridge-hero.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 100% 50%;
  filter: saturate(1.05);
  -webkit-mask-image: radial-gradient(ellipse 82% 92% at 68% 52%, black 55%, transparent 96%);
          mask-image: radial-gradient(ellipse 82% 92% at 68% 52%, black 55%, transparent 96%);
}

/* Atmospheric wash on top of the hero photo — locked: user approved 50% film-green */
.hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(34, 55, 31, 0.50);
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 82% 92% at 68% 52%, black 55%, transparent 96%);
          mask-image: radial-gradient(ellipse 82% 92% at 68% 52%, black 55%, transparent 96%);
}

.hero__wash { display: none; }

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 6rem var(--gutter) 5.5rem;
  width: 100%;
  display: block;             /* content flows bottom-left */
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 42ch;
}

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s ease, transform 1s ease;
  transition-delay: var(--rev-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  animation: dot-blink 1.05s steps(2, end) infinite;
}
@keyframes dot-blink { 50% { opacity: 0; } }

.hero__title {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(3.4rem, 8vw, 6.3rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.55);
  text-transform: lowercase;
}

.hero__lede {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg-soft);
  max-width: 38ch;
  margin: 0;
}

.hero__meta {
  position: absolute;
  right: var(--gutter);
  bottom: 32px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--fg-soft);
  opacity: 0.72;
  text-align: right;
  line-height: 1.6;
}
.hero__meta span { display: block; }
.hero__meta span + span { color: var(--muted); }

/* ============ CONTACT / GET IN TOUCH — dusk sky ============ */
.contact {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(5rem, 10vh, 7.5rem) var(--gutter);
  isolation: isolate;
}

/* Contact photo — floats right-of-center like the hero, soft radial mask so edges dissolve into green */
.contact__sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--bg);
  background-image: url("./assets/dusk-sky-1800.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 100% 50%;
  filter: saturate(0.75) brightness(0.95) sepia(0.08);
  opacity: 1;
  -webkit-mask-image: radial-gradient(ellipse 82% 92% at 68% 52%, black 55%, transparent 96%);
          mask-image: radial-gradient(ellipse 82% 92% at 68% 52%, black 55%, transparent 96%);
}

/* Atmospheric wash on the contact photo — matches hero's wash but masked to photo area only */
.contact__sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(34, 55, 31, 0.50);
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 78% at 62% 55%, black 40%, transparent 92%);
          mask-image: radial-gradient(ellipse 70% 78% at 62% 55%, black 40%, transparent 92%);
}

.contact__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact__label { align-self: flex-start; }

.label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.contact__term { max-width: 620px; }

/* ---- Contact form (feels like a continuation of the shell session) ---- */
.contact__term .term__session { margin-bottom: 14px; }
.cform {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--fg);
}
.cform__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cform__prompt {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-2);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.cform__caret {
  color: var(--accent);
  margin-right: 6px;
  font-weight: 500;
}
.cform__input {
  font: 500 14px/1.55 var(--mono);
  color: var(--fg);
  background: rgba(15, 22, 12, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(240, 176, 133, 0.28);
  border-radius: 3px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .18s ease, background .18s ease;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.cform__input:focus {
  border-color: var(--accent);
  background: rgba(15, 22, 12, 0.7);
}
.cform__input::placeholder { color: var(--muted); }
.cform__textarea {
  resize: vertical;
  min-height: 92px;
  font-family: var(--mono);
  line-height: 1.6;
}
.cform__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.cform__submit {
  font: 500 13.5px/1 var(--mono);
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  padding: 11px 18px;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
  display: inline-flex;
  align-items: baseline;
}
.cform__submit:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}
.cform__submit:hover .cform__caret { color: var(--bg); }
.cform__cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: currentColor;
  margin-left: 8px;
  transform: translateY(2px);
  animation: term-blink 1s steps(2, end) infinite;
}
.cform__status {
  font-size: 12px;
  color: var(--muted);
  min-height: 1em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.cform__status[data-state="success"] { color: var(--accent-2); }
.cform__status[data-state="error"]   { color: #ee8a52; }

@media (min-width: 720px) {
  .cform__row { flex-direction: row; align-items: center; gap: 14px; }
  .cform__row .cform__prompt { flex: 0 0 92px; }
  .cform__row--message { align-items: flex-start; }
  .cform__row--message .cform__prompt { padding-top: 10px; }
}

/* ============ BIO SECTION ============ */
.bio {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(6rem, 12vh, 9rem) var(--gutter);
  isolation: isolate;
}

/* Bio photo — floats right-of-center like the hero, soft radial mask so edges dissolve into green */
.bio__night {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--bg);
  background-image: url("./assets/bio-night.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 100% 50%;
  filter: saturate(0.55) brightness(0.88) sepia(0.18);
  opacity: 1;
  -webkit-mask-image: radial-gradient(ellipse 82% 92% at 68% 52%, black 55%, transparent 96%);
          mask-image: radial-gradient(ellipse 82% 92% at 68% 52%, black 55%, transparent 96%);
}

/* Atmospheric wash on the bio photo — matches hero's wash but masked to photo area only */
.bio__night::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(34, 55, 31, 0.50);
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 82% 92% at 68% 52%, black 55%, transparent 96%);
          mask-image: radial-gradient(ellipse 82% 92% at 68% 52%, black 55%, transparent 96%);
}

.bio__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.bio__label { align-self: flex-start; }

/* ---- Bare terminal (no frame, no card) ---- */
.term {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--fg);
  /* photos are now full-bleed — poster-style shadow so text always reads */
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 2px 6px rgba(0, 0, 0, 0.7),
    0 0 22px rgba(0, 0, 0, 0.55);
}

/* --- neofetch header: ASCII portrait + meta --- */
.term__neo {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: start;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px dashed var(--line-soft);
}
.term__ascii {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.02;
  letter-spacing: 0.6px;
  color: var(--accent);
  white-space: pre;
  filter: drop-shadow(0 0 12px rgba(238, 138, 82, 0.18));
  user-select: none;
}
.term__meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--fg-soft);
  padding-top: 4px;
}
.term__meta-row { display: flex; gap: 10px; align-items: baseline; }
.term__k {
  color: var(--accent-2);
  min-width: 44px;
  font-weight: 500;
}
.term__v { color: var(--fg); }
.term__v a { color: var(--accent); border-bottom: 1px solid rgba(238, 138, 82, 0.3); }
.term__v a:hover { color: var(--accent-2); }
.term__palette {
  display: flex;
  gap: 2px;
  margin-top: 10px;
}
.term__palette span {
  width: 18px;
  height: 12px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.35);
}

/* --- Session --- */
/* Bio & contact terminals: smoked-glass panel so text reads against busy photos */
.bio .term,
.contact .term {
  background: rgba(10, 20, 12, 0.55);
  backdrop-filter: blur(3px) saturate(0.9);
  -webkit-backdrop-filter: blur(3px) saturate(0.9);
  border: 1px solid rgba(240, 176, 133, 0.14);
  border-radius: 4px;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.5rem, 3.5vw, 2.5rem);
  width: fit-content;
  max-width: min(720px, 100%);
}
.contact .term { max-width: min(780px, 100%); }
.bio .term__session { min-height: 200px; }
.term__line { white-space: pre-wrap; word-break: break-word; padding: 1px 0; }
.term__prompt { color: var(--accent-2); }
.term__sep    { color: var(--muted); }
.term__path   { color: var(--fg-soft); }
.term__caret  { color: var(--accent); margin: 0 6px 0 2px; }
.term__cmd    { color: var(--fg); }
.term__out    { color: var(--fg-soft); padding: 2px 0; }
.term__out--dim { color: var(--muted); font-size: 11.5px; }
.term__type {
  color: var(--fg);
  padding: 6px 0 8px;
  min-height: 1.75em;
  white-space: pre-wrap;
  max-width: 78ch;
}
.term__type::after {
  content: "█";
  color: var(--accent);
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
.term__type.is-done::after { content: ""; opacity: 0; }
.term__link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(240, 176, 133, 0.45);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 160ms ease, color 160ms ease;
}
.term__link:hover,
.term__link:focus-visible {
  text-decoration-color: var(--accent);
}
.term__more { padding-top: 6px; }
.term__cursor {
  display: inline-block;
  width: 8px; height: 14px;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
.term__prompt-line {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding-top: 6px;
}
.term__hint {
  appearance: none;
  background: transparent;
  border: 1px solid var(--line-soft);
  color: var(--fg-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  margin-left: 4px;
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.term__hint:hover, .term__hint:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(238, 138, 82, 0.06);
  outline: none;
}
.term__hint kbd {
  font-family: var(--mono);
  color: var(--accent-2);
  padding: 0 4px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  font-size: 10px;
}
.term__hint.is-hidden { display: none; }

@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 720px) {
  .term__body { padding: 18px 16px 20px; font-size: 12px; }
  .term__neo { grid-template-columns: 1fr; gap: 18px; }
  .term__ascii { font-size: 8px; letter-spacing: 0.3px; align-self: center; }
  .term__meta { font-size: 11.5px; }
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  margin-top: auto;
  position: relative;
  z-index: 2;
}
.footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__clock {
  color: var(--fg-soft);
  font-variant-numeric: tabular-nums;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 820px) {
  .hero__inner {
    padding-top: 7rem;
    padding-bottom: 5rem;
  }
  .hero__photo {
    background-size: cover;
    background-position: 65% center;
  }
  .hero__meta { display: none; }
}

@media (max-width: 480px) {
  .footer__inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }
}

/* ============ MOTION SAFETY ============ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ PHOTO GPS CAPTIONS ============ */
.geo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-soft);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.85),
    0 0 14px rgba(0, 0, 0, 0.55);
}
.geo__place { color: var(--fg); font-weight: 500; }
.geo__coord { color: var(--muted); letter-spacing: 0.12em; }

/* GPS caption anchored to bottom-left of section like a photo credit stamp */
/* Positioned above the photo’s bottom fade so it sits inside the photo, not the transition */
.bio__geo,
.contact__geo {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(5.5rem, 12vh, 8rem);
  z-index: 3;
  margin: 0;
}

/* Contact form: hidden until 'more' expand, then grows in */
.cform[hidden] { display: none !important; }
.cform.is-expanded {
  animation: cform-grow 380ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes cform-grow {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
