/* ══════════════════════════════════════════════════
   FONTS
══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400;600;700&family=Nunito:wght@400;600;700&display=swap');

/* ══════════════════════════════════════════════════
   VARIABLES
══════════════════════════════════════════════════ */
:root {
  /* palette */
  --bg:          #f0e6ff;
  --bg-2:        #e4d4f8;
  --bg-3:        #d6c2ee;
  --win-bg:      #fdf8ff;

  --border:      #9966cc;
  --border-2:    #7744aa;
  --shadow:      #5522aa;

  --bar-a:       #8855cc;
  --bar-b:       #cc55aa;

  --pink:        #ee66bb;
  --blue:        #77aadd;
  --gold:        #ddbb44;

  --star:        #cc99ff;
  --star-2:      #ffaacc;

  --text:        #1e0d33;
  --muted:       #7755aa;
  --light:       #aa88cc;

  --link:        #7733bb;

  /* fonts */
  --pix:   'Pixelify Sans', 'Courier New', monospace;
  --body:  'Nunito', 'Segoe UI', system-ui, sans-serif;
  --mono:  'Consolas', 'Courier New', monospace;

  /* misc */
  --header-h: 80px;
}

/* ══════════════════════════════════════════════════
   RESET / BASE
══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* fluid type scale: 16px at ~900px → 22px at ~1600px */
  font-size: clamp(15px, 1.4vw, 22px);
}

body {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
}

img { image-rendering: pixelated; }

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

/* ══════════════════════════════════════════════════
   MARQUEE
══════════════════════════════════════════════════ */
.marquee-bar {
  position: relative;
  z-index: 20;
  overflow: hidden;
  white-space: nowrap;
  background: var(--win-bg);
  border-bottom: 2px solid var(--border);
  font-family: var(--pix);
  font-size: clamp(9px, 0.65rem, 13px);
  color: var(--muted);
  padding: 0.35em 0;
  line-height: 1;
  letter-spacing: 0.5px;
}
.marquee-inner {
  display: inline-block;
  animation: mscroll 35s linear infinite;
}
@keyframes mscroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════════
   WINDOW COMPONENT
══════════════════════════════════════════════════ */
.window {
  background: var(--win-bg);
  border: 2px solid var(--border);
  box-shadow: 4px 4px 0 var(--shadow);
  overflow: hidden;
}

.win-bar {
  background: var(--bar-a);
  padding: 0.35em 0.6em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  border-bottom: 2px solid var(--border-2);
  user-select: none;
}
.win-dots { display: flex; gap: 0.25em; }
.win-dot {
  width: 0.6em; height: 0.6em;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.18);
  flex-shrink: 0;
}
.win-dot.r { background: #ff5f57; }
.win-dot.y { background: #ffbd2e; }
.win-dot.g { background: #28c840; }

.win-label {
  font-family: var(--pix);
  font-size: clamp(8px, 0.6rem, 12px);
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.8px;
  flex: 1;
  text-align: center;
  margin-right: 1em; /* visual balance with dots */
}

.win-body { padding: 1em 1.25em; }

/* ══════════════════════════════════════════════════
   NAV STAMP BUTTONS  (shared)
══════════════════════════════════════════════════ */
.site-nav,
.home-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.site-nav a,
.home-nav a {
  font-family: var(--pix);
  font-size: clamp(9px, 0.7rem, 14px);
  letter-spacing: 0.5px;
  padding: 0.35em 0.9em;
  border: 2px solid var(--border);
  background: var(--win-bg);
  color: var(--text);
  display: inline-block;
  box-shadow: 2px 2px 0 var(--shadow);
  transition: transform 0.07s, box-shadow 0.07s;
}
.site-nav a:hover,
.home-nav a:hover {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--shadow);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  background: var(--bg-3);
  border-color: var(--border-2);
  color: var(--bar-a);
}

/* ══════════════════════════════════════════════════
   PAGE CLIFF  (home, fixed)
══════════════════════════════════════════════════ */
#pixelCliff {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 90vh;
  width: auto;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  image-rendering: pixelated;
}

/* ══════════════════════════════════════════════════
   DECORATIVE STARS
══════════════════════════════════════════════════ */
.deco-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.deco-s {
  position: absolute;
  left: var(--x, 50%);
  top:  var(--y, 50%);
  font-size: var(--sz, 14px);
  color: var(--sc, var(--star));
  animation: twinkle var(--d, 3s) ease-in-out var(--dl, 0s) infinite;
  line-height: 1;
}
@keyframes twinkle {
  0%,100% { opacity: 0.85; transform: scale(1) rotate(0deg); }
  50%      { opacity: 0.15; transform: scale(0.65) rotate(20deg); }
}

/* ══════════════════════════════════════════════════
   HOME — HERO
══════════════════════════════════════════════════ */
.home { position: relative; z-index: 2; }

.home-hero {
  position: relative;
  min-height: calc(100vh - 2em);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2vh, 32px);
  padding: clamp(32px, 5vh, 80px) clamp(24px, 6vw, 100px);

  background: transparent;
}

