/* ============================================================
   MINA'S HOMEPAGE ✦ GeoCities in Space edition
   best viewed at 800x600, netscape navigator 4.0 approved
   ============================================================ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --yellow: #ffff00;
  --purple: #c07fff;
  --pink: #ff69b4;
  --cyan: #00ffff;
  --lime: #39ff14;
  --gold: #ffd700;
  --panel: rgb(20, 0, 40);
  --title-a: #000080;
  --title-b: #1084d0;
  --face: #c0c0c0;
}

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  background: linear-gradient(180deg, #05020e 0%, #0b0426 45%, #1a0533 100%) fixed;
  color: #f2f0ff;
  font-family: 'Inconsolata', 'Courier New', monospace;
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: var(--pink);
  color: #000;
}

/* retro scrollbar (webkit) */
::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track { background: #0b0426; }
::-webkit-scrollbar-thumb {
  background: var(--face);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
}

a:focus-visible,
.btn95:focus-visible {
  outline: 2px dashed var(--yellow);
  outline-offset: 2px;
}

/* ---------------- starfield ---------------- */

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
}

/* ---------------- layout ---------------- */

.layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.sidebar {
  width: 232px;
  flex-shrink: 0;
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

/* ---------------- Win95 window chrome ---------------- */

.win {
  background: rgba(20, 0, 40, 0.92);
  border: 2px solid;
  border-color: #dfdfdf #404040 #404040 #dfdfdf;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6), 0 0 18px rgba(120, 60, 255, 0.25);
}

.win-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 3px 6px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: #fff;
}

h2.win-titlebar {
  font-family: 'VT323', monospace;
  font-size: 1.35rem;
  font-weight: normal;
  letter-spacing: 0.5px;
}

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

.win-btns button {
  font-family: 'VT323', monospace;
  font-size: 0.85rem;
  line-height: 1;
  width: 18px;
  height: 16px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--face);
  color: #000;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  cursor: pointer;
}

.win-btns button:hover {
  background: #d8d8d8;
}

.win-btns button:active {
  border-color: #404040 #fff #fff #404040;
}

.win-btns button:focus-visible {
  outline: 2px dashed var(--yellow);
  outline-offset: 1px;
}

.win-body {
  margin: 4px;
  padding: 1.1rem 1.3rem;
  border: 2px solid;
  border-color: #404040 #ffffff #ffffff #404040; /* inset */
  background: rgba(8, 0, 22, 0.55);
}

section.win {
  scroll-margin-top: 1.2rem;
}

/* mini windows for the sidebar rail */
.mini .win-body {
  margin: 3px;
  padding: 0.55rem 0.65rem;
}

.mini .win-titlebar h2,
.mini .win-titlebar span:first-child {
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  font-weight: normal;
}

/* minimized window: collapsed to just the titlebar */
.win.is-min .win-body,
.win.is-min .rail-body {
  display: none;
}

.win.is-min .win-titlebar {
  background: linear-gradient(90deg, #7a7a7a, #b0b0b0); /* win95 "inactive" gray */
}

.win.is-min [data-act="min"] {
  background: #d8d8d8;
  border-color: #404040 #fff #fff #404040; /* held down */
}

.rail-caption {
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  color: #9d8fc0;
  text-align: center;
  margin-top: 0.35rem;
}

/* ---------------- sidebar pieces ---------------- */

.side-name {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #fff;
  text-shadow: 2px 2px 0 var(--title-a), 4px 4px 0 rgba(255, 105, 180, 0.45);
  padding: 0.2rem 0.1rem 0.4rem;
}

.side-name .tld {
  display: block;
  color: var(--pink);
  font-size: 0.55em;
  text-shadow: none;
}

.side-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--yellow);
  text-decoration: none;
  padding: 0.28rem 0.35rem;
  font-size: 0.98rem;
}

.side-nav a:hover {
  color: var(--purple);
  text-decoration: underline;
  background: rgba(255, 255, 255, 0.06);
}

.side-nav a.active {
  color: var(--pink);
  background: rgba(255, 105, 180, 0.12);
}

.side-nav a.active::after {
  content: " ◄";
  font-size: 0.7rem;
}

.ico {
  width: 1.35em;
  text-align: center;
  flex-shrink: 0;
}

