/* Tommy S. Liu personal site.
   Wind Waker-inspired: sky gradient over a sea-chart grid, cream cards, navy ink lines.
   Structure varies by section on purpose: features, stat cards, a route timeline, polaroids. */

:root {
  --navy: #16325c;
  --text: #1c2f52;
  --muted: #5d6f8f;
  --cream: #fff8e6;
  --cream-2: #f6e9c8;
  --sand: #f2d59a;
  --yellow: #ffd84d;
  --red: #e2453c;
  --sky: #8fd0ff;
  --sky-2: #e6f7ff;
  --sea: #4ea9ef;
  --sea-deep: #1f75c8;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font: "Nunito", -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1060px;
  --line: 2px solid var(--navy);
  --shadow: 4px 4px 0 var(--navy);
  --shadow-sm: 2px 2px 0 var(--navy);
  --dash: 2px dashed rgba(22, 50, 92, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--sea);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(22, 50, 92, 0.35); transition: text-decoration-color 0.15s; }
a:hover { text-decoration-color: var(--navy); }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin-inline: auto; }
.skip { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 8px 12px; background: var(--navy); color: #fff; border-radius: 8px; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ================= sky (nav + intro) ================= */
.sky { position: relative; background: linear-gradient(180deg, var(--sky) 0%, var(--sky-2) 100%); padding: 80px 0 56px; }
.post-page .sky { padding-bottom: 40px; }
.cloud { position: absolute; z-index: 0; pointer-events: none; }
.cloud svg { display: block; width: 100%; height: 100%; }
.cloud-a { width: 150px; height: 58px; left: 6%; top: 250px; animation: drift 14s ease-in-out infinite alternate; }
.cloud-b { width: 110px; height: 44px; right: 4%; top: 92px; animation: drift 11s ease-in-out infinite alternate-reverse; }
.cloud-c { width: 84px; height: 34px; left: 46%; top: 120px; animation: drift 17s ease-in-out infinite alternate; }
.divider { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 56px; display: block; }
@keyframes drift { from { transform: translateX(-12px); } to { transform: translateX(12px); } }

/* ---------- nav (fixed: sticky would only stick inside .sky) ---------- */
.nav { position: fixed; top: 12px; left: 0; right: 0; z-index: 50; }
.nav-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--cream); border: var(--line); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--navy); padding: 7px 10px 7px 16px;
  transition: box-shadow 0.2s;
}
.nav.scrolled .nav-inner { box-shadow: 3px 3px 0 var(--navy), 0 8px 18px rgba(22, 50, 92, 0.22); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 17px; text-decoration: none; }
.brand svg { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { text-decoration: none; font-weight: 800; font-size: 13.5px; padding: 5px 11px; border-radius: 999px; transition: background 0.15s; }
.nav-links a:hover { background: var(--cream-2); }
.nav-links a.active { background: var(--yellow); }
.menu-btn { display: none; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--navy); background: var(--yellow); flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.menu-btn span { width: 16px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: transform 0.2s; }
.nav.open .menu-btn span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav.open .menu-btn span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- intro ---------- */
.hero { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 44px; align-items: center; padding: 52px 0 16px; }
.hero > * { min-width: 0; }
.hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.5rem, 5.6vw, 3.8rem); line-height: 1.05; margin-bottom: 8px; text-shadow: 3px 3px 0 #fff; }
.hero .role { font-weight: 800; font-size: 1.1rem; }
.hero .bio { margin-top: 16px; max-width: 60ch; }
.hero .now { margin-top: 12px; max-width: 60ch; }
.hero .links { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px 10px; font-weight: 800; font-size: 15px; }
.hero .links .sep { color: var(--muted); font-weight: 400; }
.portrait { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: var(--line); box-shadow: var(--shadow); margin-bottom: 16px; }
.hero-art { position: relative; }
.scene { width: 100%; max-width: 100%; height: auto; display: block; }
.scene .boat { animation: bob 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.scene .wave { animation: wave 7s linear infinite; }
.scene .wave.w2 { animation-duration: 9s; }
.scene .wave.w3 { animation-duration: 12s; animation-direction: reverse; }
.scene .gull { animation: glide 5s ease-in-out infinite alternate; }
.scene .gull.g2 { animation-delay: -2s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(7px) rotate(2.5deg); } }
@keyframes wave { to { transform: translateX(-80px); } }
@keyframes glide { from { transform: translate(0, 0); } to { transform: translate(18px, -8px); } }

