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

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: #d2d2d7;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1d1f;
    --bg-alt: #2d2d2f;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --accent: #2997ff;
    --accent-hover: #40a0ff;
    --border: #424245;
    --card-bg: #2d2d2f;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* Nav */
nav {
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

nav .logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

nav .logo:hover {
  color: var(--text);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav ul a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

nav ul a:hover {
  color: var(--text);
  text-decoration: none;
}

nav ul a.active {
  color: var(--text);
  font-weight: 600;
}

/* Layout */
main {
  flex: 1;
  max-width: 52rem;
  margin: 0 auto;
  padding: 3rem 2rem;
  width: 100%;
}

/* Hero */
.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card a.card-link {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Sections */
section {
  margin-bottom: 3rem;
}

section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  margin-top: 1.5rem;
}

section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

section ul {
  color: var(--text-secondary);
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

section ul li {
  margin-bottom: 0.35rem;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* Buttons / Links */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

/* Forms */
form {
  max-width: 32rem;
}

form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  margin-top: 1.25rem;
}

form input,
form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

form input:focus,
form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

form textarea {
  min-height: 8rem;
  resize: vertical;
}

form button {
  margin-top: 1.5rem;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

footer a {
  color: var(--text-secondary);
}

footer a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 600px) {
  nav {
    padding: 1rem;
  }

  nav ul {
    gap: 1rem;
  }

  main {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }
}
