/* texaloha.com — design system
   Palette + motifs carried over from the original status.sh page. */

:root {
  color-scheme: light dark;
  --bg: #0d1b22;
  --panel: #122631;
  --panel-2: #0f2029;
  --fg: #c9d8d6;
  --fg-dim: #9fb4b1;
  --teal: #5eead4;
  --sand: #e8c79a;
  --comment: #5c7a78;
  --dusk: #c97b53;
  --glow: #f0b878;
  --line: color-mix(in srgb, var(--fg) 14%, transparent);
  --mono: "SF Mono", "Menlo", "Consolas", "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="light"] {
  --bg: #eff5f3;
  --panel: #e1ebe8;
  --panel-2: #d8e5e1;
  --fg: #16302e;
  --fg-dim: #40605c;
  --teal: #0e8f82;
  --sand: #b8853c;
  --comment: #5f7876;
  --dusk: #eec9a0;
  --glow: #f7dcb0;
}
:root[data-theme="dark"] {
  --bg: #0d1b22;
  --panel: #122631;
  --panel-2: #0f2029;
  --fg: #c9d8d6;
  --fg-dim: #9fb4b1;
  --teal: #5eead4;
  --sand: #e8c79a;
  --comment: #5c7a78;
  --dusk: #c97b53;
  --glow: #f0b878;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eff5f3;
    --panel: #e1ebe8;
    --panel-2: #d8e5e1;
    --fg: #16302e;
    --fg-dim: #40605c;
    --teal: #0e8f82;
    --sand: #b8853c;
    --comment: #5f7876;
    --dusk: #eec9a0;
    --glow: #f7dcb0;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1b22;
    --panel: #122631;
    --panel-2: #0f2029;
    --fg: #c9d8d6;
    --fg-dim: #9fb4b1;
    --teal: #5eead4;
    --sand: #e8c79a;
    --comment: #5c7a78;
    --dusk: #c97b53;
    --glow: #f0b878;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: color-mix(in srgb, var(--fg) 10%, transparent);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ---------- top nav ---------- */
.topnav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font: 500 0.78rem/1 var(--mono);
  letter-spacing: 0.02em;
  color: var(--fg-dim);
}
.brand:hover .brand-name { color: var(--teal); }
.brand-name { transition: color 0.15s ease; }
.dots { display: inline-flex; gap: 0.3rem; }
.dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: color-mix(in srgb, var(--fg) 22%, transparent);
}
.topnav-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font: 500 0.78rem/1 var(--mono);
}
.topnav-links a {
  color: var(--fg-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.topnav-links a:hover { color: var(--teal); }
.theme-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg-dim);
  width: 1.9rem; height: 1.7rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover { color: var(--teal); border-color: var(--teal); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: min(82svh, 660px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(5rem, 12svh, 7.5rem) clamp(1.75rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
  isolation: isolate;
}
.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 55%, var(--dusk)) 78%,
    color-mix(in srgb, var(--bg) 30%, var(--dusk)) 100%
  );
}
.glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 88%;
  width: clamp(320px, 55vw, 640px);
  height: clamp(320px, 55vw, 640px);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--glow) 0%, color-mix(in srgb, var(--glow) 40%, transparent) 45%, transparent 72%);
  opacity: 0.55;
  filter: blur(2px);
}
.horizon {
  position: absolute;
  z-index: 0;
  left: 0; right: 0;
  top: 88%;
  height: 1px;
  background: color-mix(in srgb, var(--glow) 70%, var(--fg));
  opacity: 0.3;
}

