@font-face {
  font-family: 'Share Tech Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/share-tech-mono.woff2') format('woff2');
}

@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/orbitron.woff2') format('woff2');
}

@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/orbitron.woff2') format('woff2');
}

@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('fonts/orbitron.woff2') format('woff2');
}

:root {
  --green: #00ff41;
  --green-dim: #00cc33;
  --green-dark: #003d0f;
  --green-glow: rgba(0,255,65,0.15);
  --bg: #020a04;
  --bg2: #050f06;
  --scanline: rgba(0,0,0,0.25);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--green);
  font-family: 'Share Tech Mono', monospace;
  overflow-x: hidden;
}

/* Custom cursor — desktop (fine pointer) only; on touch the elements would
   stick at (0,0) since there is no mousemove */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
}
@media (hover: none), (pointer: coarse) {
  .cursor, .cursor-dot { display: none; }
}

.cursor {
  position: fixed;
  width: 20px; height: 20px;
  border: 2px solid var(--green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  top: 0; left: 0;
  will-change: transform;
  transition: width 0.2s, height 0.2s, opacity 0.2s;
  box-shadow: 0 0 10px var(--green);
}
.cursor-dot {
  position: fixed;
  width: 4px; height: 4px;
  background: var(--green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  top: 0; left: 0;
  will-change: transform;
}

/* Scanlines overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    var(--scanline) 2px,
    var(--scanline) 4px
  );
  pointer-events: none;
  z-index: 1000;
  opacity: 0.35;
}

/* Vignette */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.8) 100%);
  pointer-events: none;
  z-index: 999;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 1.2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0,255,65,0.15);
  background: rgba(2,10,4,0.85);
  backdrop-filter: blur(6px);
}

.nav-logo {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 4px;
  color: var(--green);
  text-shadow: 0 0 20px var(--green);
  text-decoration: none;
}

.nav-links { display: flex; gap: 2.5rem; list-style: none; }

.nav-links a {
  color: var(--green-dim);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  transition: color 0.2s, text-shadow 0.2s;
  position: relative;
}

.nav-links a::before {
  content: '> ';
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-links a:hover { color: var(--green); text-shadow: 0 0 12px var(--green); }
.nav-links a:hover::before { opacity: 1; }

/* SECTIONS */
section { padding: 7rem 3rem; max-width: 1100px; margin: 0 auto; }

/* HERO */
#hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8rem;
  position: relative;
  max-width: 100%;
}

.hero-inner { max-width: 1100px; margin: 0 auto; padding: 0 3rem; }

.hero-prefix {
  font-size: 0.75rem;
  letter-spacing: 5px;
  color: var(--green-dim);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 0.6s 0.3s forwards;
}

.hero-name {
  font-family: 'Orbitron', monospace;
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -2px;
  color: var(--green);
  text-shadow: 0 0 40px rgba(0,255,65,0.5), 0 0 80px rgba(0,255,65,0.2);
  opacity: 0;
  animation: fadeInUp 0.8s 0.5s forwards, glitch 8s 2s infinite;
  position: relative;
}

.hero-name::before, .hero-name::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
}

.hero-name::before {
  color: #ff0040;
  animation: glitch-1 8s 2s infinite;
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  opacity: 0;
}

.hero-name::after {
  color: #00ffff;
  animation: glitch-2 8s 2s infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  opacity: 0;
}

.hero-title {
  font-size: clamp(1rem, 3vw, 1.6rem);
  letter-spacing: 6px;
  color: var(--green-dim);
  margin-top: 1rem;
  opacity: 0;
  animation: fadeInUp 0.8s 0.8s forwards;
}

.hero-tagline {
  margin-top: 2.5rem;
  font-size: 0.9rem;
  color: rgba(0,255,65,0.6);
  max-width: 550px;
  line-height: 1.8;
  opacity: 0;
  animation: fadeInUp 0.8s 1.1s forwards;
}

.hero-tagline .typing-cursor {
  display: inline-block;
  width: 10px;
  background: var(--green);
  animation: blink 0.8s infinite;
  margin-left: 2px;
  vertical-align: middle;
  height: 1em;
}

.hero-cta {
  margin-top: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s 1.4s forwards;
}

.btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  text-decoration: none;
  cursor: none;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--green);
  color: var(--bg);
  border: 1px solid var(--green);
}

.btn-primary:hover {
  background: transparent;
  color: var(--green);
  box-shadow: 0 0 30px rgba(0,255,65,0.4), inset 0 0 20px rgba(0,255,65,0.1);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 1px solid rgba(0,255,65,0.4);
}

.btn-outline:hover {
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(0,255,65,0.2);
  background: rgba(0,255,65,0.05);
}

.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeInUp 0.8s 2s forwards;
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: rgba(0,255,65,0.4);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--green));
  animation: scrollPulse 2s infinite;
}

/* SECTION HEADER */
.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.section-num {
  font-family: 'Orbitron', monospace;
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: rgba(0,255,65,0.4);
}

