/* ================================
   CSS Variables & Reset
================================ */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-card: #15151f;
  
  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --accent-cyan: #00d4ff;
  --accent-purple: #a855f7;
  --accent-green: #22c55e;
  --accent-yellow: #facc15;
  --accent-red: #ef4444;
  --accent-orange: #f97316;
  
  --gradient-primary: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  --gradient-glow: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
  
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Space Grotesk', -apple-system, sans-serif;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 212, 255, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================
   Hero / Terminal Section
================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
  background: 
    var(--gradient-glow),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    var(--bg-primary);
  position: relative;
}

.terminal-window {
  width: 100%;
  max-width: 700px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 
    0 0 60px rgba(0, 212, 255, 0.1),
    0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.terminal-header {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
}

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

.terminal-btn.red { background: var(--accent-red); }
.terminal-btn.yellow { background: var(--accent-yellow); }
.terminal-btn.green { background: var(--accent-green); }

.terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
}

.typing-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.prompt {
  color: var(--accent-green);
  font-weight: 700;
}

.command {
  color: var(--text-primary);
}

.cursor {
  color: var(--accent-cyan);
  animation: blink 1s infinite;
}

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

.output {
  margin-top: 20px;
}

.ascii-art {
  color: var(--accent-cyan);
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.tagline {
  color: var(--text-secondary);
  font-size: 14px;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ================================
   Section Styles
================================ */
.section {
  padding: 100px 0;
  position: relative;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.title-icon {
  color: var(--accent-cyan);
  font-size: 24px;
  font-family: var(--font-mono);
}

/* ================================
   Tech Stack Section
================================ */
.tech-stack {
  background: var(--bg-secondary);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.stack-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.stack-category:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.1);
  transform: translateY(-4px);
}

.stack-category h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-icon {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--accent-cyan);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--font-mono);
  transition: all 0.2s ease;
}

.tag:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: var(--accent-cyan);
}

/* ================================
   Projects Section
================================ */
.projects {
  background: var(--bg-primary);
}

.project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.08);
}

.project-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 12px;
}

.project-number {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-purple);
  font-weight: 700;
}

.project-header h3 {
  font-size: 24px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.project-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 15px;
}

/* Architecture Diagram */
.architecture-diagram {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.arch-layer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.layer-label {
  width: 80px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.arch-nodes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.arch-node {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-mono);
  text-align: center;
  min-width: 100px;
}

.arch-node.highlight {
  border-color: var(--accent-green);
  background: rgba(34, 197, 94, 0.1);
}

.arch-node small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

.arch-arrow-down {
  width: 2px;
  height: 20px;
  background: var(--accent-cyan);
  margin: 8px 0 8px 130px;
  position: relative;
}

.arch-arrow-down::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: -4px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid var(--accent-cyan);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.metric {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Code Block */
.code-block {
  background: #1e1e2e;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.code-header {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  border-bottom: 1px solid var(--border-color);
}

.code-block pre {
  padding: 20px;
  overflow-x: auto;
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
}

.code-keyword { color: var(--accent-purple); }
.code-string { color: var(--accent-green); }
.code-number { color: var(--accent-orange); }
.code-boolean { color: var(--accent-cyan); }
.code-comment { color: var(--text-muted); font-style: italic; }

/* Pipeline Flow */
.pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 12px;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
}

.step-icon {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.1);
  padding: 6px 10px;
  border-radius: 4px;
}

.pipeline-connector {
  width: 40px;
  height: 2px;
  background: var(--accent-cyan);
  position: relative;
}

.pipeline-connector::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--accent-cyan);
}

/* Hybrid Diagram */
.hybrid-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.cloud-box {
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  min-width: 180px;
}

.cloud-box.aws {
  background: rgba(249, 115, 22, 0.1);
  border: 2px solid var(--accent-orange);
}

.cloud-box.onprem {
  background: rgba(0, 212, 255, 0.1);
  border: 2px solid var(--accent-cyan);
}

