/* ═══════════════════════════════════════════════════════════
   1. DESIGN TOKENS
═══════════════════════════════════════════════════════════ */
:root {
  --bg:        #080d0d;
  --sidebar:   #0b1212;
  --surface:   #0f1a1a;
  --border:    #142020;
  --border2:   #1e3030;
  --teal:      #00e5b4;
  --teal-dim:  rgba(0,229,180,0.08);
  --teal-mid:  rgba(0,229,180,0.18);
  --text:      #d4ede8;
  --muted:     #3a6060;
  --dim:       #1a2a2a;
  --danger:    #ff4d6a;
  --amber:     #ffa940;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

ul { list-style: none; }

a { text-decoration: none; }

/* ═══════════════════════════════════════════════════════════
   3. TYPOGRAPHY
═══════════════════════════════════════════════════════════ */
body {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
}

.teal { color: var(--teal); }

/* ═══════════════════════════════════════════════════════════
   4. LAYOUT
═══════════════════════════════════════════════════════════ */
body {
  display: flex;
  height: 100vh;
}

aside {
  width: 260px;
  min-width: 260px;
  background: var(--sidebar);
  border-right: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

aside::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,229,180,0.012) 3px,
    rgba(0,229,180,0.012) 4px
  );
  pointer-events: none;
  z-index: 0;
}

.sidebar-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px 24px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.sidebar-inner::-webkit-scrollbar { display: none; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  min-width: 0;
}

/* ═══════════════════════════════════════════════════════════
   5. SIDEBAR — IDENTITY BLOCK
═══════════════════════════════════════════════════════════ */
.identity {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}

.identity-tag {
  font-size: 9px;
  color: var(--teal);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0.7;
}

.identity-name {
  font-family: 'Syne', sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.15;
  color: var(--text);
}

.identity-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.status-dot {
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}

.status-text {
  font-size: 10px;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════
   6. SIDEBAR — NAVIGATION
═══════════════════════════════════════════════════════════ */
nav {
  flex: 1;
  margin-bottom: 24px;
}

.nav-section-label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 6px;
  margin-top: 4px;
  padding-left: 2px;
}

nav ul { margin-bottom: 2px; }

nav ul li { margin-bottom: 1px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  cursor: pointer;
}

.nav-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: 11px;
  opacity: 0.6;
}

.nav-label { flex: 1; }

.nav-arrow {
  font-size: 9px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}

.nav-divider {
  height: 1px;
  background: var(--border2);
  margin: 8px 0;
}

.nav-item:hover {
  background: var(--teal-dim);
  border-color: var(--border2);
  color: var(--text);
}

.nav-item:hover .nav-arrow {
  opacity: 0.5;
  transform: translateX(0);
}

.nav-item.active {
  background: var(--teal-mid);
  border-color: rgba(0,229,180,0.25);
  color: var(--teal);
}

.nav-item.active .nav-icon { opacity: 1; }

.nav-item.active .nav-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--teal);
}

/* ═══════════════════════════════════════════════════════════
   7. SIDEBAR — CHIPS
═══════════════════════════════════════════════════════════ */
.nav-chip {
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.chip-live,
.chip-tool {
  background: rgba(0,229,180,0.10);
  color: var(--teal);
  border: 1px solid rgba(0,229,180,0.20);
}

.chip-game {
  background: rgba(255,169,64,0.10);
  color: var(--amber);
  border: 1px solid rgba(255,169,64,0.20);
}

/* ═══════════════════════════════════════════════════════════
   8. SIDEBAR — FOOTER
═══════════════════════════════════════════════════════════ */
.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border2);
  flex-shrink: 0;
}

.footer-line {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.8;
  opacity: 0.6;
}

.footer-copy { opacity: 0.4; }

