:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-muted: #f1f0ea;
  --text: #2f3437;
  --muted: #6c6e72;
  --accent: #0b6e99;
  --border: #d3d1cb;
  --radius: 12px;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: 3rem;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem clamp(1.5rem, 4vw, 3.5rem);
  background: rgba(247, 246, 243, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.brand {
  font-weight: 600;
  font-size: 1.25rem;
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover,
.nav a:focus {
  color: var(--accent);
  border-color: var(--accent);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3.5rem) 4rem;
}

.hero {
  padding: 4.5rem 0 3rem;
}

.hero-content {
  display: grid;
  gap: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tagline {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
}

.subtitle {
  color: var(--muted);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: calc(var(--radius) + 6px);
  background: var(--text);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(47, 52, 55, 0.12);
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(47, 52, 55, 0.18);
}

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

.section {
  margin-bottom: 3.5rem;
  display: grid;
  gap: 1.5rem;
}

.section-header {
  display: grid;
  gap: 0.4rem;
}

.section-header p {
  color: var(--muted);
}

h2 {
  font-size: 1.9rem;
  font-weight: 600;
}

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

.card,
.stack-card,
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(17, 17, 17, 0.05);
}

.card h3,
.news-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.card p,
.stack-card p,
.news-card p {
  color: var(--muted);
}

.stack-card ul {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
  padding-left: 1.25rem;
  color: var(--muted);
}

.watchlist-form {
  display: grid;
  gap: 0.75rem;
}

.watchlist-form label {
  font-weight: 500;
}

.input-group {
  display: flex;
  gap: 0.75rem;
}

input[type="text"] {
  flex: 1;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 110, 153, 0.12);
}

button {
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--surface-muted);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

button:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(47, 52, 55, 0.1);
}

.watchlist-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
}

.watchlist-items li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: calc(var(--radius) + 8px);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-weight: 500;
}

.watchlist-items li .remove {
  padding: 0.2rem 0.6rem;
  border-radius: calc(var(--radius));
  border: none;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.watchlist-items li .remove:hover {
  color: var(--accent);
}

.watchlist-items .empty {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) + 8px);
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.news-container {
  display: grid;
  gap: 1rem;
}

.news-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: calc(var(--radius));
  background: var(--surface-muted);
  color: var(--text);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tags .tag {
  display: inline-flex;
  padding: 0.3rem 0.6rem;
  border-radius: calc(var(--radius));
  background: transparent;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.empty {
  text-align: center;
  color: var(--muted);
}

.news-card.empty {
  border-style: dashed;
  background: var(--surface-muted);
}

.footer {
  text-align: center;
  padding: 2rem 1.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 680px) {
  .nav {
    display: none;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .input-group {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
