:root {
  /* Color tokens */
  --bg: #0b0e12;
  --bg-panel: #12161c;
  --bg-panel-hover: #161b22;
  --border: #232a33;
  --border-light: #2d3540;
  --text-primary: #e6edf3;
  --text-muted: #8b96a3;
  --text-dim: #5c6672;
  --accent: #5fd4c8;
  --accent-dim: #3a8f86;
  --accent-warm: #e3b341;
  --status-green: #56d364;
  --status-red: #f0605a;

  /* Type */
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --font-sans: 'Inter', -apple-system, sans-serif;

  --radius: 6px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Title bar ---------- */
.titlebar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  position: sticky;
  top: 0;
  z-index: 10;
}

.titlebar-dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red {
  background: var(--status-red);
}

.dot-amber {
  background: var(--accent-warm);
}

.dot-green {
  background: var(--status-green);
}

.titlebar-path {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- Layout ---------- */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

/* ---------- Hero ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--status-green);
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}

.name {
  font-family: var(--font-mono);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.role {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent);
  margin: 8px 0 4px;
}

.tagline {
  color: var(--text-muted);
  margin: 0 0 28px;
  font-size: 1.05rem;
}

.bio {
  max-width: 640px;
  color: var(--text-primary);
  font-size: 1rem;
  margin: 0 0 36px;
}

/* ---------- Fields (contact info) ---------- */
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 20px 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 36px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.field-value {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.field-link {
  color: var(--accent);
  text-decoration: none;
}

.field-link:hover {
  text-decoration: underline;
}

/* ---------- Resume link ---------- */
.resume-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--bg);
  background: var(--accent);
  padding: 8px 14px;
  border-radius: 4px;
  text-decoration: none;
  margin-bottom: 28px;
}

.resume-link:hover {
  background: var(--accent-dim);
}

/* ---------- Skills ---------- */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 5px 10px;
  background: var(--bg-panel);
}

/* ---------- Projects section ---------- */
.projects {
  margin-top: 72px;
}

.section-header {
  margin-bottom: 28px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-warm);
}

.section-title {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  margin: 6px 0 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.project-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #1a1f26;
  border-bottom: 1px solid var(--border);
  display: block;
}

.project-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #1a1f26;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.project-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.project-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.status-dot.live {
  background: var(--status-green);
  box-shadow: 0 0 6px var(--status-green);
}

.status-dot.offline {
  background: var(--accent-warm);
}

.status-dot.repo {
  background: var(--text-dim);
}

.project-status-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.project-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

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

.project-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  padding: 2px 6px;
}

.project-link {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  border-top: 1px dashed var(--border-light);
}

.project-link:hover {
  text-decoration: underline;
}

/* ---------- Footer ---------- */
.footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.footer a {
  color: var(--text-dim);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  main {
    padding: 40px 16px 72px;
  }

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

  .footer {
    flex-direction: column;
    gap: 8px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .project-card {
    transition: none;
  }
}

/* ---------- Focus visibility ---------- */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}