:root {
  color-scheme: light;
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --surface: #ffffff;
  --surface-raised: #f8f9fb;
  --border: #ccd0da;
  --border-strong: #9ca0b0;
  --text: #4c4f69;
  --heading: #303446;
  --muted: #6c6f85;
  --subtle: #8c8fa1;
  --accent: #a82f74;
  --accent-readable: #832358;
  --accent-dark: #832358;
  --accent-soft: #f4d9e8;
  --accent-ink: #ffffff;
  --good: #2f7d5b;
  --shadow: 0 18px 50px rgba(76, 79, 105, 0.14);
  --shadow-small: 0 8px 24px rgba(76, 79, 105, 0.12);
  --button-glow: 0 10px 28px color-mix(in srgb, var(--accent) 48%, transparent), 0 0 34px color-mix(in srgb, var(--accent) 30%, transparent);
  --shell: 1120px;
  --radius: 22px;
  --radius-small: 12px;
  --display: "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Segoe UI", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --base: #1e1e2e;
  --mantle: #181825;
  --surface: #242437;
  --surface-raised: #2a2a40;
  --border: #45475a;
  --border-strong: #6c7086;
  --text: #cdd6f4;
  --heading: #f5e0ed;
  --muted: #a6adc8;
  --subtle: #7f849c;
  --accent-readable: #f5c2e7;
  --accent-soft: #472b43;
  --shadow: 0 20px 56px rgba(8, 8, 15, 0.37);
  --shadow-small: 0 10px 28px rgba(8, 8, 15, 0.29);
  --button-glow: 0 10px 30px color-mix(in srgb, var(--accent) 58%, transparent), 0 0 42px color-mix(in srgb, var(--accent) 40%, transparent);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--base); scroll-behavior: smooth; }