/* ================= sea (main) ================= */
/* the water deepens as you scroll, so the page feels like heading out rather than one flat colour */
.sea {
  background-color: var(--sea);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.13) 1.5px, transparent 1.5px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1.5px, transparent 1.5px),
    linear-gradient(180deg, rgba(78, 169, 239, 0) 0%, rgba(23, 92, 160, 0.34) 100%);
  background-size: 64px 64px, 64px 64px, 100% 100%;
  padding: 30px 0 80px;
}

/* section headings sit on the water as chart waypoints, content sits in cards below */
.sec { padding: 26px 0; }
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.sec-head .glyph { width: 30px; height: 30px; flex-shrink: 0; filter: drop-shadow(2.5px 2.5px 0 var(--navy)); }
.sec-head h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.65rem, 3.1vw, 2.15rem); line-height: 1.1; color: #fff;
  text-shadow: 3px 3px 0 var(--navy);
  white-space: nowrap;
}
.route { flex: 1; position: relative; height: 14px; min-width: 40px; }
.route::before { content: ""; position: absolute; left: 0; right: 16px; top: 50%; border-top: 3px dashed rgba(255, 255, 255, 0.62); }
.route::after { content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); border: 2.5px solid var(--navy); }

.card { background: var(--cream); border: var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 24px 28px; }
.eyebrow { font-weight: 800; font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.lede { max-width: 68ch; }
.lede + .lede { margin-top: 12px; }

/* link buttons */
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border: 2px solid var(--navy); border-radius: 999px;
  background: #fff; font-weight: 800; font-size: 13.5px; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--navy); background: var(--cream-2); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--navy); }
.btn svg { width: 12px; height: 12px; }

/* ---------- education ---------- */
.edu { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.edu li { padding: 0; }
.edu li + li { padding-left: 32px; border-left: var(--dash); }
.edu .when { font-weight: 800; font-size: 13.5px; color: var(--muted); }
.edu h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; margin: 4px 0 6px; }
.edu p { font-size: 15px; color: var(--muted); font-weight: 700; }
.edu p + p { margin-top: 3px; }
.edu .hl { color: var(--text); }

/* ---------- projects: alternating feature blocks ---------- */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 30px; align-items: center;
  background: var(--cream); border: var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 22px;
}
.feature + .feature { margin-top: 20px; }
.feature:nth-of-type(even) .feature-media { order: 2; }
/* a wide schematic gets a wider column than a photo would, but still sits beside the text */
.feature.media-wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.feature-media { margin: 0; min-width: 0; }
/* photos keep their own proportions, so nothing is cropped */
.feature-media img {
  width: 100%; height: auto; display: block;
  border: var(--line); border-radius: 12px; background: #fff;
}
.feature-media.is-diagram img { padding: 10px; }
.feature-media .ph {
  width: 100%; aspect-ratio: 16 / 10; display: block;
  border: var(--line); border-radius: 12px;
  background: var(--sand);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.35) 75%, transparent 75%);
  background-size: 28px 28px;
}
.feature-media figcaption { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 9px; line-height: 1.45; }
.feature-body { min-width: 0; }
.feature-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; line-height: 1.25; margin: 6px 0 10px; }
.feature-body p { font-size: 15.5px; }
.feature-body p + p { margin-top: 10px; }
.feature-body .btns { margin-top: 16px; }

.stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.stat { background: #fff; border: 2px solid var(--navy); border-radius: 12px; padding: 8px 14px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.15; }
.stat span { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-top: 1px; }

/* publications strip under projects */
.pubs { margin-top: 20px; background: var(--cream); border: var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 18px 24px; }
.pubs h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 8px; }
.pubs li { display: grid; grid-template-columns: 104px 1fr; gap: 16px; padding: 9px 0; border-top: var(--dash); font-size: 15px; }
.pubs li:first-of-type { border-top: 0; }
.pubs .when { font-weight: 800; font-size: 13.5px; color: var(--muted); }