/* big pixel title */
.home-title {
  font-family: var(--pix);
  font-size: clamp(30px, 6vw, 64px);
  color: var(--bar-a);
  text-align: center;
  letter-spacing: 6px;
  position: relative;
  z-index: 2;
  text-shadow: 3px 3px 0 var(--shadow);
}

/* profile window */
.profile-window {
  width: min(420px, 88vw);
  position: relative;
  z-index: 2;
}
.profile-window .win-body {
  padding: 1em 1.25em;
  display: flex;
  gap: 1em;
  align-items: flex-start;
}

.profile-avatar {
  flex-shrink: 0;
  width: clamp(56px, 4.5rem, 80px);
  height: clamp(56px, 4.5rem, 80px);
  border: 2px solid var(--border);
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--bar-a);
}
.profile-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.profile-info { flex: 1; min-width: 0; }
.profile-info .name-line {
  font-family: var(--pix);
  font-size: clamp(12px, 1rem, 18px);
  color: var(--bar-a);
  margin-bottom: 0.4em;
}
.profile-info p {
  font-size: clamp(10px, 0.75rem, 14px);
  color: var(--muted);
  line-height: 1.95;
  font-family: var(--mono);
}
.profile-info .status-val { color: var(--pink); }

.cursor {
  display: inline-block;
  width: 7px; height: 1em;
  background: var(--pink);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* home nav (centered stamp buttons) */
.home-nav { justify-content: center; position: relative; z-index: 2; }

/* ══════════════════════════════════════════════════
   HOME — BODY (below fold)
══════════════════════════════════════════════════ */
.home-body {
  position: relative;
  z-index: 2;
  padding: clamp(40px, 5vw, 80px) clamp(24px, 6vw, 80px) clamp(40px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vw, 36px);
  max-width: min(1000px, 94vw);
  margin: 0 auto;
  width: 100%;
}

/* meow window */
.meow-window .win-body {
  padding: 1.25em 1.5em;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  justify-content: space-between;
  align-items: flex-start;
}

.meow-input-group { display: flex; flex-direction: column; gap: 8px; }
.meow-input-group input[type="text"] {
  width: clamp(160px, 14rem, 260px);
  padding: 0.45em 0.7em;
  border: 2px solid var(--border);
  background: var(--bg);
  font-size: 0.85rem;
  font-family: var(--mono);
  outline: none;
  color: var(--text);
  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.07);
}
.meow-input-group input:focus { border-color: var(--bar-a); }
.meow-input-group input::placeholder { color: var(--light); }

/* pixel button (shared) */
.px-btn {
  font-family: var(--pix);
  font-size: clamp(9px, 0.7rem, 14px);
  letter-spacing: 0.5px;
  padding: 0.35em 0.9em;
  border: 2px solid var(--border);
  background: var(--win-bg);
  color: var(--text);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--shadow);
  transition: transform 0.07s, box-shadow 0.07s;
}
.px-btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 var(--shadow);
}
.px-btn:active { transform: translate(2px, 2px); box-shadow: none; }

.meow-btn-row { display: flex; align-items: center; gap: 10px; }
.meow-count-text {
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--muted);
}