body { margin: 0; background: var(--base); color: var(--text); font: 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
body::before { position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 85% 0, var(--accent-soft), transparent 32%); content: ""; opacity: .82; pointer-events: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent-readable); outline-offset: 4px; }
[hidden] { display: none !important; }
.site-shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.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; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 16px; border-radius: 10px; background: var(--heading); color: var(--base); transform: translateY(-180%); transition: transform 160ms ease; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent); background: color-mix(in srgb, var(--base) 92%, transparent); backdrop-filter: blur(18px); }
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 2px solid var(--accent-readable); border-radius: 14px; background: var(--accent-soft); color: var(--accent-readable); font: 800 22px/1 var(--display); }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { color: var(--heading); font: 800 20px/1 var(--display); letter-spacing: -.04em; }
.brand-copy span { color: var(--muted); font-size: 12px; }
.site-nav { display: flex; justify-content: center; gap: 4px; }
.site-nav a { padding: 11px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark); }
:root[data-theme="dark"] .site-nav a:hover, :root[data-theme="dark"] .site-nav a[aria-current="page"] { color: var(--heading); }
.theme-toggle, .mobile-menu-button { min-height: 44px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--heading); cursor: pointer; box-shadow: var(--shadow-small); }
.header-actions { display: flex; align-items: center; justify-self: end; gap: 10px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.theme-toggle:hover, .mobile-menu-button:hover { border-color: var(--accent-readable); }
.theme-toggle-icon { color: var(--accent-readable); font-size: 18px; }
.haxtech-link { position: relative; isolation: isolate; display: inline-grid; min-height: 44px; place-items: center; padding: 0 18px; border: 1px solid color-mix(in srgb, var(--accent-readable) 42%, var(--border)); border-radius: 999px; background: linear-gradient(135deg, var(--accent-soft), var(--surface)); color: var(--accent-readable); font-size: 13px; font-weight: 800; line-height: 1; white-space: nowrap; box-shadow: var(--shadow-small); transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.haxtech-link:hover { border-color: var(--accent-readable); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 22%, transparent); transform: translateY(-2px); }
.haxtech-label-dark, .haxtech-ghost { display: none; }
:root[data-theme="dark"] .haxtech-link { border-color: #4a0a0d; background: #4a0a0d; color: #ffdce8; box-shadow: 0 0 0 1px #1d090e, -12px 0 24px #1d090e, 12px 0 24px #1d090e; animation: haxtech-button-shift 2.6s cubic-bezier(.45, 0, .55, 1) infinite; will-change: translate; }
:root[data-theme="dark"] .haxtech-link:focus-visible { outline-color: #f5c2e7; }
:root[data-theme="dark"] .haxtech-link::before, :root[data-theme="dark"] .haxtech-link::after { position: absolute; inset: 2px; z-index: -1; border: 1px solid #1d090e; border-radius: inherit; content: ""; filter: blur(4px); pointer-events: none; }
:root[data-theme="dark"] .haxtech-link::before { animation: haxtech-shell-left 2.6s ease-in-out infinite; }
:root[data-theme="dark"] .haxtech-link::after { animation: haxtech-shell-right 2.6s ease-in-out infinite; }
:root[data-theme="dark"] .haxtech-label-light { display: none; }
:root[data-theme="dark"] .haxtech-label-dark { position: relative; z-index: 2; display: inline; animation: haxtech-text-shimmer 2.6s cubic-bezier(.45, 0, .55, 1) infinite; }
:root[data-theme="dark"] .haxtech-ghost { position: absolute; top: 50%; left: 50%; display: block; color: #ffdce8; filter: blur(2.2px); opacity: .28; pointer-events: none; }
:root[data-theme="dark"] .haxtech-ghost-left { animation: haxtech-ghost-left 2.6s ease-in-out infinite; }
:root[data-theme="dark"] .haxtech-ghost-right { animation: haxtech-ghost-right 2.6s ease-in-out infinite; }
@keyframes haxtech-shell-left { 0%, 100% { opacity: .28; transform: translateX(-6px); } 50% { opacity: .7; transform: translateX(3px); } }
@keyframes haxtech-shell-right { 0%, 100% { opacity: .7; transform: translateX(3px); } 50% { opacity: .28; transform: translateX(-6px); } }
@keyframes haxtech-button-shift { 0%, 100% { translate: -5px 0; } 50% { translate: 5px 0; } }
@keyframes haxtech-text-shimmer { 0%, 100% { text-shadow: -2px 0 3px rgba(255, 220, 232, .55), -5px 0 8px rgba(255, 220, 232, .24); } 50% { text-shadow: 2px 0 3px rgba(255, 220, 232, .55), 5px 0 8px rgba(255, 220, 232, .24); } }
@keyframes haxtech-ghost-left { 0%, 100% { opacity: .28; transform: translate(calc(-50% - 9px), -50%); } 50% { opacity: .05; transform: translate(calc(-50% - 4px), -50%); } }
@keyframes haxtech-ghost-right { 0%, 100% { opacity: .05; transform: translate(calc(-50% + 4px), -50%); } 50% { opacity: .28; transform: translate(calc(-50% + 9px), -50%); } }
.mobile-menu-button { display: none; padding: 0 15px; }

.hero-section, .page-hero { padding-top: clamp(70px, 11vw, 132px); padding-bottom: clamp(70px, 10vw, 124px); }
.hero-section { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(280px, .84fr); align-items: end; gap: clamp(38px, 8vw, 110px); }
.hero-copy { max-width: 700px; }
.eyebrow { margin: 0 0 16px; color: var(--accent-readable); font: 700 12px/1.2 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--heading); font-family: var(--display); letter-spacing: -.045em; }
h1 { max-width: 800px; margin-bottom: 28px; font-size: clamp(3.25rem, 8vw, 6.7rem); line-height: .98; }
h2 { margin-bottom: 18px; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.03; }
h3 { font-size: 1.35rem; line-height: 1.15; }
.hero-lede, .page-lede { max-width: 650px; margin-bottom: 32px; color: var(--muted); font-size: clamp(1.12rem, 2vw, 1.38rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 8px; padding: 0 21px; border: 2px solid transparent; border-radius: 12px; font-weight: 800; cursor: pointer; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--button-glow); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { border-color: var(--border-strong); background: var(--surface); color: var(--heading); }
.button-secondary:hover { border-color: var(--accent-readable); color: var(--accent-readable); }
.button-quiet { border-color: transparent; color: var(--accent-readable); }
.button-quiet:hover { background: var(--accent-soft); }
.hero-note { display: flex; align-items: center; gap: 10px; margin: 26px 0 0; color: var(--muted); font-size: 14px; }
.status-dot { display: block; flex: 0 0 auto; width: 9px; height: 9px; margin: 0; border-radius: 50%; background: var(--good); box-shadow: 0 0 7px 1px color-mix(in srgb, var(--good) 62%, transparent), 0 0 18px 4px color-mix(in srgb, var(--good) 30%, transparent); }
.welcome-card, .service-card, .project-card, .contact-card, .value-card, .resume-side, .calendar-section { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.welcome-card { padding: 28px; }
.card-kicker, .section-number, .project-number, .service-icon { color: var(--accent-readable); font: 700 12px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.check-list { display: grid; gap: 16px; padding: 0; margin: 0 0 25px; list-style: none; }
.check-list li { position: relative; padding-left: 27px; color: var(--heading); font-weight: 650; }
.check-list li::before { position: absolute; top: .55em; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-readable); content: ""; }
.arrow-link, .text-link { color: var(--accent-readable); font-weight: 800; }
.arrow-link { display: inline-flex; align-items: center; gap: 7px; }
.arrow-link:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.soft-section { margin-block: 20px; padding-block: clamp(58px, 9vw, 100px); background: var(--mantle); }
.two-column-section { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(35px, 8vw, 110px); align-items: start; }
.section-copy { max-width: 630px; }
.section-copy p { color: var(--muted); }
.section-copy p + p { margin-top: 18px; }
.showcase-preview, .content-section, .callout-section, .calendar-section, .contact-details, .contact-bottom, .profile-link-section { padding-block: clamp(65px, 9vw, 112px); }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.mini-project-grid, .values-grid, .card-grid, .project-grid, .contact-page-grid { display: grid; gap: 18px; }
.mini-project-grid { grid-template-columns: repeat(3, 1fr); }
.mini-project-card { display: grid; gap: 8px; min-height: 155px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface); transition: transform 160ms ease, border-color 160ms ease; }
.mini-project-card:hover { border-color: var(--accent-readable); transform: translateY(-3px); }
.mini-project-card span, .mini-project-card small { color: var(--muted); }
.mini-project-card strong { color: var(--heading); font: 700 1.5rem/1 var(--display); }
.mini-project-card small { font-size: 14px; }
.page-hero { max-width: var(--shell); margin-inline: auto; }
.page-hero h1 { max-width: 850px; }
.page-hero .page-lede { margin-bottom: 0; }
.page-hero .button { margin-top: 30px; }

.values-grid { grid-template-columns: repeat(3, 1fr); }
.value-card { padding: 26px; }
.value-card span { color: var(--accent-readable); font: 700 12px/1 var(--mono); }
.value-card h2 { margin-top: 34px; font-size: 2rem; }
.value-card p { color: var(--muted); }
.callout-section h2, .profile-link-section h2 { max-width: 680px; }

.card-grid { grid-template-columns: repeat(2, 1fr); padding-bottom: 80px; }
.service-card { display: flex; min-height: 340px; flex-direction: column; padding: 28px; }
.service-card h2 { margin-top: 32px; font-size: clamp(1.8rem, 3vw, 2.45rem); }
.service-card p { color: var(--muted); }
.service-card .card-audience { margin-top: auto; padding-top: 18px; color: var(--heading); font-size: 14px; font-weight: 700; }
.service-card .arrow-link { margin-top: 18px; }
.service-note-section { margin-top: 0; }

.project-grid { grid-template-columns: repeat(2, 1fr); padding-bottom: 72px; }
.project-card { display: flex; min-height: 360px; flex-direction: column; padding: 28px; scroll-margin-top: 110px; }
.project-card-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.project-status { padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 800; }
:root[data-theme="dark"] .project-status { color: var(--heading); }
.project-card h2 { margin-top: 44px; font-size: clamp(2rem, 4vw, 3rem); }
.project-card > p { max-width: 520px; color: var(--muted); }
.tag-list, .pill-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.tag-list { margin: 20px 0 28px; }
.tag-list li, .pill-list li { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 13px; }
.project-card .arrow-link { margin-top: auto; }
.profile-link-section { text-align: center; }
.profile-link-section h2 { margin-inline: auto; }

.resume-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: clamp(30px, 7vw, 100px); padding-bottom: 80px; }
.resume-list { display: grid; gap: 0; }
.resume-entry { position: relative; padding: 0 0 42px 28px; border-left: 2px solid var(--border); }
.resume-entry::before { position: absolute; top: 0; left: -7px; width: 12px; height: 12px; border: 3px solid var(--base); border-radius: 50%; background: var(--accent-readable); box-shadow: 0 0 0 1px var(--accent-readable); content: ""; }
.resume-entry:last-child { padding-bottom: 0; }
.resume-entry h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); }
.resume-entry p:last-child { max-width: 650px; color: var(--muted); }
.entry-meta { margin-bottom: 12px; color: var(--accent-readable); font: 700 12px/1.2 var(--mono); text-transform: uppercase; }
.resume-side { align-self: start; padding: 28px; }
.resume-side h2 { font-size: 2rem; }
.pill-list li { color: var(--heading); }
.resume-note { margin: 22px 0 0; color: var(--muted); font-size: 14px; }

.calendar-section { padding: 30px; margin-bottom: 80px; }
.calendar-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.calendar-heading h2 { margin-bottom: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.calendar-note, .calendar-timezone { color: var(--muted); font-size: 14px; }
.calendar-toolbar { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.calendar-toolbar .button { min-height: 44px; padding-inline: 14px; font-size: 14px; }
.calendar-week-label { margin: 0; color: var(--heading); text-align: center; font-weight: 800; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); gap: 8px; padding-top: 22px; }
.calendar-day { display: grid; min-height: 108px; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-small); background: var(--surface-raised); color: var(--muted); text-align: left; cursor: pointer; }
.calendar-day:hover, .calendar-day.is-selected { border-color: var(--accent-readable); background: var(--accent-soft); color: var(--heading); }
.calendar-day-name { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.calendar-day-date { color: var(--heading); font: 700 1.35rem/1 var(--display); }
.calendar-day-indicator { align-self: end; color: var(--accent-readable); font-size: 12px; font-weight: 800; }
.calendar-day-panel { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--border); }
.calendar-day-title { margin-bottom: 4px; font-size: 1.6rem; }
.calendar-timezone { margin-bottom: 18px; }
.calendar-event-list { display: grid; gap: 9px; }
.calendar-event { display: flex; align-items: baseline; gap: 12px; padding: 13px 15px; border-radius: 10px; background: var(--surface-raised); }
.calendar-event.is-open { border-left: 4px solid var(--good); }
.calendar-event.is-busy { border-left: 4px solid var(--accent-readable); }
.calendar-event-state { min-width: 42px; color: var(--muted); font: 700 11px/1.2 var(--mono); text-transform: uppercase; }
.calendar-event-title { color: var(--heading); }
.calendar-empty { color: var(--muted); }

.contact-page-grid { grid-template-columns: repeat(2, 1fr); padding-bottom: 72px; }
.contact-card { display: grid; min-height: 220px; gap: 12px; padding: 28px; transition: transform 160ms ease, border-color 160ms ease; }
.contact-card:hover { border-color: var(--accent-readable); transform: translateY(-3px); }
.contact-card-primary { background: var(--accent); color: var(--accent-ink); }
.contact-card-primary strong, .contact-card-primary .contact-card-action { color: var(--accent-ink); }
.contact-card-label { font: 700 12px/1.2 var(--mono); letter-spacing: .04em; text-transform: uppercase; opacity: .82; }
.contact-card strong { align-self: center; color: var(--heading); font: 700 clamp(1.45rem, 3vw, 2.4rem)/1.1 var(--display); overflow-wrap: anywhere; }
.contact-card-action { align-self: end; color: var(--accent-readable); font-weight: 800; }
.contact-details { display: grid; grid-template-columns: .9fr 1.1fr; gap: 35px; }
.contact-details .check-list { margin: 0; }
.contact-bottom { text-align: center; }
.contact-bottom h2 { max-width: 700px; margin-inline: auto; }
.contact-bottom .hero-actions { justify-content: center; }

.contact-strip { padding-block: 64px; background: var(--accent); color: var(--accent-ink); }
.contact-strip h2 { color: var(--accent-ink); font-size: clamp(2rem, 4vw, 3.5rem); }
.contact-strip p { max-width: 600px; margin-bottom: 0; opacity: .88; }
.contact-strip .eyebrow { color: var(--accent-ink); opacity: .8; }
.contact-strip-inner { display: flex; align-items: end; justify-content: space-between; gap: 35px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-strip .button-primary { background: var(--accent-ink); color: var(--accent-dark); box-shadow: none; }
.contact-strip .button-secondary { border-color: color-mix(in srgb, var(--accent-ink) 45%, transparent); background: transparent; color: var(--accent-ink); }
.site-footer { background: var(--heading); color: var(--base); }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; padding-block: 42px; }
.footer-brand { margin-bottom: 8px; color: var(--accent-soft); font: 800 2rem/1 var(--display); }
.footer-copy { max-width: 400px; margin: 0; color: color-mix(in srgb, var(--base) 72%, transparent); font-size: 14px; }
.footer-links { display: grid; align-content: start; justify-items: end; gap: 8px; color: var(--base); font-size: 14px; }
.footer-links a:hover, .footer-bottom a:hover { color: var(--accent-soft); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-block: 18px; border-top: 1px solid color-mix(in srgb, var(--base) 16%, transparent); color: color-mix(in srgb, var(--base) 68%, transparent); font-size: 12px; }

.admin-page { min-height: 100vh; padding-bottom: 116px; }
.admin-page [data-admin-inline] { border-radius: 7px; cursor: text; transition: outline-color 160ms ease, background 160ms ease; }
.admin-page [data-admin-inline]:hover, .admin-page [data-admin-inline]:focus { outline: 2px solid color-mix(in srgb, var(--accent) 62%, transparent); outline-offset: 5px; background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.admin-page [data-service-id], .admin-page [data-project-id], .admin-page [data-availability-id], .admin-page a { cursor: pointer; }
.admin-page [data-service-id]:hover, .admin-page [data-project-id]:hover, .admin-page [data-availability-id]:hover { border-color: var(--accent-readable); }
.admin-toolbar { position: fixed; right: 18px; bottom: 16px; left: 18px; z-index: 70; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.admin-toolbar-start, .admin-toolbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.admin-editing-label { display: inline-flex; align-items: center; gap: 10px; color: var(--heading); font-size: 13px; font-weight: 800; white-space: nowrap; }
.admin-page-selector { min-height: 44px; padding: 0 34px 0 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-raised); color: var(--heading); font-weight: 750; }
.admin-toolbar-status { color: var(--muted); font-size: 13px; white-space: nowrap; }
.admin-toolbar .button { min-height: 44px; padding-inline: 15px; font-size: 14px; }
.admin-save-button { min-width: 132px; transition: color 220ms ease, background 420ms ease, box-shadow 420ms ease, transform 160ms ease; }
.admin-save-button.is-saved { background: var(--good); box-shadow: 0 0 28px color-mix(in srgb, var(--good) 42%, transparent); }
.admin-context { position: fixed; right: 24px; bottom: 94px; z-index: 69; width: min(760px, calc(100% - 32px)); max-height: min(680px, calc(100vh - 130px)); overflow-y: auto; }
.admin-context-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.admin-context-panel { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.admin-context-panel:last-child { padding-right: 68px; }
.admin-context-panel .eyebrow { margin-bottom: 7px; }
.admin-context-panel h3 { margin: 0; color: var(--heading); font: 800 1.45rem/1.12 var(--display); letter-spacing: -.025em; }
.admin-context-help { margin: 8px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.admin-context-close { position: absolute; top: 14px; right: 14px; z-index: 1; }
.admin-icon-button { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-raised); color: var(--heading); font-size: 24px; cursor: pointer; }
.admin-context-fields { display: grid; gap: 12px; }
.admin-context-field { display: grid; gap: 6px; color: var(--heading); font-size: 13px; font-weight: 800; }
.admin-context-field input, .admin-context-field textarea, .admin-context-field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface-raised); color: var(--heading); }
.admin-context-field textarea { min-height: 100px; resize: vertical; }
.admin-context-field input:focus, .admin-context-field textarea:focus, .admin-context-field select:focus { border-color: var(--accent-readable); outline: 3px solid var(--accent-soft); }
.admin-remove-button { width: 100%; margin-top: 14px; color: var(--accent-readable); }
.admin-add-item { min-height: 160px; padding: 22px; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 65%, transparent); color: var(--accent-readable); font-weight: 800; cursor: pointer; }
.admin-add-item:hover { border-color: var(--accent-readable); background: var(--accent-soft); }
.admin-add-time { width: 100%; min-height: 56px; margin-top: 18px; }

@media (max-width: 1080px) {
  .header-inner { grid-template-columns: auto auto 1fr; }
  .mobile-menu-button { display: block; justify-self: end; }
  .header-actions { justify-self: end; }
  .site-nav { position: absolute; top: calc(100% + 1px); right: 24px; left: 24px; display: grid; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
  .site-nav a { padding: 14px; }
  .site-nav[hidden] { display: none; }
  .hero-section, .resume-layout, .contact-details { grid-template-columns: 1fr; }
  .welcome-card { max-width: 570px; }
  .calendar-grid { grid-template-columns: repeat(4, minmax(130px, 1fr)); overflow-x: auto; }
}

@media (min-width: 1081px) {
  .site-nav[hidden] { display: flex !important; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-shell { width: min(calc(100% - 32px), var(--shell)); }
  .header-inner { grid-template-columns: 1fr auto; gap: 10px; min-height: 72px; }
  .brand-copy span { display: none; }
  .mobile-menu-button { grid-column: 2; grid-row: 1; }
  .header-actions { grid-column: 1 / -1; grid-row: 2; justify-self: start; flex-wrap: wrap; margin-bottom: 10px; }
  .site-header:has(.theme-toggle) { padding-bottom: 0; }
  .hero-section, .page-hero { padding-top: 65px; padding-bottom: 66px; }
  h1 { font-size: clamp(3rem, 16vw, 4.8rem); }
  .hero-actions, .contact-actions, .contact-bottom .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button, .contact-actions .button, .contact-bottom .button { width: 100%; }
  .two-column-section, .mini-project-grid, .values-grid, .card-grid, .project-grid, .contact-page-grid { grid-template-columns: 1fr; }
  .section-heading-row, .calendar-heading, .contact-strip-inner, .footer-inner, .footer-bottom { align-items: start; flex-direction: column; }
  .section-heading-row .text-link { margin-bottom: 8px; }
  .calendar-section { padding: 18px; }
  .calendar-toolbar { grid-template-columns: 1fr 1fr; }
  .calendar-week-label { grid-column: 1 / -1; grid-row: 1; }
  .calendar-toolbar .button { width: 100%; }
  .calendar-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .calendar-day-panel { margin-top: 22px; }
  .footer-links { justify-items: start; }
  .admin-page { padding-bottom: 202px; }
  .admin-toolbar { right: 8px; bottom: 8px; left: 8px; align-items: stretch; flex-direction: column; }
  .admin-toolbar-start, .admin-toolbar-actions { width: 100%; }
  .admin-toolbar-status { width: 100%; }
  .admin-toolbar-actions .button { flex: 1; }
  .admin-context { top: 12px; right: 12px; bottom: 190px; left: 12px; width: auto; max-height: calc(100vh - 214px); }
  .admin-context-panels { grid-template-columns: 1fr; }
}

/* Device-gated mobile enhancements. Desktop browsers keep the base layout above. */
body.is-mobile-device {
  overflow-x: hidden;
  font-size: 17px;
  line-height: 1.78;
}

body.is-mobile-device .site-shell {
  width: min(calc(100% - 40px), var(--shell));
}

body.is-mobile-device #main-content {
  overflow-x: clip;
  touch-action: pan-y;
}

body.is-mobile-device .header-inner {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 84px;
  padding-block: 12px;
}

body.is-mobile-device .brand {
  min-width: 0;
}

body.is-mobile-device .brand-copy strong {
  font-size: 19px;
}

body.is-mobile-device .brand-copy span {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-mobile-device .mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding-inline: 17px;
}

body.is-mobile-device .site-nav {
  top: calc(100% + 8px);
  right: 20px;
  left: 20px;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
}

body.is-mobile-device .site-nav a {
  min-height: 48px;
  padding: 14px 16px;
}

body.is-mobile-device .header-actions {
  grid-column: 1 / -1;
  width: 100%;
  justify-self: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-bottom: 6px;
}

body.is-mobile-device .theme-toggle,
body.is-mobile-device .haxtech-link {
  width: 100%;
  min-height: 50px;
}

body.is-mobile-device .hero-section,
body.is-mobile-device .page-hero {
  padding-top: clamp(88px, 20vw, 132px);
  padding-bottom: clamp(92px, 20vw, 140px);
}

body.is-mobile-device .hero-section {
  gap: 46px;
}

body.is-mobile-device .hero-lede,
body.is-mobile-device .page-lede {
  margin-bottom: 38px;
  line-height: 1.78;
}

body.is-mobile-device .hero-actions,
body.is-mobile-device .contact-actions {
  gap: 14px;
}

body.is-mobile-device .hero-actions .button,
body.is-mobile-device .contact-actions .button,
body.is-mobile-device .contact-bottom .button {
  width: 100%;
  min-height: 54px;
}

body.is-mobile-device .welcome-card {
  padding: 32px;
}

body.is-mobile-device .check-list {
  gap: 20px;
  margin-bottom: 32px;
}

body.is-mobile-device .soft-section {
  margin-block: 26px;
  padding-block: 92px;
}

body.is-mobile-device .two-column-section {
  gap: 54px;
}

body.is-mobile-device .showcase-preview,
body.is-mobile-device .content-section,
body.is-mobile-device .callout-section,
body.is-mobile-device .calendar-section,
body.is-mobile-device .contact-details,
body.is-mobile-device .contact-bottom,
body.is-mobile-device .profile-link-section {
  padding-block: 92px;
}

body.is-mobile-device .section-heading-row,
body.is-mobile-device .calendar-heading,
body.is-mobile-device .contact-strip-inner,
body.is-mobile-device .footer-inner,
body.is-mobile-device .footer-bottom {
  align-items: start;
  flex-direction: column;
  gap: 22px;
}

body.is-mobile-device .section-heading-row {
  margin-bottom: 42px;
}

body.is-mobile-device .section-note {
  max-width: 100%;
  text-align: left;
}

body.is-mobile-device .mini-project-grid,
body.is-mobile-device .values-grid,
body.is-mobile-device .card-grid,
body.is-mobile-device .project-grid,
body.is-mobile-device .contact-page-grid {
  grid-template-columns: 1fr;
  gap: 24px;
}

body.is-mobile-device .mini-project-card {
  min-height: 180px;
  padding: 28px;
}

body.is-mobile-device .value-card,
body.is-mobile-device .service-card,
body.is-mobile-device .project-card,
body.is-mobile-device .contact-card,
body.is-mobile-device .resume-side {
  padding: 32px;
}

body.is-mobile-device .service-card {
  min-height: 380px;
}

body.is-mobile-device .project-card {
  min-height: 410px;
}

body.is-mobile-device .calendar-section {
  margin-bottom: 92px;
  padding: 24px;
}

body.is-mobile-device .calendar-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

body.is-mobile-device .calendar-day {
  min-height: 122px;
  padding: 18px;
}

body.is-mobile-device .contact-strip {
  padding-block: 84px;
}

body.is-mobile-device .contact-strip-inner {
  align-items: stretch;
}

body.is-mobile-device .contact-actions {
  width: 100%;
  flex-direction: column;
}

body.is-mobile-device .site-footer {
  padding-block: 54px;
}

body.is-mobile-device .footer-links {
  justify-items: start;
  gap: 12px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .haxtech-link, .haxtech-link::before, .haxtech-link::after, .haxtech-label-dark, .haxtech-ghost { animation: none !important; }
}
