/* HaeImAlan — blueprint-grid × 90s profile page. No framework, no blur, no build step. */

:root {
  --bg: #0b1a2e;
  --panel: #0d1f38;
  --panel-title: #1e3a8a;
  --border: #3b82f6;
  --border-dim: #1e3a5f;
  --text: #cbd5e1;
  --text-dim: #7d93b3;
  --heading: #f8fafc;
  --accent: #60a5fa;
  --accent-bright: #93c5fd;
  --good: #22c55e;
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, #17335c 0px, #17335c 3px, transparent 3px, transparent 24px),
    repeating-linear-gradient(90deg, #17335c 0px, #17335c 3px, transparent 3px, transparent 24px);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-bright);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

/* Marquee ticker */
.marquee {
  background: #000;
  border-bottom: 2px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
  padding: 4px 0;
}

.marquee-track {
  display: inline-flex;
  animation: marquee 22s linear infinite;
}

.marquee-track span {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  color: var(--good);
  letter-spacing: 0.5px;
  padding-right: 0;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Top nav */
.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 16px;
}

.topnav .brand {
  font-weight: bold;
  font-family: 'Courier New', Courier, monospace;
  color: var(--heading);
  text-decoration: none;
  margin-right: auto;
  font-size: 16px;
}

.topnav a:not(.brand) {
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topnav a:not(.brand):hover {
  text-decoration: underline;
}

main,
footer.panel {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

.panel {
  background: var(--panel);
  border: 2px solid var(--border);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  margin-bottom: 20px;
}

.panel-title {
  margin: 0;
  background: var(--panel-title);
  color: var(--heading);
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
}

.panel-body {
  padding: 18px 16px;
}

/* Masthead */
.masthead-inner {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 16px;
}

.avatar-frame {
  position: relative;
  flex-shrink: 0;
}

.avatar-frame img {
  display: block;
  border: 3px solid var(--border);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.online-dot {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  background: var(--good);
  border: 2px solid #000;
  animation: blink 1.6s step-start infinite;
}

.online-dot-inline {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--good);
  animation: blink 1.6s step-start infinite;
}

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

.online-label {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  color: var(--good);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px;
}

.masthead-text h1 {
  margin: 0 0 10px;
  font-size: 32px;
  color: var(--heading);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
}

.tagline {
  margin: 0 0 16px;
  max-width: 46ch;
}

.tagline a {
  text-decoration: underline dotted;
  font-family: 'Courier New', Courier, monospace;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  color: var(--heading);
  background: var(--border-dim);
  border: 2px outset var(--border);
  cursor: pointer;
}

.btn:hover {
  background: #2d5a8e;
}

.btn:active {
  border-style: inset;
}

.btn-primary {
  background: #1d4ed8;
  border-color: #60a5fa;
}

.btn-primary:hover {
  background: #2563eb;
}

/* Stat bar */
.statbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.stat {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 12px 16px;
  border-right: 2px solid var(--border);
  font-family: 'Courier New', Courier, monospace;
}

.stat:last-child {
  border-right: none;
}

.stat-label {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 14px;
  font-weight: bold;
  color: var(--accent);
}

.stat-good {
  color: var(--good);
}

/* About list */
.about-list {
  margin: 0;
  display: grid;
  gap: 16px;
}

.about-item {
  border-left: 3px solid var(--border);
  padding-left: 14px;
}

.about-item dt {
  font-weight: bold;
  color: var(--heading);
  margin-bottom: 4px;
}

.about-item dd {
  margin: 0;
  color: var(--text);
}

/* Link badges */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.link-badge {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 2px solid var(--border-dim);
  text-decoration: none;
  color: var(--text);
  background: rgba(96, 165, 250, 0.04);
}

.link-badge:hover {
  border-color: var(--border);
  background: rgba(96, 165, 250, 0.1);
}

.link-badge svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

.link-badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-badge-text strong {
  color: var(--heading);
  font-size: 14px;
}

.link-badge-text em {
  font-style: normal;
  font-size: 12px;
  color: var(--text-dim);
}

.guestbook-gag {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'Courier New', Courier, monospace;
}

/* Footer */
footer.panel {
  background: none;
  border: none;
  box-shadow: none;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  padding-top: 12px;
}

footer.panel p {
  margin: 4px 0;
}

footer.panel a {
  color: var(--text-dim);
  text-decoration: underline;
}

footer.panel a:hover {
  color: var(--accent);
}

footer.panel .credit {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .masthead-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .tagline {
    max-width: none;
  }

  .cta-row {
    justify-content: center;
  }

  .statbar {
    flex-direction: column;
  }

  .stat {
    border-right: none;
    border-bottom: 2px solid var(--border);
  }

  .stat:last-child {
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .online-dot,
  .online-dot-inline {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
