:root {
  --ink: #1c1c1a;
  --paper: #fbfaf8;
  --paper-alt: #f2f0eb;
  --muted: #2b2b2a;
  --line: #e2e0d8;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  font-family: var(--serif);
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

.container { max-width: 1200px; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}
.divider-short { width: 60px; }

.btn-pill {
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.btn-dark.btn-pill { background-color: var(--ink); border-color: var(--ink); }
.btn-outline-dark.btn-pill { border-color: var(--ink); color: var(--ink); }
.btn-outline-dark.btn-pill:hover { background-color: var(--ink); color: #fff; }

/* ===== Navbar ===== */
.site-navbar {
  background-color: rgba(251, 250, 248, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}
.logo-mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.nav-links .nav-link {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  font-family: var(--serif);
}
.nav-links .nav-link.active { font-weight: 700; }
.site-navbar .btn-pill { padding: 0.55rem 1.3rem; font-size: 0.85rem; }

/* ===== Hero ===== */
.hero { padding-top: 4rem; padding-bottom: 4rem; }
.hero-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 4rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.role-label {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}
.build-lead {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
}
.hero-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
  border: none;
  max-width: 380px;
}
.quote-footer {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-photo-wrap {
  max-width: 420px;
  overflow: hidden;
  border-radius: 6px;
}
.hero-photo { width: 100%; display: block; }
.hero-side-copy {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  line-height: 1.9;
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}
.location-tag {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  font-weight: 500;
}

/* ===== About Page ===== */
.about-hero .hero-photo-wrap { max-width: 460px; }
.about-title { font-size: 3rem; }
.about-lead { font-size: 1.05rem; color: var(--muted); max-width: 520px; }

.stats-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 3rem 0;
  background-color: var(--paper-alt);
}
.stat-number {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2.4rem;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0;
}

.story-text {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}
.timeline-item { position: relative; padding-bottom: 2.5rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: -2.4rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--ink);
}
.timeline-year {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.timeline-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.timeline-text { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; max-width: 560px; }

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.skill-tag {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--paper);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}

/* ===== Sections common ===== */
.section { padding: 5rem 0; }
.bg-alt { background-color: var(--paper-alt); }
.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2.4rem;
}
.section-tag {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.link-tag { color: var(--muted); }
.link-tag:hover { color: var(--ink); }

/* ===== What I Do ===== */
.feature-icon { font-size: 1.8rem; color: var(--ink); }
.feature-title { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; margin-bottom: 0.75rem; }
.feature-text { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.25rem; }
.learn-more {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
}
.learn-more:hover { text-decoration: underline; }

/* ===== Build With Me ===== */
.build-card {
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.build-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.06); transform: translateY(-3px); }
.build-icon { font-size: 1.5rem; }
.build-card-title { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; margin-bottom: 0.6rem; }
.build-card-text { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.5rem; }
.build-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

/* ===== Featured Research ===== */
.research-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.75rem;
  background-color: var(--paper);
}
.research-icon { font-size: 1.4rem; color: var(--ink); }
.research-title { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; margin-bottom: 0.75rem; }
.research-meta { font-size: 0.85rem; color: var(--ink); margin-bottom: 0.15rem; font-weight: 600; }
.research-meta-sub { font-size: 0.78rem; color: var(--muted); margin-bottom: 1.25rem; }

/* ===== Selected Work ===== */
.logo-img { max-height: 32px; width: auto; opacity: 0.65; filter: grayscale(100%); }

/* ===== Newsletter ===== */
.newsletter { border-top: 1px solid var(--line); }
.newsletter-title { font-family: var(--serif); font-weight: 700; font-size: 2.2rem; }
.newsletter-sub { color: var(--muted); }
.newsletter-form { max-width: 480px; }
.newsletter-form .form-control {
  border-color: var(--line);
  padding: 0.75rem 1rem;
}
.newsletter-form .btn { padding: 0.75rem 1.4rem; font-weight: 600; }
.newsletter-note { font-size: 0.78rem; color: var(--muted); }

