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

/* ── THEME ── */
:root {
  --bg:       #F5F3EE;
  --bg2:      #ECEAE3;
  --text:     #16150D;
  --muted:    #787770;
  --border:   #DEDAD0;
  --surface:  #EDEAE2;
  --surface2: #E4E1D8;
  --biz:      #9A5F26;
  --tech:     #2E6B50;
  --edu:      #6B4C8A;
  --mono:     'Space Mono', monospace;
  --sans:     'Poppins', system-ui, sans-serif;
  --shadow:   0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
}
[data-theme="dark"] {
  --bg:       #0C0B08;
  --bg2:      #131209;
  --text:     #EDECE5;
  --muted:    #86857D;
  --border:   #201F18;
  --surface:  #161510;
  --surface2: #1C1B14;
  --biz:      #C07832;
  --tech:     #4A8F6A;
  --edu:      #9171B8;
  --shadow:   0 1px 3px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
}

html, body {
  height: 100%; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  transition: background .35s, color .35s; overflow: hidden;
}

/* ── CHROME ── */
#chrome {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px; pointer-events: none;
}
.chrome-left { display: flex; align-items: center; gap: 8px; pointer-events: none; }
.cb {
  pointer-events: all; display: inline-block; text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 6px 13px; font-family: var(--sans);
  font-size: 11px; font-weight: 500; color: var(--muted);
  cursor: pointer; letter-spacing: .04em;
  transition: color .2s, border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.cb:hover { color: var(--text); border-color: var(--muted); }
.notes-link:hover { color: var(--tech); border-color: var(--tech); }

/* Theme toggle pill */
#themeToggle {
  pointer-events: all;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 40px; padding: 5px 12px;
  cursor: pointer; transition: border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
#themeToggle:hover { border-color: var(--muted); }
.t-icon { font-size: 13px; line-height: 1; transition: transform .4s; }
.t-pill {
  width: 28px; height: 16px; background: var(--border); border-radius: 8px;
  position: relative; transition: background .3s;
}
.t-pill::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--muted); transition: transform .3s, background .3s;
}
[data-theme="dark"] .t-pill { background: var(--tech); }
[data-theme="dark"] .t-pill::after { transform: translateX(12px); background: var(--text); }
[data-theme="dark"] .t-icon { transform: rotate(180deg); }

/* ── GATE (home) ── */
#gate {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0;
}

