/* ── Google Fonts import ──────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ── Design tokens ────────────────────────────────────────────────────────── */
:root {
  --ink:          #0f1117;
  --ink-muted:    #4a5060;
  --ink-faint:    #8892a0;
  --surface:      #fafaf8;
  --surface-2:    #f2f1ed;
  --surface-3:    #e8e7e1;
  --rule:         #dddbd4;
  --accent:       #1a4f8a;
  --accent-2:     #c8401a;
  --accent-light: #e8f0f8;
  --serif:        'DM Serif Display', Georgia, serif;
  --sans:         'DM Sans', system-ui, sans-serif;
  --max:          760px;
  --gutter:       clamp(1.5rem, 5vw, 3rem);
}

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

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

body {
  font-family: var(--sans);
  background: var(--surface);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* ── Layout wrapper ───────────────────────────────────────────────────────── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Navigation ───────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  padding: 0.9rem var(--gutter);
}

nav .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

nav .brand {
  font-family: var(--serif);
  font-size: 1.10rem;
  color: var(--ink);
  font-style: italic;
  letter-spacing: 0.01em;
}

nav .links {
  display: flex;
  gap: 1.6rem;
  list-style: none;
  flex-wrap: wrap;
}

nav .links a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.2s;
}

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

/* ── Hero / Header ────────────────────────────────────────────────────────── */
header {
  padding: clamp(4rem, 10vw, 7rem) var(--gutter) clamp(3rem, 8vw, 5rem);
  border-bottom: 1px solid var(--rule);
}

.hero {
  max-width: var(--max);
  margin: 0 auto;
}

.hero-layout {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  flex-wrap: wrap;
  animation: fadeUp 0.6s ease 0.05s both;
}

.hero-photo {
  flex-shrink: 0;
  width: clamp(150px, 22vw, 220px);
  height: clamp(150px, 22vw, 220px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--rule);
  background: var(--surface-2);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-text {
  flex: 1;
  min-width: 240px;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-muted);
  margin-bottom: 1.6rem;
  letter-spacing: 0.01em;
}

/* Credibility bar */
.cred-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-bottom: 1.8rem;
}

.cred-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.cred-item strong {
  color: var(--ink);
  font-weight: 600;
}

.cred-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* Hero CTA buttons */
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 0.18s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: #143d6e;
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border: 1.5px solid var(--rule);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ── Generic section styles ───────────────────────────────────────────────── */
section {
  padding: clamp(3rem, 8vw, 5.5rem) var(--gutter);
  border-bottom: 1px solid var(--rule);
}

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

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 1.2rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
  margin-top: 2rem;
}

h3:first-of-type {
  margin-top: 0;
}

p {
  font-size: 0.97rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
  font-weight: 300;
}

p:last-child {
  margin-bottom: 0;
}

p strong {
  color: var(--ink);
  font-weight: 500;
}

/* ── Approach pillars ─────────────────────────────────────────────────────── */
.pillars {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.pillar {
  padding: 1.4rem 1.6rem;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

.pillar-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.pillar h3 {
  margin: 0 0 0.4rem;
  font-size: 0.97rem;
}

.pillar p {
  font-size: 0.9rem;
  margin: 0;
}

/* ── Repo cards (Currently Building) ─────────────────────────────────────── */
.repos {
  display: grid;
  gap: 1rem;
  margin-top: 1.8rem;
}

.repo-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  transition: border-color 0.18s, box-shadow 0.18s;
  text-decoration: none;
  color: inherit;
}

.repo-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(26, 79, 138, 0.08);
  text-decoration: none;
}

.repo-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--accent-light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.repo-body {
  flex: 1;
  min-width: 0;
}

.repo-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-desc {
  font-size: 0.83rem;
  color: var(--ink-muted);
  font-weight: 300;
  line-height: 1.4;
}

.repo-tag {
  display: inline-block;
  margin-top: 0.5rem;
  margin-right: 0.3rem;
  padding: 0.18rem 0.55rem;
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 99px;
  font-size: 0.7rem;
  color: var(--ink-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ── Article cards (Writing) ──────────────────────────────────────────────── */
.articles {
  display: grid;
  gap: 0;
  margin-top: 1.8rem;
}

.article-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}

.article-card:last-child {
  border-bottom: none;
}

.article-card:hover .article-title {
  color: var(--accent);
}

.article-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.3rem;
  transition: color 0.18s;
  line-height: 1.4;
}

.article-sub {
  font-size: 0.82rem;
  color: var(--ink-faint);
  font-weight: 300;
}

.article-date {
  font-size: 0.78rem;
  color: var(--ink-faint);
  white-space: nowrap;
  font-weight: 300;
  padding-top: 0.15rem;
}

.writing-footer {
  margin-top: 1.4rem;
}

/* ── Leadership grid ──────────────────────────────────────────────────────── */
.leadership-grid {
  display: grid;
  gap: 2rem;
  margin-top: 1.8rem;
}

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

.leadership-item h3 {
  font-size: 0.92rem;
  margin-top: 0;
  color: var(--ink);
}

.leadership-item p {
  font-size: 0.88rem;
}

/* ── Principles list ──────────────────────────────────────────────────────── */
.principles {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.principles li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.93rem;
  color: var(--ink-muted);
  font-weight: 300;
}

.principles li::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 1.5px;
  background: var(--accent-2);
  margin-top: 0.6rem;
}

.principles li strong {
  color: var(--ink);
  font-weight: 500;
}

/* ── Connect section (dark) ───────────────────────────────────────────────── */
#contact {
  background: var(--ink);
  color: #fff;
}

#contact .section-label {
  color: #7a9fc4;
}

#contact h2 {
  color: #fff;
}

#contact p {
  color: #a0aab8;
}

.connect-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

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

.connect-card {
  padding: 1.2rem 1.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
  display: block;
}

.connect-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
}

.connect-card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7a9fc4;
  margin-bottom: 0.35rem;
}

.connect-card-value {
  font-size: 0.92rem;
  font-weight: 400;
  color: #e0e6ee;
}

.connect-cta {
  margin-top: 2.4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.connect-cta p {
  font-size: 0.93rem;
  line-height: 1.7;
  color: #8898b0;
  max-width: 520px;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
  background: var(--ink);
  padding: 1.6rem var(--gutter);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

footer .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

footer p {
  font-size: 0.78rem;
  color: #4a5568;
  margin: 0;
  font-weight: 300;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 500px) {
  .hero-photo {
    width: 120px;
    height: 120px;
  }

  nav .links {
    gap: 1rem;
  }
}
