/* =====================================================================
   ANIK SHRESTHA — SYSTEM PORTFOLIO
   Theme: amber-phosphor NOC terminal
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  --void:        #05080c;
  --panel:       #0b1119;
  --panel-2:     #0f1720;
  --line:        #1c2733;
  --text:        #dbe4ea;
  --text-dim:    #5c7280;
  --text-faint:  #384552;
  --amber:       #ffb32c;
  --amber-dim:   #a8792a;
  --cyan:        #4fd8e0;
  --green:       #59d499;
  --red:         #ff5f56;

  --mono-display: 'JetBrains Mono', 'Courier New', monospace;
  --mono-body: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 3px;
  --pad: clamp(16px, 4vw, 28px);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--mono-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection{ background: var(--amber); color: var(--void); }

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

::-webkit-scrollbar{ width: 9px; }
::-webkit-scrollbar-track{ background: var(--void); }
::-webkit-scrollbar-thumb{ background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover{ background: var(--amber-dim); }

button{ font-family: inherit; cursor: pointer; }

/* =====================================================================
   BACKGROUND
   ===================================================================== */
#net-bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .5;
  pointer-events: none;
}

.scanlines{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.018) 0px,
    rgba(255,255,255,0.018) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

.vignette{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.65) 100%);
}

/* =====================================================================
   BOOT SCREEN — with auto-scroll logs
   ===================================================================== */
#boot-screen{
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--void);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .8s ease, visibility .8s ease;
}
#boot-screen.hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-box{
  width: min(640px, 92vw);
  max-width: 640px;
  display: flex;
  flex-direction: column;
  padding: 24px 20px 20px 20px;
  gap: 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.04);
  max-height: 90vh;
}

/* Logo - fixed at top */
.boot-logo{
  flex: 0 0 auto;
  text-align: center;
  padding: 4px 0 8px 0;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-logo img{
  width: 65px;
  height: 65px;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(255,179,44,0.2));
  animation: pulse-glow 1.8s ease-in-out infinite;
}

.boot-logo .logo-fallback{
  font-size: 55px;
  animation: pulse-glow 1.8s ease-in-out infinite;
}

@keyframes pulse-glow{
  0%, 100%{ opacity: .7; filter: drop-shadow(0 0 10px rgba(255,179,44,0.15)); }
  50%{ opacity: 1; filter: drop-shadow(0 0 30px rgba(255,179,44,0.4)); }
}

/* Log area - fixed height with AUTO-SCROLL */
.boot-log{
  flex: 0 0 auto;
  height: 180px;
  font-size: 13px;
  line-height: 1.8;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  text-align: left;
  padding: 10px 14px;
  background: rgba(0,0,0,0.35);
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.05);
  font-family: var(--mono-body);
  scrollbar-width: thin;
  scrollbar-color: var(--amber-dim) transparent;
  margin-bottom: 4px;
  scroll-behavior: smooth;
}

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

.boot-log .ok{ color: var(--green); }
.boot-log .tag{ color: var(--text-dim); }

/* Progress bar - fixed at bottom */
.boot-bar-row{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 12px 4px 4px 4px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 4px;
  min-height: 44px;
  background: rgba(0,0,0,0.15);
  border-radius: 0 0 4px 4px;
}

.boot-bar-track{
  flex: 1;
  height: 5px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}

.boot-bar-fill{
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
  transition: width .12s linear;
  border-radius: 3px;
}

#boot-pct{
  width: 38px;
  text-align: right;
  color: var(--amber);
  font-weight: 700;
  font-size: 13px;
  font-family: var(--mono-display);
}

.boot-bar-row span:first-child{
  font-family: var(--mono-display);
  font-weight: 500;
  color: var(--text-faint);
  letter-spacing: 0.5px;
  min-width: 130px;
}

/* =====================================================================
   WELCOME OVERLAY
   ===================================================================== */
#welcome-overlay{
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--void);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, visibility .8s ease;
}
#welcome-overlay.active{
  opacity: 1;
  visibility: visible;
}
#welcome-overlay.fade-out{
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}

.welcome-content{
  text-align: center;
  max-width: 680px;
  padding: 40px;
}

.welcome-logo img{
  width: 80px;
  height: 80px;
  object-fit: contain;
  animation: pulse-glow 1.8s ease-in-out infinite;
  margin-bottom: 10px;
}

.welcome-logo .logo-fallback{
  font-size: 65px;
  animation: pulse-glow 1.8s ease-in-out infinite;
  display: inline-block;
}

.welcome-title{
  font-family: var(--mono-display);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 44px);
  color: var(--amber);
  letter-spacing: .04em;
  text-shadow: 0 0 60px rgba(255,179,44,0.15);
  min-height: 1.3em;
}

