/* ============ rohan-os ============ */
:root {
  --bg: #0a0e12;
  --bg2: #0d1319;
  --panel: #10171f;
  --panel-edge: #1e2a36;
  --green: #4af38b;
  --green-dim: #2c8f55;
  --blue: #61b0ff;
  --cyan: #5ee7df;
  --amber: #ffc866;
  --red: #ff5f56;
  --yellow: #ffbd2e;
  --lime: #27c93f;
  --text: #c9d7e2;
  --text-dim: #718499;
  --mono: "JetBrains Mono", "SF Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  font-size: 14px;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* CRT scanline overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 1px, transparent 1px 3px);
  z-index: 9999;
  opacity: .35;
}

.cursor { animation: blink 1s steps(1) infinite; color: var(--green); }
@keyframes blink { 50% { opacity: 0; } }

/* ============ BOOT ============ */
#boot {
  position: fixed; inset: 0;
  background: #05080b;
  z-index: 500;
  padding: 6vh 6vw;
  cursor: pointer;
}
#boot-text {
  color: var(--green);
  font-size: clamp(11px, 1.4vw, 14px);
  line-height: 1.6;
  white-space: pre-wrap;
  text-shadow: 0 0 8px rgba(74,243,139,.35);
}
#boot-skip {
  position: absolute; bottom: 4vh; left: 6vw;
  color: var(--text-dim); font-size: 12px;
  animation: blink 1.6s steps(1) infinite;
}
#boot.fade { animation: bootFade .5s forwards; }
@keyframes bootFade { to { opacity: 0; visibility: hidden; } }

/* ============ DESKTOP ============ */
#desktop {
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 700px at 70% 20%, rgba(38,64,90,.35), transparent 60%),
    radial-gradient(900px 600px at 20% 85%, rgba(24,80,54,.25), transparent 60%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
  animation: deskIn .6s ease;
}
@keyframes deskIn { from { opacity: 0; } }

/* grid texture */
#desktop::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(110,160,200,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110,160,200,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
}

/* ============ MENUBAR ============ */
#menubar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 30px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px;
  background: rgba(10,15,20,.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-edge);
  font-size: 12.5px;
  z-index: 300;
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 16px; }
.mb-logo { color: var(--green); }
.mb-title { color: var(--text); font-weight: 700; }
.mb-item { color: var(--text-dim); cursor: pointer; }
.mb-item:hover { color: var(--green); }
#mb-status { color: var(--green-dim); font-size: 11.5px; }
#mb-clock { color: var(--text-dim); }

/* ============ ICONS ============ */
#icons {
  position: absolute; top: 52px; left: 22px;
  display: flex; flex-direction: column; gap: 6px;
  z-index: 10;
}
.icon {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 96px; padding: 12px 6px 10px;
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  color: var(--text); font-family: var(--mono); font-size: 12px;
  cursor: pointer;
}
.icon:hover { background: rgba(94,231,223,.07); border-color: rgba(94,231,223,.18); }
.icon:active { transform: scale(.96); }
.icon-glyph { font-size: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.icon-label { color: var(--green); text-shadow: 0 1px 3px rgba(0,0,0,.8); }

/* ============ HERO ============ */
#hero {
  position: absolute; right: 6vw; top: 30vh;
  text-align: right;
  pointer-events: none;
  z-index: 5;
}
.hero-line1 {
  font-size: clamp(28px, 4.4vw, 56px);
  font-weight: 800; letter-spacing: -1px;
  color: var(--text);
  text-shadow: 0 0 30px rgba(97,176,255,.25);
}
.hero-line2 { color: var(--green); font-size: clamp(14px, 1.6vw, 20px); margin-top: 10px; }
.hero-line3 { color: var(--text-dim); font-size: clamp(11px, 1.2vw, 14px); margin-top: 8px; }