.meow-counter-side { text-align: right; }
.meow-counts {
  border: 2px solid var(--border);
  background: var(--bg);
  padding: 0.65em 1em;
  font-size: 0.85rem;
  font-family: var(--mono);
  color: var(--muted);
  line-height: 2;
  min-width: clamp(160px, 13rem, 240px);
  margin-bottom: 0.5em;
}
.meow-adj { display: flex; gap: 0.4em; justify-content: flex-end; }
.meow-adj .px-btn { width: 2.8em; padding: 0.35em 0; text-align: center; }

/* buttons section — flat, no window chrome */
.buttons-section { padding: 0 2px; }
.buttons-label {
  font-family: var(--pix);
  font-size: clamp(8px, 0.6rem, 12px);
  color: var(--muted);
  margin-bottom: 0.9em;
  letter-spacing: 0.5px;
}
.buttons-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.btn-88x31 {
  display: inline-block;
  width: 88px; height: 31px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.btn-88x31 img { width: 100%; height: 100%; display: block; }

.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.copyright {
  font-family: var(--pix);
  font-size: clamp(8px, 0.6rem, 11px);
  color: var(--light);
  letter-spacing: 0.5px;
}

.teto-btn {
  font-family: var(--pix);
  font-size: 7px;
  letter-spacing: 0.3px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  background: var(--win-bg);
  color: var(--muted);
  box-shadow: 1px 1px 0 var(--shadow);
  transition: transform 0.07s, box-shadow 0.07s;
  white-space: nowrap;
}
.teto-btn:hover {
  transform: translate(1px, 1px);
  box-shadow: none;
  text-decoration: none;
  color: var(--pink);
}

/* ══════════════════════════════════════════════════
   SITE HEADER  (subpages)
══════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--win-bg);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 0 var(--shadow);
}

.header-bar {
  background: var(--bar-a);
  padding: 0.45em clamp(18px, 3vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-2);
}

.site-logo {
  font-family: var(--pix);
  font-size: clamp(11px, 0.85rem, 16px);
  color: white;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}
.site-logo:hover { text-decoration: none; opacity: 0.85; }
.site-logo .at { opacity: 0.72; font-size: 0.75em; }

.header-deco {
  font-family: var(--pix);
  font-size: clamp(8px, 0.65rem, 12px);
  color: rgba(255,255,255,0.5);
  letter-spacing: 3px;
}

.header-nav-row {
  padding: 0.45em clamp(18px, 3vw, 48px);
  display: flex;
  align-items: center;
  gap: 0.4em;
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════
   PAGE CONTENT  (subpages)
══════════════════════════════════════════════════ */
.page-content {
  max-width: min(1000px, 94vw);
  margin: 0 auto;
  padding: clamp(32px, 4vw, 64px) clamp(24px, 5vw, 72px) clamp(60px, 7vw, 100px);
  position: relative;
  z-index: 1;
}

.page-content h1 {
  font-family: var(--pix);
  font-size: clamp(20px, 2.5rem, 42px);
  color: var(--bar-a);
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
  text-shadow: 2px 2px 0 var(--shadow);
  border-left: 4px solid var(--pink);
  padding-left: 0.5em;
}

.section-heading {
  font-family: var(--pix);
  font-size: clamp(11px, 0.85rem, 16px);
  color: var(--muted);
  margin-top: 2.5rem;
  margin-bottom: 0.9em;
  letter-spacing: 1px;
}

/* cliff deco, subpages */
.page-deco {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 340px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
  user-select: none;
  image-rendering: pixelated;
  transform: scaleX(-1);
}

/* ══════════════════════════════════════════════════
   ABOUT
══════════════════════════════════════════════════ */
.about-block { max-width: 600px; }
.about-block p {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.95;
  margin-bottom: 1.1rem;
}

.site-manifesto {
  max-width: 640px;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.95;
  margin-bottom: 2rem;
  padding: 0.9em 1.15em;
  border-left: 3px solid var(--pink);
  background: rgba(238,102,187,0.05);
  border-top: 2px solid var(--border);
  border-right: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow);
}

.ear-list {
  list-style: none;
  max-width: 600px;
  columns: 2;
  column-gap: 2.5rem;
  margin-top: 1rem;
}
.ear-list li {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.95;
  padding: 2px 0;
  break-inside: avoid;
}
.ear-list li::before { content: '– '; color: var(--light); }

