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

/* ── Design tokens ── */
:root {
  --bg:       #070908;
  --surf:     #111114;
  --surf2:    #1a1a1e;
  --acc:      #10b981;
  --acc-hi:   #00ff41;
  --acc-dim:  #064e3b;
  --text:     #ffffff;
  --dim:      rgba(255,255,255,0.70);
  --muted:    rgba(255,255,255,0.40);
  --faint:    rgba(255,255,255,0.15);
  --border:   rgba(255,255,255,0.06);
  --border2:  rgba(255,255,255,0.12);
  --mono:     'Fragment Mono', 'Courier New', monospace;
  --sans:     'Inter', system-ui, sans-serif;
  --radius:   4px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}


/* 
   LAYOUT
    */

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 12px;
  align-items: stretch;
}
.main-grid.wide { grid-template-columns: 1fr; }

@media (max-width: 900px) {
  .main-grid,
  .main-grid.wide { grid-template-columns: 1fr; }
}

.left-col,
.right-col {
  display: flex;
  flex-direction: column;
  min-height: 560px;
}
.left-col { height: 100%; }


/* 
   PANEL (shared box)
    */

.panel {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: var(--surf);
  overflow: hidden;
}

.panel-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  background: rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}
.panel-body.dark { background: rgba(0,0,0,0.7); }

.panel-foot {
  border-top: 1px solid var(--border);
  padding: 8px 14px;
  background: rgba(0,0,0,0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  user-select: none;
  flex-shrink: 0;
}


/* 
   WINDOW TITLEBAR
    */

.win-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--surf2);
  border-bottom: 1px solid var(--border);
  user-select: none;
  flex-shrink: 0;
}

.win-dots { display: flex; gap: 5px; }
.win-dots span { width: 11px; height: 11px; border-radius: 50%; display: block; }
.dot-r { background: #ff5f56; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #27c93f; }

.win-title {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-left: -110px; /* optical center past dots */
}
.win-title .acc { color: var(--acc-hi); }

.win-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}


/* 
   HEADER
    */

.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 22px;
}

.hdr-name h1 {
  font-family: var(--sans);
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--acc-hi);
  box-shadow: 0 0 8px var(--acc-hi);
  display: inline-block;
  flex-shrink: 0;
}

.hdr-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  font-family: var(--sans);
}

.hdr-molecules {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  flex: 1;
  min-width: 0;
  gap: 8px;
  padding: 0 16px;
}

.hdr-img {
  height: 58px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.hdr-img--1 { transform: rotate(-25deg); }
.hdr-img--2 { transform: rotate(10deg) scale(0.85); }
.hdr-img--3 { transform: rotate(40deg) scale(0.9); }

.telem-block { display: flex; flex-direction: column; align-items: flex-end; }
.telem-label { font-size: 8px; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); }
.telem-val   { font-size: 13px; font-weight: 700; color: var(--acc); letter-spacing: .06em; font-variant-numeric: tabular-nums; }


/* 
   NAV
    */

.nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 600px) { .nav { grid-template-columns: repeat(2, 1fr); } }

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
  color: var(--muted);
  font-family: var(--mono);
}
.tab-btn:hover { border-color: var(--faint); color: var(--dim); }
.tab-btn.active {
  background: var(--surf2);
  border-color: var(--acc);
  color: var(--text);
}

.tab-icon { font-size: 14px; color: var(--acc); flex-shrink: 0; }
.tab-main { display: block; font-size: 11px; font-weight: 700; }
.tab-sub  { display: block; font-size: 9px;  color: var(--muted); margin-top: 1px; }


/* 
   SECTION BOXES (inside panels)
    */

.sec-box {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.015);
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}
.sec-box:last-child { margin-bottom: 0; flex: 1; }

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 11px;
  border-bottom: 1px solid var(--border);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--acc-hi);
  flex-shrink: 0;
}

.sec-body { padding: 10px 11px; display: flex; flex-direction: column; flex: 1; }


/* 
   SHARED COMPONENTS
    */

/* -- Lists -- */
.bullet-list { list-style: none; }
.bullet-list li {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.6;
  padding: 3px 0 3px 14px;
  position: relative;
}
.bullet-list li::before { content: '›'; position: absolute; left: 0; color: var(--acc); }

/* -- Tags -- */
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tag {
  font-size: 8.5px;
  padding: 3px 8px;
  border: 1px solid var(--border2);
  border-radius: 2px;
  color: var(--muted);
  background: rgba(0,0,0,0.4);
}

/* -- Section heading -- */
.section-h {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}
.section-h h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.section-h p  { font-size: 10px; color: var(--muted); margin-top: 3px; }

.section-badge {
  font-size: 9px;
  color: var(--acc);
  background: rgba(16,185,129,0.07);
  border: 1px solid rgba(16,185,129,.2);
  padding: 3px 9px;
  border-radius: 2px;
  white-space: nowrap;
  align-self: flex-start;
}

/* -- Tab panes -- */
.tab-pane { display: none; }
.tab-pane.active { display: flex; flex-direction: column; flex: 1; }