/* ═══════════════════════════════════════════════════════════
   9. HEADER BAR
═══════════════════════════════════════════════════════════ */
.content-topbar {
  height: 44px;
  min-height: 44px;
  border-bottom: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: var(--surface);
  flex-shrink: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.bc-root { color: var(--muted); }
.bc-sep  { color: var(--border2); }
.bc-active { color: var(--teal); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
}

.status-pill {
  color: var(--teal);
  opacity: 0.8;
}

.location-pill { opacity: 0.6; }

.clock-pill { opacity: 0.5; }

/* ═══════════════════════════════════════════════════════════
   10. CONTENT PANELS — SHARED
═══════════════════════════════════════════════════════════ */
.content-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 40px 48px 60px;
  scrollbar-width: thin;
  scrollbar-color: var(--dim) transparent;
}

.content-scroll::-webkit-scrollbar { width: 4px; }
.content-scroll::-webkit-scrollbar-track { background: transparent; }
.content-scroll::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 2px; }

.content-panel {
  display: none;
}

.content-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

.panel-header {
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border2);
}

.panel-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-eyebrow {
  font-size: 9px;
  color: var(--teal);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0.8;
}

.panel-title {
  font-family: 'Syne', sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════
   11. PANEL: HOME
═══════════════════════════════════════════════════════════ */
.home-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border2);
  align-items: start;
}

.hero-eyebrow {
  font-size: 9px;
  color: var(--teal);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.8;
}

.hero-heading {
  font-family: 'Syne', sans-serif;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-bio {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 340px;
}

.hero-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-box {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}

.stat-box-val {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 4px;
}

.stat-box-label {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-card:hover {
  border-color: rgba(0,229,180,0.30);
  background: var(--teal-dim);
}

.section-card-type {
  font-size: 9px;
  color: var(--teal);
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.section-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.section-card-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  flex: 1;
}

.section-card-footer {
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-card-arrow { color: var(--teal); }

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

.quick-link {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 6px 14px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.quick-link:hover {
  border-color: rgba(0,229,180,0.30);
  color: var(--teal);
  background: var(--teal-dim);
}

/* ═══════════════════════════════════════════════════════════
   12. PANEL: IFRAME PANELS
═══════════════════════════════════════════════════════════ */
.iframe-panel {
  display: none;
}

.iframe-panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  animation: fadeIn 0.2s ease;
}

main.is-iframe .content-scroll {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.iframe-panel iframe {
  flex: 1;
  width: 100%;
  border: none;
  display: block;
}

.iframe-fallback {
  display: none;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding: 40px;
  text-align: center;
}

.iframe-fallback a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.iframe-panel.iframe-error iframe { display: none; }
.iframe-panel.iframe-error .iframe-fallback { display: flex; }

/* ═══════════════════════════════════════════════════════════
   13. PANEL: RESUME
═══════════════════════════════════════════════════════════ */
.resume-section-title {
  font-size: 10px;
  color: var(--teal);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
  margin-top: 32px;
  opacity: 0.8;
}

.exp-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border2);
  align-items: start;
}

.exp-row:last-of-type { border-bottom: none; }

.exp-date {
  font-size: 10px;
  color: var(--muted);
  padding-top: 3px;
  line-height: 1.7;
}

.exp-role {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.exp-company {
  font-size: 11px;
  color: var(--teal);
  margin-bottom: 6px;
}

.exp-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.skill-tag {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--border2);
  padding: 3px 9px;
  border-radius: 3px;
  background: var(--surface);
}

.edu-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border2);
}

.edu-item:last-child { border-bottom: none; }

.edu-deg {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.edu-inst {
  font-size: 11px;
  color: var(--teal);
  margin-bottom: 2px;
}

.edu-yr {
  font-size: 10px;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════
   14. PANEL: GITHUB
═══════════════════════════════════════════════════════════ */
.github-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
}

.github-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--dim);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--teal);
  flex-shrink: 0;
}

.github-username {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}

.github-url {
  font-size: 11px;
  color: var(--teal);
  opacity: 0.7;
}

.repo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.repo-item {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  transition: border-color 0.15s;
  text-decoration: none;
}

.repo-item:hover { border-color: rgba(0,229,180,0.25); }

.repo-name {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 4px;
}

.repo-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.repo-meta {
  display: flex;
  gap: 14px;
}

