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

:root {
  --bg:        #0d0d0d;
  --bg-2:      #141414;
  --bg-card:   #1a1a1a;
  --bg-hover:  #222222;
  --text:      #e8e8e8;
  --text-2:    #888888;
  --text-3:    #555555;
  --accent:    #00ff87;   /* electric green */
  --accent-2:  #00cc6a;  /* hover state */
  --border:    #2a2a2a;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w:     860px;
  --radius:    4px;
  --transition: 150ms ease;
}

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

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

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

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

/* ── Layout ───────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.05em;
  opacity: 0.8;
}

h2 {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ── Hero ─────────────────────────────────────── */
#hero {
  padding-top: 120px;
  padding-bottom: 100px;
  border-bottom: 1px solid var(--border);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 48px;
  max-width: 640px;
  min-height: 42px;
}

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

.prompt {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.name {
  font-family: var(--font-mono);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.prompt-static {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #00ff87;
  margin-left: 8px;
  white-space: nowrap;
  user-select: none;
}

.tagline {
  font-family: var(--font-mono);
  font-size: clamp(15px, 2.5vw, 18px);
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 2px;
}

.type-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  min-height: 1.4em;
  display: inline;
}

.type-cursor {
  color: var(--accent);
  animation: blink 1.2s step-end infinite;
  font-family: var(--font-mono);
  font-size: 13px;
}

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

.value-prop {
  font-size: 16px;
  color: var(--text-2);
  max-width: 520px;
  line-height: 1.7;
}

.hero-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.btn-ghost {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 8px 20px;
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.03em;
}

.btn-ghost:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── About ─────────────────────────────────────── */
#about p {
  color: var(--text-2);
  max-width: 620px;
  line-height: 1.75;
  font-size: 15px;
}

.stack-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: rgba(0, 255, 135, 0.07);
  border: 1px solid rgba(0, 255, 135, 0.2);
  border-radius: 3px;
  padding: 4px 10px;
  letter-spacing: 0.03em;
  transition: background 150ms, border-color 150ms, transform 150ms;
}

.tag:hover {
  background: rgba(0, 255, 135, 0.14);
  border-color: rgba(0, 255, 135, 0.5);
  transform: translateY(-1px);
}

/* language tag colour variants */
.tag:nth-child(7n+1) { color: #ff6b6b; border-color: rgba(255,107,107,0.25); background: rgba(255,107,107,0.07); }
.tag:nth-child(7n+2) { color: #ffd93d; border-color: rgba(255,217,61,0.25);  background: rgba(255,217,61,0.07);  }
.tag:nth-child(7n+3) { color: #6bcb77; border-color: rgba(107,203,119,0.25); background: rgba(107,203,119,0.07); }
.tag:nth-child(7n+4) { color: #4d96ff; border-color: rgba(77,150,255,0.25);  background: rgba(77,150,255,0.07);  }
.tag:nth-child(7n+5) { color: #c77dff; border-color: rgba(199,125,255,0.25); background: rgba(199,125,255,0.07); }
.tag:nth-child(7n+6) { color: #00ff87; border-color: rgba(0,255,135,0.2);    background: rgba(0,255,135,0.07);  }
.tag:nth-child(7n+0) { color: #ff9f43; border-color: rgba(255,159,67,0.25);  background: rgba(255,159,67,0.07);  }

/* ── Work ──────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 200ms ease;
}

.project-card:hover {
  border-color: rgba(0, 255, 135, 0.4);
  background: var(--bg-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 255, 135, 0.05);
  transform: translateY(-3px);
}

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

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-name {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.project-links {
  display: flex;
  gap: 10px;
}

.icon-link {
  color: var(--text-3);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

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

.project-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Skills ────────────────────────────────────── */
.section-intro {
  color: var(--text-2);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
  font-size: 15px;
}

.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 200ms, transform 200ms;
}

.skill-card:hover {
  border-color: rgba(0, 255, 135, 0.35);
  transform: translateY(-2px);
}

.skill-body h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.skill-body p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 14px;
}

.code-block {
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.code-header {
  background: #111;
  border-bottom: 1px solid #222;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.code-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.code-dot-red { background: #ff5f57; }
.code-dot-yellow { background: #febc2e; }
.code-dot-green { background: #28c840; }
.code-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #555;
  margin-left: 8px;
  flex: 1;
}
.code-body {
  padding: 16px;
  overflow-x: auto;
}
.code-body pre {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--accent);
  margin: 0;
  white-space: pre;
}

.skill-install {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 14px;
  line-height: 1.5;
}

.skill-install-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #555;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 540px) {
  .skill-card { flex-direction: column; }
}

/* ── Contact ───────────────────────────────────── */
#contact p {
  color: var(--text-2);
  max-width: 480px;
  line-height: 1.7;
  font-size: 15px;
}

.contact-email {
  font-family: var(--font-mono);
  font-size: 16px;
}

.contact-email a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 255, 135, 0.3);
  padding-bottom: 2px;
  transition: border-color var(--transition);
}

.contact-email a:hover {
  border-color: var(--accent);
}

.social-links {
  display: flex;
  gap: 16px;
  padding-top: 8px;
}

.social-link {
  color: var(--text-3);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.social-link:hover {
  color: var(--accent);
}

/* ── Footer ────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.footer-sep {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ── Focus ─────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 480px) {
  section {
    padding: 64px 0 60px;
  }

  #hero {
    padding-top: 80px;
    padding-bottom: 64px;
  }

  .terminal-bar {
    max-width: 100%;
  }
}
