/* Sandbox — shared stylesheet (GitHub Pages compatible, no build step) */
:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-hover: #1c2128;
  --border: #30363d;
  --border-hover: #3fb950;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --text-dim: #484f58;
  --accent: #3fb950;
  --accent-hover: #5cc96a;
  --accent-muted: #2a7a46;
  --danger: #f85149;
  --radius: 8px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
  --max-width: 720px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  color: var(--accent-hover);
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
  color: #ff7b72;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.main {
  flex: 1;
  padding-top: var(--header-height);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
}

.nav-brand img {
  width: 32px;
  height: 32px;
}

.nav-brand span {
  font-size: 1.15rem;
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  transition: color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link:hover::after,
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Nav dropdown for Daily Content */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  cursor: pointer;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
  z-index: 200;
  margin-top: 6px;
}

.nav-dropdown-menu a.nav-dropdown-item {
  display: block;
  padding: 10px 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.nav-dropdown-menu a.nav-dropdown-item:last-child {
  border-bottom: none;
}

.nav-dropdown-menu a.nav-dropdown-item:hover {
  background: var(--surface-hover);
  color: var(--accent);
}

.nav-dropdown-menu a.nav-dropdown-item.active {
  color: var(--accent);
  background: var(--surface-hover);
}

/* Show dropdown on hover */
.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

/* Header / hero */
header {
  text-align: center;
  padding: 60px 0 40px;
}

.cow-image {
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
  transition: transform var(--transition);
}

.cow-image:hover {
  transform: scale(1.03);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.date {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 0;
}

.tagline {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
}

/* Divider */
.divider {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* Sections */
section {
  margin-bottom: 48px;
}

h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 600;
}

p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

ul {
  color: var(--text);
  margin-bottom: 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
}

/* Link cards */
.link-card {
  display: block;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.link-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.link-card .title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  display: block;
  font-size: 1.05rem;
}

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

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  margin-right: 6px;
  margin-bottom: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.btn-primary {
  background: var(--accent-muted);
  border-color: var(--accent-muted);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* Footer */
footer {
  text-align: center;
  padding: 48px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

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

footer a:hover {
  text-decoration: underline;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .nav-inner {
    padding: 0 16px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  header {
    padding: 40px 0 32px;
  }

  .cow-image {
    width: 110px;
    height: 110px;
    margin-bottom: 20px;
  }

  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  .tagline {
    font-size: 0.95rem;
  }

  section {
    margin-bottom: 36px;
  }

  h2 {
    font-size: 1.25rem;
  }

  .link-card {
    padding: 18px;
  }

  .link-card .title {
    font-size: 1rem;
  }

  footer {
    padding: 36px 0;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 8px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    font-size: 1rem;
    padding: 8px 0;
    width: 100%;
    text-align: left;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    display: none;
    padding-left: 16px;
    border-top: 1px solid var(--border);
    margin-top: 0;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  .nav-dropdown-toggle {
    width: 100%;
    text-align: left;
    justify-content: space-between;
    display: flex;
    align-items: center;
  }

  .nav-dropdown-item {
    font-size: 0.95rem;
    padding: 8px 0;
    width: 100%;
    text-align: left;
    border-bottom: none;
  }

  .link-card .desc {
    font-size: 0.85rem;
  }
}