/* Reset and base */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji"; line-height: 1.5; background: var(--bg); color: var(--fg); }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:root {
  --bg: #ffffff;
  --fg: #0b1310;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card: #ffffff;
  --accent: #10b981;
  --accent-600: #0ea371;
  --ring: #a7f3d0;
  --shadow: 0 1px 2px rgba(0,0,0,0.05), 0 2px 6px rgba(0,0,0,0.06);
  --ease: cubic-bezier(.22,.61,.36,1);
}
html[data-theme="dark"] {
  --bg: #0b1210;
  --fg: #e5eee9;
  --muted: #9aa6ad;
  --border: #20302a;
  --card: #0f1916;
  --ring: #065f46;
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.35);
}
@media (prefers-reduced-motion: no-preference) {
  html, body, .card, .chip, .btn, .avatar { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }
}
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { left: 1rem; top: 1rem; width: auto; height: auto; padding: .5rem .75rem; background: var(--accent); color: white; border-radius: .5rem; z-index: 1000; }

/* Layout */
.container { max-width: 1100px; margin-inline: auto; padding: 0 1rem; }
.section { padding: 3rem 0; }
.section-header h2 { font-size: 1.6rem; margin: 0; }
.section-header .muted { margin-top: .25rem; }
.page-header { padding: 2rem 0 1rem; }
.page-header h1 { font-size: 2rem; margin: 0 0 .25rem; }

/* Header */
.site-header { position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 90%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: saturate(180%) blur(8px); z-index: 50; }
.header-inner { display: flex; align-items: center; height: 3.5rem; gap: .75rem; }
.brand { display: flex; align-items: center; gap: .5rem; }
.logo { width: 2rem; height: 2rem; border-radius: .5rem; background: var(--accent); color: white; display: grid; place-items: center; font-weight: 700; box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
.brand-name { font-weight: 600; }
.nav { display: contents; }
.nav-list { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0; }
.desktop-only { margin-left: 1rem; }
.mobile-only { display: none; border-bottom: 1px solid var(--border); }
.nav-list a { font-weight: 500; color: color-mix(in srgb, var(--fg) 70%, transparent); }
.nav-list a.active, .nav-list a:hover { color: var(--fg); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.social a { color: color-mix(in srgb, var(--fg) 80%, transparent); }
.social a:hover { color: var(--fg); }
.icon { display: inline-block; vertical-align: middle; }
.nav-toggle { display: none; background: none; border: none; padding: .5rem; border-radius: .5rem; }
.nav-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--fg); margin: 4px 0; border-radius: 1px; }

/* Collapsible (mobile menu) */
.collapsible { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .35s var(--ease), opacity .25s var(--ease); }
.collapsible.open { max-height: 280px; opacity: 1; }

/* Hero */
.hero { position: relative; padding: 3rem 0 2rem; }
.hero-glow { position: absolute; inset: -10% 0 50% 0; pointer-events: none; background:
  radial-gradient(600px 200px at 20% 10%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 60%),
  radial-gradient(600px 200px at 80% 0%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%);
  filter: blur(30px) saturate(120%);
  opacity: .6;
  animation: glowMove 16s linear infinite;
}
@keyframes glowMove {
  0% { transform: translateY(0) }
  50% { transform: translateY(10px) }
  100% { transform: translateY(0) }
}
.hero-grid { display: grid; gap: 2rem; grid-template-columns: 1.2fr .8fr; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-text h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: .5rem 0 1rem; }
.accent { color: var(--accent); }
.badge { display: inline-block; background: var(--accent); color: white; padding: .25rem .6rem; border-radius: 999px; font-size: .85rem; }
.shimmer { background: linear-gradient(90deg, var(--accent) 0%, #34d399 25%, var(--accent) 50%, #34d399 75%, var(--accent) 100%); background-size: 200% 100%; animation: shimmer 3s linear infinite; }
@keyframes shimmer { 0% { background-position: 0% 50% } 100% { background-position: -200% 50% } }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.hero-image { display: grid; place-items: center; }
.avatar { width: 260px; height: 260px; border-radius: 1.25rem; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-6px) } }