.welcome-title::after{
  content: '█';
  display: inline-block;
  animation: blink-caret 0.8s step-end infinite;
  color: var(--amber);
  margin-left: 2px;
}

.welcome-sub{
  font-size: 15px;
  color: var(--text-dim);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 8px;
  min-height: 1.5em;
}

.welcome-sub::after{
  content: '█';
  display: inline-block;
  animation: blink-caret 0.8s step-end infinite;
  color: var(--amber-dim);
  margin-left: 2px;
  font-size: 12px;
}

@keyframes blink-caret{
  0%, 100%{ opacity: 1; }
  50%{ opacity: 0; }
}

.welcome-divider{
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber-dim), transparent);
  margin: 24px auto;
  opacity: 0;
  transition: opacity .8s ease 1s;
}
#welcome-overlay.active .welcome-divider{
  opacity: 1;
}

.welcome-btn{
  display: inline-block;
  padding: 12px 32px;
  border: 2px solid var(--amber);
  color: var(--amber);
  font-family: var(--mono-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease, background .3s ease, color .3s ease;
}
.welcome-btn.show{
  opacity: 1;
  transform: translateY(0);
}
.welcome-btn:hover{
  background: var(--amber);
  color: var(--void);
}

/* =====================================================================
   STATUS BAR
   ===================================================================== */
#status-bar{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 0;
  height: 30px;
  background: var(--panel);
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--text-dim);
  padding: 0 10px;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .6s ease .3s, transform .6s ease .3s;
}
#status-bar.show{ opacity: 1; transform: translateY(0); }

.status-seg{
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.status-seg:last-child{ border-right: none; }
.status-seg.grow{ flex: 1; overflow: hidden; text-overflow: ellipsis; }
.status-dot{
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot{ 50%{ opacity: .35; } }
.status-label{ color: var(--text-faint); }
.status-val{ color: var(--text); }

@media (max-width: 720px){
  .status-seg.hide-mobile{ display: none; }
}

/* =====================================================================
   SITE LAYOUT
   ===================================================================== */
#site{
  position: relative;
  z-index: 5;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--pad) 90px;
}

header.topnav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5,8,12,0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  margin: 0 calc(-1 * var(--pad));
  padding: 0 var(--pad);
}
.topnav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}
.brand{
  font-family: var(--mono-display);
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
  letter-spacing: .02em;
}
.brand .prompt{ color: var(--green); }
.brand .path{ color: var(--cyan); }
.brand .caret{ color: var(--amber); }

nav.cmds{
  display: flex;
  gap: 2px;
  overflow-x: auto;
}
nav.cmds a{
  color: var(--text-dim);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius);
  white-space: nowrap;
}
nav.cmds a:hover, nav.cmds a:focus-visible{
  color: var(--amber);
  background: rgba(255,179,44,0.08);
  text-decoration: none;
  outline: none;
}
nav.cmds a::before{ content: "./"; color: var(--text-faint); }

