:root {
  --green: #00ff41;
  --green-dim: rgba(0, 255, 65, 0.55);
  --green-dark: #00801f;
  --amber: #ffb800;
  --amber-dim: rgba(255, 184, 0, 0.7);
  --bg: #010801;
  --terminal-bg: #020d02;
  --glow: 0 0 8px #00ff41, 0 0 18px rgba(0, 255, 65, 0.25);
  --amber-glow: 0 0 8px #ffb800, 0 0 16px rgba(255, 184, 0, 0.2);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  background-image: radial-gradient(ellipse at 50% 30%, #030f03 0%, #000 100%);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  color: var(--green);
}

/* ── Scanlines overlay ───────────────────────────────────────── */
.scanlines {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.28) 3px,
    rgba(0, 0, 0, 0.28) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ── CRT frame ───────────────────────────────────────────────── */
.crt-frame {
  width: 100%;
  max-width: 920px;
  border: 2px solid var(--green-dark);
  box-shadow:
    0 0 0 1px #001a00,
    0 0 30px rgba(0, 255, 65, 0.12),
    0 0 80px rgba(0, 255, 65, 0.05),
    inset 0 0 40px rgba(0, 255, 65, 0.03);
  animation: flicker 12s infinite;
}

@keyframes flicker {
  0%, 91%, 93%, 96%, 100% { opacity: 1; }
  92%                      { opacity: 0.85; }
  94%, 95%                 { opacity: 0.92; }
}

/* ── Title bar ───────────────────────────────────────────────── */
.window-titlebar {
  background: linear-gradient(90deg, #001200 0%, #003300 40%, #001200 100%);
  border-bottom: 1px solid var(--green-dark);
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.titlebar-buttons {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.titlebar-buttons span {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1px solid var(--green-dark);
  border-radius: 2px;
}

.titlebar-title {
  font-family: 'VT323', monospace;
  font-size: 17px;
  color: var(--green);
  text-shadow: var(--glow);
  text-align: center;
  flex: 1;
  letter-spacing: 0.04em;
}

/* ── Terminal body ───────────────────────────────────────────── */
.terminal-body {
  background: var(--terminal-bg);
  padding: 24px 36px 32px;
}

/* ── Download button ─────────────────────────────────────────── */
.hero-download {
  margin-top: 14px;
}

.dl-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px;
  color: var(--amber);
  text-decoration: none;
  border: 1px solid var(--amber-dim);
  padding: 6px 16px;
  display: inline-block;
  transition: background 0.2s, text-shadow 0.2s, box-shadow 0.2s;
}

.dl-btn:hover {
  background: rgba(255, 184, 0, 0.08);
  text-shadow: var(--amber-glow);
  box-shadow: 0 0 10px rgba(255, 184, 0, 0.2);
}

/* ── Boot sequence ───────────────────────────────────────────── */
.boot-seq {
  font-size: 14px;
  color: var(--green-dim);
  margin-bottom: 22px;
  line-height: 1.9;
}

.boot-seq p { opacity: 0; animation: fadein 0.05s forwards; }
.boot-seq .d1 { animation-delay: 0.35s; }
.boot-seq .d2 { animation-delay: 0.85s; }
.boot-seq .d3 { animation-delay: 1.3s;  }

@keyframes fadein { to { opacity: 1; } }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 10px 0 20px;
}

.hero-name {
  font-family: 'VT323', monospace;
  font-size: clamp(52px, 10vw, 84px);
  color: var(--green);
  text-shadow: var(--glow);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 10px;
}

.hero-title {
  font-family: 'VT323', monospace;
  font-size: clamp(20px, 4vw, 28px);
  color: var(--green);
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
  margin-bottom: 6px;
}

.hero-meta {
  font-size: 14px;
  color: var(--green-dim);
}

.prompt {
  color: var(--amber);
  text-shadow: var(--amber-glow);
  margin-right: 5px;
}

.sep {
  color: var(--green-dark);
  margin: 0 8px;
}

/* ── Divider ─────────────────────────────────────────────────── */
.divider {
  color: var(--green-dark);
  font-size: 13px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  margin: 8px 0;
  opacity: 0.6;
}

/* ── Sections ────────────────────────────────────────────────── */
.section {
  margin: 28px 0;
}

.sec-title {
  font-family: 'VT323', monospace;
  font-size: 22px;
  font-weight: normal;
  color: var(--amber);
  text-shadow: var(--amber-glow);
  border-bottom: 1px dashed #1a3300;
  padding-bottom: 5px;
  margin-bottom: 14px;
  letter-spacing: 0.03em;
}

.sec-body {
  padding-left: 8px;
}

.sec-body p {
  font-size: 15px;
  line-height: 1.85;
  color: rgba(0, 255, 65, 0.82);
}

/* ── Jobs ────────────────────────────────────────────────────── */
.job {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 2px solid #003300;
  transition: border-color 0.2s, background 0.2s;
}

.job:hover {
  border-left-color: var(--green);
  background: rgba(0, 255, 65, 0.025);
}

.job-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 3px;
}

