/* Black, small uppercase headings,
   monospace, times in square brackets and a blinking cursor. In phosphor green, like an old terminal. */
:root {
  --bg: #000;
  --text: #b8ffc8;   /* headings, names, links */
  --dim: #7ccf8e;    /* body text */
  --bright: #e4ffea; /* the brightest text: tagline, dates, active nav */
  --faint: rgba(124, 255, 154, 0.18);
  --cyan: #7fe7ff;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --terminal: "Share Tech Mono", var(--mono); /* the name and headings */
  /* The phosphor glow: a tight core, a halo and a wide haze. */
  --soft-glow: 0 0 1px rgba(51, 255, 102, 0.5), 0 0 6px rgba(51, 255, 102, 0.35);
  --glow: 0 0 1px rgba(51, 255, 102, 0.9), 0 0 6px rgba(51, 255, 102, 0.6), 0 0 16px rgba(51, 255, 102, 0.3);
  --cyan-glow: 0 0 1px rgba(127, 231, 255, 0.9), 0 0 6px rgba(127, 231, 255, 0.6), 0 0 16px rgba(127, 231, 255, 0.3);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--mono);
  line-height: 1.6;
  background: var(--bg);
  color: var(--dim);
  text-shadow: var(--soft-glow);
}

::selection { background: var(--cyan); color: #000; text-shadow: none; }

a { color: var(--text); text-decoration: none; }
a:hover, a:focus-visible { color: var(--cyan); text-shadow: var(--cyan-glow); }
p a { color: var(--bright); border-bottom: 1px solid var(--faint); }

ul, ol { list-style: none; margin: 0; padding: 0; }

/* A faint light that follows the mouse. */
.spotlight {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(600px at var(--x, -100%) var(--y, -100%), rgba(51, 255, 102, 0.06), transparent 80%);
}

/* Scanlines over everything, like an old CRT screen. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.3) 2px 3px);
}

/* One column on narrow screens; two on wide (see the bottom of the file). */
.layout {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.intro { margin-bottom: 4rem; }

.name { margin: 0; font-size: clamp(2.5rem, 6vw, 3rem); font-weight: 700; line-height: 1.1; }
.name a, .name a:hover { color: var(--text); text-shadow: var(--glow); }

.role {
  margin: 0.75rem 0 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  text-shadow: var(--glow);
}

/* Typed out like the dashboard's log. */
.tagline {
  max-width: 22rem;
  min-height: 3em;
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--bright);
  text-shadow: var(--glow);
}
.tagline::after { content: '█'; animation: blink 0.8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav { display: none; }

/* Links in square brackets, like the dashboard's times. */
.socials { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 2rem; font-size: 0.9rem; }
.socials a::before { content: '['; color: var(--dim); }
.socials a::after { content: ']'; color: var(--dim); }

section { margin-bottom: 6rem; scroll-margin-top: 4rem; }
section > p { margin: 0 0 1rem; }

/* Section titles: the dashboard's headings. Sticky on narrow screens; on wide ones the nav takes their place. */
.section-title {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -1.5rem 1rem;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  text-shadow: var(--glow);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

/* The skills overview: one line per area, the area in a column of its own on wider screens. */
.skills { display: grid; gap: 0.25rem 1rem; margin: 2rem 0 0; font-size: 0.9rem; }
.skills dt { color: var(--text); text-shadow: var(--glow); }
.skills dd { margin: 0 0 0.75rem; }
@media (min-width: 40rem) {
  .skills { grid-template-columns: 11rem 1fr; }
  .skills dd { margin: 0; }
}

/* Experience and projects: cards that light up on hover while the others fade. */
.list { display: grid; gap: 3rem; }
.list:hover .item:not(:hover) { opacity: 0.5; }

.item {
  position: relative;
  display: grid;
  gap: 0.5rem 1rem;
  transition: opacity 0.2s;
}
.item::before {
  content: '';
  position: absolute;
  inset: -1rem;
  z-index: -1;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  transition: background 0.2s, border-color 0.2s;
}
.item:hover::before { background: rgba(51, 255, 102, 0.04); border-color: var(--faint); }

.item h3 { margin: 0; text-shadow: var(--glow); font-size: 1rem; font-weight: 600; line-height: 1.4; }
/* The whole card is clickable through its title link. */
.item h3 a::after { content: ''; position: absolute; inset: -1rem; }
.item h3 a::before { content: '↗'; float: right; margin-left: 0.5rem; color: var(--dim); transition: transform 0.2s; }
.item:hover h3 a { color: var(--cyan); text-shadow: var(--cyan-glow); }
.item:hover h3 a::before { transform: translate(2px, -2px); color: var(--cyan); }
.item p { margin: 0.5rem 0 0; font-size: 0.9rem; }

.when { padding-top: 0.15rem; font-size: 0.8rem; color: var(--bright); text-shadow: var(--glow); }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tags li {
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--cyan);
  text-shadow: var(--cyan-glow);
  background: rgba(127, 231, 255, 0.08);
}

/* Project thumbnails: little terminal screens until you put an <img> in them. */
.thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  max-width: 12rem;
  border: 1px solid var(--faint);
  border-radius: 0.25rem;
  font-size: 0.8rem;
  color: var(--bright);
  text-shadow: var(--glow);
  background: #020a04;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.more { margin-top: 3rem; }
.more a { border: 0; font-weight: 600; color: var(--text); }


/* Medium screens: dates and thumbnails get their own column. */
@media (min-width: 40rem) {
  .item { grid-template-columns: 8rem 1fr; }
}

/* Wide screens: the left column sticks, the right column scrolls. */
@media (min-width: 64rem) {
  .layout { display: flex; justify-content: space-between; gap: 4rem; padding: 0 3rem; }

  .intro {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 48%;
    max-height: 100vh;
    margin: 0;
    padding: 6rem 0;
  }

  .content { width: 52%; padding: 6rem 0; }

  section { scroll-margin-top: 6rem; }

  /* Hidden from sight, kept for screen readers. */
  .section-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .nav { display: block; margin-top: 4rem; }
  .nav a { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; color: var(--dim); }
  .nav .line { width: 2rem; height: 1px; background: var(--dim); transition: width 0.2s, background 0.2s; }
  .nav .label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
  .nav a:hover, .nav a.active { color: var(--bright); text-shadow: var(--glow); }
  .nav a:hover .line, .nav a.active .line { width: 4rem; background: var(--bright); box-shadow: var(--glow); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tagline::after { animation: none; }
}

/* The name and headings in the terminal font. It has one weight only, so no faux bold. */
.name, .role, .section-title, .item h3 { font-family: var(--terminal); font-weight: 400; }
.name { font-size: clamp(2.75rem, 7vw, 3.5rem); }
.role, .section-title, .item h3 { font-size: 1.1rem; line-height: 1.3; }
.role { font-size: 1.6rem; }
