/* JoshIdeas - Consolidated Stylesheet */
/* Terminal Noir Dark Theme */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&family=Fira+Code:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* CSS Variables */
:root {
  /* Core colors */
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #18181b;
  --bg-elevated: #1f1f23;

  /* Terminal colors */
  --terminal-black: #0a0a0a;
  --terminal-dark: #0d1117;
  --terminal-gray: #161b22;
  --terminal-light: #21262d;

  /* Accent colors */
  --accent-cyan: #00ffc8;
  --accent-cyan-dim: rgba(0, 255, 200, 0.15);
  --accent-amber: #ffb800;
  --accent-amber-dim: rgba(255, 184, 0, 0.15);

  /* Matrix green spectrum */
  --matrix-green: #00ff41;
  --matrix-green-dim: rgba(0, 255, 65, 0.15);
  --matrix-green-glow: rgba(0, 255, 65, 0.4);
  --phosphor-green: #33ff00;

  /* Error colors */
  --breach-red: #ff0033;
  --breach-red-dim: rgba(255, 0, 51, 0.15);
  --cyber-cyan: #00ffff;
  --cyber-cyan-dim: rgba(0, 255, 255, 0.15);

  /* Text colors */
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-muted: #52525b;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(0, 255, 200, 0.3);

  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-terminal: 'Fira Code', 'SF Mono', 'Consolas', monospace;
  --font-display: 'Orbitron', monospace;

  /* Spacing */
  --section-padding: clamp(4rem, 10vw, 8rem);
  --content-max-width: 1400px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img, picture, svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ================================
   GLOBAL EFFECTS
   ================================ */

/* Scanline effect overlay */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 2px
  );
  opacity: 0.4;
}

/* Grid background */
.grid-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, black 70%, transparent 100%);
}

/* Matrix rain canvas */
.matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.15;
  pointer-events: none;
}

/* CRT effects */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.crt-flicker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 255, 65, 0.01);
  animation: flicker 0.15s infinite;
}

@keyframes flicker {
  0% { opacity: 0.97; }
  50% { opacity: 1; }
  100% { opacity: 0.98; }
}

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

/* ================================
   HEADER
   ================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3rem;
  background: linear-gradient(to bottom, var(--bg-primary) 0%, rgba(10, 10, 11, 0.9) 70%, transparent 100%);
  backdrop-filter: blur(12px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  transition: all 0.3s ease;
}

.logo:hover {
  text-shadow: 0 0 10px var(--accent-cyan), 0 0 20px var(--accent-cyan);
}

.logo-bracket {
  color: var(--accent-cyan);
  opacity: 0.8;
}

.logo-slash {
  color: var(--text-primary);
  margin: 0 0.1em;
}

.logo-text {
  color: var(--text-primary);
  letter-spacing: 0.05em;
  margin-left: 0.5rem;
  text-transform: uppercase;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--border-default);
}

.header-tagline {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 2.5rem;
}

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover .nav-number {
  color: var(--accent-cyan);
}

.nav-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.header-right {
  display: flex;
  align-items: center;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 200, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(0, 255, 200, 0); }
}

.status-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ================================
   HERO SECTION
   ================================ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: calc(var(--section-padding) + 80px) 3rem var(--section-padding);
  position: relative;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transition: background 0.3s ease;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.6s ease forwards;
  animation-delay: 0.2s;
}

.hero-label-line {
  width: 40px;
  height: 1px;
  background: var(--accent-cyan);
}

.hero-title {
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.03em;
}

.hero-title-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeSlideUp 0.6s ease forwards;
}

.hero-title-line:nth-child(1) { animation-delay: 0.3s; }
.hero-title-line:nth-child(2) { animation-delay: 0.4s; }
.hero-title-line:nth-child(3) { animation-delay: 0.5s; }

.hero-title-accent {
  color: var(--accent-cyan);
  position: relative;
}

.hero-title-accent::after {
  content: '';
  position: absolute;
  bottom: 0.1em;
  left: 0;
  right: 0;
  height: 0.15em;
  background: var(--accent-cyan-dim);
}

.hero-description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.6s ease forwards;
  animation-delay: 0.6s;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeSlideUp 0.6s ease forwards;
  animation-delay: 0.7s;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.primary-btn:hover {
  background: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 255, 200, 0.2);
}

.btn-arrow {
  transition: transform 0.3s ease;
}

.primary-btn:hover .btn-arrow {
  transform: translateX(4px);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all 0.3s ease;
}

.secondary-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.hero-visual {
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateX(30px);
  animation: fadeSlideLeft 0.8s ease forwards;
  animation-delay: 0.5s;
}

/* Code block styling */
.code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 1rem 1.25rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

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

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #febc2e; }
.code-dot.green { background: #28c840; }

.code-filename {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.code-content {
  padding: 1.5rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
  overflow-x: auto;
}

/* Circuit lines decoration */
.circuit-lines {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 400px;
  height: 400px;
  opacity: 0.4;
  z-index: -1;
}

.circuit-path {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 1;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawLine 2s ease forwards;
  animation-delay: 1s;
}

.circuit-node {
  fill: var(--accent-cyan);
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
  animation-delay: 2s;
}

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

/* ================================
   SECTIONS
   ================================ */
.section {
  padding: var(--section-padding) 3rem;
  max-width: var(--content-max-width);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.section-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  padding: 0.5rem 1rem;
  background: var(--accent-cyan-dim);
  border-radius: 4px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-default), transparent);
}

