:root {
  --paper: #f6f3ec;
  --ink: #1c1a17;
  --ink-soft: #4a463f;
  --accent: #1f3a5f;      /* deep ink blue */
  --accent-soft: #2e5680;
  --line: #d9d2c4;
  --gold: #b08d57;        /* a quiet champagne-gold nod */
  --maxw: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header / nav ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.6rem 1.5rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: "Fraunces", serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
}
.brand:hover { text-decoration: none; color: var(--accent); }

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.brand-avatar {
  width: 36px;
  height: 36px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.brand-link span {
  font-size: 1rem;
}

.nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.nav-link {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--ink); text-decoration: none; }
.nav-link.active { color: var(--accent); border-bottom-color: var(--gold); }

/* ---------- Layout ---------- */
.content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.8rem 1.5rem 3.5rem;
}

.section-heading {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 1.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
.section-heading .num {
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.page-section { margin-bottom: 2rem; }

.hero + .page-section {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.prose p { color: var(--ink-soft); margin: 0 0 1.1rem; max-width: 62ch; }

.honors-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 62ch;
}

.honors-list li {
  color: var(--ink-soft);
  padding-left: 1.5rem;
  position: relative;
}

.honors-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.read-more {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  margin-top: 0.5rem;
  transition: all 0.2s ease;
}

.read-more:hover {
  transform: translateX(2px);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 0.625rem;
  align-items: center;
  margin-bottom: 3.5rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 0.6rem;
}
.hero h1 {
  font-family: "Fraunces", serif;
  font-size: 2.7rem;
  line-height: 1.05;
  margin: 0 0 0.6rem;
  font-weight: 600;
}
.tagline {
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 500;
  margin: 0 0 1rem;
}
.blurb { color: var(--ink-soft); max-width: 52ch; margin: 0 0 1.6rem; }

.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.95rem;
}
.btn:hover { background: var(--accent-soft); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover { background: rgba(31,58,95,0.06); }

.hero-photo {
  width: 100%;
  max-width: 320px;
  justify-self: start;
  margin-left: 0;
}

.hero-photo img {
  display: block;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

/* Placeholder styling when an image file is missing */
.img-missing {
  object-fit: contain !important;
  background: repeating-linear-gradient(45deg, #ece6da, #ece6da 12px, #e4ddcd 12px, #e4ddcd 24px);
  padding: 1rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.about-preview { border-top: 1px solid var(--line); padding-top: 2rem; }
.about-preview p { color: var(--ink-soft); max-width: 62ch; }
.read-more { font-weight: 500; }

/* ---------- Timeline (work / education) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.timeline-head h2 {
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}
.timeline-head .at { color: var(--gold); }
.dates {
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.school { font-weight: 500; margin: 0.2rem 0 0.4rem; }
.timeline-item p { color: var(--ink-soft); margin: 0.4rem 0 0; }
.timeline-item .meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.1rem 0 0.2rem;
}
.timeline-summary {
  color: var(--ink-soft);
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.edu-bullets {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
}

.edu-bullets li {
  color: var(--ink-soft);
  margin: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
  line-height: 1.5;
}

.edu-bullets li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.job-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.job-details {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.job-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 5px;
}

.job-text {
  display: flex;
  flex-direction: column;
}

.job-details h2 {
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.job-meta {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.job-container .dates {
  white-space: nowrap;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Bulleted entry details (work, projects, honors) */
.bullets {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}
.bullets li { margin: 0 0 0.5rem; max-width: 64ch; }
.bullets li:last-child { margin-bottom: 0; }

.entry-link { margin: 0.6rem 0 0; }
.entry-link a { font-size: 0.9rem; font-weight: 500; }

/* ---------- Publications ---------- */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.pub-item:last-child { border-bottom: none; }
.pub-title { font-weight: 500; color: var(--ink); margin: 0 0 0.2rem; max-width: 70ch; }
.pub-meta { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.pub-note {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 600;
}

/* ---------- Skills ---------- */
.skills { display: flex; flex-direction: column; gap: 1.6rem; }
.skill-cat {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.7rem;
}
.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  background: #fbf9f4;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- Hobby cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}
.card {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fbf9f4;
  display: flex;
  flex-direction: column;
}
.card-img img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}
.card h2 {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  margin: 0.9rem 1rem 0.3rem;
}
.card > p {
  color: var(--ink-soft);
  margin: 0.3rem 1rem 0;
  font-size: 0.95rem;
  flex: 1;
}
/* Optional tech/stack line on project cards (pins to bottom) */
.card-tech { 
  font-size: 0.82rem; 
  color: var(--gold); 
  letter-spacing: 0.02em;
  margin: 1rem 1rem 0 !important;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  margin-top: auto;
}

/* ---------- Map ---------- */
#map {
  height: 460px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-top: 1.2rem;
}

/* ---------- Buttons ---------- */
.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: #1a2f4a;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(31, 58, 95, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover {
  background-color: rgba(31, 58, 95, 0.05);
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.6rem 1.5rem 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.88rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-info {
  display: flex;
  align-items: center;
}

.footer-social {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
  font-size: 1.2rem;
}

.social-link:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; max-width: 240px; }
  .hero h1 { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
