/* spantag.dev — SPANTAG/98: dark desktop OS theme
   Sharp corners, Win98 bevels + navy titlebars, neon green accents, scanlines.
   Palette: bg #0B1120 / windows #141D31 / borders #2A3650 / text #F8FAFC
   Accent: #22C55E · Titlebar: #000082→#1084D0 · Syntax: tag #E06C75, attr #D19A66, string #98C379 */

:root {
  --bg: #0B1120;
  --bg-raised: #111A2E;
  --panel: #141D31;
  --border: #2A3650;
  --text: #F8FAFC;
  --text-muted: #A5B0C4;
  --accent: #22C55E;
  --accent-strong: #4ADE80;
  --syn-tag: #E06C75;
  --syn-attr: #D19A66;
  --syn-string: #98C379;
  --syn-punct: #64748B;
  --title-grad: linear-gradient(90deg, #000082, #1084D0);
  --bevel-out: inset 1px 1px 0 rgba(255, 255, 255, 0.22), inset -1px -1px 0 rgba(0, 0, 0, 0.7), inset 2px 2px 0 rgba(255, 255, 255, 0.08), inset -2px -2px 0 rgba(0, 0, 0, 0.4);
  --bevel-in: inset 1px 1px 0 rgba(0, 0, 0, 0.7), inset -1px -1px 0 rgba(255, 255, 255, 0.18), inset 2px 2px 0 rgba(0, 0, 0, 0.4);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --lcd: "DSEG7 Classic", "JetBrains Mono", monospace;
  --dos: "VT323", "JetBrains Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; border-radius: 0 !important; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15.5px;
  line-height: 1.7;
  padding-bottom: 72px;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(34, 197, 94, 0.09), transparent),
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
}

/* CRT scanlines over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 3px);
}

::selection { background: #000082; color: #fff; }

/* ---------- syntax colors ---------- */
.tag-punct { color: var(--syn-punct); }
.tag-name { color: var(--syn-tag); }
.attr-name { color: var(--syn-attr); }
.attr-value { color: var(--syn-string); }

/* ---------- top menu bar ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 46px;
  padding: 0 18px;
  background: rgba(13, 21, 38, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -2px 0 rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.nav-links { display: flex; align-items: center; gap: 2px; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  transition: none;
}

.nav-links a:hover { color: #fff; background: #000082; }

.nav-links .nav-cta {
  color: #052E16;
  background: var(--accent);
  font-weight: 700;
  box-shadow: var(--bevel-out);
  margin-left: 8px;
}
.nav-links .nav-cta:hover { color: #052E16; background: var(--accent-strong); }
.nav-links .nav-cta:active { box-shadow: var(--bevel-in); transform: translate(1px, 1px); }

/* ---------- hero ---------- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 150px 24px 90px;
}

.hero-kicker {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.2vw, 3rem);
  line-height: 1.25;
  margin-bottom: 28px;
}

.code-line { display: block; }

.hero-name {
  color: var(--text);
  padding-left: clamp(1.2rem, 3vw, 2.4rem);
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.15;
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 6px;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-sub {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 36px;
}

.hero-sub strong { color: var(--text); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-stats strong { color: var(--accent); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: var(--bevel-out);
  transition: background-color 0.15s;
}

.btn:active { box-shadow: var(--bevel-in); transform: translate(1px, 1px); }

.btn-primary { background: var(--accent); color: #052E16; }
.btn-primary:hover { background: var(--accent-strong); }

.btn-ghost { color: var(--text); background: #202B44; }
.btn-ghost:hover { background: #283451; }

.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ---------- sections ---------- */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 70px 24px;
}

.section-title {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  margin-bottom: 14px;
  display: inline-block;
  min-height: 1.3em;
}

/* the <span> hover gimmick */
.tagged { position: relative; }
.tagged::before, .tagged::after {
  font-family: var(--mono);
  font-size: 0.6em;
  font-weight: 500;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.25s;
  position: relative;
  top: -0.35em;
}
.tagged::before { content: "<span>"; margin-right: 0.5em; }
.tagged::after { content: "</span>"; margin-left: 0.5em; }
.tagged:hover::before, .tagged:hover::after { opacity: 1; }

