:root {
  --dusty-taupe: #A17865;
  --espresso: #402220;
  --pitch-black: #110B09;
  --rosy-taupe: #C7937D;
  --dusty-taupe-2: #908171;
  --khaki-beige: #B8A692;
  --clay-soil: #7D5345;
  --cream: #F5ECE0;
  --cream-deep: #E8D6BF;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background-color:#F5ECE0;
  font-family: monospace;
  color: var(--espresso);
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><text x="0" y="26" font-size="26">%E2%9C%82%EF%B8%8F</text></svg>') 4 24, auto;
  overflow-x: hidden;
}

.star-trail {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  font-size: 18px;
  color: var(--rosy-taupe);
  text-shadow: 0 0 4px var(--rosy-taupe), 0 0 8px var(--dusty-taupe);
  animation: star-fade 0.8s ease-out forwards;
}
@keyframes star-fade {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(90deg) translateY(-20px); }
}

.page {
  max-width: 900px;
  margin: 20px auto;
  background: var(--rosy-taupe);
  border: 6px double var(--clay-soil);
  box-shadow: 0 4px 25px rgba(125,83,69,0.3), 0 0 40px rgba(184,166,146,0.2) inset;
}

marquee.topbar {
  background: linear-gradient(90deg, var(--clay-soil), var(--dusty-taupe), var(--rosy-taupe), var(--khaki-beige), var(--dusty-taupe-2), var(--clay-soil));
  color: var(--cream);
  font-weight: bold;
  padding: 4px 0;
  text-shadow: 1px 1px 2px rgba(17,11,9,0.4);
  font-size: 14px;
}

.header {
  text-align: center;
  padding: 10px;
  background: linear-gradient(180deg, var(--cream-deep), var(--khaki-beige));
  background-image:url(./images/cover.jpg);
  position:relative;
  height: 340px;
  background-size: cover;
  background-position: center center;
  overflow:hidden;
}
.header h1 {
  font-size: 28px;
  margin: 5px 0;
  background: linear-gradient(180deg, var(--clay-soil), var(--espresso), var(--dusty-taupe));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
  letter-spacing: 2px;
  position:absolute;
  bottom:-40px;
  left:10px;
  right:auto;
}
.header .tagline {
  color: var(--clay-soil);
  font-size: 14px;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
  position:absolute;
  bottom:16px;
  left:10px;
  right:auto;
}
.header .logo {
  width:280px;
  position:absolute;
  top:20px;
  right:10px;
}

@media (max-width: 420px) {
    .header {
      height: 230px;
    }
    .header .logo {
        width:130px;
    }
} 

.status-bar {
  text-align:center;
  background: var(--espresso);
  color: var(--khaki-beige);
  font-family: monospace;
  padding:6px;
  border-top:2px dashed var(--clay-soil);
  border-bottom:2px dashed var(--clay-soil);
  font-size:13px;
}

.body-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  padding: 12px;
}

.sidebar {
  background: var(--cream-deep);
  border: 3px solid var(--dusty-taupe);
  padding: 10px;
  font-size: 12px;
}

.profile-pic {
  width: 100%;
  aspect-ratio: 1;
  border: 4px solid var(--khaki-beige);
  overflow: hidden;
  filter: contrast(1.05) saturate(1.05);
  transform: rotate(-3deg);
  margin-bottom: 10px;
}
.profile-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.glitter-divider {
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--dusty-taupe), var(--rosy-taupe), var(--clay-soil), var(--dusty-taupe) 8px);
  margin: 8px 0;
  box-shadow: 0 0 6px rgba(125,83,69,0.4);
}

.stat-table td { padding: 2px 4px; font-size: 12px; }
.stat-table td:first-child { color: var(--clay-soil); font-weight: bold; }

.music-widget {
  background: var(--espresso);
  border: 2px solid var(--khaki-beige);
  color: var(--khaki-beige);
  font-family: monospace;
  font-size: 12px;
  padding: 6px;
  margin-top: 10px;
  text-align: center;
}
.eq { display:flex; gap:2px; justify-content:center; margin-top:4px; height: 20px; align-items:flex-end;}
.eq span { width: 4px; background: var(--rosy-taupe); animation: bounce 0.6s infinite ease-in-out alternate; }
.eq span:nth-child(2) { animation-delay: 0.1s; }
.eq span:nth-child(3) { animation-delay: 0.2s; }
.eq span:nth-child(4) { animation-delay: 0.3s; }
.eq span:nth-child(5) { animation-delay: 0.15s; }
@keyframes bounce { from { height: 3px; } to { height: 20px; } }