/* ══════════════════════════════════════════════════
   ART
══════════════════════════════════════════════════ */
.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.art-piece {
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow);
  background: var(--win-bg);
}
.art-piece img { width: 100%; height: auto; display: block; }
.art-piece figcaption {
  padding: 0.45em 0.75em;
  font-family: var(--pix);
  font-size: clamp(8px, 0.6rem, 11px);
  color: var(--muted);
  border-top: 2px solid var(--border);
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════════ */
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.contact-list li a {
  font-family: var(--pix);
  font-size: clamp(10px, 0.75rem, 14px);
  letter-spacing: 0.5px;
  padding: 0.55em 1.1em;
  border: 2px solid var(--border);
  background: var(--win-bg);
  color: var(--text);
  display: inline-block;
  box-shadow: 3px 3px 0 var(--shadow);
  transition: transform 0.07s, box-shadow 0.07s;
}
.contact-list li a:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
  text-decoration: none;
  color: var(--bar-a);
}
.contact-list li a::before { content: '→ '; color: var(--pink); }

/* ══════════════════════════════════════════════════
   QUOTES
══════════════════════════════════════════════════ */
.quotes-list, .thoughts-list {
  display: flex;
  flex-direction: column;
  max-width: 680px;
}
.quote-item, .thought-item {
  padding: 1em 0;
  border-bottom: 2px solid var(--bg-3);
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--muted);
}
.quote-item:first-child,
.thought-item:first-child { border-top: 2px solid var(--bg-3); }

.quote-source {
  display: block;
  font-family: var(--pix);
  font-size: clamp(8px, 0.6rem, 11px);
  color: var(--bar-a);
  letter-spacing: 0.5px;
  margin-bottom: 0.45em;
}

.thought-date {
  display: block;
  font-family: var(--pix);
  font-size: 8px;
  color: var(--light);
  letter-spacing: 0.4px;
  margin-bottom: 5px;
}

/* ══════════════════════════════════════════════════
   PROJECTS
══════════════════════════════════════════════════ */
.page-intro {
  max-width: 600px;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 2rem;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 680px;
  margin-bottom: 8px;
}
.project-card {
  background: var(--win-bg);
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 1.4em 0.9em;
  font-family: var(--pix);
  font-size: clamp(9px, 0.7rem, 13px);
  letter-spacing: 0.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text);
  transition: transform 0.07s, box-shadow 0.07s;
  min-height: 76px;
}
.project-card:hover {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
  text-decoration: none;
  color: var(--bar-a);
}
.project-card.wip { color: var(--muted); }
.card-tag {
  display: block;
  font-size: 7px;
  color: var(--light);
  margin-top: 4px;
  letter-spacing: 0.4px;
}

/* ══════════════════════════════════════════════════
   MEDIA
══════════════════════════════════════════════════ */
.media-section { margin-bottom: 2.5rem; }
.media-list { list-style: none; max-width: 680px; }
.media-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.65em 0;
  border-bottom: 2px solid var(--bg-3);
  font-size: 0.95rem;
}
.media-item:first-child { border-top: 2px solid var(--bg-3); }
.media-title { color: var(--text); flex-shrink: 0; }
.media-title::before { content: '→ '; color: var(--pink); }
.media-note { color: var(--muted); font-size: 12px; }

/* ══════════════════════════════════════════════════
   STUB
══════════════════════════════════════════════════ */
.stub-message {
  font-family: var(--pix);
  font-size: clamp(9px, 0.7rem, 13px);
  color: var(--light);
  letter-spacing: 0.5px;
  padding: 1.5em 2em;
  border: 2px dashed var(--border);
  text-align: center;
  display: inline-block;
}
.stub-message::before { content: '( '; color: var(--pink); }
.stub-message::after  { content: ' )'; color: var(--pink); }

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 800px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .ear-list { columns: 1; }
  .meow-window .win-body { flex-direction: column; }
  .meow-counter-side { text-align: left; }
  .meow-adj { justify-content: flex-start; }
  .page-deco { width: 200px; }
  #pixelCliff { height: 65vh; }
}

@media (max-width: 500px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .page-deco { width: 130px; }
  #pixelCliff { height: 50vh; }
  .header-deco { display: none; }
}
