:root {
  --msd-ink: #16181d;
  --msd-graphite: #252830;
  --msd-panel: #d7d9de;
  --msd-paper: #f5f5f2;
  --msd-white: #ffffff;
  --msd-magenta: #e600d7;
  --msd-lime: #9be532;
  --msd-cyan: #00d7e8;
  --msd-blue: #2759d7;
  --msd-muted: #5a606b;
  --msd-line: #101217;
  --msd-shadow: 7px 7px 0 #101217;
  --msd-radius: 3px;
  --msd-max: 1180px;
}

html { scroll-behavior: smooth; }
body.msd-retro-active {
  margin: 0;
  overflow-x: hidden;
  color: var(--msd-ink);
  background: var(--msd-paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
body.msd-retro-active * { box-sizing: border-box; }
body.msd-retro-active img { display: block; max-width: 100%; }
body.msd-retro-active a { color: inherit; }
body.msd-retro-active button,
body.msd-retro-active input,
body.msd-retro-active textarea { font: inherit; }

.msd-site {
  min-height: 100vh;
  background-color: var(--msd-paper);
  background-image:
    linear-gradient(rgba(22,24,29,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,24,29,.045) 1px, transparent 1px);
  background-size: 24px 24px;
}
.msd-container { width: min(calc(100% - 40px), var(--msd-max)); margin-inline: auto; }
.msd-skip { position: fixed; left: 12px; top: -80px; z-index: 9999; background: var(--msd-lime); padding: 10px 14px; border: 2px solid var(--msd-line); font-weight: 800; }
.msd-skip:focus { top: 12px; }

.msd-header { position: sticky; top: 0; z-index: 100; background: var(--msd-graphite); color: var(--msd-white); border-bottom: 3px solid var(--msd-line); }
.msd-header-top { height: 24px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; color: #cdd1da; background: #14161b; font-family: "Courier New", monospace; font-size: 12px; letter-spacing: .04em; }
.msd-status { display: inline-flex; align-items: center; gap: 7px; }
.msd-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--msd-lime); box-shadow: 0 0 8px var(--msd-lime); }
.msd-nav-row { min-height: 76px; display: flex; align-items: center; gap: 28px; }
.msd-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.msd-brand img { width: 56px; height: 56px; object-fit: contain; }
.msd-brand-copy { display: grid; line-height: 1.05; text-transform: uppercase; }
.msd-brand-copy strong { font-size: 17px; letter-spacing: .08em; }
.msd-brand-copy small { color: var(--msd-cyan); font-family: "Courier New", monospace; font-size: 11px; letter-spacing: .1em; }
.msd-nav { display: flex; align-items: center; gap: 6px; }
.msd-nav a { padding: 9px 12px; border: 1px solid transparent; text-decoration: none; font-family: "Courier New", monospace; font-weight: 700; }
.msd-nav a:hover, .msd-nav a:focus-visible { border-color: #707680; background: #343943; color: var(--msd-cyan); outline: none; }
.msd-menu-toggle { display: none; width: 44px; height: 38px; color: var(--msd-ink); background: var(--msd-panel); border: 2px outset #fff; font-weight: 900; cursor: pointer; }

.msd-hero { padding: clamp(58px, 8vw, 110px) 0 74px; }
.msd-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 54px; align-items: center; }
.msd-kicker { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 22px; padding: 5px 9px; color: var(--msd-white) !important; background: var(--msd-blue); border: 2px solid var(--msd-line); box-shadow: 3px 3px 0 var(--msd-line); font: 700 13px/1.2 "Courier New", monospace; letter-spacing: .04em; text-transform: uppercase; }
.msd-kicker::before { content: "◆"; color: var(--msd-lime); }
.msd-hero h1 { max-width: 820px; margin: 0; font-size: clamp(44px, 6.2vw, 86px); line-height: .96; letter-spacing: -.055em; }
.msd-hero h1 span { color: var(--msd-magenta); text-shadow: 3px 3px 0 var(--msd-line); }
.msd-lead { max-width: 720px; margin: 28px 0 0; color: #343842; font-size: clamp(18px, 2vw, 22px); line-height: 1.5; }
.msd-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.msd-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px; padding: 10px 18px; color: var(--msd-ink); background: var(--msd-panel); border: 3px outset #fff; text-decoration: none; font-weight: 800; cursor: pointer; }
.msd-button:hover { filter: brightness(1.05); transform: translate(1px, 1px); }
.msd-button:active { border-style: inset; }
.msd-button:focus-visible { outline: 4px solid var(--msd-cyan); outline-offset: 3px; }
.msd-button-primary { background: var(--msd-lime); }

.msd-window { overflow: hidden; background: var(--msd-panel); border: 2px solid var(--msd-line); border-radius: var(--msd-radius); box-shadow: var(--msd-shadow); }
.msd-titlebar { min-height: 34px; display: flex; align-items: center; gap: 9px; padding: 5px 8px 5px 12px; color: #fff; background: linear-gradient(90deg, #173796, #287be3); font: 700 14px/1.2 "Courier New", monospace; }
.msd-titlebar-title { margin-right: auto; }
.msd-window-controls { display: flex; gap: 4px; }
.msd-window-controls i { width: 19px; height: 19px; display: grid; place-items: center; color: var(--msd-ink); background: var(--msd-panel); border: 2px outset #fff; font-style: normal; font-size: 11px; }
.msd-window-body { padding: 8px; border: 3px outset #f5f5f5; }
.msd-terminal { min-height: 330px; padding: 24px; color: #d9ffe0; background: #0e1115; border: 2px inset #fff; font-family: "Courier New", monospace; box-shadow: inset 0 0 30px rgba(0,215,232,.08); }
.msd-terminal p { margin: 0 0 12px; }
.msd-terminal .prompt { color: var(--msd-lime); }
.msd-terminal .value { color: var(--msd-cyan); }
.msd-cursor { display: inline-block; width: 10px; height: 1em; vertical-align: -.15em; background: var(--msd-magenta); animation: msd-blink 1s steps(1) infinite; }
@keyframes msd-blink { 50% { opacity: 0; } }

.msd-section { padding: 84px 0; }
.msd-section-dark { color: var(--msd-white); background: var(--msd-graphite); border-block: 3px solid var(--msd-line); }
.msd-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.msd-eyebrow { margin: 0 0 7px; color: var(--msd-magenta); font: 800 13px/1.2 "Courier New", monospace; letter-spacing: .12em; text-transform: uppercase; }
.msd-section h2 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1; letter-spacing: -.04em; }
.msd-section-note { max-width: 470px; margin: 0; color: var(--msd-muted); }
.msd-section-dark .msd-section-note { color: #c8cbd3; }
.msd-section-dark h2 { color: var(--msd-white); }

.msd-metrics { margin-top: -32px; position: relative; z-index: 2; }
.msd-metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--msd-panel); border: 2px solid var(--msd-line); box-shadow: var(--msd-shadow); }
.msd-metric { min-height: 126px; padding: 22px; border-right: 2px solid #8d929b; }
.msd-metric:last-child { border-right: 0; }
.msd-metric strong { display: block; font: 900 clamp(31px, 4vw, 46px)/1 "Courier New", monospace; color: var(--msd-blue); }
.msd-metric span { display: block; margin-top: 8px; font-weight: 700; }

.msd-project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.msd-project { display: grid; grid-template-rows: 220px 1fr; min-width: 0; overflow: hidden; background: var(--msd-paper); color: var(--msd-ink); border: 2px solid var(--msd-line); box-shadow: 6px 6px 0 #0f1115; }
.msd-project-media { position: relative; min-width: 0; overflow: hidden; background: #fff; border-bottom: 2px solid var(--msd-line); }
.msd-project-media img { position: absolute; inset: 24px; display: block; width: calc(100% - 48px); height: calc(100% - 48px); max-width: none; max-height: none; object-fit: contain; }
.msd-project-body { display: flex; flex-direction: column; padding: 23px; }
.msd-project-meta { color: var(--msd-blue); font: 700 12px/1.3 "Courier New", monospace; text-transform: uppercase; }
.msd-project h3 { margin: 9px 0 10px; font-size: 25px; line-height: 1.1; }
.msd-project p { margin: 0 0 18px; color: #4d525c; }
.msd-project-body .msd-text-link { align-self: flex-start; margin-top: auto; }
.msd-text-link { display: inline-flex; gap: 7px; color: var(--msd-blue); font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.msd-text-link:hover, .msd-text-link:focus-visible { color: var(--msd-magenta); }

.msd-client-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.msd-client { min-height: 140px; display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 18px; padding: 16px; background: #fff; border: 2px solid var(--msd-line); text-decoration: none; }
.msd-client:hover, .msd-client:focus-visible { box-shadow: 5px 5px 0 var(--msd-magenta); transform: translate(-2px,-2px); outline: none; }
.msd-client img { width: 92px; height: 92px; object-fit: contain; }
.msd-client strong { display: block; font-size: 18px; }
.msd-client span { color: var(--msd-muted); font: 13px "Courier New", monospace; }

.msd-service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.msd-service { min-height: 210px; background: #fff; border: 2px solid var(--msd-line); box-shadow: 5px 5px 0 #91aef3; }
.msd-service-bar { display: flex; align-items: center; gap: 10px; padding: 11px 14px; color: #fff; background: linear-gradient(90deg, #214fc4, var(--msd-blue)); border-bottom: 2px solid var(--msd-line); font: 700 13px "Courier New", monospace; }
.msd-service-icon { width: 26px; height: 26px; display: grid; place-items: center; background: var(--msd-cyan); border: 2px solid var(--msd-line); }
.msd-service-copy { padding: 23px; }
.msd-service h3 { margin: 0 0 9px; font-size: 23px; }
.msd-service p { margin: 0; color: var(--msd-muted); }
.msd-service-featured { grid-column: 1 / -1; min-height: 0; box-shadow: 6px 6px 0 var(--msd-lime); }
.msd-service-featured .msd-service-bar { background: linear-gradient(90deg, #214fc4, var(--msd-blue)); }
.msd-service-featured .msd-service-icon { background: var(--msd-lime); color: var(--msd-ink); }
.msd-service-featured .msd-service-copy { max-width: 980px; }

.msd-about-grid { display: grid; grid-template-columns: minmax(300px,.8fr) minmax(0,1.2fr); gap: 38px; align-items: stretch; }
.msd-photo-window .msd-window-body { background: #fff; }
.msd-photo-window img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.msd-caption { padding: 8px 4px 1px; font: 13px "Courier New", monospace; color: var(--msd-muted); }
.msd-bio { display: flex; flex-direction: column; justify-content: center; }
.msd-bio h2 { max-width: 720px; }
.msd-bio .msd-lead { margin-top: 22px; font-size: 19px; }
.msd-credentials { display: grid; gap: 10px; margin: 27px 0 0; padding: 0; list-style: none; }
.msd-credentials li { padding: 11px 14px; background: #fff; border: 2px solid var(--msd-line); font-weight: 700; }
.msd-credentials li::before { content: "[OK]"; margin-right: 10px; color: var(--msd-blue); font-family: "Courier New", monospace; }

.msd-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.msd-value { padding: 24px; background: #fff; color: var(--msd-ink); border: 2px solid var(--msd-line); }
.msd-value b { display: block; margin-bottom: 12px; color: var(--msd-magenta); font: 800 13px "Courier New", monospace; }
.msd-value h3 { margin: 0 0 8px; font-size: 21px; }
.msd-value p { margin: 0; color: var(--msd-muted); }

.msd-cta { padding: 72px 0; }
.msd-cta-window .msd-window-body { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; padding: 34px; background: #fff; }
.msd-cta h2 { margin: 0 0 8px; font-size: clamp(31px, 4vw, 48px); line-height: 1.05; }
.msd-cta p { margin: 0; color: var(--msd-muted); }

.msd-footer { color: #d9dde5; background: #121419; border-top: 3px solid var(--msd-line); }
.msd-footer-main { min-height: 170px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; }
.msd-footer .msd-brand { width: max-content; }
.msd-footer-contact { text-align: right; }
.msd-footer-contact small { display: block; color: var(--msd-cyan); font: 12px "Courier New", monospace; text-transform: uppercase; }
.msd-footer-contact a { font-weight: 700; }
.msd-footer-bottom { padding: 10px 0; color: #aeb3bd; background: #07080a; font: 12px "Courier New", monospace; }

.msd-contact-main { padding: 70px 0 90px; }
.msd-contact-intro { max-width: 780px; margin-bottom: 36px; }
.msd-contact-intro h1 { margin: 0 0 18px; font-size: clamp(46px, 7vw, 78px); line-height: .95; letter-spacing: -.05em; }
.msd-contact-intro p { max-width: 680px; margin: 0; color: var(--msd-muted); font-size: 19px; }
.msd-contact-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,.6fr); gap: 28px; align-items: start; }
.msd-form-window .msd-window-body { padding: 24px; background: #fff; }
.msd-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.msd-form label { display: grid; gap: 6px; font-weight: 800; }
.msd-form .is-wide { grid-column: 1 / -1; }
.msd-form input, .msd-form textarea { width: 100%; min-height: 45px; padding: 10px 12px; color: var(--msd-ink); background: #fff; border: 3px inset #e8e8e8; border-radius: 0; }
.msd-form textarea { min-height: 160px; resize: vertical; }
.msd-form input:focus, .msd-form textarea:focus { outline: 3px solid var(--msd-cyan); outline-offset: 1px; }
.msd-submit { width: 100%; margin-top: 20px; }
.msd-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.msd-form-notice { margin-bottom: 18px; padding: 12px 14px; border: 2px solid var(--msd-line); }
.msd-form-notice.is-success { background: #dfffb7; }
.msd-form-notice.is-error { background: #ffd1d1; }
.msd-contact-card { padding: 24px; background: var(--msd-graphite); color: #fff; border: 2px solid var(--msd-line); box-shadow: var(--msd-shadow); }
.msd-contact-card h2 { margin: 0 0 18px; color: var(--msd-white); font-size: 26px; }
.msd-contact-card dl { margin: 0; }
.msd-contact-card dt { margin-top: 18px; color: var(--msd-cyan); font: 700 12px "Courier New", monospace; text-transform: uppercase; }
.msd-contact-card dd { margin: 4px 0 0; }
.msd-contact-card a { overflow-wrap: anywhere; }
.msd-contact-tip { margin-top: 24px; padding: 12px; color: var(--msd-ink); background: var(--msd-lime); border: 2px solid #000; font: 700 13px/1.45 "Courier New", monospace; }

@media (max-width: 980px) {
  .msd-hero-grid, .msd-about-grid, .msd-contact-grid { grid-template-columns: 1fr; }
  .msd-project-grid { grid-template-columns: 1fr 1fr; }
  .msd-project:last-child { grid-column: 1 / -1; }
  .msd-client-grid { grid-template-columns: 1fr 1fr; }
  .msd-metric-grid { grid-template-columns: 1fr 1fr; }
  .msd-metric:nth-child(2) { border-right: 0; }
  .msd-metric:nth-child(-n+2) { border-bottom: 2px solid #8d929b; }
  .msd-terminal { min-height: 280px; }
}

@media (max-width: 720px) {
  .msd-container { width: min(calc(100% - 28px), var(--msd-max)); }
  .msd-header-top { font-size: 10px; }
  .msd-nav-row { min-height: 68px; }
  .msd-brand img { width: 48px; height: 48px; }
  .msd-brand-copy strong { font-size: 14px; }
  .msd-menu-toggle { display: block; }
  .msd-nav { display: none; position: absolute; left: 0; right: 0; top: 92px; padding: 10px 14px 16px; flex-direction: column; align-items: stretch; background: var(--msd-graphite); border-bottom: 3px solid var(--msd-line); }
  .msd-nav.is-open { display: flex; }
  .msd-nav a { padding: 12px; border: 1px solid #606671; }
  .msd-hero { padding: 54px 0 62px; }
  .msd-hero h1 { font-size: clamp(43px, 15vw, 64px); overflow-wrap: anywhere; }
  .msd-lead { font-size: 18px; }
  .msd-actions { flex-direction: column; }
  .msd-button { width: 100%; }
  .msd-section { padding: 62px 0; }
  .msd-section-head { display: block; }
  .msd-section-note { margin-top: 16px; }
  .msd-project-grid, .msd-client-grid, .msd-service-grid, .msd-values { grid-template-columns: 1fr; }
  .msd-project:last-child { grid-column: auto; }
  .msd-client { grid-template-columns: 82px 1fr; }
  .msd-client img { width: 82px; height: 82px; }
  .msd-cta-window .msd-window-body, .msd-footer-main { grid-template-columns: 1fr; }
  .msd-footer-main { padding: 38px 0; }
  .msd-footer-contact { text-align: left; }
  .msd-form-grid { grid-template-columns: 1fr; }
  .msd-form .is-wide { grid-column: auto; }
}

@media (max-width: 440px) {
  .msd-header-top {
    height: auto;
    min-height: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 2px;
    padding: 5px 10px;
    font-size: 9px;
    line-height: 1.25;
  }
  .msd-header-top > span,
  .msd-status { min-width: 0; white-space: nowrap; }
  .msd-brand-copy { display: none; }
  .msd-metric-grid { grid-template-columns: 1fr; }
  .msd-metric { border-right: 0; border-bottom: 2px solid #8d929b; }
  .msd-metric:last-child { border-bottom: 0; }
  .msd-project { grid-template-rows: 180px auto; }
  .msd-project-media img { inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); }
  .msd-terminal { padding: 18px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
