@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --bg: #0d1117;
  --text: #e6edf3;
  --accent: #3fb950;
  --accent-light: #1a3a27;
  --muted: #7d8590;
  --border: #30363d;
  --card-bg: #161b22;
  --nav-bg: #0d1117;
  --max-w: 860px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ─────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

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

.nav-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

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

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 150ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-cta a {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  padding: 4px 12px;
}

.nav-cta a:hover {
  background: var(--accent);
  color: #0d1117 !important;
}

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

/* ── Hero ────────────────────────────────────────────── */
#hero {
  padding: 64px 0 56px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-photo {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--border);
}

.hero-text h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.hero-bio {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 8px;
}

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

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 150ms ease;
}

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

.hero-links svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Section ─────────────────────────────────────────── */
section {
  padding: 52px 0;
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

/* ── Experience ──────────────────────────────────────── */
.exp-entry {
  margin-bottom: 40px;
}
.exp-entry:last-child { margin-bottom: 0; }

.exp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 4px;
}

.exp-title {
  font-size: 1.025rem;
  font-weight: 600;
  color: var(--text);
}

.exp-company {
  color: var(--muted);
  font-weight: 400;
}

.exp-date {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.exp-location {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.775rem;
  font-weight: 500;
  white-space: nowrap;
}

.chip-neutral {
  background: #21262d;
  color: #adbac7;
}

.exp-bullets {
  list-style: none;
  padding: 0;
}

.exp-bullets li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 6px;
  font-size: 0.925rem;
}

.exp-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
  font-weight: 400;
}

.stat {
  font-weight: 600;
  color: var(--text);
}

/* ── Skills ──────────────────────────────────────────── */
.skills-group {
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.skills-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 90px;
  flex-shrink: 0;
}

/* ── Education ───────────────────────────────────────── */
.edu-entry {
  margin-bottom: 28px;
}
.edu-entry:last-child { margin-bottom: 0; }

.edu-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 2px;
}

.edu-school {
  font-size: 1.025rem;
  font-weight: 600;
}

.edu-degree {
  color: var(--muted);
  font-size: 0.925rem;
  margin-bottom: 4px;
}

.edu-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

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

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.project-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center top;
  display: block;
  flex-shrink: 0;
}

.project-img-portrait {
  object-position: center center;
}

.project-featured .project-img {
  width: 55%;
  height: auto;
  min-height: 260px;
  object-position: left center;
  border-radius: 0;
}

.project-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.project-name {
  font-size: 1rem;
  font-weight: 600;
}

.project-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 150ms ease;
}
.project-link:hover { opacity: 0.75; }

.project-date {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

/* ── Leadership & Interests ──────────────────────────── */
.interests-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.interests-row {
  font-size: 0.925rem;
}

.interests-row strong {
  font-weight: 600;
}

/* ── GitHub Contributions Chart ──────────────────────── */
.gh-cards-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.gh-cards-row .gh-chart-wrap { flex: 2; }
.gh-cards-row .gh-cdk-wrap   { flex: 1; }

.gh-chart-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 20px 16px;
  overflow: hidden;
}

.gh-chart {
  width: 100%;
  height: auto;
  display: block;
}

.gh-chart-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 10px;
}

.gh-chart-meta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.gh-chart-meta a:hover { text-decoration: underline; }

/* ── Interest Tags ────────────────────────────────────── */
.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.interest-tag {
  background: #21262d;
  color: #adbac7;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.825rem;
  font-weight: 500;
}

/* ── Contact ─────────────────────────────────────────── */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.contact-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.contact-card svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 4px;
}

.contact-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-card-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
}

/* ── Footer ──────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease;
}
footer a:hover { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 700px) {
  .nav-inner { height: auto; padding: 14px 20px; flex-wrap: wrap; gap: 12px; }
  .nav-links { gap: 18px; }

  main { padding: 0 20px 60px; }

  #hero { flex-direction: column; align-items: flex-start; gap: 24px; padding: 40px 0 36px; }
  .hero-photo { width: 96px; height: 96px; }
  .hero-text h1 { font-size: 2.1rem; }

  section { padding: 36px 0; }

  .gh-cards-row { flex-direction: column; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-featured { flex-direction: column; }
  .project-featured .project-img { width: 100%; height: 220px; }
  .contact-cards { grid-template-columns: 1fr; }

  .exp-header { flex-direction: column; gap: 2px; }

  footer { padding: 24px 20px; }
}