.cloud-label {
  display: block;
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 14px;
}

.cloud-services {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.vpn-tunnel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tunnel-line {
  width: 60px;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent-purple),
    var(--accent-purple) 8px,
    transparent 8px,
    transparent 12px
  );
  animation: dash 1s linear infinite;
}

@keyframes dash {
  to { background-position: 20px 0; }
}

.tunnel-label {
  font-size: 10px;
  color: var(--accent-purple);
  font-family: var(--font-mono);
}

/* Migration Flow */
.migration-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.migration-source,
.migration-target {
  text-align: center;
}

.mig-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.mig-box {
  padding: 16px 24px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  margin-bottom: 8px;
}

.mig-box.old {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}

.mig-box.new {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
}

.mig-count {
  font-size: 11px;
  color: var(--text-muted);
}

.migration-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
}

.migration-arrow .arrow-line {
  width: 80px;
  height: 2px;
  background: var(--accent-cyan);
  position: relative;
}

.migration-arrow .arrow-line::after {
  content: '';
  position: absolute;
  right: -6px;
  top: -4px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--accent-cyan);
}

/* Observability Flow */
.obs-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 24px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  margin-bottom: 24px;
}

.obs-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
}

.obs-node.alert {
  border-color: var(--accent-yellow);
  background: rgba(250, 204, 21, 0.1);
}

.obs-icon {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(0, 212, 255, 0.15);
  padding: 6px 8px;
  border-radius: 4px;
}

.obs-connector {
  width: 30px;
  height: 2px;
  background: var(--accent-cyan);
  position: relative;
}

.obs-connector::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--accent-cyan);
}

/* GitOps Diagram */
.gitops-diagram {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.gitops-layer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
}

.gitops-node {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-mono);
  text-align: center;
}

.gitops-node.highlight {
  border-color: var(--accent-purple);
  background: rgba(168, 85, 247, 0.1);
}

.gitops-connector {
  width: 40px;
  height: 2px;
  background: var(--accent-cyan);
  position: relative;
}

.gitops-connector::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--accent-cyan);
}

.gitops-split {
  display: flex;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
}

.gitops-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.branch-label {
  font-size: 11px;
  color: var(--accent-green);
  font-family: var(--font-mono);
}

.gitops-connector-v {
  width: 2px;
  height: 20px;
  background: var(--accent-cyan);
  position: relative;
}

.gitops-connector-v::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: -4px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid var(--accent-cyan);
}

.node-types {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.node-type {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.node-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.node-icon.on-demand { background: var(--accent-cyan); }
.node-icon.spot { background: var(--accent-yellow); }
.node-icon.gpu { background: var(--accent-green); }

/* ================================
   Links Section
================================ */
.links {
  background: var(--bg-secondary);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.link-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.15);
  transform: translateY(-4px);
}

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

.link-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.link-url {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ================================
   Footer
================================ */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer p {
  color: var(--text-muted);
  font-size: 14px;
}

.footer code {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.heart {
  color: var(--accent-red);
}

/* ================================
   Responsive
================================ */
@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .project-header h3 {
    font-size: 20px;
  }
  
  .ascii-art {
    font-size: 8px;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hybrid-diagram,
  .migration-flow {
    flex-direction: column;
  }
  
  .vpn-tunnel {
    transform: rotate(90deg);
    margin: 10px 0;
  }
  
  .gitops-split {
    gap: 30px;
  }
  
  .pipeline-connector,
  .obs-connector {
    width: 20px;
  }
}

@media (max-width: 480px) {
  .terminal-window {
    border-radius: 8px;
  }
  
  .project-card {
    padding: 20px;
  }
  
  .pipeline-flow,
  .obs-flow {
    gap: 8px;
  }
  
  .pipeline-step,
  .obs-node {
    padding: 8px 12px;
    font-size: 10px;
  }
  
  .pipeline-connector,
  .obs-connector,
  .gitops-connector {
    display: none;
  }
}