/* ================================
   SERVICES GRID
   ================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  position: relative;
  padding: 2.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  transition: all 0.4s ease;
}

.service-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-highlight);
  transform: translateY(-4px);
}

.service-card:hover .service-number {
  color: var(--accent-cyan);
}

.service-card:hover .service-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent-cyan);
}

.service-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

.service-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  letter-spacing: -0.01em;
}

.service-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.service-arrow {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

/* ================================
   WORK/PORTFOLIO SECTION
   ================================ */
.work-section {
  background: var(--bg-secondary);
}

.project-showcase {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4rem;
  align-items: start;
}

.project-main {
  padding: 3rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.project-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-amber));
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

.project-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 1rem 0;
  letter-spacing: -0.02em;
}

.project-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
}

.project-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.project-cta:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.project-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-nav-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.project-nav-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.project-counter {
  font-family: var(--font-mono);
  font-size: 1rem;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.project-current {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.project-divider {
  color: var(--text-muted);
}

.project-total {
  color: var(--text-tertiary);
}

.project-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.thumbnail {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 280px;
}

.thumbnail:hover {
  border-color: var(--border-default);
  color: var(--text-secondary);
}

.thumbnail.active {
  background: var(--bg-tertiary);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.thumbnail-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.thumbnail.active .thumbnail-number {
  color: var(--accent-cyan);
}

/* ================================
   ABOUT SECTION
   ================================ */
.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text {
  max-width: 640px;
}

.about-lead {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
}

.about-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0 0 2.5rem 0;
}

.tech-stack {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.tech-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

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

.tech-tags span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.tech-tags span:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
}

.stat-item {
  text-align: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-cyan);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ================================
   CONTACT SECTION
   ================================ */
.contact-section {
  padding: var(--section-padding) 3rem;
  background: var(--bg-secondary);
  position: relative;
  z-index: 2;
}

.contact-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 1rem 0 0 0;
  letter-spacing: -0.03em;
}

.contact-accent {
  color: var(--accent-cyan);
}

.contact-right {
  max-width: 480px;
}

.contact-description {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 0 2.5rem 0;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.form-input,
.form-textarea {
  padding: 1rem 1.25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-dim);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-success {
  padding: 1rem 1.25rem;
  background: rgba(0, 255, 200, 0.1);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-size: 0.95rem;
}

.form-error {
  padding: 1rem 1.25rem;
  background: rgba(255, 95, 87, 0.1);
  border: 1px solid #ff5f57;
  color: #ff5f57;
  font-size: 0.95rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 2.5rem;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-btn:hover {
  background: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 255, 200, 0.2);
}

.contact-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ================================
   FOOTER
   ================================ */
.footer {
  padding: 2rem 3rem;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 2;
}

.footer-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
}

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

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

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ================================
   ANIMATIONS
   ================================ */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Glitch text effect */
.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  animation: glitch-1 2s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
  color: var(--cyber-cyan);
}

.glitch-text::after {
  animation: glitch-2 2s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
  color: var(--breach-red);
}

@keyframes glitch-1 {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
}

@keyframes glitch-2 {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(2px); }
  40% { transform: translateX(-2px); }
  60% { transform: translateX(1px); }
  80% { transform: translateX(-1px); }
}

/* Typewriter effect */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--accent-cyan);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--accent-cyan) }
}

/* ================================
   BLOG STYLES
   ================================ */
.blog-header {
  border-bottom: 1px solid rgba(0, 255, 65, 0.1);
}

.blog-header .header-tagline {
  color: var(--matrix-green);
  animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
  0%, 100% { opacity: 0.7; text-shadow: none; }
  50% { opacity: 1; text-shadow: 0 0 5px var(--matrix-green); }
}

