/* ==========================================================================
   section.css - styles unique to the section pages
   (experience / publications / projects / awards)
   Loads AFTER base.css.
   ========================================================================== */

/* ---------- back link ---------- */

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.014em;
  color: var(--soft);
  transition: color 150ms ease;
}

.back svg { width: 15px; height: 15px; flex: none; }
.back:hover { color: var(--ink); }
.back:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- sub-navigation ---------- */

.subnav {
  margin: 34px 0 0;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subnav a {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.014em;
  color: var(--soft);
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: color 150ms ease, background-size 240ms cubic-bezier(.22,.61,.36,1);
  width: fit-content;
}

.subnav a:hover { color: var(--ink); background-size: 100% 1px; }
.subnav a.on { color: var(--ink); }
.subnav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- page heading ---------- */

.head { margin: 0 0 40px; }

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

h1 {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

/* ---------- entries ---------- */

.entries { margin: 0; }

.entry {
  padding: 14px 0;
}

.entry-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 7px;
}

.entry-top .when {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.entry-top .leader {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.entry-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.014em;
  line-height: 1.4;
}

.entry-tag {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 6px;
  vertical-align: middle;
  white-space: nowrap;
}

.entry-org {
  margin: 3px 0 0;
  color: var(--soft);
  font-size: 15px;
}

.entry-desc {
  margin: 10px 0 0;
  color: var(--soft);
  text-wrap: pretty;
}

.entry-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.entry-list li {
  position: relative;
  padding-left: 15px;
  margin: 4px 0;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.5;
  text-wrap: pretty;
}

.entry-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.7em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--faint);
}

.entry-links {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.entry-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft);
  background-image: linear-gradient(var(--faint), var(--faint));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: color 150ms ease, background-size 180ms ease;
}
.entry-links a:hover { color: var(--ink); background-size: 0% 1px; }

/* ---------- who i am (about) ---------- */

/* photo floats left; the chapter button sits beside it and, when opened,
   the story flows alongside the photo and continues full width below it */
.uni::after { content: ""; display: block; clear: both; }

.uni-photo {
  float: left;
  width: 300px;
  margin: 0 34px 22px 0;
}

.uni-photo img {
  display: block;
  width: 100%;
  border-radius: 14px;
  object-fit: cover;
  background: var(--tint);
  border: 1px solid var(--rule);
}

.chapter { margin: 0 0 14px; }
.chapter:last-child { margin-bottom: 0; }

/* hide the photo once a chapter is opened, so the story reads full width */
.uni:has(.chapter[open]) .uni-photo { display: none; }

/* each chapter is a clickable pill that reveals its story when opened */
.chapter summary {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  width: fit-content;
  max-width: 100%;
  padding: 12px 20px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  cursor: pointer;
  list-style: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.chapter-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chapter summary::-webkit-details-marker { display: none; }
.chapter summary::marker { content: ""; }

.chapter summary:hover { border-color: var(--ink); background: var(--tint); }
.chapter summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.chapter[open] summary { border-color: var(--ink); }

.chapter-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.014em;
  color: var(--ink);
}

.chapter-date {
  font-size: 13px;
  color: var(--soft);
}

.chapter-body {
  margin: 18px 0 0;
  color: var(--soft);
}
.chapter-body p { margin: 0 0 15px; text-align: justify; }
.chapter-body p:last-child { margin-bottom: 0; }

.chapter-sub {
  margin: 28px 0 12px;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.014em;
  color: var(--ink);
}

.chapter-fig {
  margin: 22px 0;
}

.chapter-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--tint);
}

.chapter-cite {
  margin: 0 0 12px;
  padding-left: 14px;
  border-left: 2px solid var(--rule);
  font-style: italic;
  font-size: 14px;
  color: var(--faint);
}

.chapter-written {
  align-self: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

@media (max-width: 620px) {
  .uni-photo {
    float: none;
    width: auto;
    max-width: 320px;
    margin: 0 0 24px;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .subnav { flex-flow: row wrap; gap: 8px 22px; }
  h1 { font-size: 30px; }
}

@media (max-width: 560px) {
  h1 { font-size: 28px; }
}