.now-list p {
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
  color: #d8d2ec;
}

.now-list .ico {
  font-size: 1.05em;
}

.badges {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.badge88 {
  width: 88px;
  height: 31px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.38rem;
  line-height: 1.5;
  border: 1px solid #fff;
  outline: 1px solid #000;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.7);
  text-decoration: none;
  image-rendering: pixelated;
}

.badge-viewed { background: #000; color: var(--lime); }
.badge-lean   { background: linear-gradient(180deg, #000080, #1084d0); color: var(--cyan); }
.badge-oeis   { background: #fff; color: #000; }
.badge-hott   { background: linear-gradient(135deg, #30105a, #701a56); color: var(--pink); }

/* ---------------- hero ---------------- */

.hero {
  text-align: center;
  padding: 1.2rem 0.5rem 0.4rem;
}

.welcome {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.72rem;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

.glitter {
  font-family: 'Press Start 2P', monospace;
  font-weight: normal;
  font-size: clamp(1.35rem, 4.5vw, 2.4rem);
  line-height: 1.55;
  background: linear-gradient(90deg, var(--pink), var(--gold), var(--cyan), #b13bff, var(--pink));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite;
  filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.8));
  margin: 0 auto 0.7rem;
  max-width: 100%;
}

.hero-pre {
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  letter-spacing: 2px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.tagline {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: #ffe9a8;
  letter-spacing: 0.5px;
  padding: 0.15rem 0;
}

.hero .btn95 {
  margin-top: 1rem;
}

.spin {
  display: inline-block;
  animation: spin 3s linear infinite;
}

/* ---------------- buttons ---------------- */

.btn95 {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.66rem;
  line-height: 1;
  padding: 0.85rem 1.05rem;
  background: var(--face);
  color: #000;
  text-decoration: none;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 1px 1px 0 #000;
  cursor: pointer;
}

.btn95:hover {
  background: #d8d8d8;
  color: #000080;
}

.btn95:active {
  border-color: #404040 #ffffff #ffffff #404040;
  transform: translate(1px, 1px);
  box-shadow: none;
}

/* emoji glyphs fall back to the system emoji font at pixel-font sizes;
   bump them up so icons read as big as the label */
.btn95 .emo {
  font-family: 'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

/* ---------------- misc typography ---------------- */

p + p {
  margin-top: 0.8rem;
}

a {
  color: var(--yellow);
  text-decoration: none;
}

a:hover {
  color: var(--purple);
  text-decoration: underline;
}

.comic {
  font-family: 'Comic Sans MS', 'Comic Neue', cursive;
}

.mono,
code {
  font-family: 'Inconsolata', monospace;
  font-size: 0.85rem;
  background: #17032e;
  border: 1px solid #3a2560;
  padding: 0.08em 0.35em;
  color: #d9ccff;
}

.mono a,
a.mono {
  color: var(--yellow);
}

.info-label {
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #9d8fc0;
}

/* rainbow divider */
.rainbow-bar {
  height: 10px;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  background: repeating-linear-gradient(
    90deg,
    #ff004c 0 24px,
    #ff9500 24px 48px,
    #ffee00 48px 72px,
    #00d26a 72px 96px,
    #00c3ff 96px 120px,
    #b13bff 120px 144px,
    #ff004c 144px 168px
  );
}

/* ---------------- about facts ---------------- */

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem 1.4rem;
  margin-top: 1.1rem;
}

.fact-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  border-left: 3px double var(--purple);
  padding-left: 0.6rem;
}

.fact-icon {
  font-size: 1.25rem;
  line-height: 1.3;
}

/* ---------------- entries (research / projects) ---------------- */

.entry {
  padding: 0.9rem 0;
}

.entry + .entry {
  border-top: 1px dashed rgba(192, 127, 255, 0.35);
}

.entry-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem 1rem;
  margin-bottom: 0.2rem;
}

.entry-title {
  font-weight: 700;
  font-size: 1.12rem;
  color: #fff;
}

a.entry-title {
  color: var(--yellow);
}

a.entry-title:hover {
  color: var(--purple);
}

.entry-date {
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  color: var(--gold);
  white-space: nowrap;
}

.entry-venue {
  font-style: italic;
  color: #b3a6d6;
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.entry-tech {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.8rem;
}

.entry p {
  font-size: 0.97rem;
}

.entry-bullets {
  list-style: none;
  margin: 0.55rem 0 0 0.2rem;
}

.entry-bullets li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.entry-bullets li::before {
  content: "★";
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* status tags */
.status {
  font-size: 0.82rem;
  white-space: nowrap;
}

.status.ok   { color: var(--lime); }
.status.info { color: var(--cyan); }
.status.hot  { color: var(--pink); }

.construction {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.82rem;
  color: var(--gold);
  background: #140a02;
  padding: 0.12rem 0.55rem;
  border: 3px solid transparent;
  border-image: repeating-linear-gradient(45deg, #ffd800 0 8px, #141414 8px 16px) 3;
  white-space: nowrap;
}

/* ---------------- talks ---------------- */

.talk-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 1rem;
}

.talk {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.talk-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.05rem;
  color: var(--gold);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.8);
  min-width: 2.6rem;
  padding-top: 0.2rem;
}

.talk-title {
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.15rem;
}

.talk-tag {
  font-size: 0.8rem;
  color: var(--cyan);
}

.talk-desc {
  font-size: 0.93rem;
  color: #d8d2ec;
}

/* ---------------- skills ---------------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.skill-pane {
  border: 2px solid;
  border-color: #404040 #ffffff #ffffff #404040; /* inset */
  background: rgba(0, 0, 0, 0.35);
  padding: 0.8rem 1rem;
}

.skill-pane h3 {
  font-family: 'VT323', monospace;
  font-weight: normal;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
  border-left: 4px solid var(--pink);
}

.skill-pane:nth-child(2) h3 { border-left-color: var(--cyan); }
.skill-pane:nth-child(3) h3 { border-left-color: var(--gold); }

.skill-pane ul {
  list-style: none;
}

.skill-pane li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
}

.skill-pane li::before {
  content: "»";
  position: absolute;
  left: 0;
  color: var(--purple);
}

/* ---------------- guestbook / footer ---------------- */

.gb-note {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #b3a6d6;
}

footer {
  text-align: center;
  padding: 0.6rem 0.5rem 1.6rem;
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  color: #9d8fc0;
}

footer .foot-sub {
  font-size: 1rem;
  color: #6f61a0;
}

/* ---------------- sparkles & keyframes ---------------- */

.sparkle {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  font-size: 0.95rem;
  animation: sparkle-fade 0.9s ease-out forwards;
}

@keyframes sparkle-fade {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  to   { opacity: 0; transform: translate(-50%, -160%) scale(0.3) rotate(90deg); }
}

@keyframes blink {
  to { visibility: hidden; }
}

.blink {
  animation: blink 1s steps(2, start) infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  to { background-position: 300% 0; }
}

/* ---------------- "cannot close" dialog ---------------- */

.dlg-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 0, 10, 0.55);
}

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

.dlg95 {
  width: min(420px, 92vw);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.7), 0 0 30px rgba(120, 60, 255, 0.45);
}

.dlg-row {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.dlg-ico {
  font-size: 1.9rem;
  line-height: 1;
  flex-shrink: 0;
}

.dlg-ok {
  margin-top: 0.9rem;
  min-width: 5.5rem;
  text-align: center;
}

/* window refuses to die */
@keyframes win-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.win.shake {
  animation: win-shake 0.4s ease-in-out;
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blink, .spin, .glitter, .sparkle { animation: none; }
  .win.shake { animation: none; }
  .glitter { color: var(--pink); -webkit-text-fill-color: var(--pink); }
}

/* ---------------- responsive ---------------- */

@media (max-width: 860px) {
  .layout {
    flex-direction: column;
    padding: 1rem;
  }

  .sidebar {
    position: static;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }

  .sidebar > * {
    flex: 1 1 200px;
  }

  .side-name {
    flex: 1 1 100%;
    text-align: center;
    font-size: 1.05rem;
  }

  .side-name .tld {
    display: inline;
  }

  .main-col {
    width: 100%;
  }

  .talk {
    flex-direction: column;
    gap: 0.2rem;
  }
}

@media (max-width: 480px) {
  .win-body {
    padding: 0.85rem 0.9rem;
  }

  .fact-grid {
    grid-template-columns: 1fr;
  }
}
