/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Theme tokens ---------- */
:root {
  --bg: #f7f9fb;
  --bg-alt: #eef2f6;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --border: #e2e8ee;
  --text: #1a2733;
  --text-muted: #4f5b68;
  --text-faint: #78838f;
  --accent: #0f6e63;
  --accent-soft: rgba(15, 110, 99, 0.08);
  --accent-2: #9c6b16;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-display: 'Fraunces', Georgia, serif;
  --max-width: 1080px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(26, 39, 51, 0.05);
  --shadow-md: 0 8px 24px rgba(26, 39, 51, 0.06);
}

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

svg { flex-shrink: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(247, 249, 251, 0.85);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.logo .dot { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 150px 0 100px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 480px;
  background:
    radial-gradient(ellipse 620px 380px at 12% 10%, rgba(15, 110, 99, 0.09), transparent 65%),
    radial-gradient(ellipse 520px 360px at 92% 0%, rgba(156, 107, 22, 0.07), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.88rem;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-sub strong { color: var(--text); font-weight: 700; }
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.meta-item svg { width: 16px; height: 16px; color: var(--accent); }
.hero-meta a { border-bottom: 1px solid transparent; }
.hero-meta a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Hero visual ---------- */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.visual-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 40px 32px;
  text-align: center;
  width: 100%;
  max-width: 300px;
}
.avatar-ring {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #1a8f81);
  box-shadow: 0 8px 20px rgba(15, 110, 99, 0.25);
}
.avatar-initials {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  color: #ffffff;
}
.visual-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.visual-role {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 20px;
}
.visual-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.visual-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: 999px;
}
.visual-badge {
  position: absolute;
  bottom: -18px;
  left: -10px;
  background: var(--text);
  color: var(--bg);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-shadow: var(--shadow-md);
}
.visual-badge-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}
.visual-badge-label {
  font-size: 0.72rem;
  opacity: 0.8;
  margin-top: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 110, 99, 0.22);
}
.btn-primary:hover {
  background: #0c584f;
  transform: translateY(-2px);
}
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  z-index: 2;
  padding: 96px 0;
}
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-kicker {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  margin-bottom: 44px;
}

/* ---------- About ---------- */
.about-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.4fr;
  gap: 48px;
  margin-bottom: 56px;
  align-items: start;
}
.about-quote {
  margin: 0;
  position: relative;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
  padding-left: 24px;
  border-left: 3px solid var(--accent);
}
.quote-mark {
  display: block;
  font-size: 2.6rem;
  color: var(--accent);
  line-height: 0.6;
  margin-bottom: 10px;
}
.about-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.about-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.about-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.about-icon svg { width: 19px; height: 19px; }
.about-card h3 {
  font-size: 0.98rem;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 8px;
}
.about-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num {
  font-family: var(--mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.skill-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.skill-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.skill-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.skill-icon svg { width: 17px; height: 17px; }
.skill-card h3 {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 700;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
}

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
  border-left: 2px solid var(--border);
  padding-left: 56px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.timeline-item { position: relative; }
.timeline-marker {
  position: absolute;
  left: -77px;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.timeline-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text);
}
.timeline-org {
  font-weight: 500;
  color: var(--text-muted);
}
.timeline-date {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent-2);
  white-space: nowrap;
}
.timeline-role {
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.timeline-content > ul {
  margin-bottom: 8px;
}
.timeline-content li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.timeline-content li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.85rem;
}

.sub-project {
  margin-top: 24px;
  padding: 20px 22px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.sub-project-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.sub-project h4 {
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}
.sub-project h4 span {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---------- Credentials ---------- */
.credentials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.credential-block h3 {
  font-size: 1.05rem;
  margin-bottom: 20px;
  color: var(--text);
}
.credential-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.credential-list li:first-child { padding-top: 0; }
.credential-title { color: var(--text); font-weight: 600; font-size: 0.96rem; }
.credential-sub { color: var(--text-muted); font-size: 0.88rem; }
.credential-meta { font-family: var(--mono); color: var(--accent-2); font-size: 0.8rem; }
.credential-list.badges li {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.badge-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.badge-check svg { width: 14px; height: 14px; }

/* ---------- Contact ---------- */
.contact-section { text-align: center; }
.contact-container { max-width: 640px; }
.contact-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 20px auto 40px;
  max-width: 520px;
}
.contact-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-faint);
}
.back-to-top { color: var(--text-faint); }
.back-to-top:hover { color: var(--accent); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 24px; }
  .visual-card { max-width: 340px; }
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .about-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .credentials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.25s ease;
    pointer-events: none;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle { display: flex; }
  .hero { padding: 110px 0 70px; }
  .about-cards { grid-template-columns: 1fr; }
  .timeline { padding-left: 44px; }
  .timeline-marker { left: -60px; width: 34px; height: 34px; font-size: 0.6rem; }
}