.job-title {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: var(--green);
  text-shadow: 0 0 6px rgba(0, 255, 65, 0.4);
}

.job-date {
  font-size: 14px;
  color: var(--amber-dim);
  font-family: 'Share Tech Mono', monospace;
  flex-shrink: 0;
}

.job-company {
  font-size: 14px;
  color: var(--green-dim);
  margin-bottom: 8px;
}

.tag {
  display: inline-block;
  border: 1px solid #1a4400;
  color: #005500;
  font-size: 10px;
  padding: 0 5px;
  margin-left: 6px;
  vertical-align: middle;
  border-radius: 1px;
}

.tag.current {
  border-color: var(--amber-dim);
  color: var(--amber);
  text-shadow: 0 0 6px rgba(255, 184, 0, 0.4);
}

.bullets {
  list-style: none;
  margin-bottom: 8px;
}

.bullets li {
  font-size: 14px;
  color: rgba(0, 255, 65, 0.78);
  line-height: 1.75;
  padding-left: 16px;
  position: relative;
}

.bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--amber);
}

.job-tech {
  font-size: 14px;
  color: #005520;
  font-style: italic;
  line-height: 1.6;
}

/* ── Skills ──────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.sg-title {
  font-size: 14px;
  color: var(--amber);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.sbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  font-size: 14px;
  white-space: nowrap;
}

.sname {
  width: 110px;
  flex-shrink: 0;
  color: rgba(0, 255, 65, 0.88);
}

.bar {
  color: var(--green);
  text-shadow: 0 0 4px rgba(0, 255, 65, 0.5);
  letter-spacing: -0.5px;
}

.pct {
  color: var(--green-dim);
  font-size: 12px;
  width: 32px;
}

/* ── Languages ───────────────────────────────────────────────── */
.lang-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.lang {
  font-size: 14px;
}

.lang-name {
  color: var(--green);
}

.lang-lvl {
  color: var(--green-dim);
  margin-left: 6px;
}

/* ── Contact ─────────────────────────────────────────────────── */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.ci-icon {
  color: var(--amber);
  width: 28px;
  flex-shrink: 0;
}

.contact-item a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px dashed #003800;
  transition: text-shadow 0.2s, border-color 0.2s;
}

.contact-item a:hover {
  text-shadow: var(--glow);
  border-bottom-color: var(--green);
}

.contact-item span {
  color: rgba(0, 255, 65, 0.75);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  text-align: center;
  font-size: 14px;
  color: var(--green-dim);
  margin: 12px 0 6px;
}

.fsep {
  margin: 0 10px;
  color: #003300;
}

.status-dot {
  color: var(--green);
  text-shadow: var(--glow);
}

.cursor-line {
  font-size: 15px;
  color: var(--green-dim);
  margin-top: 10px;
}

/* ── Blink ───────────────────────────────────────────────────── */
.blink {
  animation: blink 1s step-end infinite;
}

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

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .terminal-body {
    padding: 16px 18px 24px;
  }

  .job-head {
    flex-direction: column;
  }

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

  .sbar {
    flex-wrap: wrap;
    white-space: normal;
  }

  .sname {
    width: auto;
    min-width: 110px;
    flex-shrink: 0;
  }

  .divider {
    font-size: 9px;
  }

  .lang-row {
    flex-direction: column;
    gap: 8px;
  }

  .footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 13px;
  }

  .fsep {
    display: none;
  }
}
