/* ═══════════════════════════════════════════
   CSS Variables
═══════════════════════════════════════════ */
:root {
  --primary:       #1e5809;
  --accent:        #4ade80;   /* bright green — highlights & glow */
  --bg:            #080808;
  --surface:       #0f0f0f;
  --surface-2:     #161616;
  --border:        #1e3a12;
  --border-bright: #2d5a1b;
  --text:          #d4d4d4;
  --text-muted:    #6b7280;
  --text-dim:      #374151;
  --tag-bg:        #0e2209;
  --tag-text:      #86efac;
  --shadow-glow:   0 0 20px rgba(30, 88, 9, 0.3);
  --shadow-card:   0 4px 24px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  /* Subtle scanline texture */
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 0, 0.012) 2px,
    rgba(0, 255, 0, 0.012) 4px
  );
}

/* ═══════════════════════════════════════════
   Typography
═══════════════════════════════════════════ */
h1, h2, h3,
.terminal-prompt,
.role-line,
.bio-title,
.skill-title,
.card-chrome-path,
code {
  font-family: 'Space Mono', monospace;
}

code {
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.85em;
}

.highlight {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   Layout
═══════════════════════════════════════════ */
.container {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.bio-section {
  flex: 0 0 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 2.5rem 1.25rem;
  text-align: center;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  /* thin scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── Main ── */
.main-content {
  flex: 1;
  background: var(--bg);
  padding: 3.5rem 3.5rem 5rem;
  max-width: 900px;
}

/* ═══════════════════════════════════════════
   Sidebar
═══════════════════════════════════════════ */
.bio-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.bio-image {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid var(--border-bright);
  margin-bottom: 1.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.bio-image:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.3);
}

.bio-section p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.welcome-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 1.25rem 0;
}

.welcome-text::before { content: '> '; }

/* ── Social Links ── */
.social-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  margin: 1.25rem 0;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  font-size: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.2);
}

/* ── Email button ── */
.email-btn {
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-bright);
  padding: 0.6rem 1rem;
  border-radius: 3px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.email-btn:hover,
.email-btn:focus-visible {
  background: var(--primary);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

/* ═══════════════════════════════════════════
   Hero
═══════════════════════════════════════════ */
.hero {
  margin-bottom: 2rem;
}

.terminal-prompt {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.name {
  font-size: 2.25rem;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 0.75rem;
  min-height: 2.75rem; /* reserve space while typing */
}

/* Blinking cursor appended via JS */
.cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.role-line {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.prompt-symbol {
  color: var(--accent);
  margin-right: 0.4em;
  user-select: none;
}

/* ── Descriptions ── */
.descriptions {
  margin-bottom: 0.5rem;
}

.description {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 68ch;
  margin-bottom: 0.9rem;
}

/* ═══════════════════════════════════════════
   Buttons
═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  padding: 0.65rem 1.1rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
  cursor: pointer;
}

.projects-btn {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--border-bright);
  margin: 1.5rem 0 0;
}

.projects-btn:hover,
.projects-btn:focus-visible {
  background: var(--surface-2);
  box-shadow: var(--shadow-glow);
  color: var(--accent);
}

/* Universal focus ring */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════
   Section Headers
═══════════════════════════════════════════ */
.skills-section,
.projects-section {
  margin-top: 3.5rem;
}

.skills-section h2,
.projects-section h2 {
  font-size: 1.1rem;
  color: #fff;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════
   Skills Grid
═══════════════════════════════════════════ */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 1rem;
  margin-top: 2rem;
}

.skill-category {
  flex: 1 1 calc(33% - 1rem);
  min-width: 180px;
}

.skill-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-left: 3px solid var(--primary);
  padding-left: 0.6rem;
  margin-bottom: 1rem;
}

.skill-category i {
  font-size: 2.5rem;
  margin-right: 0.5rem;
  opacity: 0.8;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.skill-category i:hover {
  opacity: 1;
  filter: drop-shadow(0 0 6px var(--accent));
}

/* ═══════════════════════════════════════════
   Projects Grid
═══════════════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ── Card ── */
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* Terminal title-bar chrome */
.card-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

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

.card-chrome-path {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Card body */
.card-body {
  padding: 1.5rem;
}

.card-body h3 {
  font-family: 'Space Mono', monospace;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.project-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

/* Tech tags */
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin-bottom: 1.25rem;
}

.project-tech li {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  background: var(--tag-bg);
  color: var(--tag-text);
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  border: 1px solid var(--border);
}

/* Project links */
.project-links {
  display: flex;
  gap: 1rem;
}

.project-links a {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease;
}

.project-links a:hover,
.project-links a:focus-visible {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   Scroll-to-top
═══════════════════════════════════════════ */
.scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  font-size: 1rem;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 100;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════
   Mobile Responsive
═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .bio-section {
    position: static;
    height: auto;
    flex: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 2rem 1.5rem;
  }

  .bio-title {
    display: none; /* name shown in hero below */
  }

  .bio-section p {
    max-width: 55ch;
    margin: 0.5rem auto;
  }

  .main-content {
    padding: 2rem 1.25rem 4rem;
  }

  .description {
    max-width: 100%;
  }

  .name {
    font-size: 1.6rem;
  }

  .skill-category {
    flex: 1 1 100%;
  }

  .skill-category i {
    font-size: 3rem;
  }

  .scroll-top {
    bottom: 1rem;
    right: 1rem;
  }
}