.section-title {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--green);
  text-shadow: 0 0 20px rgba(0,255,65,0.4);
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(0,255,65,0.4), transparent);
}

/* ABOUT */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  font-size: 0.9rem;
  line-height: 2;
  color: rgba(0,255,65,0.75);
  margin-bottom: 1.2rem;
}

.about-text p strong {
  color: var(--green);
  text-shadow: 0 0 10px rgba(0,255,65,0.4);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-item {
  border: 1px solid rgba(0,255,65,0.15);
  padding: 1.2rem 1.5rem;
  position: relative;
  background: rgba(0,255,65,0.02);
  transition: border-color 0.3s, background 0.3s;
}

.stat-item:hover {
  border-color: rgba(0,255,65,0.5);
  background: rgba(0,255,65,0.05);
}

.stat-item::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 20px; height: 20px;
  border-top: 2px solid var(--green);
  border-left: 2px solid var(--green);
}

.stat-num {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 900;
  color: var(--green);
  text-shadow: 0 0 20px rgba(0,255,65,0.5);
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 3px;
  color: rgba(0,255,65,0.5);
  text-transform: uppercase;
  margin-top: 0.3rem;
}

/* PHOTO */
.about-photo-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.about-photo {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(0,255,65,0.3);
  filter: none;
  box-shadow: 0 0 30px rgba(0,255,65,0.15);
}

.about-photo-wrap::before,
.about-photo-wrap::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  z-index: 1;
}
.about-photo-wrap::before {
  top: -4px; left: -4px;
  border-top: 2px solid var(--green);
  border-left: 2px solid var(--green);
}
.about-photo-wrap::after {
  bottom: -4px; right: -4px;
  border-bottom: 2px solid var(--green);
  border-right: 2px solid var(--green);
}

/* TIMELINE */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0.4rem; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--green), transparent);
}

.timeline-item {
  position: relative;
  padding-bottom: 3.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.9rem;
  top: 0.35rem;
  width: 9px; height: 9px;
  border: 1px solid var(--green);
  background: var(--bg);
  box-shadow: 0 0 8px var(--green);
  transform: rotate(45deg);
}

.timeline-year {
  font-family: 'Orbitron', monospace;
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: var(--green-dim);
  margin-bottom: 0.4rem;
}

.timeline-role {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--green);
  text-shadow: 0 0 15px rgba(0,255,65,0.4);
  margin-bottom: 0.8rem;
}

.timeline-current .timeline-role {
  font-size: 1.15rem;
  text-shadow: 0 0 25px rgba(0,255,65,0.6);
}

.timeline-current::before {
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
  width: 11px; height: 11px;
}

.timeline-desc {
  font-size: 0.85rem;
  line-height: 1.9;
  color: rgba(0,255,65,0.65);
  margin-bottom: 1rem;
  max-width: 680px;
}

/* SECTION INTRO */
.section-intro {
  font-size: 0.9rem;
  line-height: 2;
  color: rgba(0,255,65,0.75);
  max-width: 680px;
  margin: -2rem 0 3.5rem;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 800px;
}

.faq-item {
  border: 1px solid rgba(0,255,65,0.15);
  border-left: 3px solid var(--green);
  padding: 1.5rem 2rem;
  background: rgba(0,255,65,0.02);
  transition: border-color 0.3s, background 0.3s;
}

.faq-item:hover {
  border-color: rgba(0,255,65,0.4);
  border-left-color: var(--green);
  background: rgba(0,255,65,0.05);
}

.faq-q {
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--green);
  text-shadow: 0 0 15px rgba(0,255,65,0.4);
  margin-bottom: 0.8rem;
}

.faq-a {
  font-size: 0.85rem;
  line-height: 1.9;
  color: rgba(0,255,65,0.65);
}

/* PROJECT / USE-CASE CARDS */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
}

.project-card {
  border: 1px solid rgba(0,255,65,0.15);
  padding: 2rem;
  position: relative;
  background: var(--bg2);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--green), transparent);
  transform: scaleX(0);
  transition: transform 0.4s;
}

.project-card:hover {
  border-color: rgba(0,255,65,0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 30px rgba(0,255,65,0.1);
}

.project-card:hover::before { transform: scaleX(1); }

.project-tag {
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: var(--green-dim);
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.project-name {
  font-family: 'Orbitron', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--green);
  margin-bottom: 0.8rem;
}

.project-desc {
  font-size: 0.8rem;
  line-height: 1.8;
  color: rgba(0,255,65,0.6);
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  font-size: 0.6rem;
  letter-spacing: 2px;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(0,255,65,0.25);
  color: rgba(0,255,65,0.6);
  background: rgba(0,255,65,0.03);
}

/* CONTACT */
#contact {
  text-align: center;
  padding-bottom: 10rem;
}

#contact .section-header { justify-content: center; }
#contact .section-line { display: none; }