.g-avatar {
  width: 104px; height: 104px; border-radius: 50%;
  object-fit: cover; margin-bottom: 16px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.g-eyebrow {
  font-family: var(--mono); font-size: 9px; font-weight: 400;
  color: var(--muted); letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.g-eyebrow::before, .g-eyebrow::after {
  content: ''; display: block; width: 20px; height: 1px; background: var(--border);
}
.g-name {
  font-size: clamp(2.2rem, 8vw, 3.8rem);
  font-weight: 700; letter-spacing: -.03em; line-height: 1;
  margin-bottom: 6px; text-align: center;
}
.g-handle {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  margin-bottom: 4px; letter-spacing: .04em;
}
.g-role {
  font-size: 13px; font-weight: 300; color: var(--muted);
  margin-bottom: 6px; letter-spacing: .02em; text-align: center;
}
.g-award {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 500; color: var(--biz);
  background: color-mix(in srgb, var(--biz) 8%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--biz) 20%, var(--border));
  border-radius: 20px; padding: 4px 10px; margin-bottom: 26px;
  letter-spacing: .04em;
}
.g-award::before { content: '★'; font-size: 9px; }
.g-q {
  font-size: 11px; font-weight: 400; color: var(--muted);
  letter-spacing: .06em; margin-bottom: 14px; text-align: center;
}
.g-btns { display: flex; gap: 8px; }
.g-btn {
  display: inline-block; text-align: center; text-decoration: none;
  padding: 11px 30px; border: 1px solid var(--border);
  border-radius: 4px; background: var(--surface);
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  color: var(--muted); cursor: pointer; letter-spacing: .05em;
  transition: all .2s; -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
}
.g-btn:hover { color: var(--text); border-color: var(--muted); }
.g-btn.biz:hover  { color: var(--biz);  border-color: var(--biz);  background: color-mix(in srgb, var(--biz) 5%, var(--surface)); }
.g-btn.tech:hover { color: var(--tech); border-color: var(--tech); background: color-mix(in srgb, var(--tech) 5%, var(--surface)); }
.g-btn.edu:hover  { color: var(--edu);  border-color: var(--edu);  background: color-mix(in srgb, var(--edu) 5%, var(--surface)); }

/* ── PERSONA PAGES / VIEWS ── */
#biz  { --acc: var(--biz);  }
#tech { --acc: var(--tech); }
#edu  { --acc: var(--edu);  }

.view {
  position: fixed; inset: 0; display: flex; align-items: center;
  justify-content: center; gap: 56px; padding: 58px 60px 30px;
}

/* ── WHEEL COLUMN ── */
.w-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.w-ptr {
  width: 0; height: 0; border-left: 7px solid transparent;
  border-right: 7px solid transparent; border-top: 11px solid var(--text);
  opacity: .3; margin-bottom: 5px;
}
.w-wrap {
  width: 300px; height: 300px; cursor: grab; user-select: none;
  -webkit-user-select: none; touch-action: none; position: relative;
}
.w-wrap:active { cursor: grabbing; }
.w-svg { width: 100%; height: 100%; overflow: visible; display: block; }
.w-hint {
  margin-top: 10px; font-family: var(--mono); font-size: 9px;
  color: var(--muted); letter-spacing: .14em; text-transform: uppercase;
}

/* Wheel slices */
.sl-0 { fill: color-mix(in srgb, var(--acc)  7%, var(--bg)); }
.sl-1 { fill: color-mix(in srgb, var(--acc) 13%, var(--bg)); }
.sl-2 { fill: color-mix(in srgb, var(--acc) 20%, var(--bg)); }
.sl-3 { fill: color-mix(in srgb, var(--acc) 27%, var(--bg)); }
.sl-4 { fill: color-mix(in srgb, var(--acc) 10%, var(--bg)); }
.sl-stroke { stroke: var(--bg); stroke-width: 2; }
.sl-inner  { fill: var(--bg); stroke: var(--border); stroke-width: 1.5; }
.sl-dot    { fill: var(--border); }
.sl-lbl    { fill: var(--text); font-family: 'Poppins', sans-serif; font-weight: 500; }
.sl-div    { stroke: var(--bg); stroke-width: 2; }

/* ── CONTENT COLUMN ── */
.c-col { max-width: 400px; flex: 1; min-width: 0; text-align: center; }

.c-sec { animation: cFd .28s ease both; }
@keyframes cFd {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.c-tag {
  font-family: var(--mono); font-size: 8.5px; font-weight: 400;
  letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 8px; display: flex; align-items: center;
  gap: 8px; justify-content: center;
}
.c-tag::before, .c-tag::after { content: ''; display: block; width: 12px; height: 1px; }
#biz  .c-tag { color: var(--biz);  } #biz  .c-tag::before, #biz  .c-tag::after { background: var(--biz); }
#tech .c-tag { color: var(--tech); } #tech .c-tag::before, #tech .c-tag::after { background: var(--tech); }
#edu  .c-tag { color: var(--edu);  } #edu  .c-tag::before, #edu  .c-tag::after { background: var(--edu); }

.c-sec h2 {
  font-size: 1.65rem; font-weight: 600;
  letter-spacing: -.02em; line-height: 1.2; margin-bottom: 7px;
}
.c-sec .sub {
  font-family: var(--mono); font-size: 10px; font-weight: 400;
  color: var(--muted); margin-bottom: 12px; letter-spacing: .06em;
}
.c-sec p {
  font-size: 13.5px; font-weight: 300; color: var(--muted);
  line-height: 1.7; margin-bottom: 10px;
}
.c-sec p strong { color: var(--text); font-weight: 500; }

/* Award badge inline */
.award-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 500; color: var(--biz);
  background: color-mix(in srgb, var(--biz) 8%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--biz) 25%, var(--border));
  border-radius: 20px; padding: 5px 12px; margin: 4px 0;
}
.award-badge::before { content: '★'; }

.stat-row {
  display: flex; gap: 16px; justify-content: center; margin: 12px 0;
}
.stat { text-align: center; }
.stat-n {
  font-family: var(--mono); font-size: 1.3rem; font-weight: 700;
  color: var(--text); line-height: 1; display: block;
}
.stat-l { font-size: 10px; font-weight: 300; color: var(--muted); letter-spacing: .04em; }

