/* ============================================
   hersh.cc - Dark Monochrome Theme
   ============================================ */

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

/* Variables */
:root {
  --bg: #0e0e0e;
  --bg-elevated: #141414;
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text: #c8c8c8;
  --heading: #e0e0e0;
  --muted: #6b6b6b;
  --accent: #4a9eca;
  --accent-hover: #6bb8e0;
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --font: 'Fira Code', 'Fira Mono', 'Cascadia Code', 'JetBrains Mono', monospace;
  --max-w: 880px;
  --nav-h: 60px;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

/* Base */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  line-height: 1.7;
  letter-spacing: -0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.2rem; line-height: 1.2; }
h2 { font-size: 1.5rem; line-height: 1.3; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; line-height: 1.4; margin-bottom: 0.5rem; }
h4 { font-size: 0.95rem; }

p { margin-bottom: 0.8rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

strong { color: var(--heading); font-weight: 600; }

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

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

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 0 1.5rem;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 680px;
  width: calc(100% - 2rem);
}

.nav-logo {
  font-weight: 700;
  color: var(--heading);
  font-size: 0.85rem;
  margin-right: auto;
  white-space: nowrap;
  text-decoration: none;
}
.nav-logo:hover { color: #fff; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--heading);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* Mobile nav */
@media (max-width: 640px) {
  .nav {
    border-radius: 16px;
    flex-wrap: wrap;
    height: auto;
    padding: 0.7rem 1rem;
    gap: 0;
  }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 0.5rem;
    gap: 0.1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    width: 100%;
    padding: 0.5rem 0.65rem;
  }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 3rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.3);
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(14, 14, 14, 0.4), var(--bg));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero .subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
}

/* Page header (smaller hero for subpages) */
.page-header {
  padding: calc(var(--nav-h) + 3rem) 1.5rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.page-header .subtitle {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.card h3 { margin-bottom: 0.4rem; }

.card .card-desc {
  color: var(--muted);
  font-size: 0.82rem;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.card-link:hover { color: inherit; }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0e0e0e;
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #0e0e0e;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--heading);
  background: rgba(255, 255, 255, 0.03);
}

/* ============================================
   Tags / Pills
   ============================================ */
.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
}

.tag-green { color: var(--green); border-color: rgba(74, 222, 128, 0.2); background: rgba(74, 222, 128, 0.06); }
.tag-red { color: var(--red); border-color: rgba(248, 113, 113, 0.2); background: rgba(248, 113, 113, 0.06); }
.tag-yellow { color: var(--yellow); border-color: rgba(251, 191, 36, 0.2); background: rgba(251, 191, 36, 0.06); }
.tag-blue { color: var(--accent); border-color: rgba(74, 158, 202, 0.2); background: rgba(74, 158, 202, 0.06); }

/* ============================================
   Banner
   ============================================ */
.banner {
  background: rgba(74, 158, 202, 0.08);
  border: 1px solid rgba(74, 158, 202, 0.15);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  margin-bottom: 2rem;
}

.banner span { color: var(--text); }

/* ============================================
   Changelog
   ============================================ */
.changelog-entry {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.changelog-entry:last-child { border-bottom: none; }

.changelog-version {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.changelog-version h3 {
  font-size: 1.05rem;
  margin-bottom: 0;
}

.changelog-date {
  font-size: 0.75rem;
  color: var(--muted);
}

.changelog-list {
  list-style: none;
  padding: 0;
}

.changelog-list li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.3rem;
  font-size: 0.83rem;
  color: var(--text);
}

.changelog-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted);
}

.changelog-list li.added::before { background: var(--green); }
.changelog-list li.removed::before { background: var(--red); }
.changelog-list li.fixed::before { background: var(--accent); }
.changelog-list li.changed::before { background: var(--yellow); }

/* ============================================
   Image carousel
   ============================================ */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  height: 100%;
}

.carousel-track img {
  min-width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all var(--transition);
}

.carousel-btn:hover { background: rgba(0, 0, 0, 0.7); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background var(--transition);
}
.carousel-dot.active { background: rgba(255, 255, 255, 0.8); }

/* ============================================
   Status / Charts
   ============================================ */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

.status-dot.online { background: var(--green); }
.status-dot.offline { background: var(--red); }
.status-dot.unknown { background: var(--muted); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================
   Quick links
   ============================================ */
.quick-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.82rem;
  transition: all var(--transition);
  text-decoration: none;
}

.quick-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--heading);
}

/* ============================================
   Subpage links (within section pages)
   ============================================ */
.subpage-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.subpage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
}

.subpage-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--heading);
}

.subpage-item .arrow {
  color: var(--muted);
  transition: transform var(--transition);
}

.subpage-item:hover .arrow {
  transform: translateX(4px);
  color: var(--heading);
}

/* ============================================
   Contact
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition);
}

.contact-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.contact-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.contact-card h3 { margin-bottom: 0.3rem; }

.contact-card p {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  list-style: none;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.75rem;
}
.footer-links a:hover { color: var(--heading); }

/* ============================================
   Tinkreate content
   ============================================ */
.tinkreate-content p {
  font-size: 0.88rem;
  line-height: 1.8;
}

.tinkreate-content a {
  border-bottom: 1px solid rgba(74, 158, 202, 0.3);
}
.tinkreate-content a:hover {
  border-bottom-color: var(--accent);
}

/* ============================================
   Utilities
   ============================================ */
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.3rem; }
  .hero { min-height: 320px; }
  .hero h1 { font-size: 2.2rem; }
  .section { padding: 3rem 0; }
  .container { padding: 0 1rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .quick-links { flex-direction: column; }
}
