/* =========================
   Global theme
========================= */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #5b6472;
  --line: #e8ebf2;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* =========================
   Centered layout wrappers
========================= */
.wrap {
  max-width: 900px;
  margin: 24px auto 60px;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

/* =========================
   Top navigation bar
   (centered independently)
========================= */
.site-nav {
  max-width: 900px;
  width: calc(100% - 32px);
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0.75rem;
  z-index: 1000;
}

/* Brand */
.site-nav .brand {
  text-decoration: none;
  color: #111827;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav .brand:hover {
  color: #000;
}

/* Hamburger menu container */
.nav-menu {
  position: relative;
}

/* Remove default marker */
.nav-menu summary {
  list-style: none;
}
.nav-menu summary::-webkit-details-marker {
  display: none;
}

/* Hamburger button */
.menu-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  align-items: center;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover {
  background: #f9fafb;
  border-color: #c7cdd6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hamburger bars */
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Open animation */
.nav-menu[open] .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-menu[open] .menu-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-menu[open] .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Dropdown */
.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 220px;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

/* Open on hover/focus/click */
.nav-menu:hover .dropdown,
.nav-menu:focus-within .dropdown,
.nav-menu[open] .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Dropdown links */
.dropdown a {
  display: block;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  color: #111827;
  font-weight: 500;
}

.dropdown a:hover {
  background: #f3f4f6;
}

.dropdown a.active {
  background: #eef2ff;
  color: #1d4ed8;
  font-weight: 600;
}

/* =========================
   Card typography (shared)
========================= */
.card h1 {
  margin: 0 0 8px 0;
  font-size: 2rem;
  line-height: 1.2;
}

.card h2 {
  margin: 0 0 12px 0;
  font-size: 1.15rem;
}

.card h3 {
  margin: 0 0 8px 0;
  font-size: 1.02rem;
}

.card h4 {
  margin: 12px 0 6px 0;
  font-size: 0.98rem;
  color: #374151;
}

.card p {
  margin: 0 0 14px 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

.card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

/* =========================
   Homepage-specific blocks
========================= */
.hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: center;
  text-align: left;
}

.photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
  background: #e9edf5;
  display: block;
}

.subtitle {
  margin: 0 0 16px 0;
  color: var(--muted);
  font-size: 1rem;
}

.links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--text);
  background: #fff;
  transition: 0.2s ease;
  font-size: 0.95rem;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

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

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

.section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.footer-note {
  margin-top: 18px;
  font-size: 0.9rem;
  color: #7a8291;
}

/* =========================
   Responsive
========================= */
@media (max-width: 720px) {
  .site-nav {
    width: calc(100% - 24px);
    margin-top: 12px;
  }

  .wrap {
    margin: 16px auto 32px;
    padding: 0 12px;
  }

  .card {
    padding: 22px;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 18px;
  }

  .photo {
    margin: 0 auto;
    width: 150px;
    height: 150px;
  }

  .links {
    justify-content: center;
  }
}
/* =========================
   Contact form
========================= */
.contact-form {
  margin-top: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid #dbe1ea;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #9aa3b2;
}

.form-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Honeypot hidden field */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-actions {
    justify-content: flex-start;
  }
}
