/* Base / reset */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: #1a1815; overflow-x: hidden; }
body { font-family: Newsreader, serif; }
a { color: #8fa6bd; text-decoration: none; }
a:hover { color: #b6c8db; }
img { max-width: 100%; }
button { cursor: pointer; }
button:hover { border-color: #8d8578; color: #ece8e0; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(26, 24, 21, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #3d3931;
}
.navbar {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 96px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 34px);
  height: 60px;
  flex-wrap: wrap;
}
.navbrand {
  font-family: Newsreader, serif;
  font-size: 19px;
  color: #ece8e0;
  margin-right: auto;
}
.navlink {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #a39c8e;
}
.navlink:hover { color: #ece8e0; }

/* Page shell */
.page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  background: #211f1c;
  color: #ece8e0;
  padding: clamp(40px, 5vw, 72px) clamp(24px, 6vw, 96px) clamp(56px, 6vw, 96px);
  box-sizing: border-box;
}

/* Header / hero */
.hdr {
  display: flex;
  gap: 44px;
  align-items: flex-start;
  border-bottom: 1px solid #3d3931;
  padding-bottom: 40px;
  flex-wrap: wrap;
}
.avatar {
  width: 190px;
  height: 190px;
  object-fit: cover;
  flex: 0 0 190px;
}
.hdr-info { flex: 1; }
.name {
  margin: 0;
  font-size: 52px;
  font-weight: 400;
  letter-spacing: -.02em;
}
.sub {
  margin: 10px 0 0 0;
  font-size: 20px;
  color: #b5ad9e;
  font-weight: 300;
}
.contact {
  display: flex;
  gap: 26px;
  margin-top: 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: .02em;
  flex-wrap: wrap;
  color: #8fa6bd;
}
.contact a {
  color: inherit;
  border-bottom: 1px solid #6b5a3f;
}
.contact-phone { color: #8d8578; }

.bio {
  margin: 38px 0 0 0;
  font-size: 21px;
  line-height: 1.65;
  max-width: 44em;
  font-weight: 300;
  text-wrap: pretty;
}

/* Section headings */
.sec {
  margin: 60px 0 6px 0;
  scroll-margin-top: 84px;
  font-family: Newsreader, serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: #ece8e0;
}
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin: 60px 0 6px 0;
}
.sec-head .sec { margin: 0; }

.rail-controls { display: flex; gap: 8px; }
.rail-btn {
  width: 38px;
  height: 38px;
  border: 1px solid #4a453b;
  background: #2a2723;
  color: #cbc4b4;
  border-radius: 50%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  line-height: 1;
}

/* Projects rail */
.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 14px 0 16px 0;
  border-top: 1px solid #3d3931;
  -webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: #4a453b; border-radius: 4px; }
.rail::-webkit-scrollbar-track { background: #2a2723; border-radius: 4px; }

.card {
  flex: 0 0 340px;
  background: #2a2723;
  border: 1px solid #3d3931;
}
.card-img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #332f29;
  border-bottom: 1px solid #3d3931;
}
.card-body { padding: 18px 20px 22px 20px; }
.card-meta {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8d8578;
}
.card-title { margin: 8px 0 0 0; font-size: 22px; }
.card-desc {
  margin: 8px 0 0 0;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 300;
  color: #a39c8e;
}

/* Education / Experience rows */
.list {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
}
.row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid #3d3931;
}
.list--experience .row { padding: 18px 0; }
.row-title { margin: 0; font-size: 20px; }
.row-sub { margin: 4px 0 0 0; font-size: 16px; color: #a39c8e; }
.date {
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 500;
  color: #cbc4b4;
  text-align: right;
  letter-spacing: .01em;
}

/* Publications */
.pub-list {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  max-width: 52em;
}
.pub {
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid #3d3931;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 300;
}
.pub strong {
  font-weight: 600;
}

/* Skills */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0 0;
  padding-top: 20px;
  border-top: 1px solid #3d3931;
  max-width: 52em;
}
.pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #2a2723;
  border: 1px solid #454036;
  color: #dcd6c9;
}

/* Responsive */
@media (max-width: 760px) {
  .navbar { height: auto; padding-top: 12px; padding-bottom: 12px; gap: 10px 16px; }
  .navbrand { margin-right: 0; width: 100%; font-size: 17px; }
  .hdr { gap: 22px; padding-bottom: 28px; }
  .hdr img { width: 116px; height: 116px; flex: 0 0 116px; }
  .name { font-size: 34px; }
  .sub { font-size: 17px; }
  .contact { gap: 10px 18px; }
  .bio { font-size: 18px; margin-top: 28px; }
  .sec { font-size: 24px; margin-top: 44px; scroll-margin-top: 108px; }
  .row { grid-template-columns: 1fr; gap: 6px; padding: 14px 0; }
  .date { text-align: left; font-size: 14px; order: -1; }
  .card { flex: 0 0 78vw; }
  .pub { font-size: 16px; }
  .pill { font-size: 13px; padding: 8px 14px; }
}