.section-lead {
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 44px;
  font-size: 0.95rem;
}

/* ---------- scroll typing ---------- */
.type-caret {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 0.7s steps(1) infinite;
}

/* ---------- windows ---------- */
.win {
  background: var(--panel);
  border: 1px solid #0A0F1C;
  box-shadow: var(--bevel-out);
  transition: box-shadow 0.2s;
}

.win:hover {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45), 0 0 22px rgba(34, 197, 94, 0.12), var(--bevel-out);
}

.js .win-anim { animation: winopen 0.18s steps(4, end) both; }

@keyframes winopen {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.win-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 5px 0 10px;
  background: var(--title-grad);
  user-select: none;
}

.win-title {
  color: #fff;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win-btns { display: inline-flex; gap: 3px; margin-left: auto; flex-shrink: 0; }

.win-btn {
  /* relative + z-index so a dodging × stays above the window body it slides over */
  position: relative;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 18px;
  background: #C7CFDD;
  color: #10192E;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border: none;
  box-shadow: var(--bevel-out);
  user-select: none;
}

button.win-btn { cursor: pointer; }
button.win-btn:hover { background: #DDE4EF; }
button.win-close:hover, button.dlg-close-btn:hover { background: #E05656; color: #fff; }
button.win-btn:active { box-shadow: var(--bevel-in); }

.win-body { position: relative; }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.work-grid { grid-template-columns: repeat(2, 1fr); }
.services-grid { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel);
  box-shadow: var(--bevel-out);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45), 0 0 18px rgba(34, 197, 94, 0.1), var(--bevel-out); }

.card h3 { font-size: 1.12rem; font-weight: 600; }

.card p { color: var(--text-muted); font-size: 0.88rem; flex-grow: 1; }

/* ---------- terminal windows (proof section) ---------- */
.term-card {
  background: #0D1526;
  border: 1px solid #0A0F1C;
  box-shadow: var(--bevel-out);
  overflow: hidden;
  font-family: var(--mono);
  transition: box-shadow 0.2s;
}

.term-card:hover { box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45), 0 0 22px rgba(34, 197, 94, 0.12), var(--bevel-out); }

.js .term-card.win-anim { animation: winopen 0.18s steps(4, end) both; }

.term-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  padding: 0 5px 0 10px;
  background: var(--title-grad);
  user-select: none;
}

.term-file {
  order: 1;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.term-status {
  order: 2;
  margin-left: auto;
  color: #7CF2A4;
  font-size: 0.7rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.term-bar .win-btns { order: 3; margin-left: 0; }

.term-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.82rem;
  line-height: 1.6;
}

.term-cmd { color: var(--text); word-break: break-word; min-height: 1.6em; }
.term-prompt { color: var(--accent); font-weight: 700; margin-right: 2px; }
.term-out { color: var(--syn-string); word-break: break-word; }
.term-desc { color: #96A2B8; }
.term-meta { color: var(--syn-punct); font-size: 0.75rem; margin-top: 4px; }

.term-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.term-link:hover { color: var(--accent-strong); text-decoration: underline; }

/* staged reveal after the command types out */
.js .term-out, .js .term-desc, .js .term-meta { opacity: 0; }
.js .term-card.revealed .term-out { opacity: 1; transition: opacity 0.15s steps(3) 0.05s; }
.js .term-card.revealed .term-desc { opacity: 1; transition: opacity 0.15s steps(3) 0.2s; }
.js .term-card.revealed .term-meta { opacity: 1; transition: opacity 0.15s steps(3) 0.35s; }

/* ---------- services ---------- */
.service-card h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--mono);
  font-size: 1.05rem;
}

.service-num { color: var(--syn-punct); font-size: 0.85rem; font-weight: 500; }
.service-num::before { content: "["; }
.service-num::after { content: "]"; }

.service-outcome {
  font-family: var(--mono);
  color: var(--accent) !important;
  font-size: 0.9rem !important;
  flex-grow: 0 !important;
}

