/* ============================================================
   shakhzod.sys — terminal/monitor portfolio
   ============================================================ */

:root {
  --bg:        #0a0d0c;
  --bg-2:      #0f1413;
  --panel:     #111716;
  --panel-2:   #161e1c;
  --line:      #1e2825;
  --line-2:    #2a3833;
  --fg:        #d6e2dd;
  --fg-2:      #9aa8a3;
  --muted:     #5d6d68;
  --warn:      #ffb86b;
  --err:       #ff6b6b;
  --accent:    #7cffb2;
  --accent-rgb: 124, 255, 178;

  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-display: "JetBrains Mono", ui-monospace, monospace;

  --maxw: 1320px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(var(--accent-rgb), 0.06), transparent 60%),
    radial-gradient(ellipse 60% 50% at 110% 110%, rgba(var(--accent-rgb), 0.04), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

/* faint scanlines + grain layered on top of everything */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.014) 0px,
    rgba(255,255,255,0.014) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 1;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}
.page--no-grain ~ body::after { display: none; }

a { color: inherit; text-decoration: none; }

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

::selection { background: rgba(var(--accent-rgb), 0.25); color: #fff; }

/* ---------- boot ------------------------------------------- */

.boot {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 100;
  display: grid;
  align-items: flex-start;
  padding: 14vh 8vw;
  font-size: 13px;
  color: var(--fg-2);
  transition: opacity 280ms ease;
}
.boot--out { opacity: 0; pointer-events: none; }
.boot__inner {
  white-space: pre-wrap;
  font-family: var(--font-mono);
}
.boot__line { animation: typeIn 180ms ease forwards; opacity: 0; }
.boot__line:nth-child(n) { animation-delay: 0ms; opacity: 1; }
.boot__line:last-of-type { color: var(--accent); }
.boot__caret {
  display: inline-block;
  color: var(--accent);
  animation: blink 900ms steps(1) infinite;
}
@keyframes typeIn { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- page shell ------------------------------------- */

.page {
  position: relative;
  z-index: 3;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 32px 64px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 360ms ease, transform 360ms ease;
}
.page--in { opacity: 1; transform: none; }

/* ---------- header ----------------------------------------- */

.head__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  font-size: 12px;
  margin-bottom: 28px;
}
.head__bar-l, .head__bar-r {
  display: flex; align-items: center; gap: 10px;
}

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.7);
  animation: pulse 1.6s ease-in-out infinite;
}
.dot--warn { background: var(--warn); box-shadow: 0 0 8px rgba(255,184,107,0.6); }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.7); opacity: 0.6; }
}

.head__main {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  padding: 24px 0 36px;
  border-bottom: 1px dashed var(--line-2);
}

.head__name-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.head__name {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
}
.badge--avail {
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

.head__headline {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--fg);
  margin: 18px 0 22px;
  max-width: 56ch;
  line-height: 1.45;
}
.head__headline::before { content: "> "; color: var(--accent); }

.meta { margin: 0; }
.meta__row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 16px;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px dashed transparent;
}
.meta__row dt { color: var(--muted); }
.meta__row dd { margin: 0; color: var(--fg); }

.head__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-self: start;
}
.stat {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px 16px;
  border-radius: 4px;
  position: relative;
}
.stat::before {
  content: "";
  position: absolute; top: 8px; right: 10px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}
.stat__label {
  font-size: 11px;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}
.stat__value {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 4px 0 2px;
  color: var(--fg);
  font-feature-settings: "tnum";
}
.stat__sub { font-size: 11px; color: var(--fg-2); }

/* ---------- main grid -------------------------------------- */

.main {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 28px;
  padding-top: 32px;
}
.col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 14px;
  font-size: 12px;
}
.section__tag {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.section__tag::before { content: "▸ "; }

/* ---------- timeline --------------------------------------- */

.tl__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 4px;
  overflow: hidden;
}
.tl__list {
  list-style: none;
  margin: 0; padding: 0;
  border-right: 1px solid var(--line);
}
.tl__row {
  display: grid;
  grid-template-columns: 28px 14px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px 14px;
  border-bottom: 1px dashed var(--line-2);
  cursor: pointer;
  outline: none;
  transition: background 120ms ease, color 120ms ease;
}
.tl__row:last-child { border-bottom: 0; }
.tl__row:hover, .tl__row--on, .tl__row:focus-visible {
  background: rgba(var(--accent-rgb), 0.05);
}
.tl__row--on { box-shadow: inset 2px 0 0 0 var(--accent); }
.tl__idx { color: var(--muted); font-size: 11px; }
.tl__rule {
  display: block;
  height: 1px;
  background: var(--line-2);
}
.tl__row--on .tl__rule { background: var(--accent); }
.tl__role { font-weight: 600; color: var(--fg); }
.tl__co { font-size: 12px; color: var(--fg-2); display: flex; align-items: center; gap: 8px; }
.tl__period { font-size: 11px; white-space: nowrap; }

.pill {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.06);
}

.tl__detail {
  padding: 20px 22px;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb),0.03), transparent 40%),
    var(--panel-2);
  display: flex; flex-direction: column; gap: 16px;
  animation: fadeIn 200ms ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

.tl__detail-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
}
.tl__detail-role {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.tl__detail-co { color: var(--accent); font-size: 13px; margin-top: 2px; }
.tl__detail-meta { font-size: 11px; text-align: right; line-height: 1.6; }

.tl__detail-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  border-radius: 3px;
  color: var(--fg-2);
}

