/* Modern minimal black & white theme with smooth scroll navbar */
:root {
  --bg: #050505;
  --card: #ffffff;
  --text: #0b0b0b;
  --muted: #6b6b6b;
  --glass: rgba(0,0,0,0.04);
  --radius: 16px;
  --container: 980px;
  --max-width: 760px;
  --shadow: 0 20px 60px rgba(0,0,0,0.15);
  --accent-border: rgba(0,0,0,0.08);
  font-size: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg), #0b0b0b 40%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--card);
  line-height: 1.6;
}

/* Page layout */
.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 100px;
}

/* Sticky header with slide-down animation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 4px 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              background 0.3s ease,
              box-shadow 0.3s ease;
}

.header.scrolled {
  background: rgba(5, 5, 5, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header.hidden {
  transform: translateY(-100%);
}

/* Logo styling */
.header .logo {
  height: 100px;
  width: 100px;
  object-fit: contain;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header .logo:hover {
  transform: scale(1.05);
}

/* Main container + card */
.container {
  max-width: var(--container);
  width: 100%;
  padding: 0 24px;
  margin: 32px auto 60px;
  display: flex;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: var(--max-width);
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--accent-border);
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card head */
.card-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.card-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.card-head .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  text-align: center;
}

/* Primary nav */
.primary-nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 0 0 32px;
  flex-wrap: wrap;
}

.primary-nav a {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.primary-nav a:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.primary-nav a[aria-current="page"] {
  background: var(--text);
  color: var(--card);
  border-color: var(--text);
}

/* Content */
.content {
  line-height: 1.7;
}

.content p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
}

.content h2 {
  font-size: 20px;
  margin: 28px 0 12px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.3px;
}

.content h2:first-of-type {
  margin-top: 0;
}

.content ul {
  margin: 12px 0 20px 20px;
  color: var(--muted);
}

.content li {
  margin: 10px 0;
  line-height: 1.7;
}

.content li strong {
  color: var(--text);
}

/* Footer navigation */
.footer-nav {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.footer-nav a {
  display: inline-block;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
}

.footer-nav a:hover {
  background: var(--text);
  color: var(--card);
  transform: translateX(2px);
}

.footer-nav a:first-child:hover {
  transform: translateX(-2px);
}

/* Note text */
.note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* Tile grid for homepage */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.tile {
  background: #fafafa;
  color: #111;
  padding: 28px 24px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.3s ease;
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.12);
}

.tile strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.tile .sub {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* Footer */
footer {
  color: #9b9b9b;
  margin-bottom: 36px;
  text-align: center;
  font-size: 13px;
}

footer a {
  color: inherit;
  text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
  .page-wrap {
    padding-top: 80px;
  }

  .header {
    padding: 12px 16px;
  }

  .header .logo {
    height: 40px;
    width: 40px;
  }

  .container {
    padding: 0 16px;
    margin: 20px auto 40px;
  }

  .card {
    padding: 28px 20px;
    border-radius: 12px;
  }

  .card-head h1 {
    font-size: 24px;
  }

  .tile-grid {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    flex-direction: column;
    gap: 8px;
  }

  .footer-nav a {
    width: 100%;
    text-align: center;
  }
}