/* ---------- process ---------- */
.process-win { max-width: 780px; }

.process-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: flex-start;
}

.process-list {
  list-style: none;
  display: grid;
  gap: 22px;
}

.process-list li { display: flex; gap: 16px; align-items: flex-start; }

.proc-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-strong);
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  background: #050D07;
  box-shadow: var(--bevel-in);
  padding: 6px 10px;
  flex-shrink: 0;
}

.process-list h3 { font-family: var(--mono); font-size: 1rem; margin-bottom: 4px; }

.process-list p { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- about ---------- */
.about-win { max-width: 720px; }

.about-body { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.about-body p { color: var(--text-muted); font-size: 0.93rem; }
.about-body strong { color: var(--text); }

/* ---------- contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.contact-form {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-field label {
  display: block;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.form-field input, .form-field textarea {
  width: 100%;
  background: #0B1120;
  border: none;
  box-shadow: var(--bevel-in);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 12px 14px;
}

.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.form-field textarea { resize: vertical; }
.form-field ::placeholder { color: #64748B; }

.hidden-field { position: absolute; left: -9999px; }

.contact-side {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-side-title { font-family: var(--mono); color: var(--accent); font-size: 0.9rem; }

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
}
.contact-link:hover { color: var(--accent); }
.contact-link svg { color: var(--syn-punct); flex-shrink: 0; }
.contact-link:hover svg { color: var(--accent); }

.contact-side-note { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- footer ---------- */
.footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  text-align: center;
}

.footer-close { font-family: var(--mono); font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }

.footer-note { color: var(--syn-punct); font-size: 0.9rem; }

/* ---------- taskbar ---------- */
.taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 8px;
  background: #10192E;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.09), inset 0 3px 0 rgba(0, 0, 0, 0.3);
}

.task-start {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 14px;
  background: var(--accent);
  color: #052E16;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: var(--bevel-out);
}

.task-start:hover { background: var(--accent-strong); }
.task-start:active, .task-start[aria-expanded="true"] { box-shadow: var(--bevel-in); }

.start-glyph { font-size: 1rem; line-height: 1; }

.task-items { display: flex; gap: 5px; overflow: hidden; }

.task-item {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  background: #1A2438;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.78rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--bevel-out);
}

.task-item:hover { color: var(--text); background: #202B44; }

.task-item.active {
  color: var(--accent);
  background: #0D1526;
  box-shadow: var(--bevel-in);
  font-weight: 700;
}

.task-progress {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 32px;
  margin-left: auto;
  padding: 0 8px;
  background: #0B1120;
  box-shadow: var(--bevel-in);
}

.task-progress i {
  width: 7px;
  height: 16px;
  background: #1E293B;
}

.task-progress i.on { background: var(--accent); }

.task-clock {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  background: #0B1120;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  box-shadow: var(--bevel-in);
}

/* ---------- start menu ---------- */
.start-menu {
  position: fixed;
  bottom: 52px;
  left: 8px;
  z-index: 70;
  display: flex;
  width: 280px;
  background: var(--panel);
  box-shadow: var(--bevel-out), 0 8px 30px rgba(0, 0, 0, 0.6);
}

.start-menu[hidden] { display: none; }

.start-side {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 34px;
  padding: 12px 0;
  background: var(--title-grad);
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  user-select: none;
}

.start-side span { color: #7CF2A4; }

.start-list { list-style: none; flex: 1; padding: 6px 0; }

.start-list a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.88rem;
  text-decoration: none;
}

.start-list a:hover { background: #000082; color: #fff; }

.start-sep { height: 1px; margin: 6px 10px; background: var(--border); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08); }

.start-shutdown { color: var(--syn-tag) !important; }
.start-list a.start-shutdown:hover { background: #4A0E0E; color: #fff !important; }

/* ---------- error dialog ---------- */
.dlg-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 18, 0.6);
  padding: 20px;
}

.dlg-backdrop[hidden] { display: none; }

.dlg {
  width: min(430px, 94vw);
  background: var(--panel);
  box-shadow: var(--bevel-out), 0 16px 50px rgba(0, 0, 0, 0.7);
}