.main {
  background: var(--cream);
  border: 3px solid var(--clay-soil);
  padding: 14px;
}

.section-title {
  background: linear-gradient(90deg, var(--clay-soil), var(--dusty-taupe));
  padding: 4px 10px;
  font-weight: bold;
  color: var(--cream);
  text-shadow: 1px 1px rgba(17,11,9,0.5);
  margin-bottom: 6px;
  border-left: 6px solid var(--khaki-beige);
}

.about-box {
  font-size: 13px;
  line-height: 1.5;
  color: var(--espresso);
  background: var(--cream-deep);
  padding: 10px;
  border: 1px dashed var(--dusty-taupe);
  margin-bottom: 14px;
}
.about-box a {
  color: var(--espresso);
  font-weight:600;
}
.blink { animation: blinker 1s step-start infinite; color: var(--clay-soil); }
.status-bar .blink {color:var(--cream) }
@keyframes blinker { 50% { opacity: 0; } }

.services-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  background: var(--cream-deep);
  border: 1px dashed var(--dusty-taupe);
}
.services-panel.open {
  max-height: 2000px;
  margin-bottom: 14px;
}
.services-inner {
  padding: 10px;
}
.services-inner h3 {
  color: var(--clay-soil);
  font-size: 13px;
  margin: 10px 0 6px;
  text-shadow: 1px 1px rgba(255,255,255,0.4);
}
.services-inner h3:first-child { margin-top: 0; }
.services-inner ul {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  font-size: 12px;
  color: var(--espresso);
}
.services-inner li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px dotted var(--dusty-taupe);
}
.services-inner li span {
  color: var(--clay-soil);
  font-weight: bold;
  flex-shrink: 0;
}

.top8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.friend {
  background: var(--cream-deep);
  border: 2px solid var(--dusty-taupe);
  text-align: center;
  padding: 6px 2px;
  font-size: 12px;
}
.friend .thumb {
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 4px;
  border: 1px solid var(--khaki-beige);
  overflow: hidden;
}
.friend .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.friend a { color: var(--espresso); text-decoration: none; }
.friend a:hover .thumb { outline: 2px solid var(--rosy-taupe); }

.faq-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--cream-deep);
  border: 1px dashed var(--dusty-taupe);
  padding: 8px;
  margin-bottom: 14px;
}
.faq-nav a,
.faq-tab {
  flex: 1;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--clay-soil);
  color: var(--espresso);
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  padding: 6px 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
}
.faq-nav a:hover,
.faq-tab:hover {
  background: var(--rosy-taupe);
  color: var(--cream);
}
.faq-tab[aria-selected="true"] {
  background: var(--rosy-taupe);
  color: var(--cream);
  box-shadow: 0 0 10px rgba(199,147,125,0.5);
}
.faq-panel[hidden] { display: none; }

.comments {
  font-size: 14px;
}
.comment {
  background: var(--cream-deep);
  border: 1px solid var(--clay-soil);
  padding: 8px;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}
.comment .avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  border: 1px solid var(--khaki-beige);
}
.comment .who {
  color: var(--clay-soil);
  font-weight: bold;
  font-size: 14px;
  text-shadow: 1px 1px rgba(255,255,255,0.4);
  margin-bottom:8px;
}
.comment .glitter {
  background: linear-gradient(90deg, var(--dusty-taupe), var(--clay-soil), var(--rosy-taupe), var(--dusty-taupe));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  font-weight:bold;
}
.comment.reply {
  margin-left: 24px;
  border-left: 3px solid var(--dusty-taupe);
  background: var(--cream);
}
.comment.reply .who {
  color: var(--espresso);
  text-shadow: 1px 1px rgba(255,255,255,0.4);
}
.avatar-photo {
  overflow: hidden;
  background: none;
}
.avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.footer {
  text-align: center;
  font-size: 10px;
  color: var(--dusty-taupe-2);
  padding: 10px;
}

