:root {
  color-scheme: light;
  --color-primary: #2563eb;
  --color-secondary: #4f46e5;
  --color-primary-hover: #1d4ed8;
  --color-bg-main: #fbfbf9;
  --color-bg-card: #ffffff;
  --color-bg-hero: #f1f5f9;
  --color-text-main: #1e293b;
  --color-text-muted: #64748b;
  --color-text-inverse: #ffffff;
  --color-border: #e2e8f0;
  --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 10px 15px -3px rgba(37, 99, 235, 0.08), 0 4px 6px -4px rgba(37, 99, 235, 0.04);
  --tag-copilot-bg: #eff6ff;
  --tag-copilot-text: #1e40af;
  --tag-sharepoint-bg: #f0fdf4;
  --tag-sharepoint-text: #166534;
  --tag-loop-bg: #faf5ff;
  --tag-loop-text: #6b21a8;
  --tag-purview-bg: #fef2f2;
  --tag-purview-text: #991b1b;
  --tag-default-bg: #f1f5f9;
  --tag-default-text: #334155;
  --ink: var(--color-text-main);
  --paper: var(--color-bg-main);
  --white: var(--color-bg-card);
  --teal: var(--color-primary);
  --teal-bright: var(--color-secondary);
  --coral: var(--color-secondary);
  --line: var(--color-border);
  --muted: var(--color-text-muted);
  --display: Georgia, "Times New Roman", serif;
  --body: "Trebuchet MS", Verdana, sans-serif;
  --max: 1180px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --color-primary: #38bdf8;
  --color-secondary: #6366f1;
  --color-primary-hover: #7dd3fc;
  --color-bg-main: #090d16;
  --color-bg-card: #111827;
  --color-bg-hero: #0f172a;
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #0f172a;
  --color-border: #1e293b;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 10px 25px -5px rgba(56, 189, 248, 0.15), 0 8px 10px -6px rgba(99, 102, 241, 0.1);
  --tag-copilot-bg: rgba(56, 189, 248, 0.15);
  --tag-copilot-text: #7dd3fc;
  --tag-sharepoint-bg: rgba(74, 222, 128, 0.15);
  --tag-sharepoint-text: #86efac;
  --tag-loop-bg: rgba(192, 132, 252, 0.15);
  --tag-loop-text: #e9d5ff;
  --tag-purview-bg: rgba(248, 113, 113, 0.15);
  --tag-purview-text: #fca5a5;
  --tag-default-bg: rgba(148, 163, 184, 0.15);
  --tag-default-text: #cbd5e1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.65; }
h1, h2, h3 { color: var(--color-text-main); }
body::before { content: ""; display: block; height: 5px; background: linear-gradient(90deg, var(--color-primary) 0 68%, var(--color-secondary) 68%); }
a { color: var(--teal); text-underline-offset: 0.2em; }
a:hover { color: var(--color-primary-hover); }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }
.skip-link { position: fixed; top: 0.75rem; left: 0.75rem; z-index: 20; padding: 0.65rem 1rem; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-footer { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.site-header { position: relative; z-index: 15; border-bottom: 1px solid var(--line); background: var(--paper); }
.header-primary, .nav-panel-inner { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.header-primary { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { color: var(--ink); text-decoration: none; line-height: 1.1; }
.brand strong { display: block; font-family: var(--display); font-size: 1.7rem; font-weight: 500; }
.brand span { display: block; margin-top: 0.4rem; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.13em; }
.header-utilities { display: flex; align-items: center; gap: 1.5rem; }
.header-utilities a, .utility-link { border: 0; background: transparent; color: var(--ink); font-weight: 700; text-decoration: none; cursor: pointer; }
.header-utilities a:hover, .utility-link:hover { color: var(--color-primary); }
.theme-toggle { display: inline-flex; min-width: 2.5rem; min-height: 2.5rem; align-items: center; justify-content: center; gap: 0.55rem; border: 1px solid var(--line); border-radius: 9999px; background: var(--white); color: var(--ink); cursor: pointer; }
.theme-toggle:hover { border-color: var(--color-primary); color: var(--color-primary); }
.theme-toggle-icon { width: 1.2rem; font-size: 1.15rem; line-height: 1; text-align: center; }
.header-utilities .theme-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.nav-panel { border-top: 1px solid var(--line); }
.nav-panel-inner { min-height: 48px; display: flex; align-items: stretch; }
.topic-nav { display: flex; align-items: stretch; gap: 2rem; }
.topic-nav > a, .more-button { display: flex; align-items: center; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink); font-weight: 700; text-decoration: none; cursor: pointer; }
.topic-nav > a:hover, .topic-nav > a[aria-current="page"], .more-button:hover, .more-menu[data-open="true"] .more-button { border-bottom-color: var(--color-secondary); color: var(--color-primary); }
.more-menu { position: relative; display: flex; }
.more-button { gap: 0.4rem; }
.more-dropdown { position: absolute; z-index: 20; top: calc(100% + 1px); left: -1rem; display: none; min-width: 13rem; padding: 0.65rem; border: 1px solid var(--line); background: var(--white); box-shadow: 0 1rem 2rem rgba(23, 40, 38, 0.14); }
.more-menu[data-open="true"] .more-dropdown { display: grid; }
.more-dropdown a { padding: 0.65rem 0.75rem; color: var(--ink); font-weight: 700; text-decoration: none; }
.more-dropdown a:hover, .more-dropdown a[aria-current="page"] { background: var(--paper); color: var(--teal); }
.mobile-utilities, .menu-button { display: none; }
.menu-button { align-items: center; gap: 0.6rem; border: 0; background: transparent; color: var(--ink); padding: 0.55rem 0; font-weight: 700; cursor: pointer; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 1.25rem; height: 2px; background: currentColor; transition: transform 180ms ease; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -0.4rem; }
.menu-icon::after { top: 0.4rem; }
.menu-button[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-button[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-button[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--color-bg-main); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.06) 0%, transparent 60%); pointer-events: none; }
.hero::after { content: "EO"; position: absolute; right: max(1rem, calc((100vw - var(--max)) / 2)); bottom: -0.25em; color: rgba(37, 99, 235, 0.06); font-family: var(--display); font-size: min(34vw, 24rem); line-height: 0.7; pointer-events: none; }
.hero-layout { position: relative; z-index: 1; width: min(calc(100% - 2rem), var(--max)); min-height: 600px; margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(3rem, 5vw, 4.5rem); }
.hero-inner { position: relative; z-index: 1; max-width: 850px; }
.kicker, .eyebrow { color: var(--teal); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; }
.hero h1 { max-width: 11ch; margin: 0.25rem 0 1.5rem; font-family: var(--display); font-size: clamp(3.5rem, 9vw, 7.5rem); font-weight: 400; line-height: 0.92; }
.hero h1 em { color: var(--teal); font-weight: 400; }
.hero-copy { max-width: 58ch; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-link { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1rem; font-weight: 700; }
.hero-media { position: relative; align-self: end; display: grid; justify-items: end; }
.hero-portrait { width: min(100%, 350px); filter: contrast(1.04); }
.mvp-badge { position: absolute; right: 0; bottom: 1rem; height: 100px; overflow: hidden; background: #062431; transition: transform 180ms ease; }
.mvp-badge:hover { transform: translateY(-0.2rem); }
.mvp-badge img { width: auto; height: 100px; }

.archive, .page-shell { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section-heading { display: grid; grid-template-columns: 1fr minmax(260px, 0.6fr); gap: 2rem; align-items: end; margin-bottom: 2rem; }
.section-heading h1, .section-heading h2, .page-header h1 { margin: 0; font-family: var(--display); font-size: clamp(2.7rem, 6vw, 5rem); font-weight: 400; line-height: 1; }
.filter-panel { display: grid; gap: 1rem; }
.search-label { display: grid; gap: 0.4rem; color: var(--muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.search-label input { width: 100%; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: transparent; padding: 0.65rem 0; color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter { border: 1px solid var(--line); background: var(--white); padding: 0.4rem 0.65rem; color: var(--ink); cursor: pointer; }
.filter[aria-pressed="true"] { border-color: var(--teal); background: var(--teal); color: white; }
.result-count { margin: 0; color: var(--muted); font-size: 0.85rem; }
.post-list { display: grid; gap: 1rem; }
.post-card { position: relative; display: grid; grid-template-columns: 10rem 1fr auto; gap: 2rem; align-items: start; padding: 1.5rem; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-bg-card); box-shadow: var(--shadow-card); transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out; }
.post-card:hover, .post-card:focus-within { transform: translateY(-2px); border-color: var(--color-primary); box-shadow: var(--shadow-card-hover); }
.post-card[hidden] { display: none; }
.post-meta { display: grid; gap: 0.75rem; justify-items: start; color: var(--muted); font-size: 0.78rem; }
.post-meta time { text-transform: uppercase; letter-spacing: 0.08em; }
.category-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.category-badge { display: inline-flex; align-items: center; border: 1px solid transparent; border-radius: 9999px; padding: 0.25rem 0.75rem; background: var(--tag-default-bg); color: var(--tag-default-text); font-family: var(--body); font-size: 0.85rem; font-weight: 500; line-height: 1.4; letter-spacing: 0; text-transform: none; }
.category-badge--copilot { background: var(--tag-copilot-bg); color: var(--tag-copilot-text); }
.category-badge--sharepoint-online { background: var(--tag-sharepoint-bg); color: var(--tag-sharepoint-text); }
.category-badge--loop { background: var(--tag-loop-bg); color: var(--tag-loop-text); }
.category-badge--purview { background: var(--tag-purview-bg); color: var(--tag-purview-text); }
.post-card h3 { max-width: 30ch; margin: 0 0 0.6rem; font-family: var(--display); font-size: clamp(1.55rem, 3vw, 2.35rem); font-weight: 400; line-height: 1.1; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a::after { position: absolute; inset: 0; border-radius: inherit; content: ""; }
.post-card h3 a:focus-visible { outline: 0; }
.post-card h3 a:focus-visible::after { outline: 3px solid var(--color-primary); outline-offset: 3px; }
.post-card h3 a:hover { color: var(--color-primary-hover); }
.post-card p { max-width: 62ch; margin: 0; color: var(--muted); }
.post-arrow { color: var(--color-primary); font-family: var(--display); font-size: 2rem; line-height: 1; }
.empty-state { padding: 3rem 0; border-bottom: 1px solid var(--line); }
.archive-action { display: flex; justify-content: flex-end; padding-top: 2rem; }
.archive-action a { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1rem; border: 1px solid var(--ink); color: var(--ink); font-weight: 700; text-decoration: none; }
.archive-action a:hover { border-color: var(--teal); background: var(--teal); color: white; }

.about-band { background: var(--color-primary); color: var(--color-text-inverse); }
.about-band-inner { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; padding-block: clamp(3rem, 7vw, 6rem); display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(2rem, 8vw, 7rem); }
.about-band .kicker { color: #dbeafe; }
.about-band h2 { margin: 0; color: var(--color-text-inverse); font-family: var(--display); font-size: clamp(2.5rem, 6vw, 5.3rem); font-weight: 400; line-height: 1; }
.about-band p { max-width: 58ch; font-size: 1.1rem; }
.about-band a { color: white; font-weight: 700; }

.page-shell { max-width: 920px; min-height: 65vh; }
.page-header { margin-bottom: 3rem; }
.page-header p { max-width: 54ch; color: var(--muted); font-size: 1.15rem; }
.prose { font-family: var(--display); font-size: 1.18rem; }
.prose h2 { margin-top: 2.5rem; font-size: 2rem; font-weight: 400; }
.contact-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.5rem; }
.contact-links a { min-height: 8rem; padding: 1.4rem; border-top: 3px solid var(--coral); background: var(--white); color: var(--ink); font-family: var(--display); font-size: 1.4rem; text-decoration: none; }

.article-shell { width: min(calc(100% - 2rem), 800px); margin-inline: auto; padding-block: clamp(3.5rem, 8vw, 7rem); }
.article-header { margin-bottom: 3.5rem; }
.article-header h1 { margin: 1rem 0; font-family: var(--display); font-size: clamp(2.8rem, 7vw, 5.5rem); font-weight: 400; line-height: 0.98; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.article-date, .back-link { color: var(--muted); font-size: 0.85rem; }
.article-content { font-family: var(--display); font-size: 1.18rem; }
.article-content h2, .article-content h3 { margin-top: 2.8rem; line-height: 1.2; }
.article-content h2 { font-size: 2rem; }
.article-content img { margin: 2rem auto; }
.article-content figure { margin: 2.5rem 0; }
.article-content figcaption { color: var(--muted); font-family: var(--body); font-size: 0.8rem; text-align: center; }
.article-content pre, .article-content table { max-width: 100%; overflow-x: auto; }
.article-content pre { padding: 1rem; background: var(--ink); color: white; }
.article-content table { display: block; border-collapse: collapse; font-family: var(--body); font-size: 0.9rem; }
.article-content th, .article-content td { padding: 0.75rem; border: 1px solid var(--line); }
.article-author { margin-top: 4rem; padding: 2rem; border-left: 5px solid var(--coral); background: var(--white); }
.article-pagination { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
.article-pagination a { padding: 1.25rem; border-top: 1px solid var(--ink); color: var(--ink); font-family: var(--display); text-decoration: none; }
.article-pagination small { display: block; color: var(--muted); font-family: var(--body); }

.site-footer { display: flex; justify-content: space-between; gap: 2rem; padding-block: 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.site-footer div { display: flex; gap: 1.2rem; }

[data-theme="dark"] .site-header { background: var(--color-bg-main); }
[data-theme="dark"] .header-utilities a, [data-theme="dark"] .utility-link, [data-theme="dark"] .topic-nav > a, [data-theme="dark"] .more-button { color: var(--color-text-muted); }
[data-theme="dark"] .header-utilities a:hover, [data-theme="dark"] .utility-link:hover, [data-theme="dark"] .topic-nav > a:hover, [data-theme="dark"] .topic-nav > a[aria-current="page"], [data-theme="dark"] .more-button:hover { color: var(--color-primary); }
[data-theme="dark"] .hero { background: var(--color-bg-hero); }
[data-theme="dark"] .hero::before { background: radial-gradient(circle at 75% 25%, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.05) 40%, transparent 70%); }
[data-theme="dark"] .hero::after { color: rgba(56, 189, 248, 0.05); }
[data-theme="dark"] .category-badge { border-color: rgba(148, 163, 184, 0.2); }
[data-theme="dark"] .category-badge--copilot { border-color: rgba(56, 189, 248, 0.2); }
[data-theme="dark"] .category-badge--sharepoint-online { border-color: rgba(74, 222, 128, 0.2); }
[data-theme="dark"] .category-badge--loop { border-color: rgba(192, 132, 252, 0.2); }
[data-theme="dark"] .category-badge--purview { border-color: rgba(248, 113, 113, 0.2); }
[data-theme="dark"] .mvp-badge { border: 1px solid var(--color-border); }

@media (max-width: 720px) {
  .header-primary { min-height: 82px; }
  .archive-page { padding-block: 2rem; }
  .archive-page .section-heading { gap: 1rem; margin-bottom: 1rem; }
  .header-utilities { display: none; }
  .menu-button { display: flex; }
  .nav-panel { display: none; position: absolute; top: 100%; right: 0; left: 0; max-height: calc(100vh - 87px); overflow-y: auto; border-bottom: 1px solid var(--line); background: var(--white); box-shadow: 0 1rem 2rem rgba(23, 40, 38, 0.14); }
  .nav-panel[data-open="true"] { display: block; }
  .nav-panel-inner { display: grid; padding-block: 1rem 1.5rem; }
  .topic-nav { display: grid; gap: 0; }
  .topic-nav > a, .more-button { min-height: 3rem; border-bottom: 1px solid var(--line); }
  .more-menu { display: contents; }
  .more-button { display: none; }
  .more-dropdown { position: static; display: grid; min-width: 0; padding: 0; border: 0; box-shadow: none; }
  .more-dropdown a { display: flex; align-items: center; min-height: 3rem; padding: 0; border-bottom: 1px solid var(--line); }
  .mobile-utilities { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem 1rem; padding-top: 1.25rem; }
  .mobile-utilities a, .mobile-utilities .utility-link, .mobile-utilities .theme-toggle { min-height: 2.75rem; display: flex; align-items: center; justify-content: flex-start; padding: 0; color: var(--teal); font-weight: 700; text-decoration: none; }
  .mobile-utilities .theme-toggle { border: 0; border-radius: 0; background: transparent; }
  .hero-layout { min-height: 0; grid-template-columns: 1fr; padding-block: 3.5rem; }
  .hero-media { display: none; }
  .section-heading, .about-band-inner { grid-template-columns: 1fr; }
  .post-card { grid-template-columns: 1fr auto; gap: 0.5rem 1rem; }
  .post-meta { grid-column: 1 / -1; }
  .post-card p { grid-column: 1 / -1; }
  .contact-links, .article-pagination { grid-template-columns: 1fr; }
  .site-footer { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .post-card { transition: none; }
}