.c-list { list-style: none; display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.c-list li {
  font-size: 13px; font-weight: 300; color: var(--muted);
  display: flex; align-items: baseline; gap: 8px; justify-content: center;
}
.c-list li::before { content: '›'; color: var(--acc); font-size: 12px; flex-shrink: 0; }

.sg { margin-bottom: 10px; }
.sg-lbl {
  font-family: var(--mono); font-size: 9px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 6px; text-align: center;
}
.tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.tag {
  font-size: 11px; font-weight: 400; background: var(--surface2);
  border: 1px solid var(--border); padding: 2px 9px;
  border-radius: 3px; color: var(--text); letter-spacing: .02em;
}
.tag-note { color: var(--muted); font-weight: 400; }

.plist { display: flex; flex-direction: column; }
.pitem { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.pitem:first-child { border-top: 1px solid var(--border); }
.pm { color: var(--acc); font-family: var(--mono); font-size: 10px; font-weight: 700; padding-top: 2px; flex-shrink: 0; }
.pt { font-size: 13px; font-weight: 300; color: var(--muted); line-height: 1.55; text-align: left; }
.pt strong { color: var(--text); font-weight: 500; }

.clinks { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; align-items: center; }
.clink {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  color: var(--text); justify-content: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 5px;
  padding: 8px 16px; width: 100%; max-width: 320px;
  transition: border-color .2s, color .2s;
}
.clink:hover { border-color: var(--acc); color: var(--acc); }
.cl-lbl { font-family: var(--mono); font-size: 9px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); min-width: 54px; }
.cl-val { font-size: 13px; font-weight: 400; flex: 1; text-align: left; }

/* CTA button */
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--acc); color: #fff; text-decoration: none;
  font-size: 12px; font-weight: 600; letter-spacing: .06em;
  padding: 10px 24px; border-radius: 4px; margin-top: 14px;
  transition: opacity .2s, transform .2s; border: none; cursor: pointer;
}
.cta-btn:hover { opacity: .88; transform: translateY(-1px); }

.vfoot {
  position: absolute; bottom: 12px; left: 0; right: 0;
  text-align: center; font-family: var(--mono); font-size: 9px; font-weight: 400;
  color: var(--muted); letter-spacing: .08em; pointer-events: none;
}

/* ── NOTES PAGE ── */
.notes-view {
  --acc: var(--tech);
  flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 0; overflow-y: auto; padding: 76px 24px 60px;
}
.notes-wrap { width: 100%; max-width: 620px; margin: 0 auto; }
.notes-head { text-align: center; margin-bottom: 28px; }
.notes-head h2 { font-size: 1.65rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 8px; }
.notes-intro { font-size: 13.5px; font-weight: 300; color: var(--muted); line-height: 1.7; }

.notes-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.note-empty { text-align: center; font-size: 13px; font-weight: 300; color: var(--muted); }
.note-link {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 16px 18px; transition: border-color .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.note-link:hover { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 4%, var(--surface)); }
.note-main { min-width: 0; }
.note-title {
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3;
  display: flex; align-items: baseline; gap: 7px;
}
.note-arrow { font-family: var(--mono); font-size: 11px; color: var(--muted); transition: color .2s, transform .2s; }
.note-link:hover .note-arrow { color: var(--acc); transform: translate(1px,-1px); }
.note-desc { font-size: 13px; font-weight: 300; color: var(--muted); line-height: 1.6; margin-top: 6px; }
.note-date {
  font-family: var(--mono); font-size: 10px; color: var(--muted);
  letter-spacing: .06em; white-space: nowrap; flex-shrink: 0; padding-top: 3px;
}

/* ── MOBILE ── */
@media (max-width: 700px) {
  html, body { overflow-y: auto; }
  .view {
    flex-direction: column; align-items: center; justify-content: flex-start;
    overflow-y: auto; padding: 52px 20px 48px; min-height: 100dvh; gap: 20px;
    position: relative; inset: unset;
  }
  .w-wrap { width: 230px; height: 230px; }
  .c-col { max-width: 100%; width: 100%; }
  .g-btns { flex-direction: column; width: 100%; max-width: 260px; }
  .g-btn { text-align: center; }
  .vfoot { position: relative; bottom: auto; margin-top: 10px; }
  .stat-row { gap: 24px; }
  .clink { max-width: 100%; }
  .notes-view { padding: 68px 18px 48px; }
  .note-link { flex-direction: column; gap: 8px; }
  .note-date { padding-top: 0; }
}

@media (max-width: 380px) {
  .g-name { font-size: 2rem; }
  .w-wrap { width: 190px; height: 190px; }
}

/* ── LARGE SCREENS ── */
@media (min-width: 1200px) {
  .view { gap: 72px; padding: 60px 80px 30px; }
  .w-wrap { width: 360px; height: 360px; }
  .c-col { max-width: 440px; }
  .c-sec h2 { font-size: 1.9rem; }
}
@media (min-width: 1600px) {
  .view { gap: 90px; }
  .w-wrap { width: 400px; height: 400px; }
  .c-col { max-width: 480px; }
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none;
  z-index: 1000; opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
