:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --accent: #0f766e;
  --accent-2: #115e59;
  --link: #0f766e;
  --link-hover: #115e59;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 0.75rem;
  --max-width: 1000px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
}

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

.has-submenu {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding: 0.5rem 0 0;
  background: transparent;
  border: none;
  list-style: none;
  margin: 0;
  z-index: 101;
  width: 100%;
}

.submenu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.5rem;
}

.submenu-inner {
  position: absolute;
  top: 0.5rem;
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
}

.has-submenu:hover .submenu,
.has-submenu:focus-within .submenu {
  display: block;
}

.submenu-inner a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
}

.submenu-inner a:hover,
.submenu-inner a.active {
  background: var(--surface);
  color: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 0.4rem;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Hero */
.hero {
  position: relative;
  width: 100%;
  min-height: 260px;
  max-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.25) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.25rem 2rem;
  width: 100%;
}

.hero-content h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin: 0 0 0.5rem;
  line-height: 1.1;
  color: #fff;
}

.hero-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 640px;
}

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.page-content h1 {
  font-size: 2rem;
  margin: 0 0 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-content h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
  color: var(--accent-2);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.page-content h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--text);
}

.page-content p {
  margin: 0 0 1.1rem;
}

.page-content ul,
.page-content ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.35rem;
}

.page-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
}

.page-content code {
  background: var(--surface-2);
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
  font-family: "SF Mono", Consolas, Monaco, monospace;
  font-size: 0.92em;
}

.page-content pre {
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
}

.page-content img {
  display: block;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

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

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.card h3 a {
  color: var(--text);
}

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

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card p.muted em {
  color: var(--text-muted);
  font-style: italic;
}

/* Buttons */
.button,
a.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
}

.button:hover,
a.button:hover {
  background: var(--accent-2);
  color: #fff;
  text-decoration: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--text);
  padding: 3rem 1.25rem 2rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  text-align: left;
}

.footer-brand p {
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.65);
}

.footer-nav strong {
  display: block;
  color: #fff;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.4rem;
}

.footer-nav a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
}

.footer-nav a:hover {
  color: #fff;
}

.site-footer .social {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.site-footer .social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease;
}

.site-footer .social a:hover {
  color: #fff;
}

.site-footer .social img,
.site-footer .social svg {
  width: 24px;
  height: 24px;
  border-radius: 0;
  box-shadow: none;
}

.footer-legal {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-legal p {
  margin: 0.25rem 0;
  color: rgba(255, 255, 255, 0.65);
}

/* Responsive */
@media (max-width: 720px) {
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
    gap: 0;
  }

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

  .nav-menu > li {
    border-bottom: 1px solid var(--border);
  }

  .nav-menu a {
    display: block;
    padding: 0.75rem 0;
  }

  .submenu {
    position: static;
    display: block;
    padding-top: 0;
    background: transparent;
    border: none;
  }

  .submenu-inner {
    box-shadow: none;
    border: none;
    background: transparent;
    padding-left: 1rem;
  }

  .submenu-inner a {
    padding: 0.4rem 0;
  }

  .hero {
    min-height: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card:hover,
  a {
    transition: none;
  }
}