.system-info {
  display: flex;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.system-item {
  display: flex;
  gap: 0.5rem;
}

.system-label {
  color: var(--text-muted);
}

.system-value {
  color: var(--text-secondary);
}

.status-online {
  color: var(--matrix-green) !important;
  animation: blink 1s infinite;
}

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

/* Terminal window */
.terminal-window {
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid rgba(0, 255, 65, 0.3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 255, 65, 0.1),
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 100px rgba(0, 255, 65, 0.05),
    inset 0 0 60px rgba(0, 255, 65, 0.02);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1rem;
  background: rgba(22, 27, 34, 0.9);
  border-bottom: 1px solid rgba(0, 255, 65, 0.1);
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

.terminal-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
}

.terminal-btn.red { background: #ff5f57; }
.terminal-btn.yellow { background: #febc2e; }
.terminal-btn.green { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex: 1;
  text-align: center;
}

.terminal-body {
  padding: 2rem;
}

.terminal-line {
  font-family: var(--font-terminal);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.prompt {
  color: var(--matrix-green);
  font-weight: 600;
}

.cursor {
  color: var(--matrix-green);
  font-weight: 400;
  animation: cursorBlink 1s step-end infinite;
}

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

.terminal-output {
  border-left: 2px solid var(--matrix-green);
  padding-left: 1.5rem;
  margin-left: 1rem;
}

.ascii-art {
  font-family: var(--font-terminal);
  font-size: 0.65rem;
  line-height: 1.1;
  color: var(--matrix-green);
  margin: 0 0 1.5rem 0;
  text-shadow: 0 0 10px var(--matrix-green);
  white-space: pre;
}

/* Blog filter bar */
.filter-section {
  padding: 0 2rem 2rem;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: 4px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--matrix-green);
  white-space: nowrap;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-terminal);
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn:hover {
  border-color: var(--matrix-green);
  color: var(--matrix-green);
  background: var(--matrix-green-dim);
}

.filter-btn.active {
  border-color: var(--matrix-green);
  color: var(--matrix-green);
  background: var(--matrix-green-dim);
  box-shadow: 0 0 10px var(--matrix-green-dim);
}

.filter-key {
  color: var(--text-muted);
  font-size: 0.65rem;
}

/* Blog posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.post-card {
  position: relative;
  padding: 1.5rem;
  background: rgba(13, 17, 23, 0.9);
  border: 1px solid rgba(0, 255, 65, 0.15);
  transition: all 0.3s ease;
  overflow: hidden;
}

.post-card:hover {
  border-color: var(--matrix-green);
  background: rgba(13, 17, 23, 0.95);
  box-shadow:
    0 0 20px rgba(0, 255, 65, 0.1),
    inset 0 0 30px rgba(0, 255, 65, 0.02);
  transform: translateY(-4px);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.post-category {
  font-family: var(--font-display);
  font-size: 0.65rem;
  padding: 0.25rem 0.75rem;
  background: var(--matrix-green-dim);
  color: var(--matrix-green);
  letter-spacing: 0.1em;
  border: 1px solid rgba(0, 255, 65, 0.3);
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.post-index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-body {
  margin-bottom: 1.5rem;
}

.post-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  line-height: 1.4;
  display: flex;
  gap: 0.5rem;
  transition: color 0.3s ease;
}

.post-card:hover .post-title {
  color: var(--matrix-green);
  text-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
}

.post-prefix {
  color: var(--matrix-green);
  font-weight: 400;
}

.post-excerpt {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 255, 65, 0.1);
}

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

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyber-cyan);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.post-card:hover .post-tag {
  opacity: 1;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.read-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.read-btn {
  font-family: var(--font-terminal);
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--matrix-green);
  color: var(--matrix-green);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.read-btn:hover {
  background: var(--matrix-green);
  color: var(--terminal-black);
  box-shadow: 0 0 15px var(--matrix-green-glow);
}

/* Blog post reader styles */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--terminal-gray);
  z-index: 1001;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--matrix-green), var(--cyber-cyan));
  box-shadow: 0 0 10px var(--matrix-green), 0 0 20px var(--matrix-green-glow);
  transition: width 0.1s ease-out;
}

.article-content {
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--section-padding) + 100px) 2rem var(--section-padding);
}

.markdown-content {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-secondary);
}

.markdown-content h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--matrix-green);
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.markdown-content h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 255, 65, 0.1);
}

.markdown-content h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.markdown-content p {
  margin: 0 0 1.5rem;
}

.markdown-content ul,
.markdown-content ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

.markdown-content li {
  margin: 0.5rem 0;
}

.markdown-content a {
  color: var(--cyber-cyan);
  text-decoration: none;
  border-bottom: 1px dashed var(--cyber-cyan);
  transition: all 0.3s ease;
}

