:root {
  --bg: #F7F8F7;
  --surface: #FFFFFF;
  --ink: #111413;
  --ink-muted: #575E5B;
  --border: #E4E7E5;
  --accent: #0F6B5B;
  --tag-bg: #EEF2F0;
  --tag-ink: #27443E;
  --container: 1080px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--surface);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.layout {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 4.5rem;
  align-items: start;
}

/* Sticky Left Rail */
.rail {
  position: sticky;
  top: 0;
  min-height: 100vh;
  padding: 4.5rem 0 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
}

.rail h1 {
  margin: 0 0 0.35rem;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.role {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.bio {
  margin: 0 0 1.75rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  max-width: 38ch;
  text-align: left;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.link-subtle {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #C5CCC8;
  text-underline-offset: 4px;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.link-subtle:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.section-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.section-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-weight: 500;
  transition: color 0.16s ease;
}

.section-nav a::before {
  content: "";
  width: 16px;
  height: 1px;
  background: #C5CCC8;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.section-nav a:hover,
.section-nav a.is-active {
  color: var(--ink);
}

.section-nav a.is-active::before {
  width: 28px;
  background: var(--accent);
}

.rail-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.15rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.rail-foot a {
  color: var(--ink-muted);
  text-decoration: none;
}

.rail-foot a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Right Content Column */
.content {
  padding: 4.5rem 0 5rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.block {
  scroll-margin-top: 3rem;
}

.block h2 {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Project Cards (clean bordered surfaces, zero shadows) */
.projects {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.35rem 1.5rem;
  transition: border-color 0.18s ease;
}

.project-card:hover {
  border-color: #C2CBC6;
}

.project-top {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.55rem;
}

.project-card h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.project-card h3 a {
  color: inherit;
  text-decoration: none;
}

.project-card h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-meta {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.impact {
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}

.project-desc {
  margin: 0 0 1rem;
  font-size: 0.925rem;
  color: var(--ink-muted);
  max-width: 64ch;
}

.project-desc a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #C5CCC8;
  text-underline-offset: 3px;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

.project-desc a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.22rem 0.6rem;
  border-radius: 6px;
  background: var(--tag-bg);
  color: var(--tag-ink);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Experience & Education */
.exp-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.exp-item {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.exp-item:last-child {
  border-bottom: 0;
}

.exp-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-bottom: 0.15rem;
}

.exp-top h3 {
  margin: 0;
  font-size: 0.96875rem;
  font-weight: 600;
}

.exp-org {
  margin: 0 0 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.exp-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
  max-width: 64ch;
}

.exp-item p + p {
  margin-top: 0.4rem;
}

/* Stack 2x2 Grid */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.stack-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.35rem;
}

.stack-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.stack-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .rail {
    position: static;
    min-height: auto;
    padding: 3rem 0 0;
  }

  .section-nav {
    display: none;
  }

  .content {
    padding: 0 0 4rem;
  }
}

@media (max-width: 560px) {
  .stack-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