.repo-meta-item {
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Language dot colours — data representation, not design tokens */
.lang-python     { background: #3572A5; }
.lang-javascript { background: #f1e05a; }
.lang-typescript { background: #3178c6; }
.lang-go         { background: #00ADD8; }
.lang-rust       { background: #dea584; }
.lang-csharp     { background: #178600; }
.lang-html       { background: #e34c26; }
.lang-css        { background: #563d7c; }
.lang-default    { background: var(--muted); }

.repo-stars {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.repo-stars-val {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* ═══════════════════════════════════════════════════════════
   15. PANEL: CONTACT
═══════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
  max-width: 640px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
  color: inherit;
}

.contact-card:not(.contact-card-static):hover {
  border-color: rgba(0,229,180,0.30);
  background: var(--teal-dim);
}

.contact-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--teal-dim);
  border: 1px solid rgba(0,229,180,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--teal);
  flex-shrink: 0;
}

.contact-card-label {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 3px;
}

.contact-card-val {
  font-size: 12px;
  color: var(--text);
}

#contact-form {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 24px;
  max-width: 640px;
}

.form-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}

.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row { margin-bottom: 14px; }

.form-actions { margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════
   16. BUTTONS AND FORM ELEMENTS
═══════════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  background: var(--teal-mid);
  color: var(--teal);
  border: 1px solid rgba(0,229,180,0.30);
  padding: 9px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary:hover { background: rgba(0,229,180,0.25); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border2);
  padding: 9px 20px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  text-decoration: none;
}

.btn-ghost:hover {
  border-color: rgba(0,229,180,0.30);
  color: var(--text);
}

.form-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--dim);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 9px 12px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(0,229,180,0.40);
}

.form-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px var(--dim) inset;
  -webkit-text-fill-color: var(--text);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit { margin-bottom: 12px; }

.form-error {
  display: none;
  font-size: 11px;
  color: var(--danger);
  margin-top: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255,77,106,0.25);
  border-radius: 4px;
  background: rgba(255,77,106,0.06);
}

.form-error.visible { display: block; }

.form-success {
  display: none;
  font-size: 13px;
  color: var(--teal);
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid rgba(0,229,180,0.25);
  border-radius: 6px;
  margin-top: 16px;
}

.form-success.visible { display: inline-block; }

.form-submitted { display: none; }

/* ═══════════════════════════════════════════════════════════
   17. ANIMATIONS AND KEYFRAMES
═══════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,229,180,0.4); }
  50%       { opacity: 0.6; box-shadow: 0 0 0 4px rgba(0,229,180,0); }
}

/* ═══════════════════════════════════════════════════════════
   18. MOBILE BREAKPOINT
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body {
    flex-direction: column;
    height: 100dvh;
  }

  aside {
    width: 100%;
    min-width: unset;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border2);
    flex-shrink: 0;
  }

  aside::before { display: none; }

  .sidebar-inner {
    padding: 10px 16px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    height: auto;
    scrollbar-width: none;
  }

  .sidebar-inner::-webkit-scrollbar { display: none; }

  .identity {
    display: none;
  }

  .sidebar-footer { display: none; }

  nav {
    flex: unset;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    min-width: 0;
  }

  .nav-section-label { display: none; }
  .nav-divider { display: none; }

  nav ul {
    display: flex;
    flex-direction: row;
    gap: 4px;
    margin-bottom: 0;
  }

  nav ul li { margin-bottom: 0; }

  .nav-item {
    padding: 6px 10px;
    font-size: 11px;
    gap: 6px;
    white-space: nowrap;
  }

  .nav-arrow { display: none; }
  .nav-chip { display: none; }

  main { flex: 1; min-height: 0; }

  .content-topbar {
    padding: 0 16px;
  }

  .location-pill,
  .status-pill { display: none; }

  .content-scroll {
    padding: 24px 20px 40px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-heading { font-size: 32px; }

  .sections-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row-two {
    grid-template-columns: 1fr;
  }

  .panel-header-row {
    flex-direction: column;
    gap: 12px;
  }

  .exp-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .iframe-panel.active {
    height: calc(100dvh - 60px - 44px);
  }
}
