/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:          #0b0f0b;
  --surface:     #111611;
  --surface-2:   #172017;
  --border:      #1f2b1f;
  --border-hi:   #2e422e;

  --green:       #4ade80;
  --green-soft:  #22c55e;
  --green-dim:   #166534;
  --green-muted: #86efac;
  --green-tint:  rgba(74, 222, 128, 0.07);
  --green-tint2: rgba(74, 222, 128, 0.12);

  --text:        #d1e8d1;
  --text-mid:    #7fa07f;
  --text-muted:  #4d6b4d;
  --text-bright: #f0faf0;

  --font-display: 'Michroma', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);
  --t:     180ms;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Ambient background glow ────────────────────────────────────────────────── */
.bg-glow {
  position: fixed;
  top: -20vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 60vh;
  background: radial-gradient(ellipse at center,
    rgba(34, 197, 94, 0.08) 0%,
    rgba(34, 197, 94, 0.03) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ── Language bar ───────────────────────────────────────────────────────────── */
.lang-bar {
  display: flex;
  justify-content: flex-end;
  padding: 1.25rem 0 0;
}

.lang-btn {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color var(--t), border-color var(--t), background var(--t);
}

.lang-btn:hover, .lang-btn:focus-visible {
  color: var(--green);
  border-color: var(--green-dim);
  background: var(--green-tint);
  outline: none;
}

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 3rem 0 2.25rem;
  animation: fadeUp 0.7s var(--ease) both;
}

.callsign {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 14vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  line-height: 1;
  margin-bottom: 0.75rem;
  /* Subtle green tint without neon glow */
  background: linear-gradient(160deg, #f0faf0 30%, var(--green-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-mid);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

.hero-loc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Section spacing ────────────────────────────────────────────────────────── */
.links-section   { animation: fadeUp 0.7s 0.08s var(--ease) both; }
.contact-section { margin-top: 1rem; animation: fadeUp 0.7s 0.16s var(--ease) both; }
.qso-section     { margin-top: 2rem; animation: fadeUp 0.7s 0.22s var(--ease) both; }

/* ── Link cards ─────────────────────────────────────────────────────────────── */
.links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text);
  transition: background var(--t), border-color var(--t), transform var(--t) var(--ease);
  position: relative;
}

.link-card:hover, .link-card:focus-visible {
  background: var(--surface-2);
  border-color: var(--border-hi);
  transform: translateY(-1px);
  outline: none;
}

/* accent left border on hover */
.link-card::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 2px;
  border-radius: 2px;
  background: var(--green-soft);
  opacity: 0;
  transition: opacity var(--t), top var(--t) var(--ease), bottom var(--t) var(--ease);
}

.link-card:hover::before, .link-card:focus-visible::before {
  opacity: 1;
  top: 15%; bottom: 15%;
}

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-mid);
  flex-shrink: 0;
  transition: color var(--t), border-color var(--t), background var(--t);
}

.link-icon svg { width: 1.1rem; height: 1.1rem; }

.link-card:hover .link-icon,
.link-card:focus-visible .link-icon {
  color: var(--green);
  border-color: var(--green-dim);
  background: var(--green-tint);
}

.link-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.link-label {
  font-size: 0.975rem;
  font-weight: 500;
  color: var(--text-bright);
}

.link-url {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  color: var(--text-muted);
  transition: color var(--t), transform var(--t) var(--ease);
  flex-shrink: 0;
}

.link-arrow svg { width: 1rem; height: 1rem; display: block; }

.link-card:hover .link-arrow,
.link-card:focus-visible .link-arrow {
  color: var(--green);
  transform: translate(2px, -2px);
}

/* ── Contact section ────────────────────────────────────────────────────────── */
.contact-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 0;
  overflow: hidden;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.9rem 1.1rem;
  flex-wrap: wrap;
}

.contact-row + .contact-row {
  border-top: 1px solid var(--border);
}

.contact-row--gpg { align-items: flex-start; }

.contact-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 3rem;
  flex-shrink: 0;
}

.email-link {
  font-family: var(--font-mono);
  font-size: 0.925rem;
  color: var(--green);
  text-decoration: none;
  transition: color var(--t);
}

.email-link:hover, .email-link:focus-visible {
  color: var(--green-muted);
  outline: none;
}

.gpg-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.gpg-fingerprint {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  word-break: break-all;
  line-height: 1.6;
}

.gpg-fetch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-mid);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  width: fit-content;
  transition: color var(--t), border-color var(--t), background var(--t);
}

.gpg-fetch-btn svg { width: 0.9rem; height: 0.9rem; }

.gpg-fetch-btn:hover, .gpg-fetch-btn:focus-visible {
  color: var(--green);
  border-color: var(--green-dim);
  background: var(--green-tint);
  outline: none;
}

/* ── QSO section ────────────────────────────────────────────────────────────── */
.section-title {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.qso-notice {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--green-tint);
  border: 1px solid var(--border-hi);
  border-left: 3px solid var(--green-dim);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.qso-table {
  width: 100%;
  border-collapse: collapse;
}

.qso-table thead {
  border-bottom: 1px solid var(--border);
}

.qso-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
}

.qso-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t);
  animation: rowIn 0.4s var(--ease) both;
}

.qso-table tbody tr:last-child { border-bottom: none; }
.qso-table tbody tr:hover { background: var(--surface-2); }

.qso-table td {
  padding: 0.7rem 1rem;
  white-space: nowrap;
}

.td-mono {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-mid);
}

.td-call {
  font-family: var(--font-mono);
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-bright);
  letter-spacing: 0.03em;
}

/* Badges */
.band-badge, .mode-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: var(--r-sm);
  border: 1px solid;
  letter-spacing: 0.04em;
}

.band-badge {
  color: var(--green);
  border-color: var(--green-dim);
  background: var(--green-tint2);
}

.mode-badge { color: var(--text-mid); border-color: var(--border); background: transparent; }
.mode-badge.mode-ft8  { color: #60a5fa; border-color: #1e3a5f; background: rgba(96,165,250,.07); }
.mode-badge.mode-ft4  { color: #818cf8; border-color: #2d2d6b; background: rgba(129,140,248,.07); }
.mode-badge.mode-ssb  { color: #fb923c; border-color: #6b3010; background: rgba(251,146,60,.07); }
.mode-badge.mode-cw   { color: #f472b6; border-color: #6b1040; background: rgba(244,114,182,.07); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-call { color: var(--text-mid); font-weight: 500; }
.footer-sep  { color: var(--border-hi); }

/* ── Animations ─────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes rowIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Focus ──────────────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--green-soft);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 500px) {
  .callsign { font-size: 3.25rem; }
  .page-wrap { padding-inline: 1rem; }
  .link-card { padding: 0.85rem 0.9rem; }
  .contact-row { gap: 0.75rem; }
  .qso-table th, .qso-table td { padding: 0.65rem 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
