/* ===== Password Gate ===== */
.password-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg, #121212);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.password-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.password-container {
  width: 100%;
  max-width: 440px;
  padding: 1rem;
}

.password-label {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.password-hint {
  color: var(--text-dim, #666);
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
}

.password-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.password-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--green, #33ff33);
  font-family: var(--font-mono, monospace);
  font-size: 1rem;
  caret-color: transparent;
  flex: 1;
  text-shadow: 0 0 8px rgba(51, 255, 51, 0.4);
}

.password-error {
  color: #ff5f56;
  font-size: 0.8rem;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.password-error.show {
  opacity: 1;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #121212;
  --green: #33ff33;
  --green-dim: #1a9e1a;
  --green-dark: #0d4f0d;
  --amber: #ffb833;
  --text: #c5c5c5;
  --text-dim: #666;
  --border: #2a2a2a;
  --terminal-bg: #161616;
  --glow: 0 0 8px rgba(51, 255, 51, 0.4), 0 0 20px rgba(51, 255, 51, 0.1);
  --glow-strong: 0 0 10px rgba(51, 255, 51, 0.6), 0 0 30px rgba(51, 255, 51, 0.2), 0 0 60px rgba(51, 255, 51, 0.1);
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--green-dark) var(--bg);
}

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--green);
  color: var(--bg);
}

/* ===== CRT Overlay Effects ===== */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  animation: flicker 0.15s infinite;
  opacity: 1;
}

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 1px,
    rgba(0, 0, 0, 0.08) 1px,
    rgba(0, 0, 0, 0.08) 2px
  );
}

.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9997;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

@keyframes flicker {
  0%   { opacity: 0.97; }
  5%   { opacity: 0.98; }
  10%  { opacity: 0.97; }
  15%  { opacity: 0.99; }
  20%  { opacity: 0.97; }
  50%  { opacity: 0.98; }
  80%  { opacity: 0.97; }
  90%  { opacity: 0.99; }
  100% { opacity: 0.98; }
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
  text-shadow: var(--glow);
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s, text-shadow 0.3s;
  position: relative;
}

.nav-link::before {
  content: '>';
  margin-right: 0.4rem;
  color: var(--green-dark);
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--green);
  text-shadow: var(--glow);
}

.nav-link:hover::before {
  color: var(--green);
}

/* ===== Common ===== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.prompt {
  color: var(--green);
  text-shadow: var(--glow);
  font-weight: 700;
  margin-right: 0.5rem;
}

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

.section {
  padding: 6rem 0;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-prompt {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--text-dim);
}

.section-prompt .prompt {
  color: var(--green);
}

/* ===== Terminal Window ===== */
.terminal-window {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 0 80px rgba(51, 255, 51, 0.01);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #161616;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1.5rem;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero .terminal-window {
  max-width: 700px;
  width: 100%;
}

.terminal-line {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green);
  text-shadow: var(--glow-strong);
  margin-bottom: 1rem;
  min-height: 2.5rem;
}

.cursor {
  color: var(--green);
  animation: blink 1s step-end infinite;
  text-shadow: var(--glow);
}

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

.hero-subtitle {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.hero-subtitle.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-cta {
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease 0.6s, transform 0.6s ease 0.6s;
}

.hero-cta.visible {
  opacity: 1;
  transform: translateY(0);
}

.cta-link {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px dashed var(--amber);
  transition: text-shadow 0.3s;
}

.cta-link:hover {
  text-shadow: 0 0 8px rgba(255, 184, 51, 0.5);
}

/* ===== About ===== */
.about-window {
  max-width: 100%;
}

.about-text {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.8;
}

.about-text.muted {
  color: var(--text-dim);
  margin-top: 1rem;
}

/* ===== Experience / Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--green-dark);
  box-shadow: 0 0 6px rgba(51, 255, 51, 0.2);
}

.timeline-entry {
  position: relative;
  margin-bottom: 3rem;
}

.timeline-entry:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.4rem;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--green);
  box-shadow: var(--glow);
  z-index: 1;
}

.timeline-entry:first-child .timeline-marker {
  background: var(--green);
  box-shadow: var(--glow-strong);
}

.timeline-content {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.timeline-content:hover {
  border-color: var(--green-dark);
  box-shadow: 0 0 20px rgba(51, 255, 51, 0.05);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.entry-role {
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
  text-shadow: 0 0 6px rgba(51, 255, 51, 0.2);
}

.entry-date {
  color: var(--text-dim);
  font-size: 0.8rem;
}

.entry-company {
  color: var(--amber);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.entry-desc {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.7;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  transition: border-color 0.3s;
}

.skill-category:hover {
  border-color: var(--green-dark);
}

.skill-title {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  text-shadow: 0 0 4px rgba(51, 255, 51, 0.2);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: rgba(51, 255, 51, 0.06);
  border: 1px solid var(--green-dark);
  color: var(--text);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  font-size: 0.75rem;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.skill-tag:hover {
  background: rgba(51, 255, 51, 0.12);
  color: var(--green);
  box-shadow: 0 0 8px rgba(51, 255, 51, 0.15);
}

/* ===== Press ===== */
.press-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.press-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1rem;
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.press-item:hover {
  border-color: var(--green-dark);
  box-shadow: 0 0 20px rgba(51, 255, 51, 0.05);
}

.press-source {
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  min-width: 140px;
  text-shadow: 0 0 4px rgba(51, 255, 51, 0.2);
}

.press-title {
  color: var(--text);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .press-item {
    flex-direction: column;
    gap: 0.15rem;
    align-items: flex-start;
  }

  .press-source {
    min-width: unset;
  }

  .press-title {
    white-space: normal;
  }
}

/* ===== Footer ===== */
.footer {
  padding: 4rem 0 3rem;
  border-top: 1px solid var(--border);
}

.footer-text {
  color: var(--green);
  font-size: 1.4rem;
  text-shadow: var(--glow);
  margin-bottom: 2rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.footer-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s, text-shadow 0.3s;
}

.footer-link:hover {
  color: var(--green);
  text-shadow: var(--glow);
}

.footer-prompt {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    padding: 0.75rem 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.75rem;
  }

  .nav-link::before {
    display: none;
  }

  .hero {
    padding: 1rem;
  }

  .terminal-line {
    font-size: 1.1rem;
  }

  .section {
    padding: 4rem 0;
  }

  .container {
    padding: 0 1rem;
  }

  .entry-header {
    flex-direction: column;
    gap: 0.2rem;
  }

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

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .nav-logo {
    font-size: 0.85rem;
  }

  .nav-links {
    gap: 0.75rem;
  }

  .terminal-line {
    font-size: 0.95rem;
  }

  .hero-subtitle {
    font-size: 0.8rem;
  }
}