.term{
  margin-top: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--void) 130%);
  box-shadow: 0 20px 60px -25px rgba(0,0,0,0.8);
  overflow: hidden;
}
.term-bar{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.term-dot{ width: 10px; height: 10px; border-radius: 50%; }
.term-dot.r{ background: #ff5f56; }
.term-dot.y{ background: #ffbd2e; }
.term-dot.g{ background: #27c93f; }
.term-title{
  margin-left: 6px;
  font-size: 12px;
  color: var(--text-faint);
}
.term-body{ padding: var(--pad); }

section{ scroll-margin-top: 74px; }

.eyebrow{
  font-size: 12px;
  color: var(--amber);
  letter-spacing: .06em;
  margin: 0 0 6px;
}
h2.sec-title{
  font-family: var(--mono-display);
  font-weight: 700;
  font-size: clamp(20px, 3vw, 26px);
  color: var(--text);
  margin: 0 0 20px;
  letter-spacing: -.01em;
}
h2.sec-title .hash{ color: var(--text-faint); font-weight: 400; }

/* =====================================================================
   HERO
   ===================================================================== */
.hero-term{ margin-top: 24px; }
.hero-line{ display: flex; gap: 8px; flex-wrap: wrap; }
.hero-prompt{ color: var(--green); }
.hero-cmd{ color: var(--text); }

.hero-name{
  font-family: var(--mono-display);
  font-weight: 800;
  font-size: clamp(30px, 6vw, 48px);
  margin: 14px 0 2px;
  color: var(--text);
  letter-spacing: -.02em;
}
.hero-role{
  color: var(--amber);
  font-size: clamp(14px, 2.4vw, 17px);
  margin: 0 0 18px;
  font-weight: 600;
}
.hero-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.hero-meta span{ color: var(--text-faint); }
.hero-tagline{
  max-width: 62ch;
  color: var(--text-dim);
  margin: 0 0 24px;
}
.hero-actions{ display: flex; gap: 12px; flex-wrap: wrap; }
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid var(--line);
  color: var(--text);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.btn:hover{ text-decoration: none; }
.btn.primary{
  background: var(--amber);
  color: var(--void);
  border-color: var(--amber);
  font-weight: 700;
}
.btn.primary:hover{ background: #ffc659; }
.btn.ghost:hover{ border-color: var(--amber); color: var(--amber); }

/* =====================================================================
   ABOUT
   ===================================================================== */
.about-text p{ color: var(--text-dim); margin: 0 0 14px; max-width: 68ch; }
.about-text strong{ color: var(--text); font-weight: 600; }

/* =====================================================================
   EXPERIENCE
   ===================================================================== */
.log-entry{
  border-left: 2px solid var(--line);
  padding: 2px 0 26px 20px;
  position: relative;
}
.log-entry:last-child{ padding-bottom: 4px; }
.log-entry::before{
  content: "";
  position: absolute;
  left: -6px; top: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--void);
  border: 2px solid var(--amber);
}
.log-entry.current::before{
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}
.log-head{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.log-role{ font-family: var(--mono-display); font-weight: 700; color: var(--text); font-size: 15px; }
.log-org{ color: var(--cyan); font-size: 13px; }
.log-time{
  font-size: 11px;
  color: var(--void);
  background: var(--amber);
  padding: 2px 7px;
  border-radius: 3px;
  font-weight: 700;
  white-space: nowrap;
}
.log-entry:not(.current) .log-time{ background: var(--line); color: var(--text-dim); }
.log-list{ margin: 8px 0 0; padding-left: 18px; color: var(--text-dim); }
.log-list li{ margin-bottom: 5px; }
.log-list li::marker{ color: var(--text-faint); }

/* =====================================================================
   SKILLS
   ===================================================================== */
.skill-cat{ margin-bottom: 30px; }
.skill-cat:last-child{ margin-bottom: 0; }
.skill-cat-title{
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: .07em;
  text-transform: uppercase;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.skill-cat-title::after{
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.skill-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.skill-card{
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.skill-card:hover, .skill-card:focus-visible{
  transform: translateY(-3px);
  border-color: var(--amber-dim);
  background: rgba(255,179,44,0.06);
  outline: none;
}
.skill-icon{
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  opacity: .7;
  transition: opacity .15s ease, transform .15s ease;
}
.skill-card:hover .skill-icon{ opacity: 1; transform: scale(1.08); }
.skill-icon img{ width: 30px; height: 30px; object-fit: contain; }
.skill-icon .monogram{
  display: none;
  width: 30px; height: 30px;
  border: 1px solid var(--amber-dim);
  border-radius: 50%;
  align-items: center; justify-content: center;
  font-family: var(--mono-display);
  font-weight: 700;
  font-size: 11px;
  color: var(--amber);
}
.skill-name{ color: var(--text); font-weight: 500; line-height: 1.3; }

/* =====================================================================
   SKILL MODAL
   ===================================================================== */
#modal-backdrop{
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2,4,7,0.78);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
#modal-backdrop.open{ opacity: 1; visibility: visible; }

.modal{
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--amber-dim);
  border-radius: 6px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.9);
  transform: scale(.92) translateY(10px);
  opacity: 0;
  transition: transform .28s cubic-bezier(.2,.9,.3,1.2), opacity .22s ease;
}
#modal-backdrop.open .modal{ transform: scale(1) translateY(0); opacity: 1; }

.modal-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.modal-bar-title{ font-size: 12px; color: var(--text-faint); }
.modal-close{
  background: none; border: none;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1;
  padding: 4px 6px;
}
.modal-close:hover{ color: var(--red); }

.modal-body{ padding: 22px; }
.modal-head{ display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.modal-icon{ width: 40px; height: 40px; flex-shrink: 0; }
.modal-icon img{ width: 40px; height: 40px; object-fit: contain; }
.modal-name{ font-family: var(--mono-display); font-weight: 700; font-size: 17px; color: var(--text); }
.modal-cat{ font-size: 11px; color: var(--amber); margin-top: 2px; }

.modal-desc{
  color: var(--text-dim);
  font-size: 13.5px;
  border-left: 2px solid var(--line);
  padding-left: 12px;
  min-height: 60px;
}
.type-cursor{
  display: inline-block;
  width: 7px; height: 14px;
  background: var(--amber);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}

/* =====================================================================
   EDUCATION
   ===================================================================== */
table.edu{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.edu th{
  text-align: left;
  color: var(--text-faint);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 0 10px 8px;
  border-bottom: 1px solid var(--line);
}
table.edu td{
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
}
table.edu tr:last-child td{ border-bottom: none; }
table.edu td.deg{ color: var(--text); }
table.edu td.gpa{ color: var(--amber); font-weight: 600; }

.chips{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip{
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}

/* =====================================================================
   CONTACT
   ===================================================================== */
.contact-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.contact-item{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--panel-2);
}
.contact-item .k{ font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.contact-item .v{ color: var(--text); font-size: 14px; word-break: break-word; }
.contact-item .v a{ color: var(--cyan); }

/* =====================================================================
   FOOTER
   ===================================================================== */
footer.sys-exit{
  margin-top: 46px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  padding-bottom: 20px;
}
footer.sys-exit .exit-line{ color: var(--text-dim); margin-bottom: 6px; }

/* =====================================================================
   REVEAL ON SCROLL
   ===================================================================== */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in{ opacity: 1; transform: translateY(0); }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 640px){
  nav.cmds a::before{ content: ""; }
  .term-body{ padding: 16px; }
  .skill-grid{ grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); }
  .boot-log{
    height: 140px;
    font-size: 12px;
    line-height: 1.6;
    padding: 8px 10px;
  }
  .boot-logo img{
    width: 50px;
    height: 50px;
  }
  .boot-bar-row{
    font-size: 11px;
    padding: 10px 2px 2px 2px;
    min-height: 38px;
    gap: 10px;
  }
  #boot-pct{
    width: 30px;
    font-size: 11px;
  }
  .boot-box{
    padding: 16px 12px 14px 12px;
    gap: 8px;
  }
  .boot-bar-row span:first-child{
    min-width: 100px;
    font-size: 10px;
  }
}

@media (max-height: 600px){
  .boot-log{
    height: 100px;
    font-size: 11px;
    line-height: 1.5;
  }
  .boot-logo img{
    width: 40px;
    height: 40px;
  }
  .boot-box{
    padding: 12px 12px 10px 12px;
    gap: 6px;
  }
  .boot-bar-row{
    padding: 6px 2px 0 2px;
    min-height: 30px;
    font-size: 10px;
  }
  .boot-logo{
    min-height: 50px;
    padding: 2px 0 4px 0;
  }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}


/* =====================================================================
   DOCUMENTATION (added — does not touch existing UI)
   ===================================================================== */
.doc-intro{
  color: var(--text-dim);
  margin: 0 0 22px;
  max-width: 68ch;
  font-size: 14px;
}
.doc-block{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  margin-bottom: 10px;
  overflow: hidden;
}
.doc-block summary{
  padding: 12px 16px;
  cursor: pointer;
  color: var(--cyan);
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
  transition: background .15s ease;
}
.doc-block summary::-webkit-details-marker{ display: none; }
.doc-block summary::before{
  content: "▸";
  color: var(--amber);
  font-size: 12px;
  transition: transform .15s ease;
}
.doc-block[open] summary::before{ transform: rotate(90deg); }
.doc-block summary:hover{
  background: rgba(255,179,44,0.06);
}
.doc-body{
  padding: 4px 16px 18px;
  border-top: 1px solid var(--line);
}
.doc-body h4{
  font-family: var(--mono-display);
  font-size: 13px;
  color: var(--amber);
  margin: 16px 0 8px;
  font-weight: 600;
}
.doc-body h4:first-child{ margin-top: 12px; }
.doc-body pre{
  background: var(--void);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
  margin: 0 0 6px;
  font-family: var(--mono-body);
}

/* ===================== INTERACTIVE TERMINAL ===================== */
#cmd-output{
  height: 360px;
  overflow-y: auto;
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono-body);
}
#cmd-output::-webkit-scrollbar{ width:8px; }
#cmd-output::-webkit-scrollbar-thumb{ background: var(--line); border-radius:4px; }

.cmd-line{ margin-bottom: 6px; }
.cmd-prompt{ color: var(--green, #4ade80); }
.cmd-path{ color: var(--cyan); }
.cmd-echo{ color: var(--text); }
.cmd-key{ color: var(--amber); font-weight:600; }
.cmd-dim{ color: #6b7885; }
.cmd-error{ color: #ff6b6b; }
.cmd-link{ color: var(--cyan); text-decoration: underline; }

.cmd-inputrow{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 10px 18px 14px;
  border-top: 1px solid var(--line);
}
.cmd-inputrow .cmd-prompt{ white-space:nowrap; }
#cmd-input{
  flex:1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--mono-body);
  font-size: 13.5px;
  caret-color: var(--amber);
}

/* ===================== COPY BUTTON ===================== */
.copy-btn{
  position:absolute;
  top:8px;
  right:8px;
  background: var(--panel, #0f1419);
  border:1px solid var(--line);
  color: var(--cyan);
  font-family: var(--mono-body);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor:pointer;
  opacity: 0;
  transition: opacity .15s ease;
}
pre:hover .copy-btn{ opacity: 1; }
.copy-btn:hover{ background: rgba(255,179,44,0.12); }
