@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/vt323-400.ttf') format('truetype');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-400.ttf') format('truetype');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-700.ttf') format('truetype');
}

:root {
  --phosphor: #bab1ff;
  --phosphor-dim: #7d76b3;
  --phosphor-glow: rgba(186, 177, 255, 0.4);
  --phosphor-subtle: rgba(186, 177, 255, 0.1);
  --bg-dark: #0a0a0a;
  --bg-screen: #050505;
  --scanline-opacity: 0.08;
}

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

html {
  font-size: 18px;
}

body {
  background: var(--bg-dark);
  color: var(--phosphor);
  font-family: 'IBM Plex Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

/* CRT Monitor Frame */
.crt-monitor {
  min-height: 100vh;
  background: var(--bg-screen);
  position: relative;
}

/* Brightness ramp up */
@keyframes brightness-up {
  0% { filter: brightness(0.05); }
  30% { filter: brightness(0.3); }
  60% { filter: brightness(0.6); }
  100% { filter: brightness(1); }
}

.crt-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-screen);
  overflow: hidden;
}

.screen-content {
  padding: 3rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

/* Screen reflection/glare */
.crt-wrapper .screen-glare {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.01) 100%
  );
  pointer-events: none;
  z-index: 1001;
}

/* Scanlines overlay */
.crt-wrapper::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, var(--scanline-opacity)) 0px,
    rgba(0, 0, 0, var(--scanline-opacity)) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 1000;
}

/* Phosphor text glow */
.glow {
  text-shadow:
    0 0 2px var(--phosphor),
    0 0 8px var(--phosphor-glow),
    0 0 20px var(--phosphor-glow);
}

.glow-strong {
  text-shadow:
    0 0 2px var(--phosphor),
    0 0 10px var(--phosphor),
    0 0 30px var(--phosphor-glow),
    0 0 50px var(--phosphor-glow);
}

/* Header */
header {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--phosphor-dim);
}

h1 {
  font-family: 'VT323', monospace;
  font-size: 3.5rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 0.9rem;
  color: var(--phosphor-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.tagline span {
  margin: 0 0.5rem;
  opacity: 0.5;
}

/* Cursor blink */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  background: var(--phosphor);
  margin-left: 0.1em;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

/* Sections */
section {
  margin-bottom: 2.5rem;
}

h2 {
  font-family: 'VT323', monospace;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

h2::before {
  content: '>';
  color: var(--phosphor-dim);
}

/* Role cards */
.role {
  background: var(--phosphor-subtle);
  border: 1px solid var(--phosphor-dim);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  position: relative;
  transition: all 0.2s ease;
}

.role::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--phosphor-dim);
  transition: all 0.2s ease;
}

.role:hover {
  background: rgba(186, 177, 255, 0.15);
  border-color: var(--phosphor);
}

.role:hover::before {
  background: var(--phosphor);
  box-shadow: 0 0 10px var(--phosphor-glow);
}

.role h3 {
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.role h3 a {
  color: var(--phosphor);
  text-decoration: none;
}

.role h3 a:hover {
  text-decoration: underline;
}

.role .period {
  font-size: 0.75rem;
  color: var(--phosphor-dim);
  margin-bottom: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
}

.role .description {
  font-size: 0.85rem;
  color: var(--phosphor);
  opacity: 0.8;
  line-height: 1.5;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(250px, 40%), 1fr));
  gap: 1rem;
}

.project {
  background: var(--phosphor-subtle);
  border: 1px solid var(--phosphor-dim);
  padding: 1rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.project::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--phosphor-subtle),
    transparent
  );
  transition: none;
}

.project:hover::after {
  left: 100%;
  transition: left 0.5s ease;
}

.project:hover {
  border-color: var(--phosphor);
  box-shadow: 0 0 15px var(--phosphor-glow);
}

.project h3 {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.project h3 a {
  color: var(--phosphor);
  text-decoration: none;
}

.project h3 a:hover {
  text-decoration: underline;
}

.project p {
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.5;
}

/* Links section */
.links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.links a {
  color: var(--phosphor);
  text-decoration: none;
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.links a::before {
  content: '[';
  color: var(--phosphor-dim);
}

.links a::after {
  content: ']';
  color: var(--phosphor-dim);
}

.links a:hover {
  text-shadow: 0 0 10px var(--phosphor-glow);
}

/* Presentations */
.presentation {
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--phosphor-dim);
}

.presentation h3 {
  font-family: 'VT323', monospace;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.presentation h3 a {
  color: var(--phosphor);
  text-decoration: none;
}

.presentation h3 a:hover {
  text-decoration: underline;
}

.presentation .venue {
  font-size: 0.75rem;
  color: var(--phosphor-dim);
  margin-bottom: 0.25rem;
}

.presentation p {
  font-size: 0.8rem;
  opacity: 0.7;
  line-height: 1.4;
}

/* Boot sequence animation */
@keyframes fadeUp {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: brightness-up, fadeUp 5s ease forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }

/* Responsive */
@media (max-width: 600px) {
  html { font-size: 16px; }
  h1 { font-size: 2.5rem; }
  .screen-content { padding: 2rem 1.25rem; }
}
