/* ============================================
   Christine Hu — Shared Design System
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@400;500&family=DM+Sans:wght@300;400;500;600&display=swap');

/* --- Variables --- */
:root {
  --teal: #0D7377;
  --teal-light: #14a085;
  --teal-dark: #0a5c5f;
  --black: #0a0a0a;
  --gray-900: #1a1a1a;
  --gray-700: #444;
  --gray-500: #888;
  --gray-400: #aaa;
  --gray-300: #ccc;
  --gray-200: #e5e5e5;
  --gray-100: #f5f5f5;
  --white: #ffffff;
  --border: #e8e8e8;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-mono: 'DM Mono', 'SF Mono', monospace;
  --max-width: 1080px;
  --nav-height: 64px;
}

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

/* --- Base --- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

.label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ============================================
   Navigation
   ============================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--black);
  font-weight: 500;
}

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

.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--gray-500);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--black);
}

.nav-links .gh-link svg {
  width: 20px;
  height: 20px;
  fill: var(--gray-500);
  transition: fill 0.2s ease;
}

.nav-links .gh-link:hover svg {
  fill: var(--black);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--black);
  margin: 5px 0;
  transition: all 0.3s ease;
}

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

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

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

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 80px;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  font-size: 13px;
  color: var(--gray-500);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--teal);
}

@media (max-width: 640px) {
  .site-footer .container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--gray-300);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--black);
}

.card-desc {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6;
}

.card-arrow {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  letter-spacing: 0.05em;
  transition: transform 0.2s ease;
}

.card:hover .card-arrow {
  transform: translateX(4px);
}

/* ============================================
   Tags
   ============================================ */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag:hover,
.tag.active {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 32px;
  border: 1.5px solid var(--black);
  background: none;
  color: var(--black);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--black);
  color: var(--white);
}

.btn-teal {
  border-color: var(--teal);
  color: var(--teal);
}

.btn-teal:hover {
  background: var(--teal);
  color: var(--white);
}

/* ============================================
   Section spacing
   ============================================ */
.section {
  padding: 80px 0;
}

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

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 32px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .section {
    padding: 120px 0;
  }

  .section-title {
    font-size: 40px;
  }
}

/* ============================================
   Utility
   ============================================ */
.text-teal { color: var(--teal); }
.text-gray { color: var(--gray-500); }
.text-sm { font-size: 14px; }
.text-mono { font-family: var(--font-mono); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