.dlg-body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 20px 6px;
}

.dlg-icon { flex-shrink: 0; }

.dlg-body p { font-family: var(--mono); font-size: 0.9rem; color: var(--text); line-height: 1.7; }

.dlg-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 20px 20px;
}

.dlg-ok {
  min-width: 92px;
  padding: 8px 18px;
  background: #C7CFDD;
  color: #10192E;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: var(--bevel-out);
}

.dlg-ok:hover { background: #DDE4EF; }
.dlg-ok:active { box-shadow: var(--bevel-in); transform: translate(1px, 1px); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .work-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .task-items { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 64px; }
  .nav { padding: 0 12px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .hero { padding: 120px 20px 60px; }
  .section { padding: 50px 20px; }
  .work-grid, .services-grid, .form-row { grid-template-columns: 1fr; }
  .tagged::before, .tagged::after { display: none; }
  .task-progress { display: none; }
  .taskbar { height: 42px; }
}

/* ---------- LCD displays ---------- */
.lcd {
  font-family: var(--lcd);
  font-weight: 700;
  color: var(--accent-strong);
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.task-clock.lcd { font-size: 0.9rem; color: var(--accent-strong); text-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }

/* ---------- minimized windows (the _ button works) ---------- */
.minimized > *:not(.win-titlebar):not(.term-bar) { display: none !important; }
.minimized { align-self: start; height: auto; }

/* ---------- boot screen ---------- */
.boot {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #000;
  cursor: wait;
  transition: opacity 0.25s;
}

.boot.boot-out { opacity: 0; }

.boot pre {
  font-family: var(--dos);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  line-height: 1.5;
  color: var(--accent-strong);
  padding: 46px clamp(20px, 6vw, 70px);
  white-space: pre-wrap;
}

/* ---------- BSOD ---------- */
.bsod {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: #0000AA;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.bsod[hidden] { display: none; }

.bsod-inner {
  max-width: 640px;
  padding: 24px;
  font-family: var(--dos);
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  line-height: 1.5;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 22px;
  white-space: pre-line;
  text-align: left;
}

.bsod-title {
  display: inline-block;
  background: #AAAAAA;
  color: #0000AA;
  padding: 1px 12px;
  font-weight: 700;
}

.bsod-cursor { animation: blink 0.8s steps(1) infinite; }

/* ---------- clippy (span.clp assistant) ---------- */
.clippy {
  position: fixed;
  right: 18px;
  bottom: 64px;
  z-index: 65;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.clippy[hidden] { display: none; }

.js .clippy:not([hidden]) { animation: winopen 0.2s steps(3, end) both; }

.clippy-bubble {
  position: relative;
  width: 250px;
  background: #FFFFE1;
  color: #10192E;
  border: 1px solid #000;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.55;
}

.clippy-bubble p strong { font-weight: 700; }

.clippy-sub { margin-top: 6px; color: #3B4763; }

.clippy-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 16px;
  background: #C7CFDD;
  border: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: #10192E;
  cursor: pointer;
  box-shadow: var(--bevel-out);
}

.clippy-x:active { box-shadow: var(--bevel-in); }

.clippy-actions { display: flex; gap: 8px; margin-top: 12px; }

.clippy-btn {
  flex: 1;
  text-align: center;
  padding: 6px 10px;
  background: #C7CFDD;
  color: #10192E;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--bevel-out);
}

.clippy-btn:hover { background: #DDE4EF; }
.clippy-btn:active { box-shadow: var(--bevel-in); transform: translate(1px, 1px); }

.clippy-svg { margin-right: 12px; filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.35)); }

@media (max-width: 640px) {
  .clippy { right: 10px; bottom: 54px; }
  .clippy-bubble { width: 220px; }
}

/* ---------- nav logo hover: the tag opens ---------- */
.logo-full { display: none; }
.logo-me { color: var(--accent); font-weight: 700; }
.nav-logo:hover .logo-full, .nav-logo:focus-visible .logo-full { display: inline; }
.nav-logo:hover .logo-self, .nav-logo:focus-visible .logo-self { display: none; }

/* ---------- start button flag waves on hover ---------- */
.winflag { display: inline-block; vertical-align: -2px; }
.wf { transform-origin: 2px 11px; }
.task-start:hover .wf { animation: flagwave 0.7s ease-in-out infinite; }
@keyframes flagwave {
  0%, 100% { transform: skewY(0deg); }
  50% { transform: skewY(-5deg); }
}

/* ---------- bliss desktop (about section) ---------- */
.about-desktop {
  position: relative;
  padding: 90px 0;
  overflow: hidden;
}

.bliss { position: absolute; inset: 0; z-index: 0; }

.bliss-svg { width: 100%; height: 100%; display: block; }

.about-inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.about-desktop .section-title { color: #fff; text-shadow: 1px 2px 0 rgba(8, 20, 60, 0.55); }

.about-desktop .about-win { box-shadow: var(--bevel-out), 0 16px 44px rgba(5, 15, 40, 0.5); background: var(--panel); }

.bliss-clouds { animation: clouddrift 80s linear infinite alternate; }

@keyframes clouddrift {
  from { transform: translateX(-30px); }
  to { transform: translateX(55px); }
}

.bliss-flagcloth {
  transform-origin: 1px 2px;
  animation: flagwave 3.2s ease-in-out infinite;
}

/* ---------- desktop icons (wide screens) ---------- */
.desk-icons {
  position: fixed;
  left: 26px;
  top: 200px;
  z-index: 5;
  display: none;
  flex-direction: column;
  gap: 30px;
}

@media (min-width: 1280px) { .desk-icons { display: flex; } }

.desk-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 88px;
  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.2s;
}

.desk-icon:hover { opacity: 1; }

.desk-icon span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text);
  padding: 1px 5px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
}

.desk-icon:hover span { background: #000082; color: #fff; text-shadow: none; }

/* ---------- photo window ---------- */
.photo-win {
  width: 300px;
  margin: 0 0 44px;
}

@media (min-width: 1100px) {
  .hero { position: relative; padding-bottom: 130px; }
  .hero-sub, .hero-stats { max-width: calc(100% - 380px); }
  .photo-win {
    position: absolute;
    right: 24px;
    top: 300px;
    margin: 0;
  }
}

.photo-body img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.06);
}

.photo-caption {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  padding: 8px 12px;
  background: #0D1526;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---------- orbital backdrop (canvas engine — see sky.js) ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- satellites (no-JS fallback only) ---------- */
.sats {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.sat { position: absolute; left: 0; opacity: 0.42; }

.sat1 { top: 15%; animation: satfly-lr 95s linear infinite; animation-delay: -28s; }
.sat2 { top: 48%; opacity: 0.33; animation: satfly-rl 135s linear infinite; animation-delay: -60s; }
.sat3 { top: 76%; opacity: 0.26; animation: satfly-lr 175s linear infinite; animation-delay: -120s; }

@keyframes satfly-lr {
  from { transform: translate(-150px, 28px) rotate(-6deg); }
  to { transform: translate(106vw, -46px) rotate(5deg); }
}

@keyframes satfly-rl {
  from { transform: translate(106vw, -24px) rotate(4deg); }
  to { transform: translate(-150px, 38px) rotate(-6deg); }
}

.sat-light { animation: blink 1.6s steps(1) infinite; }

/* ---------- selection marquee ---------- */
.marquee {
  position: fixed;
  z-index: 40;
  border: 1px dashed var(--accent);
  background: rgba(34, 197, 94, 0.08);
  pointer-events: none;
}

/* ---------- mouse trail ---------- */
.trail {
  position: fixed;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--accent);
  opacity: 0.5;
  pointer-events: none;
  z-index: 90;
  animation: trailfade 0.4s steps(4) forwards;
}

@keyframes trailfade {
  to { opacity: 0; transform: translate(4px, 8px) scale(0.3); }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .term-out, .js .term-desc, .js .term-meta { opacity: 1; }
  .sats { display: none; }
}