/* ============ WINDOWS ============ */
.window {
  position: absolute;
  min-width: 320px;
  width: min(620px, 92vw);
  background: rgba(13,19,26,.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  box-shadow: 0 18px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(0,0,0,.4);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: winIn .18s ease;
}
@keyframes winIn { from { opacity: 0; transform: scale(.92) translateY(10px); } }
.window.closing { animation: winOut .15s ease forwards; }
@keyframes winOut { to { opacity: 0; transform: scale(.92) translateY(8px); } }
.window.maxed {
  top: 38px !important; left: 8px !important;
  width: calc(100vw - 16px) !important;
  height: calc(100vh - 100px) !important;
}
.window.focused { border-color: #2e4256; box-shadow: 0 24px 80px rgba(0,0,0,.75), 0 0 24px rgba(74,243,139,.06); }

.titlebar {
  display: flex; align-items: center;
  height: 36px; padding: 0 12px;
  background: linear-gradient(180deg, #16202b, #121a23);
  border-bottom: 1px solid var(--panel-edge);
  cursor: grab; user-select: none;
  flex: none;
}
.titlebar:active { cursor: grabbing; }
.lights { display: flex; gap: 8px; }
.light {
  width: 13px; height: 13px; border-radius: 50%;
  border: none; cursor: pointer; padding: 0;
  position: relative;
  font-size: 9px; line-height: 13px; color: transparent; font-family: var(--mono);
}
.light:hover { color: rgba(0,0,0,.6); font-weight: 700; }
.light-close { background: var(--red); }
.light-min { background: var(--yellow); }
.light-max { background: var(--lime); }
.win-title {
  flex: 1; text-align: center;
  font-size: 12.5px; color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 8px;
}
.win-title .wt-glyph { margin-right: 6px; }
.titlebar-spacer { width: 55px; }

.win-content { overflow: auto; flex: 1; min-height: 0; }
.window:not(.maxed) .win-content { max-height: min(56vh, 520px); }

/* scrollbars */
.win-content::-webkit-scrollbar { width: 10px; }
.win-content::-webkit-scrollbar-thumb { background: #223140; border-radius: 5px; }
.win-content::-webkit-scrollbar-track { background: transparent; }

/* ============ APP CONTENT ============ */
.app-body { padding: 18px 22px 22px; line-height: 1.65; font-size: 13.5px; }
.app-body p { margin: 8px 0; }
.app-body strong { color: var(--cyan); font-weight: 600; }
.prompt-line { color: var(--text-dim); margin: 12px 0 8px; }
.p-green { color: var(--green); }
.p-blue { color: var(--blue); }
.ascii { color: var(--green); font-size: 10px; line-height: 1.15; text-shadow: 0 0 10px rgba(74,243,139,.3); margin-bottom: 6px; }
.hint { color: var(--text-dim); font-style: italic; }

.fact-list { list-style: none; margin: 10px 0; }
.fact-list li { padding: 3px 0; }
.fact-list .k {
  display: inline-block; min-width: 96px;
  color: var(--amber);
}
.fact-list .k::after { content: " ="; color: var(--text-dim); }

/* projects */
.project {
  border: 1px solid var(--panel-edge);
  border-left: 3px solid var(--green-dim);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 10px 0;
  background: rgba(255,255,255,.015);
}
.project:hover { border-left-color: var(--green); background: rgba(74,243,139,.03); }
.proj-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.proj-name { color: var(--blue); font-weight: 700; }
.proj-date { color: var(--text-dim); font-size: 11.5px; margin-left: auto; }
.proj-link { font-size: 12px; }
.project p { color: var(--text); font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span {
  font-size: 11px; padding: 2px 8px;
  border: 1px solid rgba(94,231,223,.25); border-radius: 20px;
  color: var(--cyan);
}

/* experience */
.xp { margin: 14px 0; padding-left: 14px; border-left: 2px solid var(--panel-edge); }
.xp:hover { border-left-color: var(--green); }
.xp-head { color: var(--text); }
.xp-role { color: var(--amber); font-weight: 700; }
.xp-meta { color: var(--text-dim); font-size: 11.5px; margin: 2px 0 4px; }
.xp p { font-size: 13px; margin: 4px 0 0; }

/* skills */
.json { background: rgba(0,0,0,.3); border: 1px solid var(--panel-edge); border-radius: 6px; padding: 14px; font-size: 12px; line-height: 1.7; overflow-x: auto; }
.j-key { color: var(--blue); }
.j-str { color: var(--green); }
.bars { margin-top: 16px; }
.bar-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.bar-label { width: 140px; flex: none; font-size: 12px; color: var(--text); }
.bar { flex: 1; height: 10px; background: rgba(255,255,255,.05); border-radius: 5px; overflow: hidden; }
.bar-fill {
  height: 100%; width: var(--w);
  background: linear-gradient(90deg, var(--green-dim), var(--green));
  border-radius: 5px;
  animation: growBar 1s ease both;
}
@keyframes growBar { from { width: 0; } }

/* contact */
.contact-list .k { min-width: 110px; }

/* ============ TERMINAL APP ============ */
.term-body { padding: 14px 16px; display: flex; flex-direction: column; min-height: 260px; }
.term-out { white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.55; }
.term-out .t-dim { color: var(--text-dim); }
.term-out .t-green { color: var(--green); }
.term-out .t-amber { color: var(--amber); }
.term-out .t-blue { color: var(--blue); }
.term-out .t-red { color: var(--red); }
.term-out a { color: var(--cyan); }
.term-input-row { display: flex; align-items: center; margin-top: 6px; font-size: 13px; }
.term-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--mono); font-size: 13px;
  caret-color: var(--green);
}

/* ============ DOCK ============ */
#dock {
  position: absolute; bottom: 12px; left: 50%;
  transform: translateX(-50%);
  z-index: 350;
}
#dock-items {
  display: flex; gap: 8px; align-items: center;
  padding: 8px 12px;
  background: rgba(10,15,20,.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-edge);
  border-radius: 14px;
  min-height: 46px;
}
#dock-items:empty { display: none; }
.dock-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid transparent; border-radius: 9px;
  color: var(--text); font-family: var(--mono); font-size: 12px;
  cursor: pointer;
}
.dock-item:hover { border-color: rgba(94,231,223,.3); background: rgba(94,231,223,.08); }
.dock-item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex: none; }
.dock-item.minimized .dot { background: var(--yellow); }

/* ============ MOBILE ============ */
@media (max-width: 720px) {
  #icons {
    top: 44px; left: 10px; right: 10px;
    flex-direction: row; flex-wrap: wrap; justify-content: flex-start;
  }
  .icon { width: 84px; }
  #hero { right: 16px; left: 16px; top: auto; bottom: 90px; text-align: left; }
  .window {
    top: 40px !important; left: 4vw !important;
    width: 92vw !important;
  }
  .window:not(.maxed) .win-content { max-height: 58vh; }
  .mb-item { display: none; }
}
