/* ===========================================================
   TOKENS
   =========================================================== */
:root {
  /* color */
  --bg: #0D1117;
  --panel: #161B22;
  --panel-border: #21262D;
  --text: #E6EDF3;
  --text-muted: #8B949E;
  --accent: #39FF88;
  --accent-dim: #1FA85C;
  --critical: #FF5C5C;
  --warn: #F2C744;

  /* type */
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;
  --font-sans: 'Inter', -apple-system, sans-serif;

  /* layout */
  --max-w: 1140px;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* faint scanline texture, very subtle */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.025;
  background-image: repeating-linear-gradient(
    0deg, #fff 0px, #fff 1px, transparent 1px, transparent 3px
  );
}

/* ===========================================================
   TOPBAR
   =========================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--panel-border);
}

.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand-prompt { color: var(--accent); }

.topnav {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.topnav a:hover { color: var(--accent); }

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 88px 24px 64px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: 999px;
  padding: 5px 12px;
  margin: 0 0 24px;
  background: rgba(57, 255, 136, 0.06);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-avatar {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--accent-dim);
  border-radius: 8px;
  filter: grayscale(35%) contrast(1.05);
  flex-shrink: 0;
}

.cursor {
  color: var(--accent);
  animation: blink 1.1s step-end infinite;
}

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

.hero-role {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 18px;
}

.hero-blurb {
  color: var(--text-muted);
  font-size: 15.5px;
  max-width: 480px;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--radius);
  display: inline-block;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #06190E;
}
.btn-primary:hover { transform: translateY(-1px); background: #58ff9d; }

.btn-ghost {
  border: 1px solid var(--panel-border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* hero terminal panel */
.hero-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
}

.panel-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.panel-dot.red { background: #FF5F56; }
.panel-dot.yellow { background: #FFBD2E; }
.panel-dot.green { background: #27C93F; }

.panel-title {
  margin-left: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.panel-body {
  margin: 0;
  padding: 16px;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--accent);
  min-height: 280px;
  white-space: pre-wrap;
  word-break: break-word;
}

.panel-body .line-muted { color: var(--text-muted); }
.panel-body .line-warn { color: var(--warn); }
.panel-body .line-crit { color: var(--critical); }

/* ===========================================================
   SECTIONS (shared)
   =========================================================== */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 24px;
  border-top: 1px solid var(--panel-border);
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  margin: 0 0 14px;
  letter-spacing: 0.03em;
}

.section-title {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  margin: 0 0 8px;
}

.section-sub {
  color: var(--text-muted);
  margin: 0 0 36px;
  font-size: 15px;
}

/* ===========================================================
   ABOUT
   =========================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
}

.about-text h2 {
  font-size: 26px;
  margin: 0 0 18px;
}

.about-text p {
  color: var(--text-muted);
  margin: 0 0 16px;
  font-size: 15.5px;
}

.about-text em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.about-stat-rail {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid var(--panel-border);
  padding-left: 32px;
}

.stat-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--panel-border);
}
.stat-row:last-child { border-bottom: none; }

.stat-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ===========================================================
   TICKET QUEUE (case studies)
   =========================================================== */
.ticket-queue {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.ticket[open] { border-color: var(--accent-dim); }

.ticket-summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 90px 1fr auto auto 20px;
  gap: 16px;
  align-items: center;
}

.ticket-summary::-webkit-details-marker { display: none; }

.ticket-id {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.ticket-name {
  font-weight: 600;
  font-size: 15.5px;
}

.ticket-name .ticket-tagline {
  display: block;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.severity {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.severity-high { background: rgba(255, 92, 92, 0.12); color: var(--critical); }
.severity-medium { background: rgba(242, 199, 68, 0.12); color: var(--warn); }
.severity-resolved { background: rgba(57, 255, 136, 0.12); color: var(--accent); }

.ticket-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.chevron {
  width: 16px; height: 16px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  justify-self: end;
}

.ticket[open] .chevron { transform: rotate(-135deg); }

.ticket-body {
  padding: 0 20px 26px;
  border-top: 1px solid var(--panel-border);
}

.ticket-body-inner {
  padding-top: 20px;
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 32px;
}

.case-field {
  margin-bottom: 18px;
}

.case-field h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.case-field p, .case-field li {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0;
}

.outcome-line {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--accent);
  background: rgba(57, 255, 136, 0.06);
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.55;
}

.outcome-line .prompt {
  color: var(--accent-dim);
  flex-shrink: 0;
}

.case-field ul {
  margin: 0;
  padding-left: 18px;
}
.case-field ul li { margin-bottom: 4px; }

.case-side {
  border-left: 1px solid var(--panel-border);
  padding-left: 24px;
}

.tag-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}

.tag-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 4px 9px;
  border-radius: 4px;
}

.case-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.case-links a:hover { text-decoration: underline; }

/* ===========================================================
   STACK
   =========================================================== */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stack-col h3 {
  font-size: 14px;
  font-family: var(--font-mono);
  color: var(--text);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--panel-border);
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tag-list li {
  font-size: 13.5px;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
}

.tag-list li::before {
  content: '›';
  color: var(--accent);
  position: absolute;
  left: 0;
}

/* ===========================================================
   CERTS
   =========================================================== */
.cert-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.cert-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.cert-status {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}

.status-progress { color: var(--warn); }

.cert-card h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
}

.cert-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===========================================================
   CONTACT
   =========================================================== */
.section-contact { padding-bottom: 96px; }

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 760px;
}

.contact-links a {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.contact-links a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.link-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.link-value {
  font-size: 14px;
  color: var(--text);
  word-break: break-word;
}

/* ===========================================================
   FOOTER
   =========================================================== */
.footer {
  text-align: center;
  padding: 28px 24px 40px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; }
  .hero-title { flex-wrap: wrap; }
  .hero-avatar { width: 38px; height: 38px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-stat-rail { border-left: none; padding-left: 0; flex-direction: row; gap: 24px; overflow-x: auto; }
  .stat-row { border-bottom: none; padding: 0; flex: 1; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .cert-row { grid-template-columns: 1fr; }
  .contact-links { grid-template-columns: 1fr; }
  .ticket-summary {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name chevron"
      "severity severity"
      "status status";
  }
  .ticket-id { display: none; }
  .ticket-name { grid-area: name; }
  .chevron { grid-area: chevron; }
  .severity { grid-area: severity; justify-self: start; margin-top: 8px; }
  .ticket-status { grid-area: status; margin-top: 4px; }
  .ticket-body-inner { grid-template-columns: 1fr; }
  .case-side { border-left: none; padding-left: 0; border-top: 1px solid var(--panel-border); padding-top: 20px; }
  .topnav { display: none; }
}

@media (max-width: 520px) {
  .stack-grid { grid-template-columns: 1fr; }
}