/* 
   HOME TAB
    */

.bio-section h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 10px;
}
.bio-para {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.7;
  margin-bottom: 10px;
  font-family: var(--sans);
}


/* 
   WORK TAB — timeline
    */

.timeline {
  border-left: 2px solid var(--border2);
  padding-left: 24px;
  margin-left: 8px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tl-entry { position: relative; }

.tl-node {
  position: absolute;
  left: -32px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 0 3px var(--surf), 0 0 0 4px var(--acc-dim);
}

.tl-card {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.015);
  padding: 16px 18px;
  transition: border-color .2s;
}
.tl-card:hover { border-color: rgba(16,185,129,.35); }

.tl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tl-role   { font-size: 13px; font-weight: 700; color: var(--acc-hi); }
.tl-co     { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: var(--sans); }
.tl-period {
  font-size: 10px;
  color: var(--acc);
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  padding: 3px 9px;
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tl-desc { font-size: 12px; color: var(--dim); line-height: 1.65; margin-bottom: 10px; font-family: var(--sans); }

.tl-bullets-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 8px;
  display: block;
}

.tl-bullets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 7px;
}

.tl-bullet {
  display: flex;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.35);
  border-radius: var(--radius);
}
.tl-bullet-arrow { color: var(--acc-hi); font-size: 10px; flex-shrink: 0; margin-top: 1px; }
.tl-bullet p     { font-size: 11px; color: var(--dim); line-height: 1.55; font-family: var(--sans); }


/* 
   PROJECTS TAB
    */

.proj-grid { display: flex; flex-direction: column; gap: 12px; }

.proj-card {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.015);
  padding: 16px 18px;
  transition: border-color .2s;
}
.proj-card:hover { border-color: rgba(16,185,129,.35); }

.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 10px;
  gap: 10px;
  flex-wrap: wrap;
}

.proj-title { font-size: 12px; font-weight: 700; color: var(--acc-hi); }
.proj-badge { font-size: 8.5px; color: var(--muted); }
.proj-desc  { font-size: 12px; color: var(--dim); line-height: 1.65; margin-bottom: 10px; font-family: var(--sans); }

.proj-link {
  font-size: 11px;
  font-weight: 700;
  color: var(--acc-hi);
  text-decoration: none;
  font-family: var(--mono);
}
.proj-link:hover { text-decoration: underline; }

.proj-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .proj-two { grid-template-columns: 1fr; } }


/* 
   MUSIC TAB
    */

.album-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}
.album-list .album-btn { flex: 1; align-items: center; }

.album-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0,0,0,0.35);
  cursor: pointer;
  text-align: left;
  font-family: var(--mono);
  color: var(--muted);
  transition: all .12s;
}
.album-btn:hover { border-color: var(--faint); color: var(--dim); }
.album-btn.active {
  background: rgba(0,255,65,0.06);
  border-color: var(--acc-hi);
  color: var(--text);
  font-weight: 700;
}

.album-idx {
  font-size: 9px;
  font-weight: 700;
  color: var(--acc-hi);
  min-width: 22px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border2);
  border-radius: 2px;
  background: rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.album-btn.active .album-idx { border-color: var(--acc-hi); background: rgba(0,255,65,0.1); }

.album-name   { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.album-artist { font-size: 8.5px; color: var(--muted); white-space: nowrap; }

/* Now playing section */
.now-playing {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.now-rank {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--acc-hi);
  border: 1px solid var(--acc-dim);
  border-radius: var(--radius);
  background: rgba(0,255,65,0.04);
}

.now-title  { font-size: 13px; font-weight: 700; color: var(--text); }
.now-artist { font-size: 10px; color: var(--acc); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }
.now-desc   { font-size: 11px; color: var(--dim); line-height: 1.6; margin-top: 5px; font-family: var(--sans); }

.spotify-frame {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: #000;
  padding: 4px;
  overflow: hidden;
}

.spotify-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 9px;
  color: var(--muted);
}
.spotify-link { color: var(--acc-hi); text-decoration: none; font-weight: 700; }
.spotify-link:hover { text-decoration: underline; }


/* 
   molecule animation
    */

.ascii-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--surf);
}

#mol-pre {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.15;
  color: var(--acc);
  letter-spacing: .05em;
  user-select: none;
  white-space: pre;
  text-shadow: 0 0 6px rgba(16,185,129,.4);
}

.ascii-label {
  font-size: 9px;
  color: var(--muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: .12em;
}


/* 
   FOOTER
    */

.ftr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
}

.contact-links { display: flex; flex-wrap: wrap; gap: 8px; }

.contact-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: var(--surf2);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.contact-btn:hover { border-color: var(--acc); color: var(--text); }
.contact-btn svg {
  width: 14px;
  height: 14px;
  stroke: var(--acc);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copyright { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .15em; }


/* 
   UTILITIES & GLOBAL
    */

/* Scrollbar */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

/* Animations */
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .22s ease forwards; }

/* Helpers */
.hidden { display: none !important; }
.mt8    { margin-top: 8px; }