.badge {
  display:inline-block;
  background: var(--cream);
  border:1px solid var(--clay-soil);
  color: var(--clay-soil);
  font-size:14px;
  padding:2px 5px;
  margin:2px;
  text-decoration:none;
  cursor:pointer;
  font-family:inherit;
  appearance:none;
  margin-top:10px;
  width:100%;
  text-align:center;
}
.badge:hover {
  border:1px solid var(--dusty-taupe);
  color: var(--dusty-taupe);
  background: var(--cream-deep);
}
.profile-pic a { display:block; width:100%; height:100%; }

@media (max-width: 640px) {
  .page { margin: 10px; }
  .header h1 { font-size: 28px; }
  .body-grid { grid-template-columns: 1fr; padding: 8px; gap: 10px; }
  .top8 { grid-template-columns: repeat(2, 1fr); }
  marquee.topbar { font-size: 12px; }
  .status-bar { font-size: 11px; }
  .faq-nav { flex-direction: column; }
  .faq-nav a,
  .faq-tab { flex: none; }
}

/* Accessibility widget */
.a11y-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  font-family: Arial, Helvetica, sans-serif;
}
.a11y-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rosy-taupe), var(--dusty-taupe));
  border: 3px solid var(--khaki-beige);
  color: var(--pitch-black);
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(199,147,125,0.6), 0 0 25px rgba(161,120,101,0.4);
}
.a11y-fab:hover { transform: scale(1.08); }
.a11y-fab:focus-visible { outline: 3px solid var(--khaki-beige); outline-offset: 3px; }
.a11y-panel {
  position: absolute;
  bottom: 66px;
  right: 0;
  width: 240px;
  background: var(--cream-deep);
  border: 2px solid var(--clay-soil);
  border-radius: 8px;
  padding: 12px;
  color: var(--espresso);
  box-shadow: 0 4px 20px rgba(17,11,9,0.35);
}
.a11y-panel[hidden] { display: none; }
.a11y-panel-title {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--clay-soil);
}
.a11y-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
  cursor: pointer;
}
.a11y-option input { width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.a11y-reset-btn {
  width: 100%;
  margin-top: 4px;
  padding: 6px;
  background: var(--cream);
  border: 1px solid var(--espresso);
  color: var(--espresso);
  cursor: pointer;
  font-size: 12px;
  border-radius: 4px;
  font-family: inherit;
}

/* Reduce motion */
body.a11y-reduce-motion *,
body.a11y-reduce-motion *::before,
body.a11y-reduce-motion *::after {
  animation: none !important;
  transition: none !important;
}

/* High contrast */
body.a11y-high-contrast * {
  background-image: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
body.a11y-high-contrast,
body.a11y-high-contrast * {
  background-color: #000 !important;
  color: #ffff00 !important;
  -webkit-text-fill-color: #ffff00 !important;
  border-color: #ffff00 !important;
}
body.a11y-high-contrast .glitter-divider { background-color: #ffff00 !important; }
body.a11y-high-contrast a,
body.a11y-high-contrast .badge,
body.a11y-high-contrast .faq-nav a,
body.a11y-high-contrast .faq-tab {
  color: #00ffff !important;
  -webkit-text-fill-color: #00ffff !important;
}
body.a11y-high-contrast .a11y-fab {
  background: #000 !important;
  color: #ffff00 !important;
  -webkit-text-fill-color: #ffff00 !important;
}

/* Larger text */
body.a11y-large-text .about-box,
body.a11y-large-text .services-inner ul,
body.a11y-large-text .comments,
body.a11y-large-text .faq-nav a,
body.a11y-large-text .faq-tab,
body.a11y-large-text .stat-table td,
body.a11y-large-text .status-bar,
body.a11y-large-text .footer,
body.a11y-large-text .badge,
body.a11y-large-text .section-title,
body.a11y-large-text .friend,
body.a11y-large-text .a11y-option,
body.a11y-large-text .a11y-panel-title {
  font-size: 17px !important;
  line-height: 1.6 !important;
}
body.a11y-large-text .header h1 { font-size: 50px !important; }
body.a11y-large-text .header .tagline { font-size: 17px !important; }

/* Readable font */
body.a11y-readable-font,
body.a11y-readable-font * {
  font-family: Arial, Helvetica, "Segoe UI", sans-serif !important;
}

/* Normal cursor */
body.a11y-normal-cursor {
  cursor: auto !important;
}
