:root {
  --site-header-height: 90px;
}

html {
  scroll-padding-top: calc(var(--site-header-height) + 18px);
}

body {
  padding-top: var(--site-header-height);
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 10px;
  z-index: 10001;
  transform: translateY(-140%);
  padding: 10px 12px;
  color: #fff;
  background: #0f2438;
  border-radius: 8px;
  font-weight: 850;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(216,224,232,.86);
  box-shadow: 0 12px 32px rgba(16,31,46,.08);
  backdrop-filter: blur(16px);
}

.site-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  max-width: 1180px;
  min-height: var(--site-header-height);
  margin: 0 auto;
  padding: 0 22px;
}

.site-brand {
  display: inline-flex;
  flex-direction: column;
  color: #0f2438;
  text-decoration: none;
  line-height: 1.05;
}

.site-brand strong {
  font-size: .98rem;
  font-weight: 950;
}

.site-brand span {
  color: #607083;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.site-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.site-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  color: #0f2438;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.site-menu a:hover,
.site-menu a.active {
  color: #184f56;
  background: #eef7f6;
  text-decoration: none;
}

.site-menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 38px;
  color: #0f2438;
  background: #fff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.article-nav-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 74px;
  padding: 12px 14px;
  color: #0f2438;
  background: #fff;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(16,31,46,.05);
}

.article-nav-link:hover {
  color: #184f56;
  border-color: rgba(38,107,114,.45);
  text-decoration: none;
}

.article-nav-label {
  display: block;
  color: #b5893f;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.article-nav-title {
  display: block;
  margin-top: 4px;
  font-weight: 850;
  line-height: 1.2;
}

@media (max-width: 920px) {
  :root { --site-header-height: 74px; }
  .site-nav {
    grid-template-columns: auto auto;
    justify-content: space-between;
    min-height: var(--site-header-height);
    padding: 0 14px;
  }
  .site-menu-button { display: inline-flex; }
  .site-menu {
    grid-column: 1 / -1;
    display: none;
    justify-content: start;
    padding: 0 0 12px;
  }
  .site-header.menu-open .site-menu { display: flex; }
  .site-brand span { display: none; }
  .article-nav { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  :root { --site-header-height: 66px; }
  .site-nav { gap: 8px; }
  .site-brand strong { font-size: .92rem; }
}

@media print {
  body { padding-top: 0 !important; }
  .site-header,
  .skip-link,
  .article-nav,
  .article-actions { display: none !important; }
}

/* Refined portfolio-style navigation */
.site-header {
  background: #fff;
  border-top: 12px solid #3c3c3c;
  border-bottom: 1px solid #eef1f4;
  box-shadow: none;
  backdrop-filter: none;
}

.site-nav {
  min-height: 78px;
  grid-template-columns: minmax(300px, auto) 1fr auto;
}

.site-brand {
  position: relative;
  min-height: 42px;
  justify-content: center;
  padding-left: 54px;
}

.site-brand::before {
  content: "MS";
  position: absolute;
  left: 0;
  top: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  transform: translateY(-50%);
  color: #fff;
  background: linear-gradient(135deg, #075e5d, #0b2434);
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 950;
  letter-spacing: -.02em;
}

.site-brand strong {
  color: #657181;
  font-size: .84rem;
  font-weight: 950;
}

.site-brand span {
  color: #657181;
  font-size: .77rem;
  letter-spacing: 0;
  text-transform: none;
}

.site-menu {
  justify-content: end;
  gap: 2px;
}

.site-menu a {
  color: #263546;
  min-height: 42px;
  padding: 0 10px;
  font-size: .95rem;
  font-weight: 950;
}

.site-menu a:hover,
.site-menu a.active {
  color: #075e5d;
  background: transparent;
}

.site-menu a.nav-contact {
  margin-left: 6px;
  padding: 0 20px;
  color: #fff;
  background: #0b2434;
  border-radius: 999px;
}

.site-menu a.nav-contact:hover,
.site-menu a.nav-contact.active {
  color: #fff;
  background: #075e5d;
}

@media (max-width: 920px) {
  .site-header { border-top-width: 8px; }
  .site-nav {
    grid-template-columns: 1fr auto;
    min-height: 66px;
  }
  .site-menu {
    justify-content: start;
  }
  .site-menu a.nav-contact {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .site-brand {
    min-width: 0;
    padding-left: 48px;
  }
  .site-brand::before {
    width: 38px;
    height: 38px;
  }
}

/* Site-wide editorial polish */
body:not(.cv-home) {
  background:
    linear-gradient(180deg, #f6f8fa 0, #fff 440px),
    #fff;
}

body:not(.cv-home) .page {
  max-width: 1180px;
  padding-top: 34px;
}

body:not(.cv-home) .page > .hero {
  min-height: auto;
  padding: 52px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(11,36,52,.96), rgba(7,94,93,.88)),
    radial-gradient(circle at 90% 10%, rgba(242,208,134,.30), transparent 26%);
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(11,36,52,.16);
}

body:not(.cv-home) .page > .hero h1 {
  max-width: 820px;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: .92;
}

body:not(.cv-home) .page > .hero p {
  color: rgba(255,255,255,.82);
}

body:not(.cv-home) .eyebrow {
  color: #f2d086;
  border-color: rgba(242,208,134,.35);
  background: rgba(255,255,255,.06);
}

body:not(.cv-home) .home-link {
  border-radius: 999px;
}

body:not(.cv-home) .section-head {
  margin-top: 34px;
  align-items: end;
}

body:not(.cv-home) .section-note {
  color: #075e5d;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body:not(.cv-home) .posts {
  gap: 18px;
}

body:not(.cv-home) .post-card {
  position: relative;
  min-height: 310px;
  padding: 24px;
  border-radius: 18px;
  border-color: #dfe6ec;
  box-shadow: 0 18px 42px rgba(16,31,46,.07);
  overflow: hidden;
}

body:not(.cv-home) .post-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #075e5d, #b5893f);
}

body:not(.cv-home) .post-card h3 {
  font-size: 1.22rem;
  line-height: 1.18;
}

body:not(.cv-home) .tag {
  background: #eef7f6;
  border: 1px solid rgba(7,94,93,.12);
}

body:not(.cv-home) .article-page {
  max-width: 920px;
}

body:not(.cv-home) .news-article {
  padding: clamp(24px, 4vw, 42px);
  border-radius: 20px;
  border-color: #dfe6ec;
  box-shadow: 0 22px 58px rgba(16,31,46,.08);
}

body:not(.cv-home) .news-article h2,
body:not(.cv-home) .news-article h3 {
  color: #0b2434;
  font-size: clamp(1.9rem, 3vw, 2.65rem);
  line-height: 1.05;
}

body:not(.cv-home) .article-cta {
  border-left-color: #b5893f;
  background: #fff8e9;
}

body:not(.cv-home) footer {
  color: #657181;
}

@media (max-width: 680px) {
  body:not(.cv-home) .page { padding-inline: 14px; }
  body:not(.cv-home) .page > .hero {
    margin-inline: 0;
    padding: 34px 22px;
    border-radius: 20px;
  }
}
