:root {
  --primary: #2563eb;
  --primary-light: #60a5fa;
  --primary-dark: #1e40af;
  --secondary: #64748b;
  --accent: #ec4899;
  --bg-body: #f0f9ff;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --white: #ffffff;
  --radius: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(37 99 235 / 0.05);
  --shadow:
    0 4px 6px -1px rgb(37 99 235 / 0.1), 0 2px 4px -2px rgb(37 99 235 / 0.1);
  --shadow-lg:
    0 10px 15px -3px rgb(37 99 235 / 0.1), 0 4px 6px -4px rgb(37 99 235 / 0.1);
  --shadow-hover:
    0 20px 25px -5px rgb(37 99 235 / 0.15), 0 8px 10px -6px rgb(37 99 235 / 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--primary-light);
  color: var(--white);
}

body {
  font-family:
    "Inter",
    -apple-system,
    system-ui,
    sans-serif;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-body);
  background-image:
    radial-gradient(at 0% 0%, hsla(217, 91%, 95%, 1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, hsla(186, 100%, 94%, 1) 0px, transparent 50%);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  z-index: 100;
  transition: top 0.3s ease;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}
.skip-link:focus {
  top: 0;
}

header.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: padding 0.3s ease;
}

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

.logo a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.logo a::before {
  content: "♥";
  color: var(--accent);
  font-size: 1.2rem;
  animation: heartbeat 2s infinite;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  5% {
    transform: scale(1.1);
  }
  10% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

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

.main-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.2s;
}

.main-nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.main-nav a:hover,
.main-nav a:focus {
  color: var(--primary);
}

.main-nav a:hover::after,
.main-nav a:focus::after {
  width: 100%;
}

.search-btn,
.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.5rem;
  margin-left: 0.5rem;
  border-radius: 50%;
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.search-btn:hover,
.theme-toggle:hover {
  background-color: var(--bg-body);
  color: var(--primary);
  transform: translateY(-1px);
}

.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-modal.active {
  opacity: 1;
}

.search-content {
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.search-modal.active .search-content {
  transform: translateY(0);
}

#search-input {
  width: 100%;
  padding: 1.25rem 1.5rem;
  font-size: 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  outline: none;
  transition: var(--transition);
  background: #f8fafc;
}

#search-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

#search-results {
  margin-top: 1.5rem;
  max-height: 50vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--secondary) transparent;
}

.search-result-item {
  padding: 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  transition: var(--transition);
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

.search-result-item:hover {
  background: #f0f9ff;
  transform: translateX(4px);
  border-left: 3px solid var(--primary);
}

.search-result-item a {
  text-decoration: none;
  color: var(--text-main);
  display: block;
}

.search-result-item strong {
  display: block;
  color: var(--primary);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.search-result-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

#close-search {
  margin-top: 1.5rem;
  background: #f1f5f9;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted);
  width: 100%;
  transition: var(--transition);
}

#close-search:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

main {
  padding: 4rem 0;
  flex: 1;
}

.content-card {
  background: var(--white);
  padding: 4rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.content-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

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

h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.5rem;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 2.5rem 0;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

img:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-hover);
}

footer.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 5rem 0 3rem;
  margin-top: 6rem;
  border-top: 4px solid var(--primary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
}

.footer-info h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  margin-top: 0;
}

.footer-copy {
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.agent-tag {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.loading-spinner {
  display: none;
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

.loading-spinner.active {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  .main-nav ul {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .content-card {
    padding: 2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .footer-copy {
    text-align: center;
  }
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.75rem;
  }
}