/* ---------- terminal window ---------- */
.window {
  position: relative;
  z-index: 1;
  width: min(100%, 46rem);
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.45),
    0 8px 60px -10px color-mix(in srgb, var(--glow) 25%, transparent);
}
.titlebar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.9rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  font: 500 0.72rem/1.3 var(--mono);
  color: var(--comment);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.body-text {
  padding: clamp(1.4rem, 4vw, 2.2rem);
  font: 500 clamp(0.92rem, 2vw, 1.05rem)/2 var(--mono);
}
.prompt { color: var(--teal); margin-right: 0.15rem; }
.out { color: var(--fg); }
.out-link {
  color: var(--sand);
  text-decoration: none;
  margin-right: 1.1rem;
  border-bottom: 1px dashed color-mix(in srgb, var(--sand) 50%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.out-link:hover { color: var(--teal); border-bottom-color: var(--teal); }
.section-list { margin-top: 0.1rem; }
.cursor {
  display: inline-block;
  width: 0.55ch;
  height: 1em;
  background: var(--sand);
  vertical-align: text-bottom;
  margin-left: 0.15em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; opacity: 1; } }

/* ---------- tide canvas ---------- */
.tide {
  display: block;
  width: 100%;
  height: 56px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

/* ---------- sections ---------- */
.section {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.25rem, 5vw, 2.5rem);
}
.section-title {
  font: 500 0.85rem/1 var(--mono);
  color: var(--fg-dim);
  letter-spacing: 0.02em;
  margin: 0 0 1.4rem;
}
.section-title .prompt { color: var(--teal); }
.section-intro {
  color: var(--fg-dim);
  margin: 0 0 1.6rem;
  max-width: 40rem;
}

/* sample banner */
.sample-banner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0.55rem clamp(1.25rem, 5vw, 2.5rem);
  font: 500 0.75rem/1.5 var(--mono);
  color: var(--sand);
  border-bottom: 1px dashed color-mix(in srgb, var(--sand) 45%, transparent);
  background: color-mix(in srgb, var(--sand) 8%, transparent);
}

/* now */
.now-body .now-line { display: flex; gap: 0.9rem; }
.now-key {
  min-width: 8.5rem;
  color: var(--comment);
  flex: none;
}
.now-key::before { content: "> "; color: var(--teal); }
.now-val { color: var(--fg); }
.now-updated {
  color: var(--comment);
  font-size: 0.8em;
  margin-top: 0.9rem;
}
.now-updated::before { content: "// "; }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  background: var(--panel);
}
.stat b {
  display: block;
  font: 600 1.5rem/1.2 var(--mono);
  color: var(--teal);
}
.stat span {
  font: 500 0.7rem/1.4 var(--mono);
  color: var(--comment);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stat.next b { font-size: 0.95rem; color: var(--sand); line-height: 1.5; }

/* map */
.map-window { margin-bottom: 2.5rem; }
.map-wrap {
  position: relative;
  padding: 1rem 1rem 0.5rem;
  background: var(--bg);
}
.map-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}
.map-loading {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--comment);
  font: 500 0.85rem/1.6 var(--mono);
}
.map-wrap .countries path {
  fill: color-mix(in srgb, var(--fg) 9%, transparent);
  stroke: color-mix(in srgb, var(--fg) 22%, transparent);
  stroke-width: 0.4;
  transition: fill 0.15s ease;
}
.map-wrap .countries path:hover {
  fill: color-mix(in srgb, var(--fg) 20%, transparent);
}
.map-wrap .countries path.visited {
  fill: color-mix(in srgb, var(--teal) 55%, transparent);
  stroke: color-mix(in srgb, var(--teal) 80%, transparent);
}
.map-wrap .places circle {
  fill: var(--sand);
  stroke: var(--bg);
  stroke-width: 1.2;
  cursor: pointer;
}
.map-wrap .places circle.cluster { stroke-width: 1.5; }
.map-wrap .places circle:focus-visible {
  stroke: var(--teal);
  stroke-width: 1.8;
  outline: none;
}
.map-wrap .places circle.pulse {
  animation: dotpulse 2.6s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes dotpulse {
  0% { opacity: 1; }
  70% { opacity: 0.45; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .map-wrap .places circle.pulse { animation: none; }
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  padding: 0.5rem 1rem 0.7rem;
  font: 500 0.7rem/1 var(--mono);
  color: var(--comment);
  background: var(--bg);
}
.legend-item { display: inline-flex; align-items: center; gap: 0.45rem; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch.country { background: color-mix(in srgb, var(--teal) 55%, transparent); }
.swatch.city { background: var(--sand); border-radius: 50%; }
.swatch.city.cluster { width: 14px; height: 14px; }

/* tooltip */
.tooltip {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  background: var(--panel);
  border: 1px solid color-mix(in srgb, var(--fg) 25%, transparent);
  color: var(--fg);
  font: 500 0.75rem/1.5 var(--mono);
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.5);
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 0.12s ease;
  max-width: 16rem;
}
.tooltip.show { opacity: 1; }
.tooltip .t-sub { display: block; color: var(--comment); margin-top: 0.15rem; }

/* trips */
.trips { display: grid; gap: 2.4rem; }
.trip-year { display: grid; gap: 1rem; }
.year-heading {
  margin: 0;
  font: 500 0.85rem/1 var(--mono);
  color: var(--sand);
  letter-spacing: 0.04em;
}
.year-heading .prompt { color: var(--teal); margin-right: 0.35rem; }
.year-trips { display: grid; gap: 1.35rem; }
.trip {
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 18px 50px -28px rgba(0, 0, 0, 0.45);
  scroll-margin-top: 5.5rem;
}
.trip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0;
}
.trip-title {
  margin: 0;
  font: 600 1.15rem/1.4 var(--sans);
  letter-spacing: 0.01em;
}
.trip-dates {
  font: 500 0.75rem/1 var(--mono);
  color: var(--sand);
  white-space: nowrap;
}
@media (max-width: 560px) {
  .trip-head { flex-wrap: wrap; }
  .trip-dates { white-space: normal; }
}
.trip-return {
  box-shadow: none;
  background: var(--panel);
}
.trip-return .trip-body { padding-top: 0.35rem; padding-bottom: 1rem; }
.trip-return .trip-meta { margin-bottom: 0; }
.trip-return .trip-title a { color: inherit; text-decoration: none; }
.trip-return .trip-title a:hover { color: var(--teal); }
.trip-also { margin: 0 0 0.9rem; color: var(--fg-dim); }
.trip-also a { color: var(--sand); }
.trip-inset {
  margin: 1rem 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(11rem, 0.85fr);
  background: #0d1b22;
}
.trip-inset img { display: block; width: 100%; height: auto; }
.port-list {
  margin: 0;
  padding: 0.85rem 0.9rem 0.85rem 1.7rem;
  color: #c9d8d6;
  font: 500 0.78rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.port-list li::marker { color: #e8c79a; }
.trip-inset figcaption {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.45rem 0.8rem 0.6rem;
  background: #0f2029;
  color: #9fb4b1;
  font: 500 0.68rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (max-width: 640px) {
  .trip-inset { grid-template-columns: 1fr; }
}
.trip-photo {
  margin: 1rem 1.25rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  line-height: 0;
}
.trip-photo img { width: 100%; height: auto; display: block; }
.trip-body { padding: 1.1rem 1.25rem 1.35rem; }
.trip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font: 500 0.75rem/1.6 var(--mono);
  color: var(--comment);
  margin-bottom: 0.8rem;
}
.trip-meta .country-name { color: var(--teal); }
.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font: 500 0.68rem/1.6 var(--mono);
  color: var(--fg-dim);
}
.trip-summary { margin: 0 0 1rem; color: var(--fg); max-width: 40rem; }
.trip-highlights {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}
.trip-highlights li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--fg-dim);
  max-width: 40rem;
}
.trip-highlights li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--teal);
}