.tl__detail-notes {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12.5px;
  color: var(--fg);
}
.tl__detail-notes li::marker { content: ""; }

.tl__detail-foot {
  margin-top: auto;
  padding-top: 14px;
  font-size: 11px;
  border-top: 1px dashed var(--line-2);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ---------- stack monitor ---------------------------------- */

.stack__head, .stack__row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 0.6fr 1.4fr;
  gap: 14px;
  align-items: center;
  padding: 8px 14px;
  font-size: 12.5px;
}
.stack__head {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 4px 4px 0 0;
}
.stack__list {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
  background: var(--panel);
}
.stack__row {
  border-bottom: 1px dashed var(--line-2);
  transition: background 120ms ease;
}
.stack__row:last-child { border-bottom: 0; }
.stack__row:hover { background: rgba(var(--accent-rgb), 0.04); }
.stack__name { font-weight: 600; }
.stack__years { color: var(--fg-2); font-feature-settings: "tnum"; }
.stack__bar { display: inline-flex; gap: 3px; }
.stack__seg {
  display: inline-block;
  width: 14px; height: 8px;
  background: var(--line-2);
  border-radius: 1px;
}
.stack__seg.on {
  background: var(--accent);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.5);
}

/* ---------- ticker ----------------------------------------- */

.ticker__list {
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 4px;
  font-size: 11.5px;
  overflow: hidden;
}
.ticker__row {
  display: grid;
  grid-template-columns: auto 1fr 1.2fr auto auto;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px dashed var(--line-2);
  align-items: center;
}
.ticker__row:last-child { border-bottom: 0; }
.ticker__t { color: var(--muted); font-feature-settings: "tnum"; }
.ticker__svc { color: var(--fg); }
.ticker__ver { color: var(--fg-2); font-feature-settings: "tnum"; }
.ticker__st--ok { color: var(--accent); }
.ticker__st--archived { color: var(--muted); }

/* ---------- cli -------------------------------------------- */

.cli__screen {
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 100% at 50% 0%, rgba(var(--accent-rgb), 0.04), transparent 70%),
    var(--panel-2);
  border-radius: 4px;
  padding: 16px 18px;
  height: 320px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.55;
  cursor: text;
  position: relative;
}
.cli__screen::before {
  content: "";
  position: absolute; top: 10px; right: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
  animation: pulse 1.6s ease-in-out infinite;
}
.cli__line { white-space: pre-wrap; word-break: break-word; }
.cli__line--in { color: var(--fg); }
.cli__line--out { color: var(--fg-2); }
.cli__line--err { color: var(--err); }
.cli__line--current { display: flex; align-items: center; cursor: text; }
.cli__ps { color: var(--accent); margin-right: 8px; }
.cli__field {
  position: relative;
  flex: 1;
  display: block;
  min-height: 1.55em;
}
.cli__text {
  display: inline;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--fg);
  pointer-events: none;
}
.cli__input {
  position: absolute;
  inset: 0;
  width: 100%;
  background: transparent;
  border: 0; outline: none;
  color: transparent;
  font: inherit;
  caret-color: transparent;
  padding: 0;
}
.cli__caret {
  display: inline-block;
  color: var(--accent);
  margin-left: 1px;
  animation: blink 900ms steps(1) infinite;
  vertical-align: baseline;
}

/* ---------- contact ---------------------------------------- */

.contact__list {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 4px;
  overflow: hidden;
}
.contact__row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px dashed var(--line-2);
  font-size: 12.5px;
}
.contact__row:last-child { border-bottom: 0; }
.contact__k { letter-spacing: 0.05em; }
.contact__v {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  color: var(--fg);
  position: relative;
  transition: color 120ms ease;
}
.contact__v:hover { color: var(--accent); }
.contact__arrow { color: var(--muted); transition: transform 160ms ease, color 120ms ease; }
.contact__v:hover .contact__arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.contact__cta {
  margin-top: 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
}
.contact__cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 4px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 120ms ease, transform 120ms ease;
}
.contact__cta-btn:hover {
  background: rgba(var(--accent-rgb), 0.15);
  transform: translateY(-1px);
}

/* ---------- foot ------------------------------------------- */

.foot {
  margin-top: 60px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-2);
  display: flex; justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* ---------- tweaks panel preset chips ---------------------- */

.preset {
  height: 28px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
}
.preset:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.4); }

/* ---------- responsive ------------------------------------- */

@media (max-width: 1080px) {
  .head__main { grid-template-columns: 1fr; }
  .main { grid-template-columns: 1fr; }
  .tl__grid { grid-template-columns: 1fr; }
  .tl__list { border-right: 0; border-bottom: 1px solid var(--line); }
  .stack__head, .stack__row { grid-template-columns: 1.6fr 0.8fr 0.6fr 1fr; }
  .ticker__row { grid-template-columns: auto 1fr auto auto; }
  .ticker__org { display: none; }
}
@media (max-width: 640px) {
  .page { padding: 18px 16px 40px; }
  .head__bar { font-size: 11px; }
  .head__stats { grid-template-columns: 1fr 1fr; }
  .stack__head, .stack__row { grid-template-columns: 1.4fr 0.6fr 1fr; }
  .stack__tag { display: none; }
  .ticker__t { display: none; }
  .ticker__row { grid-template-columns: 1fr auto auto; }
  .contact__row { grid-template-columns: 70px 1fr; }
}