/* ===== Footer ===== */
.site-footer {
  background-color: var(--paper-alt);
  border-top: 1px solid var(--line);
  padding: 4rem 0 2.5rem;
  font-size: 0.9rem;
}
.footer-name { font-weight: 700; }
.footer-role { color: var(--muted); font-size: 0.85rem; }
.footer-tag { color: var(--muted); font-size: 0.85rem; max-width: 280px; }
.footer-heading {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1rem;
}
.footer-links li { margin-bottom: 0.65rem; }
.footer-links a { color: var(--muted); font-size: 0.88rem; }
.footer-links a:hover { color: var(--ink); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
  .hero-title { font-size: 3rem; }
  .about-title { font-size: 2.4rem; }
  .section-title { font-size: 2rem; }
  .nav-links { text-align: center; margin: 1rem 0; }
  .site-navbar .btn-pill.d-none { display: inline-block !important; margin-top: 0.5rem; }
  .hero-photo-wrap, .about-hero .hero-photo-wrap { max-width: 340px; }
  .stat-number { font-size: 2rem; }
}

@media (max-width: 575.98px) {
  .hero-title { font-size: 2.4rem; }
  .about-title { font-size: 2rem; }
  .section-title { font-size: 1.7rem; }
  .newsletter-title { font-size: 1.7rem; }
  .newsletter-form .input-group { flex-direction: column; }
  .newsletter-form .form-control { border-radius: 8px !important; margin-bottom: 0.6rem; }
  .newsletter-form .btn { border-radius: 8px !important; width: 100%; }
  .hero-side-copy, .location-tag { text-align: left; }
  .section { padding: 3.5rem 0; }
  .timeline { padding-left: 1.5rem; }
  .timeline-marker { left: -1.9rem; }
}

/* ===== Dropdown nav ===== */
.nav-links .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
  padding: 0.5rem;
}
.nav-links .dropdown-item {
  font-size: 0.88rem;
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
}
.nav-links .dropdown-item:hover { background-color: var(--paper-alt); }
.nav-links .dropdown-toggle::after { vertical-align: 0.1em; }

/* ===== Post / Portfolio cards (Build With Me, listings) ===== */
.post-card {
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  color: var(--ink);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.post-card:hover { box-shadow: 0 14px 30px rgba(0,0,0,0.08); transform: translateY(-3px); }
.post-card-img { width: 100%; height: 190px; object-fit: cover; display: block; }
.post-card-type {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.post-card-title { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; margin-bottom: 0.6rem; }
.post-card-text { color: var(--muted); font-size: 0.88rem; margin-bottom: 1.25rem; }
.skill-tag-sm { padding: 0.3rem 0.7rem; font-size: 0.72rem; }

/* ===== Rich text (blog/page bodies from admin) ===== */
.page-rich-text h2 { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; margin-top: 2rem; margin-bottom: 1rem; }
.page-rich-text h3 { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.page-rich-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1.25rem; }
.page-rich-text a { color: var(--ink); text-decoration: underline; }
.page-rich-text img { max-width: 100%; border-radius: 8px; margin: 1.5rem 0; }
.page-rich-text ul, .page-rich-text ol { color: var(--muted); line-height: 1.8; margin-bottom: 1.25rem; }
.page-rich-text blockquote { border-left: 3px solid var(--ink); padding-left: 1.25rem; font-style: italic; font-family: var(--serif); font-size: 1.1rem; margin: 1.5rem 0; }

/* ===== Contact form ===== */
.contact-form .form-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.contact-form .form-control { border-color: var(--line); padding: 0.7rem 0.9rem; }
.contact-links a { color: var(--ink); font-weight: 500; }
.contact-links a:hover { text-decoration: underline; }

/* ===== Resume ===== */
.resume-table { font-size: 0.9rem; }
.resume-table th { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom-width: 2px; }
.resume-table td, .resume-table th { border-color: var(--line); vertical-align: top; }

/* ===== Pagination ===== */
.pagination .page-link { color: var(--ink); border-color: var(--line); }
.pagination .page-item.active .page-link { background-color: var(--ink); border-color: var(--ink); }

/* ===== Alerts ===== */
.alert { border-radius: 8px; font-size: 0.9rem; }

/* ===== Under Construction Modal ===== */
.construction-modal {
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-backdrop.show { opacity: 0.35; }
