:root {
  --night: #0b1a3a;
  --red: #d40000;
  --green: #0a7a2a;
  --gold: #ffd700;
  --snow: #fffdf5;
  --ink: #1a1a1a;
  --comic: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive;
  --times: "Times New Roman", Times, serif;
  --mono: "Courier New", Courier, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.6 var(--comic);
  background-color: var(--night);
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 90px 70px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 130px 20px, #ffe9a8 50%, transparent 51%),
    radial-gradient(2px 2px at 160px 110px, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 50px 140px, #bfe3ff 50%, transparent 51%);
  background-size: 180px 160px;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ctext y='22' font-size='22'%3E%F0%9F%8E%84%3C/text%3E%3C/svg%3E") 4 4, auto;
}
a { color: #0000ee; text-decoration: underline; }
a:visited { color: #551a8b; }
a:hover { color: var(--red); background: #ffff66; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px dashed var(--red); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--red); }
p { margin: 0 0 12px; }
h1, h2, h3, h4 { font-family: var(--times); font-weight: 700; }
h2 { font-size: 36px; line-height: 1.2; margin: 6px 0 14px; color: var(--red); text-shadow: 2px 2px 0 var(--gold), 4px 4px 0 var(--green); }
h3 { font-size: 26px; line-height: 1.2; margin: 8px 0 12px; color: var(--green); text-decoration: underline wavy var(--red); text-underline-offset: 6px; }
em { font-style: italic; color: var(--red); }
.eyebrow { font: bold 12px/1.5 var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--green); }
.eyebrow::before { content: "\2605  "; color: var(--gold); text-shadow: 0 0 3px #b8860b; }

.page { width: min(820px, calc(100% - 24px)); margin: 0 auto 24px; }
body { overflow-x: hidden; }
.bevel {
  background: var(--snow);
  border: 6px ridge #c0c0c0;
  outline: 4px solid var(--red);
  outline-offset: 0;
  box-shadow: 0 0 0 8px var(--green), 8px 8px 0 8px #000a;
  margin: 26px 8px;
  padding: 18px 22px;
}

/* String of Christmas lights across the top */
.lights { position: sticky; top: 0; z-index: 40; display: flex; justify-content: space-around; margin: 0; padding: 4px 0 10px; list-style: none; overflow: hidden; white-space: nowrap; background: linear-gradient(#0b1a3a, transparent); }
.lights::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: #2b2b2b; }
.lights li { position: relative; width: 12px; height: 20px; margin-top: 6px; border-radius: 50%; background: #ff2a2a; box-shadow: 0 2px 16px 3px #ff2a2a; animation: flash-1 1s infinite alternate; flex-shrink: 0; }
.lights li::before { content: ""; position: absolute; top: -5px; left: 3px; width: 6px; height: 6px; background: #444; border-radius: 2px; }
.lights li:nth-child(4n+2) { background: #32e05a; box-shadow: 0 2px 16px 3px #32e05a; animation-name: flash-2; animation-duration: 1.3s; }
.lights li:nth-child(4n+3) { background: #2aa7ff; box-shadow: 0 2px 16px 3px #2aa7ff; animation-name: flash-3; animation-duration: .9s; }
.lights li:nth-child(4n+4) { background: var(--gold); box-shadow: 0 2px 16px 3px var(--gold); animation-name: flash-2; animation-duration: 1.6s; }
@keyframes flash-1 { 50% { background: #5a0000; box-shadow: none; } }
@keyframes flash-2 { 30% { background: #103d18; box-shadow: none; } }
@keyframes flash-3 { 70% { background: #0b2d48; box-shadow: none; } }

.marquee { display: block; margin-top: 8px; padding: 6px 0; background: var(--red); color: var(--gold); font: bold 20px/1.4 var(--comic); border: 3px outset #ff6b6b; text-shadow: 1px 1px 0 #000; }
.construction { margin: 14px 8px 0; padding: 6px; text-align: center; font: bold 18px/1.4 Impact, "Arial Black", sans-serif; letter-spacing: 2px; color: #000; background: repeating-linear-gradient(45deg, #ffd700 0 18px, #000 18px 36px); }
.construction > * , .construction { text-shadow: 0 0 3px #ffd700, 0 0 3px #ffd700, 0 0 3px #ffd700; }
.worker { display: inline-block; animation: bob .6s infinite alternate; }
@keyframes bob { to { transform: translateY(-4px) rotate(-8deg); } }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { visibility: hidden; } }

.header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 18px; background: linear-gradient(#fff, #e8ffe8); }
.identity { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.identity:hover { background: none; }
.monogram { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff7b7b, var(--red) 60%, #7a0000); color: var(--snow); font: bold 20px/1 var(--times); box-shadow: 0 0 0 3px var(--gold); }
.identity-name { font: bold 28px/1 var(--times); }
.rainbow { background: linear-gradient(90deg, #d40000, #ff8c00, #ffd700, #0a7a2a, #0055ff, #8a2be2, #d40000); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rainbow 3s linear infinite; }
@keyframes rainbow { to { background-position: 200% 0; } }
.tree-spin { display: inline-block; font-size: 26px; animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotateY(360deg); } }
nav { display: flex; flex-wrap: wrap; gap: 8px; }
nav a { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 4px 12px; font: bold 14px/1 var(--comic); color: #000; text-decoration: none; background: linear-gradient(#f3f3f3, #c8c8c8); border: 3px outset #e0e0e0; }
nav a:visited { color: #000; }
nav a:hover { background: var(--gold); color: var(--red); }
nav a:active { border-style: inset; }
.nav-contact { background: linear-gradient(#ff6b6b, var(--red)); color: #fff !important; border-color: #ff8a8a; }

.hero { text-align: center; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: center; }
.hero-copy { text-align: left; }
.hero h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.08; margin: 10px 0 14px; color: var(--green); text-shadow: 3px 3px 0 var(--gold), 5px 5px 0 #000; }
.hero h1 em { color: var(--red); }
.hero-intro { font-size: 19px; }
.hero-description { font-size: 15px; color: #333; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); margin-right: 6px; box-shadow: 0 0 6px var(--red); animation: blink 1s steps(1) infinite; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 16px; }
.button { display: inline-flex; align-items: center; gap: 14px; min-height: 46px; padding: 10px 18px; font: bold 16px/1 var(--comic); color: #fff; text-decoration: none; text-shadow: 1px 1px 0 #000; background: var(--red); border: 4px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--red) 0 8px, #fff 8px 16px) 6; box-shadow: 0 0 0 2px var(--gold); cursor: pointer; }
.button:visited { color: #fff; }
.button:hover { background: var(--green); color: #fff; }
.button:active { transform: translateY(2px); }
.text-link { font-weight: bold; }
.career-note { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 13px; }
.scale-panel { padding: 16px; text-align: center; color: var(--gold); background: radial-gradient(circle at 50% 20%, #12306b, #050d20); border: 5px ridge var(--gold); }
.panel-top { display: flex; justify-content: space-between; gap: 6px; font: bold 11px/1.4 var(--mono); color: #fff; }
.panel-top .blink { color: #ff5ed1; }
.scale-stat { font: bold 88px/1 var(--times); color: var(--gold); text-shadow: 0 0 12px #ffae00, 3px 3px 0 var(--red); margin-top: 8px; }
.scale-stat > span { color: #ff5ed1; font-size: 56px; vertical-align: 14px; }
.scale-panel > p { color: #fff; font-size: 16px; margin: 6px 0; }
.network { display: block; width: 100%; height: 100px; }
.bulb { animation: flash-1 1.2s infinite alternate; }
.bulb.b2 { animation-name: flash-2; animation-duration: .8s; }
.bulb.b3 { animation-name: flash-3; animation-duration: 1.5s; }
.panel-bottom { border-top: 2px dashed var(--gold); padding-top: 8px; font-size: 12px; color: #cfe8ff; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.facts > a { display: block; padding: 10px; text-decoration: none; color: var(--ink); background: #fff8d0; border: 3px dashed var(--green); }
.facts > a:nth-child(2) { background: #ffe0e0; border-color: var(--red); }
.facts > a:hover { background: var(--gold); }
.facts strong { display: block; font: bold 20px/1.2 var(--times); color: var(--red); }
.facts span { display: block; font-size: 12px; margin-top: 4px; }
.facts i { font-style: normal; }

hr.candy { height: 14px; margin: 0 8px; border: 0; border-radius: 7px; background: repeating-linear-gradient(-45deg, var(--red) 0 10px, #fff 10px 20px); box-shadow: 0 0 8px #fff8; }

.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 10px; flex-wrap: wrap; }
.section-heading > p { max-width: 320px; font-size: 14px; margin: 0; padding: 8px; background: #ffffcc; border: 2px solid #000; }
.project { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 22px; padding: 20px 0; border-top: 4px double var(--green); align-items: start; }
.project-index { grid-column: 1; font: bold 13px/1.5 var(--mono); color: var(--red); }
.project-copy { grid-column: 1; }
.project-copy > .eyebrow { display: inline-block; padding: 2px 8px; background: var(--green); color: #fff; border: 2px outset #3fbf65; }
.project-copy > .eyebrow::before { color: var(--gold); }
.project-copy p { font-size: 15px; }
.project-note { font-size: 13px; font-style: italic; margin-top: 12px; }
details { margin-top: 12px; border: 3px groove #c0c0c0; background: #f0fff0; }
summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; font-weight: bold; cursor: pointer; list-style: none; color: var(--green); }
summary::-webkit-details-marker { display: none; }
summary::before { content: "\1F381"; }
summary:hover { background: #ffff66; }
details[open] summary span { display: inline-block; transform: rotate(45deg); }
.detail-content { padding: 0 14px 10px; font-size: 14px; }
.detail-content ul { padding-left: 0; list-style: none; }
.detail-content li::before { content: "\1F384  "; }
.illustration { grid-column: 2; grid-row: 1 / 4; padding: 14px; background: #fff; border: 5px ridge var(--red); box-shadow: inset 0 0 0 3px var(--gold); }
.diagram-label { font: bold 12px/1.4 var(--mono); color: #fff; background: var(--red); padding: 3px 6px; text-align: center; }
.diagram-core { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 2px dotted var(--green); font: bold 18px/1.3 var(--times); }
.diagram-core > span { font-size: 30px; }
.diagram-rows { display: grid; gap: 6px; margin-top: 10px; }
.diagram-rows > span { font: 12px/1.5 var(--mono); color: var(--red); }
.diagram-rows b { margin-left: 8px; color: var(--ink); font: bold 14px/1.5 var(--comic); }
.diagram-caption { font-size: 12px; margin-top: 10px; font-style: italic; }
.deployment-diagram { background: #fffbe6; }
.time-comparison { display: flex; flex-direction: column; padding-top: 10px; line-height: 1.1; }
.time-comparison > span:first-child { font-size: 26px; text-decoration: line-through wavy var(--red); color: #777; }
.time-comparison > span:nth-child(2) { align-self: flex-end; margin: -20px 20px 0 0; font-size: 34px; color: var(--red); }
.time-comparison strong { font: italic bold 44px/1.2 var(--times); color: var(--green); text-shadow: 2px 2px 0 var(--gold); }
.pipeline { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 14px; font: bold 12px/1.5 var(--mono); }
.pipeline span { padding: 4px 6px; background: var(--green); color: #fff; border: 2px outset #3fbf65; }
.pipeline i { font-style: normal; color: var(--red); }
.deployment-diagram > p { font-size: 12px; margin: 12px 0 0; }

.principles { color: #fff; text-align: center; background: radial-gradient(circle at 50% 0%, #1a4a1a, #062b0e); }
.principles-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px 30px; align-items: center; text-align: left; }
.principles .eyebrow { grid-column: 1 / -1; color: var(--gold); text-align: center; }
.principles blockquote { margin: 0; font: bold 44px/1.1 var(--times); color: #fff; text-shadow: 3px 3px 0 var(--red); }
.principles em { color: var(--gold); }
.principles p:not(.eyebrow) { font-size: 15px; color: #e6ffe6; }

.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 26px; align-items: start; }
.about-intro { font-size: 17px; font-weight: bold; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tags span { padding: 4px 10px; font: bold 12px/1.5 var(--mono); color: #fff; background: var(--red); border: 2px dashed #fff; border-radius: 14px; box-shadow: 0 0 0 2px var(--red); }
.tags span:nth-child(2) { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.career { padding: 14px; background: #fffbe6; border: 4px double var(--green); }
.career h3 { margin: 0 0 8px; font-size: 22px; text-decoration: none; }
.career > div { display: grid; grid-template-columns: 100px 1fr; gap: 0 10px; padding: 10px 0; border-top: 2px dotted var(--red); }
.career span { grid-row: 1 / 3; font: bold 12px/1.6 var(--mono); color: var(--red); }
.career h4 { margin: 0; font-size: 17px; color: var(--green); }
.career p { grid-column: 2; margin: 2px 0 0; font-size: 13px; }
.career .education { padding-top: 10px; border-top: 2px dotted var(--red); font-size: 12px; line-height: 1.8; margin: 0; }

.contact { text-align: center; background: repeating-linear-gradient(90deg, #fff 0 40px, #fff4f4 40px 80px); }
.contact h2 { font-size: 42px; margin: 6px 0 12px; }
.contact-bottom { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.contact-bottom p { max-width: 460px; margin: 0; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; }

.extras { text-align: center; background: #000; color: #0f0; font-family: var(--mono); border-color: #808080; }
.counter-box { font-size: 14px; }
.counter { display: inline-block; margin: 6px 0 12px; padding: 4px 6px; font: bold 28px/1 var(--mono); letter-spacing: 6px; color: #ff3030; background: #111; border: 3px inset #666; text-shadow: 0 0 6px #ff0000; }
.guestbook { display: block; margin-bottom: 12px; font: bold 18px/1.4 var(--comic); color: var(--gold) !important; }
.guestbook:hover { background: none; color: #fff !important; }
.webring { padding: 8px; margin-bottom: 12px; font-size: 13px; color: #fff; border: 2px solid var(--gold); }
.webring a { color: #7fdbff !important; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.badges span { width: 132px; padding: 4px; font: 10px/1.3 Verdana, sans-serif; color: #fff; background: linear-gradient(#20407a, #0b1a3a); border: 2px outset #8fa8d8; }
.badges span:nth-child(2) { background: linear-gradient(#7a2020, #3a0b0b); border-color: #d88f8f; }
.badges span:nth-child(3) { background: linear-gradient(#207a3a, #0b3a17); border-color: #8fd8a3; }
.badges span:nth-child(4) { background: linear-gradient(#7a6a20, #3a320b); border-color: #d8c88f; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 18px; margin: 0 8px; padding: 10px 14px; font: bold 13px/1.5 var(--mono); color: #fff; background: var(--red); border: 3px outset #ff8a8a; }
footer > div { display: flex; flex-wrap: wrap; gap: 16px; }
footer a, footer a:visited { color: var(--gold); }
footer a:hover { color: var(--red); }

/* Fixed "now playing" widget for the background tune */
.midi { position: fixed; left: 12px; bottom: 12px; z-index: 45; display: flex; align-items: center; gap: 8px; padding: 6px 8px; font: bold 12px/1 var(--mono); color: #0f0; background: #000; border: 3px outset #c0c0c0; box-shadow: 4px 4px 0 #0008; }
.midi-note { font-size: 18px; color: var(--gold); }
.midi.is-playing .midi-note { animation: bob .4s infinite alternate; }
.midi button { min-height: 32px; padding: 4px 10px; font: bold 12px/1 var(--mono); color: #000; background: linear-gradient(#f3f3f3, #c8c8c8); border: 2px outset #e0e0e0; cursor: pointer; }
.midi button:active { border-style: inset; }
.midi button:hover { background: var(--gold); }

.skip { position: fixed; top: -100px; left: 20px; z-index: 60; padding: 10px; color: #fff; background: var(--green); }
.skip:focus { top: 8px; }

/* Snowfall and cursor trail, created by js/christmas.js */
.flake { position: fixed; top: -2em; z-index: 50; color: #fff; pointer-events: none; text-shadow: 0 0 4px #bfe3ff; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--drift, 0), 110vh) rotate(360deg); } }
.trail { position: fixed; z-index: 55; pointer-events: none; font-size: 16px; animation: trail-fade .8s ease-out forwards; }
@keyframes trail-fade { to { opacity: 0; transform: translateY(24px) scale(.4); } }

@media (max-width: 760px) {
  .bevel { margin: 22px 8px; padding: 14px; }
  .header { justify-content: center; }
  .identity-name { font-size: 24px; }
  .hero-layout, .project, .about, .principles-inner, .facts { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); overflow-wrap: anywhere; }
  .pipeline { flex-wrap: wrap; }
  .illustration { grid-column: 1; grid-row: auto; margin-top: 14px; }
  .scale-stat { font-size: 70px; }
  .principles blockquote { font-size: 36px; text-align: center; }
  .principles blockquote br { display: none; }
  .contact h2 br { display: none; }
  .marquee { font-size: 16px; }
  .construction { font-size: 14px; letter-spacing: 1px; }
}
@media (max-width: 440px) {
  .midi-file { display: none; }
  .lights li:nth-child(n+17) { display: none; }
  nav a { padding: 4px 8px; font-size: 13px; }
  h2 { font-size: 30px; }
  .career > div { grid-template-columns: 1fr; }
  .career span, .career p { grid-column: 1; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .flake, .trail { display: none; }
}
