/* Dev journal — matches kvorr client / dashboard chrome */

:root {
  --arena: #cdcdcd;
  --panel: #f4f4f4;
  --panel-strong: #ffffff;
  --border: #a8a8a8;
  --border-soft: #c4c4c4;
  --text: #333333;
  --text-muted: #666666;
  --text-faint: #888888;
  --blue: #00b2e1;
  --blue-deep: #0099c9;
  --green: #8abc3f;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  --radius: 6px;
  --font: Ubuntu, "Segoe UI", system-ui, sans-serif;
  --content: 42rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 178, 225, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(138, 188, 63, 0.12), transparent 50%),
    var(--arena);
  line-height: 1.55;
}

a {
  color: var(--blue-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* —— Header —— */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--content) + 4rem);
  margin: 0 auto;
  padding: 1.25rem 1.5rem 0.5rem;
}

.brand {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--blue-deep);
  text-decoration: none;
}

/* —— Login-style title shine + sparkle —— */

.title {
  position: relative;
  display: inline-block;
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  line-height: 1;
}

.title-word {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--blue);
  background-image: linear-gradient(
    105deg,
    var(--blue) 0%,
    var(--blue) 40%,
    #ffffff 50%,
    var(--blue) 60%,
    var(--blue) 100%
  );
  background-size: 240% 100%;
  background-position: 100% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter:
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.7))
    drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
  animation: kvorr-title-shine 4.8s ease-in-out infinite;
}

.title-sparkle {
  position: absolute;
  right: -0.12em;
  top: -0.08em;
  width: 0.42em;
  height: 0.42em;
  overflow: visible;
  fill: #ffffff;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 1.1;
  stroke-linejoin: round;
  filter:
    drop-shadow(0 0 3px rgba(255, 255, 255, 0.95))
    drop-shadow(0 0 8px rgba(0, 178, 225, 0.55));
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  pointer-events: none;
  animation: kvorr-title-sparkle 4.8s linear infinite;
}

@keyframes kvorr-title-shine {
  0%, 68% { background-position: 100% 50%; }
  82%, 100% { background-position: 0% 50%; }
}

@keyframes kvorr-title-sparkle {
  0%, 80% { opacity: 0; transform: scale(0.15) rotate(0deg); }
  84% { opacity: 1; transform: scale(1.25) rotate(120deg); }
  89% { opacity: 1; transform: scale(1) rotate(240deg); }
  94%, 100% { opacity: 0; transform: scale(0.3) rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .title-word {
    animation: none;
    background-image: none;
    -webkit-text-fill-color: var(--blue);
    color: var(--blue);
    filter: none;
    text-shadow:
      0 2px 0 rgba(255, 255, 255, 0.7),
      0 3px 6px rgba(0, 0, 0, 0.12);
  }

  .title-sparkle {
    animation: none;
    opacity: 0;
  }

  .subtitle-word {
    animation: none;
    color: var(--text-muted);
  }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--blue-deep);
}

/* —— Main —— */

main {
  max-width: calc(var(--content) + 4rem);
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
}

.hero {
  padding: 3.5rem 0 2.75rem;
  text-align: center;
}

.hero-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.subtitle {
  margin: 1.15rem 0 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.42em;
  font-size: clamp(12px, 1.4vw, 16px);
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
}

.subtitle-word {
  display: inline-block;
  color: var(--text-muted);
  transform: translateY(0);
  will-change: transform, color;
  animation: subtitle-word-hop 5.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.22s);
}

@keyframes subtitle-word-hop {
  0%, 8% { transform: translateY(0); color: var(--text-muted); }
  14% { transform: translateY(-11px); color: var(--hop); }
  22%, 100% { transform: translateY(0); color: var(--text-muted); }
}

.section {
  margin-top: 2.75rem;
  padding: 1.5rem 1.35rem 1.6rem;
  background: var(--panel-strong);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: -0.25rem 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.section > p {
  margin: 0 0 0.85rem;
  max-width: 40rem;
}

.section > p:last-child {
  margin-bottom: 0;
}

/* —— Dev log entries —— */

.entry {
  padding: 1.1rem 0;
  border-top: 1px solid var(--border-soft);
}

.entry:first-of-type {
  border-top: none;
  padding-top: 0.25rem;
}

.entry:last-child {
  padding-bottom: 0;
}

.entry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.45rem;
}

.entry-header time {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.entry-header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.entry p {
  margin: 0;
  color: var(--text);
}

/* —— Systems list —— */

.system-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.system-list li {
  display: grid;
  gap: 0.15rem 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border-soft);
}

.system-list li:first-child {
  border-top: none;
  padding-top: 0.15rem;
}

.system-list li:last-child {
  padding-bottom: 0;
}

.system-list strong {
  color: var(--text);
}

.system-list span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (min-width: 560px) {
  .system-list li {
    grid-template-columns: 10rem 1fr;
    align-items: baseline;
  }
}

/* —— Footer —— */

.site-footer {
  max-width: calc(var(--content) + 4rem);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-faint);
}

@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 2.25rem;
    text-align: left;
  }

  .subtitle {
    justify-content: flex-start;
  }
}