.markdown-content a:hover {
  color: var(--matrix-green);
  border-color: var(--matrix-green);
  text-shadow: 0 0 5px var(--matrix-green);
}

.markdown-content code {
  font-family: var(--font-terminal);
  font-size: 0.9em;
  background: var(--matrix-green-dim);
  color: var(--matrix-green);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid rgba(0, 255, 65, 0.2);
}

.markdown-content pre {
  margin: 2rem 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 65, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.markdown-content pre code {
  display: block;
  padding: 1.25rem;
  background: rgba(13, 17, 23, 0.98);
  border: none;
  overflow-x: auto;
}

.markdown-content blockquote {
  position: relative;
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(0, 255, 65, 0.03);
  border-left: 3px solid var(--matrix-green);
  border-radius: 0 4px 4px 0;
  font-style: italic;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-family: var(--font-terminal);
  font-size: 0.85rem;
}

.markdown-content th {
  background: var(--matrix-green-dim);
  color: var(--matrix-green);
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 255, 65, 0.3);
}

.markdown-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 255, 65, 0.1);
}

.markdown-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--matrix-green), transparent);
  margin: 3rem 0;
  opacity: 0.3;
}

/* ================================
   ERROR PAGES
   ================================ */
.error-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(8rem, 20vw, 15rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  margin-bottom: 2rem;
}

.error-code.red { color: var(--breach-red); text-shadow: 0 0 50px rgba(255, 0, 51, 0.3); }
.error-code.cyan { color: var(--accent-cyan); text-shadow: 0 0 50px rgba(0, 255, 200, 0.3); }
.error-code.amber { color: var(--accent-amber); text-shadow: 0 0 50px rgba(255, 184, 0, 0.3); }

.error-terminal {
  max-width: 600px;
  width: 100%;
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  overflow: hidden;
}

.error-terminal.red { border-color: var(--breach-red); }
.error-terminal.cyan { border-color: var(--accent-cyan); }
.error-terminal.amber { border-color: var(--accent-amber); }

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* ================================
   WEBSITE BUILDER
   ================================ */
.builder-form {
  max-width: 800px;
  margin: 0 auto;
}

.builder-section {
  margin-bottom: 2rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.builder-section h2 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.color-input {
  display: flex;
  gap: 0.5rem;
}

.color-picker {
  width: 50px;
  height: 42px;
  border: none;
  cursor: pointer;
  background: none;
}

.color-text {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1.25rem 2rem;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 255, 200, 0.2);
}

.status-panel {
  text-align: center;
  padding: 4rem 2rem;
}

.spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  position: relative;
}

.spinner-ring {
  width: 100%;
  height: 100%;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.status-text {
  color: var(--text-secondary);
  /*margin-bottom: 2rem;*/
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.download-btn:hover {
  background: var(--text-primary);
  transform: translateY(-2px);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 1200px) {
  .header {
    padding: 1.25rem 2rem;
  }

  .header-right {
    display: none;
  }

  .hero, .section {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    min-height: auto;
    padding-top: calc(var(--section-padding) + 100px);
  }

  .hero-visual {
    max-width: 500px;
  }

  .circuit-lines {
    display: none;
  }

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

  .project-showcase {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .project-thumbnails {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .thumbnail {
    min-width: auto;
    flex: 1 1 200px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-stats {
    flex-direction: row;
    justify-content: space-around;
  }

  .stat-item {
    border-bottom: none;
    border-right: 1px solid var(--border-subtle);
    padding: 1rem 2rem;
  }

  .stat-item:last-child {
    border-right: none;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-right {
    max-width: none;
  }

  .system-info {
    display: none;
  }

  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .header-left {
    width: 100%;
    justify-content: center;
  }

  .header-tagline {
    display: none;
  }

  .nav {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding-top: 160px;
    padding-bottom: 4rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    justify-content: center;
  }

  .service-card {
    padding: 2rem;
  }

  .service-number {
    font-size: 2.5rem;
  }

  .about-stats {
    flex-direction: column;
  }

  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem 0;
  }

  .stat-item:last-child {
    border-bottom: none;
  }

  .contact-title {
    font-size: 2.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    gap: 1.5rem;
  }

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

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-buttons {
    width: 100%;
  }

  .filter-btn {
    flex: 1;
    justify-content: center;
    min-width: calc(50% - 0.25rem);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav {
    gap: 1rem;
  }

  .nav-link span:not(.nav-number) {
    font-size: 0.85rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .code-content {
    padding: 1rem;
    font-size: 0.7rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .filter-key {
    display: none;
  }
}