/* ---------- experience: charted route ---------- */
.timeline { position: relative; padding-left: 36px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; border-left: 3px dashed rgba(22, 50, 92, 0.25); }
.timeline > li { position: relative; padding-bottom: 26px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: -34px; top: 5px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--yellow); border: 2.5px solid var(--navy);
}
.timeline > li.minor::before { background: #fff; width: 12px; height: 12px; left: -32px; top: 7px; }
.tl-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.tl-top h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.3; }
.tl-when { font-weight: 800; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tl-role { font-weight: 800; font-size: 14.5px; color: var(--red); margin-top: 2px; }
.timeline p { font-size: 15.5px; margin-top: 8px; max-width: 68ch; }
.timeline p + p { margin-top: 6px; }
.timeline .btns { margin-top: 12px; }

/* ---------- awards: the name carries the prestige, the ratio proves it ---------- */
.awards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(292px, 1fr)); gap: 16px; }
.award {
  display: flex; flex-direction: column;
  background: #fff; border: var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 18px 20px 20px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.award:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--navy); }
.award-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.award h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.25; }
.award .year { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.award .stat-line { margin-top: 9px; font-weight: 800; font-size: 14.5px; }
.award .stat-line em {
  font-style: normal; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem;
  background: linear-gradient(transparent 58%, var(--yellow) 58%); padding: 0 3px; margin-right: 3px;
}
.award .note { margin-top: 9px; font-size: 14px; color: var(--muted); font-weight: 700; }

/* ---------- news: deliberately minor ---------- */
.news { font-size: 15px; }
.news li { display: grid; grid-template-columns: 108px 1fr; gap: 16px; padding: 8px 0; border-top: var(--dash); }
.news li:first-child { border-top: 0; }
.news .when { font-weight: 800; font-size: 13px; color: var(--muted); }
.news li.hidden, .hidden { display: none; }
.more { margin-top: 14px; font-weight: 800; font-size: 14px; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(22, 50, 92, 0.35); }
.more:hover { text-decoration-color: var(--navy); }

/* ---------- violin ---------- */
.violin { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 20px; align-items: start; }
.violin h3, .card h3.sub { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; margin-bottom: 10px; }
.violin .card + .card { margin-top: 20px; }
.rep li { padding: 7px 0; border-top: var(--dash); font-size: 15px; color: var(--muted); font-weight: 700; }
.rep li:first-child { border-top: 0; }
.rep b { color: var(--text); font-weight: 800; }
.wins li { padding: 10px 0; border-top: var(--dash); }
.wins li:first-child { border-top: 0; padding-top: 0; }
.wins b { display: block; font-weight: 800; font-size: 15px; }
.wins span { display: block; color: var(--muted); font-size: 14.5px; font-weight: 700; }
.recordings { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 20px; }
.rec { background: #fff; border: var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 9px 9px 12px; text-decoration: none; color: var(--text); transition: transform 0.18s, box-shadow 0.18s; }
.rec:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--navy); }
.rec .thumb { position: relative; aspect-ratio: 16 / 9; border: 1.5px solid var(--navy); border-radius: 6px; overflow: hidden; background: var(--sand); }
.rec .thumb img { width: 100%; height: 100%; object-fit: cover; }
.rec .play { position: absolute; inset: 0; display: grid; place-items: center; }
.rec .play span { width: 40px; height: 40px; border-radius: 50%; background: var(--cream); border: 2.5px solid var(--navy); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.rec .play svg { width: 15px; height: 15px; margin-left: 2px; }
.rec:hover .play span { background: var(--yellow); }
.rec b { display: block; font-weight: 800; font-size: 14px; line-height: 1.35; margin-top: 10px; }
.rec span.meta { display: block; color: var(--muted); font-weight: 700; font-size: 12.5px; margin-top: 3px; }

/* ---------- blog ---------- */
.posts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-card { background: var(--cream); border: var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 20px 22px; text-decoration: none; color: var(--text); display: block; transition: transform 0.18s, box-shadow 0.18s; }
.post-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--navy); }
.post-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; line-height: 1.3; margin: 6px 0 8px; }
.post-card p { font-size: 15px; color: var(--muted); font-weight: 700; }
.post-card .read { display: inline-block; margin-top: 12px; font-weight: 800; font-size: 14px; }

