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

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

:root {
  --bg: #000000;
  --fg: #FFFFFF;
  --yellow: #FFFF55;
  --green: #55FF55;
  --cyan: #55FFFF;
  --red: #FF5555;
  --magenta: #FF55FF;
  --gray: #AAAAAA;
  --border: #555555;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background: transparent;
  color: var(--fg);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  line-height: 1.5;
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

/* ── Background canvas ── */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Content layer ── */
.ascii-header,
.top-bar,
.hero,
.section-heading,
.skills-grid,
.timeline,
.project-card,
.contact-card,
.footer {
  position: relative;
  z-index: 1;
}

/* ── ASCII header ── */
.ascii-header {
  margin-bottom: 24px;
  text-align: center;
}

.ascii-header pre {
  color: var(--cyan);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  line-height: 1.2;
  display: inline-block;
  text-align: left;
  text-shadow:
    0 0 8px var(--cyan),
    0 0 20px rgba(85, 255, 255, 0.4);
}

.ascii-sub {
  color: var(--yellow);
  font-size: 14px;
  margin-top: 8px;
  text-shadow: 0 0 6px rgba(255, 255, 85, 0.5);
}

/* ── Top bar ── */
.top-bar {
  border: 1px solid var(--border);
  padding: 4px 8px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray);
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(2px);
  z-index: 10;
}

.top-nav {
  display: flex;
  gap: 16px;
}

.top-nav a {
  color: var(--gray);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

.top-nav a:hover,
.top-nav a.active {
  color: var(--cyan);
  text-shadow: 0 0 6px rgba(85, 255, 255, 0.5);
}

.top-nav a::before {
  content: "/";
  color: var(--border);
}

/* ── Hero ── */
.hero {
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.hero h1 {
  color: var(--yellow);
  font-size: 24px;
  margin-bottom: 12px;
  text-shadow: 0 0 6px rgba(255, 255, 85, 0.4);
}

.hero .about {
  color: var(--fg);
  font-size: 14px;
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}

.hero .status {
  margin-top: 16px;
  color: var(--green);
  font-size: 14px;
  text-shadow: 0 0 6px rgba(85, 255, 85, 0.5);
}

/* ── Section heading ── */
.section-heading {
  color: var(--yellow);
  font-size: 18px;
  margin-bottom: 12px;
  text-shadow: 0 0 6px rgba(255, 255, 85, 0.4);
}

.section-heading::before {
  content: ">> ";
  color: var(--gray);
}

/* ── Skills ── */
#skills {
  margin-bottom: 24px;
}

.skills-grid {
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-group-title {
  color: var(--cyan);
  font-size: 13px;
  margin-bottom: 8px;
  text-shadow: 0 0 4px rgba(85, 255, 255, 0.4);
}

.skill-group-title::before {
  content: "$ ";
  color: var(--gray);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Timeline ── */
#experience {
  margin-bottom: 24px;
}

.timeline {
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 90px;
  top: 20px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-date {
  color: var(--gray);
  font-size: 12px;
  min-width: 90px;
  padding-top: 2px;
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
}

.timeline-title {
  color: var(--green);
  font-size: 14px;
  margin-bottom: 6px;
  text-shadow: 0 0 4px rgba(85, 255, 85, 0.3);
}

.timeline-body {
  color: var(--fg);
  font-size: 13px;
  line-height: 1.5;
}

/* ── Project card ── */
#projects {
  margin-bottom: 24px;
}

.project-card {
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 16px;
}

.project-card .card-title {
  color: var(--green);
  font-size: 16px;
  margin-bottom: 8px;
  text-shadow: 0 0 6px rgba(85, 255, 85, 0.4);
}

.project-card .card-title::before {
  content: "╔═ ";
  color: var(--border);
}

.project-card .card-title::after {
  content: " ═╗";
  color: var(--border);
}

.project-card .card-body {
  color: var(--fg);
  font-size: 14px;
  margin-bottom: 12px;
}

.project-card .card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.project-card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-link {
  color: var(--cyan);
  text-decoration: none;
  font-size: 12px;
  white-space: nowrap;
  text-shadow: 0 0 4px rgba(85, 255, 255, 0.4);
  transition: color 0.15s;
  flex-shrink: 0;
}

.card-link:hover {
  color: var(--fg);
}

.project-card .tag {
  color: var(--magenta);
  font-size: 12px;
  text-shadow: 0 0 4px rgba(255, 85, 255, 0.4);
}

.project-card .tag::before {
  content: "[";
  color: var(--gray);
}

.project-card .tag::after {
  content: "]";
  color: var(--gray);
}

/* ── Skills tags (reuse .tag style via .skill-tags .tag) ── */
.skill-tags .tag {
  color: var(--magenta);
  font-size: 12px;
  text-shadow: 0 0 4px rgba(255, 85, 255, 0.4);
}

.skill-tags .tag::before {
  content: "[";
  color: var(--gray);
}

.skill-tags .tag::after {
  content: "]";
  color: var(--gray);
}

/* ── Contact ── */
#contact {
  margin-bottom: 24px;
}

.contact-card {
  border: 1px solid var(--border);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-line {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 14px;
}

.contact-label {
  color: var(--gray);
  min-width: 100px;
  flex-shrink: 0;
}

.contact-link {
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 4px rgba(85, 255, 255, 0.3);
  transition: color 0.15s;
}

.contact-link:hover {
  color: var(--fg);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-size: 12px;
  color: var(--gray);
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .ascii-header pre {
    font-size: 8px;
  }

  .top-nav {
    gap: 10px;
  }

  .top-nav a {
    font-size: 11px;
  }

  .timeline-item {
    flex-direction: column;
    gap: 4px;
  }

  .timeline-item:not(:last-child)::after {
    display: none;
  }

  .timeline-date {
    min-width: unset;
  }

  .contact-line {
    flex-direction: column;
    gap: 2px;
  }
}
