/* =============================================
   THE LONDON CODER — Main Stylesheet
   ============================================= */

:root {
  --bg:           #060810;
  --bg-card:      rgba(255, 255, 255, 0.03);
  --bg-card-hover:rgba(255, 255, 255, 0.06);
  --border:       rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 255, 180, 0.4);
  --accent:       #00ffb4;
  --accent-dim:   rgba(0, 255, 180, 0.15);
  --accent2:      #6c63ff;
  --text:         #e2e8f0;
  --text-muted:   #64748b;
  --text-dim:     #94a3b8;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --font-sans:    'Inter', system-ui, sans-serif;
  --glow:         0 0 40px rgba(0, 255, 180, 0.12);
  --glow-strong:  0 0 80px rgba(0, 255, 180, 0.2);
  --radius:       14px;
  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ── Animated canvas background ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.4;
}

/* ── Noise texture overlay ── */
.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ── Container ── */
.container {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero ── */
.hero {
  padding: 80px 0 64px;
}

.terminal-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  padding: 10px 16px;
  margin-bottom: 0;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }

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

.hero-content {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 40px 40px 48px;
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(10px);
}

.hero-prompt {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.prompt-char {
  color: var(--accent);
  font-weight: 700;
  margin-right: 6px;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent) 60%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: var(--accent);
  margin-bottom: 20px;
  min-height: 1.5em;
}

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

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

.hero-desc {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 520px;
  line-height: 1.7;
}

/* ── Projects section ── */
.projects-section {
  padding: 16px 0 80px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Project card ── */
.project-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0, 255, 180, 0.04));
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--glow), 0 20px 60px rgba(0,0,0,0.4);
}

.project-card:hover::before {
  opacity: 1;
}

.card-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(0, 255, 180, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.project-card:hover .card-glow {
  opacity: 1;
}

.card-inner {
  position: relative;
  padding: 28px;
  z-index: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.card-index {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 255, 180, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

.card-arrow {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.project-card:hover .card-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

.card-title {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  transition: color var(--transition);
}

.project-card:hover .card-title {
  color: #fff;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

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

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 4px;
  transition: var(--transition);
}

.project-card:hover .tag {
  border-color: rgba(0, 255, 180, 0.15);
  color: var(--accent);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-social {
  display: flex;
  gap: 20px;
}

.social-link {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
}

.social-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Scan line effect ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
}

/* ── Fade-in animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero        { animation: fadeUp 0.8s ease both; }
.projects-section { animation: fadeUp 0.8s 0.2s ease both; }
.site-footer { animation: fadeUp 0.8s 0.4s ease both; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero-content { padding: 28px 24px 36px; }
  .projects-grid { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