/* notes */
.notes { display: grid; gap: 1.5rem; }
.note .titlebar { cursor: default; }
.note-body {
  padding: 1.2rem 1.5rem 1.5rem;
  color: var(--fg);
  max-width: 42rem;
}
.note-body p { margin: 0 0 0.9rem; }
.note-body p:last-child { margin-bottom: 0; }
.note-date {
  font: 500 0.72rem/1 var(--mono);
  color: var(--comment);
}
.note-tags { display: inline-flex; gap: 0.4rem; margin-left: 0.8rem; }

/* elsewhere */
.elsewhere-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.elsewhere-list li {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font: 500 0.9rem/1.8 var(--mono);
}
.elsewhere-label {
  min-width: 5.5rem;
  color: var(--comment);
}
.elsewhere-list a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px dashed color-mix(in srgb, var(--teal) 45%, transparent);
  word-break: break-all;
  transition: border-color 0.15s ease;
}
.elsewhere-list a:hover { border-bottom-style: solid; }
.elsewhere-handle { color: var(--fg-dim); font-size: 0.8em; }

/* footer */
.footer {
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  margin-top: 2rem;
}
.footer-inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem clamp(1.25rem, 5vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font: 500 0.75rem/1.5 var(--mono);
  color: var(--comment);
}
.footer .ok { color: var(--teal); }
.footer a { color: var(--teal); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-copy { opacity: 0.8; }

/* noscript */
.noscript {
  max-width: 46rem;
  margin: 2rem auto;
  padding: 1.5rem;
  text-align: center;
  color: var(--fg-dim);
  font: 500 0.9rem/1.8 var(--mono);
}

/* utilities */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