.contact-subtitle {
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: rgba(0,255,65,0.5);
  margin-bottom: 3rem;
  line-height: 2;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.contact-link {
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: rgba(0,255,65,0.6);
  text-decoration: none;
  text-transform: uppercase;
  padding: 0.8rem 1.5rem;
  border: 1px solid rgba(0,255,65,0.2);
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.contact-link:hover {
  color: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(0,255,65,0.2);
  text-shadow: 0 0 10px var(--green);
}

/* FOOTER */
footer {
  border-top: 1px solid rgba(0,255,65,0.1);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: rgba(0,255,65,0.25);
  max-width: 1100px;
  margin: 0 auto;
}

/* TERMINAL DECORATION */
.terminal-box {
  border: 1px solid rgba(0,255,65,0.2);
  padding: 1.5rem;
  background: rgba(0,255,65,0.02);
  font-size: 0.75rem;
  line-height: 2;
  color: rgba(0,255,65,0.6);
  margin-top: 3rem;
  position: relative;
}

.terminal-box::before {
  content: '// SYSTEM INFO';
  position: absolute;
  top: -0.6rem;
  left: 1rem;
  background: var(--bg);
  padding: 0 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: rgba(0,255,65,0.5);
}

.terminal-line { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.terminal-key { color: rgba(0,255,65,0.4); min-width: 120px; }
.terminal-val { color: var(--green); }

/* MATRIX BG */
#matrix-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  opacity: 0.04;
}

/* DIVIDER */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,255,65,0.2), transparent);
  margin: 0;
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

@keyframes glitch {
  0%, 90%, 100% { text-shadow: 0 0 40px rgba(0,255,65,0.5), 0 0 80px rgba(0,255,65,0.2); }
  91% { text-shadow: -3px 0 #ff0040, 3px 0 #00ffff; }
  92% { text-shadow: 3px 0 #ff0040, -3px 0 #00ffff; }
  93% { text-shadow: 0 0 40px rgba(0,255,65,0.5), 0 0 80px rgba(0,255,65,0.2); }
  94% { text-shadow: -5px 0 #ff0040, 5px 0 #00ffff; }
  96% { text-shadow: 0 0 40px rgba(0,255,65,0.5); }
}

@keyframes glitch-1 {
  0%, 90%, 100% { opacity: 0; transform: none; }
  91% { opacity: 0.7; transform: translate(-3px, 0); }
  92% { opacity: 0; }
  94% { opacity: 0.5; transform: translate(3px, 0); }
  95% { opacity: 0; }
}

@keyframes glitch-2 {
  0%, 90%, 100% { opacity: 0; transform: none; }
  91% { opacity: 0; }
  92% { opacity: 0.7; transform: translate(3px, 0); }
  93% { opacity: 0; }
  95% { opacity: 0.5; transform: translate(-3px, 0); }
  96% { opacity: 0; }
}

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s, transform 0.8s;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  nav { padding: 0.9rem 1rem; flex-direction: column; gap: 0.5rem; }
  .nav-links { gap: 0.2rem 0.3rem; flex-wrap: wrap; justify-content: center; }
  /* bigger type + padded tap targets; links may wrap onto two rows */
  .nav-links a {
    font-size: 0.8rem;
    letter-spacing: 2px;
    padding: 0.5rem 0.7rem;
    display: inline-block;
  }
  section { padding: 5rem 1.5rem; }
  #hero { padding-top: 9rem; }
  .hero-inner { padding: 0 1.5rem; }
  .hero-title { letter-spacing: 3px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 1rem; }
  .hero-cta .btn { text-align: center; }
  .scroll-indicator { display: none; }
  #about .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(0,255,65,0.55);
  }

  /* Readability: larger + brighter body copy, effects toned down — on narrow
     screens all text sits in the vignette zone and the desktop sizes/dim
     greens become hard to read */
  body::before { opacity: 0.12; }   /* scanlines */
  body::after { display: none; }    /* vignette */
  .hero-tagline { font-size: 1rem; color: rgba(0,255,65,0.85); }
  .section-intro, .about-text p { font-size: 1rem; color: rgba(0,255,65,0.9); }
  .timeline-desc { font-size: 1rem; color: rgba(0,255,65,0.85); }
  .faq-q { font-size: 0.95rem; }
  .faq-a { font-size: 1rem; color: rgba(0,255,65,0.85); }
  .project-desc { font-size: 0.95rem; color: rgba(0,255,65,0.85); }
  .project-tag { font-size: 0.7rem; }
  .tech-tag { font-size: 0.75rem; letter-spacing: 1px; color: rgba(0,255,65,0.8); }
  .stat-label { font-size: 0.75rem; color: rgba(0,255,65,0.75); }
  .contact-subtitle { font-size: 0.95rem; color: rgba(0,255,65,0.8); }
  .contact-link { font-size: 0.85rem; color: rgba(0,255,65,0.85); }
  .btn { font-size: 0.85rem; }
  .terminal-box { font-size: 0.9rem; }
  .terminal-key { color: rgba(0,255,65,0.65); }
  /* the legal pages set their copy color inline, hence the !important */
  .terminal-box .terminal-line { color: rgba(0,255,65,0.85) !important; }
}