/* Cards */
.grid { display: grid; gap: 1rem; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: .9rem; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transform-style: preserve-3d; }
.card-media { aspect-ratio: 16/9; background: #111; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transform: translateZ(0); transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 1rem; display: grid; gap: .5rem; }
.card-title { margin: 0; font-size: 1.05rem; }
.card-footer { margin-top: auto; padding: 1rem; display: flex; gap: .5rem; }

/* Buttons & chips */
.btn { --_bg: color-mix(in srgb, var(--fg) 6%, var(--bg)); --_fg: var(--fg); display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .55rem .9rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--_bg); color: var(--_fg); cursor: pointer; font-weight: 600; transform: translateZ(0); }
.btn:hover { filter: brightness(0.98); }
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 20px -12px rgba(16,185,129,.8); }
.btn-primary:hover { background: var(--accent-600); }
.btn-outline { background: transparent; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { padding: .4rem .65rem; font-size: .9rem; }
.hover-raise { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.hover-raise:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -16px rgba(0,0,0,.4); }

/* Text utilities */
.muted { color: var(--muted); }
.underline { text-decoration: underline; text-underline-offset: 3px; }

/* Timeline with progress */
.timeline { position: relative; list-style: none; padding: 0; margin: 0; }
.timeline::before,
.timeline::after { content: ""; position: absolute; left: 16px; top: 0; width: 2px; }
.timeline::before { bottom: 0; background: var(--border); }
.timeline::after { height: var(--line-progress, 0%); background: linear-gradient(var(--accent), #34d399); transition: height .35s var(--ease); border-radius: 1px; }
.timeline-item { position: relative; padding-left: 44px; margin-bottom: 1.25rem; }
.timeline-item::before { content: ""; position: absolute; left: 9px; top: 10px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg); box-shadow: 0 0 0 0 rgba(16,185,129,.4); transition: box-shadow .5s var(--ease); }
.timeline-item:hover::before { box-shadow: 0 0 0 6px rgba(16,185,129,.12); }
.timeline-card { background: var(--card); border: 1px solid var(--border); border-radius: .9rem; padding: 1rem; box-shadow: var(--shadow); }
.timeline-top { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: space-between; }
.timeline .title { font-weight: 700; }
.list { margin: .5rem 0 0 1rem; }

/* CTA */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1px solid var(--border); background: var(--card); padding: 1rem; border-radius: 1rem; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; padding: 1rem; }
.field { display: grid; gap: .35rem; }
.field input, .field textarea, .search input { border: 1px solid var(--border); background: var(--bg); color: var(--fg); border-radius: .6rem; padding: .6rem .75rem; font: inherit; }
.field input:focus, .field textarea:focus, .search input:focus { outline: 2px solid var(--ring); outline-offset: 2px; }
.col-span-2 { grid-column: span 2; }
.two { grid-template-columns: 1.2fr .8fr; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.details { padding: 1rem; }
.detail-list { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .5rem; }

/* Filters/search */
.filters { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; justify-content: space-between; margin-bottom: 1rem; }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.tab { padding: .4rem .7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--fg); cursor: pointer; }
.tab:hover { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.search { min-width: 220px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; }
.footer-inner { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; }
.footer-inner .social { margin-left: auto; display: flex; gap: .5rem; }

/* Mobile nav */
@media (max-width: 900px) {
  .desktop-only { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-only { display: grid; padding: .75rem 1rem; gap: .5rem; }
  .mobile-only a { padding: .4rem 0; }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--delay, 0ms); will-change: opacity, transform; }
.reveal.active { opacity: 1; transform: none; }

/* Page transitions */
.page-enter { animation: pageFadeIn .25s ease both; }
.page-exit { animation: pageFadeOut .20s ease both; }
@keyframes pageFadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes pageFadeOut { from { opacity: 1 } to { opacity: 0 } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal, .hover-raise, .avatar, .hero-glow, .btn, .card-media img { transition: none !important; animation: none !important; }
  .collapsible { transition: none !important; }
}