:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --line: #e2e8f0;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --secondary: #1e293b;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  top: -44px;
  left: 1rem;
  background: #0f172a;
  color: #ffffff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  z-index: 100;
}

.skip-link:focus {
  top: 0.8rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
  scroll-margin-top: 92px;
}

.section-alt {
  background: #f1f5f9;
}

.section-head {
  margin-bottom: 1.5rem;
}

.kicker {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.08rem;
}

p {
  margin: 0 0 1rem;
}

.muted {
  color: var(--muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.site-header.is-scrolled {
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

.nav-wrapper {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 800;
  color: var(--secondary);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-nav a {
  padding: 0.4rem 0.6rem;
  color: #334155;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--primary);
}

.site-nav a.is-active {
  color: var(--primary);
}

.site-nav .nav-cta {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding-inline: 0.9rem;
  background: #ffffff;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.2rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1e293b;
  margin: 5px 0;
  transition: 0.2s ease;
}

.hero-template.section {
  padding: 1.5rem 0 3rem;
}

.hero-template-shell {
  width: min(1280px, 95%);
  margin: 0 auto;
  min-height: calc(100vh - 112px);
  display: grid;
  grid-template-columns: 270px 1fr;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #0f172a;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.22);
}

.hero-sidebar {
  background: #020617;
  color: #e2e8f0;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar-avatar {
  width: 94px;
  height: 94px;
  border-radius: 999px;
  object-fit: cover;
  border: 4px solid rgba(148, 163, 184, 0.35);
  margin-bottom: 0.8rem;
}

.sidebar-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
}

.sidebar-role {
  margin: 0.2rem 0 1rem;
  color: #94a3b8;
  font-size: 0.9rem;
  text-align: center;
}

.sidebar-socials {
  display: flex;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.sidebar-socials a {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-socials a:hover {
  border-color: #334155;
  color: #ffffff;
}

.hero-side-nav {
  width: 100%;
  margin-top: 0.8rem;
}

.hero-side-nav a {
  display: block;
  color: #cbd5e1;
  font-weight: 500;
  padding: 0.62rem 0.65rem;
  border-left: 3px solid transparent;
}

.hero-side-nav a:hover {
  color: #ffffff;
  border-left-color: #0ea5e9;
  background: rgba(15, 23, 42, 0.45);
}

.hero-side-nav a.is-active {
  color: #ffffff;
  border-left-color: #38bdf8;
  background: rgba(15, 23, 42, 0.55);
}

.hero-stage {
  position: relative;
  display: flex;
  align-items: center;
  background:
    linear-gradient(
      95deg,
      rgba(2, 6, 23, 0.94) 0%,
      rgba(2, 6, 23, 0.82) 34%,
      rgba(2, 6, 23, 0.58) 58%,
      rgba(2, 6, 23, 0.32) 78%,
      rgba(2, 6, 23, 0.2) 100%
    ),
    url("assets/og-thumbnail.png") right center / cover no-repeat;
}

.hero-stage-content {
  width: min(700px, 92%);
  margin-left: clamp(1.2rem, 4vw, 4.4rem);
  color: #ffffff;
  background: rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: clamp(1rem, 2.6vw, 2rem);
  backdrop-filter: blur(1.5px);
}

.hero-intro {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.4rem;
  color: #bae6fd;
}

.hero-stage-content h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 0.5rem;
  line-height: 1.08;
  text-wrap: balance;
}

.hero-typing {
  font-size: clamp(1.1rem, 2.3vw, 2rem);
  margin-bottom: 1rem;
  font-weight: 500;
  min-height: 1.4em;
}

#typedText {
  color: #7dd3fc;
  font-weight: 700;
}

.typing-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: #7dd3fc;
  vertical-align: -0.16em;
  margin-left: 2px;
  animation: blink 0.9s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.hero-description {
  color: #e2e8f0;
  max-width: 60ch;
  margin-bottom: 0.35rem;
}

.lead {
  font-size: 1.05rem;
  color: #334155;
  max-width: 68ch;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  font-weight: 600;
  transition: 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: #0f172a;
}

.btn-secondary:hover {
  border-color: #cbd5e1;
}

.btn:hover {
  transform: translateY(-1px);
}

.card,
.case-card,
.quote,
.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.chips span {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.9rem;
  color: #334155;
  background: #fff;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.case-card,
.quote {
  padding: 1.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.case-card:hover,
.quote:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.portfolio-filters {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-btn {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-btn:hover {
  border-color: #94a3b8;
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.case-category {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case-card.is-hidden {
  display: none;
}

.label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.8rem;
}

.case-card ul {
  margin: 0 0 0.8rem;
  padding-left: 1.1rem;
}

.case-card .result {
  color: #14532d;
}

.list {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

.card-cert .card-cert-intro {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #64748b;
}

.cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cert-list li {
  margin: 0;
  padding: 0.55rem 0.65rem 0.55rem 0.85rem;
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, rgba(14, 116, 144, 0.07), transparent 70%);
}

.cert-list strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
}

.cert-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.quote p {
  margin-bottom: 0.8rem;
  color: #1e293b;
}

.quote cite {
  color: #64748b;
  font-style: normal;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 1fr;
}

.contact-list {
  margin: 0;
  padding-left: 1.1rem;
}

.contact-list a {
  color: var(--primary-dark);
}

.contact-form {
  padding: 1rem;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  background: #fff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid #99f6e4;
  border-color: #14b8a6;
}

.btn.full {
  width: 100%;
  margin-top: 0.9rem;
}

.form-status {
  min-height: 1.3rem;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #334155;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 1.8rem 0;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-title {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.footer-links p {
  margin: 0 0 0.4rem;
  color: #334155;
}

.social-links {
  display: flex;
  gap: 0.9rem;
}

.social-links a {
  color: var(--primary-dark);
  font-weight: 600;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: none;
  z-index: 60;
}

.back-to-top.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #22d3ee;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 900px) {
  .hero-template-shell,
  .contact-grid,
  .grid.three,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .hero-template.section {
    padding: 0.5rem 0 2rem;
  }

  .hero-sidebar {
    align-items: flex-start;
    padding: 1rem;
  }

  .sidebar-name,
  .sidebar-role {
    text-align: left;
  }

  .hero-stage {
    min-height: 460px;
    padding: 1rem 0;
    background-position: 72% center;
  }

  .hero-stage-content {
    margin: 0 1rem;
    width: auto;
    padding: 1rem;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 1rem 1rem;
  }

  .site-nav a {
    padding: 0.7rem 0.5rem;
  }

  .site-nav a.is-active {
    background: #f1f5f9;
    border-radius: 8px;
  }

  .site-nav.open {
    display: flex;
  }

  .footer-wrap,
  .footer-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .back-to-top {
    bottom: 6.4rem;
  }
}