/* ---------- gallery: polaroids straight on the water ---------- */
/* columns, not grid: the photos are different shapes, so let them pack instead of leaving gaps */
.gallery { columns: 2; column-gap: 26px; }
.polaroid { break-inside: avoid; background: #fff; border: var(--line); border-radius: 6px; box-shadow: var(--shadow); padding: 10px 10px 14px; margin: 0 0 26px; transform: rotate(-1.1deg); transition: transform 0.25s; }
.polaroid:nth-child(even) { transform: rotate(1.1deg); }
.polaroid:hover { transform: rotate(0) translateY(-3px); }
/* photos keep their own shape; the frames end up different heights, like real prints on a board */
.polaroid img {
  width: 100%; height: auto; display: block;
  border: 1.5px solid var(--navy); border-radius: 3px; background: var(--sand);
}
.polaroid .ph {
  width: 100%; aspect-ratio: 4 / 3; display: block;
  border: 1.5px solid var(--navy); border-radius: 3px; background: var(--sand);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0.35) 75%, transparent 75%);
  background-size: 28px 28px;
}
.polaroid figcaption { margin-top: 11px; }
.polaroid figcaption b { display: block; font-weight: 800; }
.polaroid figcaption span { display: block; color: var(--muted); font-weight: 700; font-size: 14px; }
.polaroid figcaption time { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ---------- contact ---------- */
.contact { text-align: center; padding: 26px 28px 32px; }
.contact .bottle { width: 150px; height: 74px; margin: 0 auto 4px; animation: bob 4s ease-in-out infinite; }
.contact h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; margin-bottom: 8px; }
.contact p { color: var(--muted); font-weight: 700; max-width: 46ch; margin: 0 auto 18px; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; font-weight: 800; }

/* ---------- blog post pages ---------- */
.post { max-width: 820px; margin: 0 auto; }
.post .back { display: inline-block; font-weight: 800; font-size: 14px; margin-bottom: 14px; }
.post h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.15; margin-bottom: 10px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--muted); font-weight: 800; font-size: 14px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: var(--dash); }
.prose { font-size: 16.5px; line-height: 1.75; }
.prose p { margin: 0 0 1.2em; max-width: 72ch; }
.prose h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: 1.8em 0 0.6em; }
.prose strong { font-weight: 800; }
.prose blockquote { margin: 1.6em 0; padding: 14px 20px; border-left: 4px solid var(--yellow); background: var(--cream-2); border-radius: 0 10px 10px 0; }
.prose blockquote p:last-child { margin: 0; }
.prose .updates { border: var(--line); border-radius: 12px; padding: 14px 18px; margin: 0 0 1.8em; background: #fff; font-size: 15px; }
.prose .updates p { margin: 0 0 0.8em; }
.prose .updates p:last-child { margin: 0; }
.prose .updates time { display: block; font-weight: 800; color: var(--navy); font-size: 13px; }
.post-foot { margin-top: 28px; padding-top: 16px; border-top: var(--dash); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 800; font-size: 14.5px; }

/* ---------- footer ---------- */
.footer { position: relative; background: var(--sea-deep); color: #fff; padding: 28px 0 34px; }
.footer .wave-top { position: absolute; left: 0; right: 0; top: -56px; width: 100%; height: 58px; display: block; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-weight: 700; }
.footer .boat-sm { width: 70px; height: 54px; animation: bob 3.4s ease-in-out infinite; }
.footer a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.5); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 36px; }
  .hero-art { max-width: 480px; margin-inline: auto; }
  .cloud-a, .cloud-c { display: none; }
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; left: 0; right: 0; top: calc(100% + 10px);
    background: var(--cream); border: var(--line); border-radius: 22px; box-shadow: 3px 3px 0 var(--navy); padding: 10px;
  }
  .nav.open .nav-links a { padding: 10px 14px; font-size: 15px; }
  /* .feature.media-wide is more specific than .feature, so it must be named here too */
  .feature, .feature.media-wide { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .feature:nth-of-type(even) .feature-media { order: 0; }
  .violin { grid-template-columns: minmax(0, 1fr); }
  .violin .card + .card { margin-top: 0; }
  .violin > div + div { margin-top: 20px; }
  .posts { grid-template-columns: 1fr; }
  .edu { grid-template-columns: 1fr; gap: 20px; }
  .edu li + li { padding-left: 0; border-left: 0; padding-top: 20px; border-top: var(--dash); }
}
@media (max-width: 640px) {
  .sec-head h2 { white-space: normal; }
  .card, .feature, .pubs { padding: 18px 18px; }
  .contact { padding: 24px 18px 26px; }
  .gallery { columns: 1; }
  .pubs li, .news li { grid-template-columns: 1fr; gap: 2px; }
  .timeline { padding-left: 28px; }
  .timeline > li::before { left: -26px; }
  .timeline > li.minor::before { left: -24px; }
  .award .figure { padding-right: 56px; font-size: 1.6rem; }
  /* an empty placeholder would push the project title off-screen; the real photo stays */
  .feature-media.is-ph { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
