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

:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2129;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-subtle: #6e7681;
  --accent: #58a6ff;
  --accent-green: #3fb950;
  --accent-orange: #d29922;
  --tag-bg: #21262d;
  --tag-border: #30363d;
  --tag-text: #c9d1d9;
  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 900px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ─── Nav ──────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-card);
  text-decoration: none;
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
}

.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-photo-wrap {
  flex-shrink: 0;
}

.hero-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--border);
  box-shadow: 0 0 0 6px rgba(88, 166, 255, 0.08);
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #e6edf3 30%, #8b949e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-bio {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-bio strong {
  color: var(--text);
  font-weight: 600;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* ─── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  opacity: 0.85;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--text-subtle);
}

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-subtle);
  font-size: 13px;
  margin-left: 4px;
}

/* ─── Section ──────────────────────────────────────────────────── */
.section {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child {
  border-bottom: none;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  margin-bottom: 32px;
}

/* ─── Timeline / Jobs ──────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.job {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s;
}

.job:hover {
  border-color: var(--text-subtle);
}

.job-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.job-meta-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.company-logo {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  overflow: hidden;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
}

.company-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* fallback badge colors — shown if img fails to load */
.logo-ba { background: #fff; }
.logo-ba.logo-text { background: #0f2d52; color: #4a9eff; }
.logo-cr { background: #fff; }
.logo-cr.logo-text { background: #1a1a2e; color: #7b68ee; }
.logo-c1 { background: #fff; }
.logo-c1.logo-text { background: #c8102e; color: #fff; }
.logo-iv { background: #fff; }
.logo-iv.logo-text { background: #1a3a2a; color: #4ade80; }
.logo-ca { background: #fff; }
.logo-ca.logo-text { background: #7c3aed; color: #fff; }
.logo-osu { background: #fff; }
.logo-osu.logo-text { background: #bb0000; color: #fff; }

.job-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.job-company {
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-mono);
}

.job-dates {
  font-size: 12px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  white-space: nowrap;
  padding-top: 2px;
}

.job-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.job-bullets li {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  padding-left: 16px;
  position: relative;
}

.job-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-size: 11px;
  top: 3px;
}

/* ─── Skills ───────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.skill-group {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s;
}

.skill-group:hover {
  border-color: var(--text-subtle);
}

.skill-group-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  margin-bottom: 12px;
}

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

.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tag-text);
  transition: border-color 0.15s, color 0.15s;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-mono {
  font-family: var(--font-mono);
}

/* ─── Open Source ──────────────────────────────────────────────── */
.oss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.oss-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.oss-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  text-decoration: none;
}

.oss-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-subtle);
}

.oss-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(63, 185, 80, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.oss-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
}

.oss-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.oss-link {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  margin-top: 4px;
}

/* ─── Education ────────────────────────────────────────────────── */
.edu-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.edu-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.edu-school {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.edu-degree {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.edu-focus {
  font-size: 12px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

/* ─── Footer ───────────────────────────────────────────────────── */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-subtle);
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-subtle);
  font-size: 13px;
  transition: color 0.15s;
}

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

/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero-container {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 24px;
  }

  .hero-photo {
    width: 120px;
    height: 120px;
  }

  .job-meta {
    flex-direction: column;
    gap: 4px;
  }

  .edu-meta {
    flex-direction: column;
    gap: 4px;
  }

  .nav-links {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
