@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/eb-garamond-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/eb-garamond-latin-600-normal.woff2') format('woff2'); }
:root { --navy: #0f2346; --bg: #f6f6f6; --ink: #111; --muted: #666; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background-color: var(--bg);
  background-image: repeating-linear-gradient(90deg, rgba(15,35,70,.07) 0, rgba(15,35,70,.07) 1px, transparent 1px, transparent 22px);
  font-family: 'EB Garamond', Garamond, 'Times New Roman', serif; font-size: 22px; line-height: 1.65;
}
a { color: var(--navy); }
header.site {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  padding: 24px 40px; font-size: 20px; letter-spacing: .4px;
}
a.brand {
  display: inline-block; font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: 4px; padding: 8px 8px 8px 12px;
  text-decoration: none; color: var(--navy); border: 2px solid var(--navy);
  transition: transform .5s cubic-bezier(.2, .9, .3, 1.5), background-color .3s, color .3s, letter-spacing .4s;
}
a.brand:hover, a.brand:focus-visible { background: var(--navy); color: #f6f6f6; letter-spacing: 12px; transform: rotate(-6deg) scale(1.12); outline: none; }
nav#site-nav { display: flex; gap: 30px; align-items: center; }
nav#site-nav a { color: #333; text-decoration: none; }
nav#site-nav a { transition: transform .25s, color .25s, background-color .3s; }
nav#site-nav a:hover, nav#site-nav a[aria-current="page"] { color: var(--navy); text-decoration: underline; text-underline-offset: 6px; }
nav#site-nav a:hover { transform: translateY(-2px); }
nav#site-nav a.resume { border: 1px solid var(--navy); color: var(--navy); padding: 6px 14px; text-decoration: none; }
nav#site-nav a.resume:hover { background: var(--navy); color: #fff; }
button#menu-toggle { display: none; background: none; border: 0; font: inherit; font-size: 24px; cursor: pointer; color: var(--ink); }


main.content { max-width: 800px; margin: 0 auto; padding: 20px 24px 80px; }
main.content h1 { font-weight: normal; font-size: 56px; line-height: 1.1; color: var(--navy); margin: 10px 0 20px; }
main.content h2 { font-weight: normal; font-size: 34px; line-height: 1.2; color: var(--navy); margin: 32px 0 4px; }
main.content .meta { font-size: 19px; color: var(--muted); margin: 0 0 8px; }

@media (max-width: 700px) {
  header.site { padding: 16px 20px; }
  .js button#menu-toggle { display: block; }
  .js nav#site-nav { display: none; flex-direction: column; align-items: flex-start; gap: 14px; width: 100%; padding: 14px 0 6px; }
  .js header.site.nav-open nav#site-nav { display: flex; }
  nav#site-nav { flex-wrap: wrap; gap: 14px; width: 100%; padding-top: 12px; }
}

/* Home: pages arranged around the photo */
.home { padding: 6px 28px 56px; }
.orbit {
  max-width: 1500px; margin: 0 auto; display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: repeat(3, auto) auto;
  align-items: center; column-gap: clamp(60px, 8vw, 130px); row-gap: 40px;
}
.center { grid-column: 2; grid-row: 1 / span 3; text-align: center; }
.nameblock { grid-column: 1 / -1; grid-row: 4; text-align: center; margin-top: 26px; }
.photo { position: relative; width: 320px; height: 320px; margin: 22px auto 0; }
.photo::before {
  content: ''; position: absolute; inset: -28px; border-radius: 50%;
  border: 1px dashed rgba(15, 35, 70, .45); animation: spin 90s linear infinite;
}
.photo img {
  position: relative; width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
  border-radius: 50%; border: 3px solid var(--navy); display: block;
}
.nameblock h1 { font-weight: normal; font-size: clamp(50px, 6vw, 86px); line-height: 1.05; color: var(--navy); margin: 0 0 8px; letter-spacing: .5px; }
.nameblock p { margin: 0; color: var(--muted); font-size: 22px; }

.item {
  display: block; text-decoration: none; color: var(--navy); padding: 14px 22px; --x: 0px;
  transform: translateX(var(--x));
  transition: transform .45s cubic-bezier(.2, .9, .3, 1.35), background-color .3s, color .3s;
  animation: rise .9s ease backwards, float 7s ease-in-out infinite;
}
.item .t { display: block; font-size: clamp(36px, 4.4vw, 68px); line-height: 1.1; transition: letter-spacing .4s; }
.item .c { display: block; font-size: 21px; color: var(--muted); margin-top: 4px; transition: color .3s; }
.item:hover, .item:focus-visible { background: var(--navy); color: #f6f6f6; transform: translateX(var(--x)) scale(1.14) rotate(-2deg); outline: none; }
.item:hover .t, .item:focus-visible .t { letter-spacing: .05em; }
.item:hover .c, .item:focus-visible .c { color: #cfd8e8; }
.i1 { grid-column: 1; grid-row: 1; --x: 18px; justify-self: end; text-align: right; animation-delay: .10s; }
.i2 { grid-column: 3; grid-row: 1; --x: -18px; justify-self: start; text-align: left; animation-delay: .20s; }
.i3 { grid-column: 1; grid-row: 2; justify-self: end; text-align: right; animation-delay: .30s; }
.i4 { grid-column: 3; grid-row: 2; justify-self: start; text-align: left; animation-delay: .40s; }
.i5 { grid-column: 1; grid-row: 3; --x: 18px; justify-self: end; text-align: right; animation-delay: .50s; }
.i6 { grid-column: 3; grid-row: 3; --x: -18px; justify-self: start; text-align: left; animation-delay: .60s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { transform: translateY(18px) translateX(var(--x)); } }

@media (max-width: 1100px) {
  .home { padding: 0 16px 56px; }
  .orbit { grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 12px; }
  .center { grid-column: 1 / -1; grid-row: auto; margin-bottom: 0; }
  .nameblock { grid-row: auto; margin: 0 0 14px; }
  .photo { width: 230px; height: 230px; }
  .nameblock h1 { font-size: 46px; margin-top: 34px; }
  .item { grid-column: auto !important; grid-row: auto !important; justify-self: stretch !important; text-align: left !important; --x: 0px; border: 1px solid var(--navy); padding: 16px 14px; }
  .item { animation: rise .9s ease backwards; }
  .item .t { font-size: clamp(22px, 6.3vw, 32px); }
  .item .c { font-size: 17px; }
  .item:hover, .item:focus-visible { transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .photo::before, .item { animation: none; }
  .item { transition: background-color .3s, color .3s; }
}

/* Page illustrations */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.page-art { flex: 0 0 320px; width: 320px; }
.page-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.page-art .ln { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.page-art .thin { stroke-width: 2; }
.page-art .faint { opacity: .25; }
.page-art .fl { fill: #fff; stroke: var(--navy); stroke-width: 3; stroke-linejoin: round; }
.page-art .solid { fill: var(--navy); stroke: var(--navy); stroke-width: 3; }
.page-art .tint { fill: rgba(15, 35, 70, .09); stroke: none; }
.page-art .tint2 { fill: rgba(15, 35, 70, .16); stroke: var(--navy); stroke-width: 3; }
.page-art .dot { fill: var(--navy); animation: dot 6s ease-in-out infinite; }
.bob { animation: bob 5s ease-in-out infinite; }
.drift { animation: bob 6s ease-in-out -2s infinite reverse; }
.flip { transform-origin: 160px 120px; animation: flip 3.6s ease-in-out infinite alternate; }
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 6s ease-in-out infinite; }
.pop { transform-box: fill-box; transform-origin: center; animation: pop 6s ease-in-out infinite; }
.sway { transform-origin: 153px 132px; animation: sway 6s ease-in-out infinite; }
.snow { fill: var(--navy); animation: snow 4.5s linear infinite; }
@keyframes bob { 50% { transform: translateY(-9px); } }
@keyframes flip { 0%, 15% { transform: scaleX(1); } 85%, 100% { transform: scaleX(-1); } }
@keyframes draw { 0% { stroke-dashoffset: 1; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@keyframes dot { 0%, 40% { opacity: 0; } 50%, 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pop { 0%, 4% { opacity: 0; transform: scale(.6); } 12%, 82% { opacity: 1; transform: scale(1); } 94%, 100% { opacity: 0; transform: scale(.6); } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes snow { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(170px); opacity: 0; } }
@media (max-width: 760px) {
  .page-head { flex-direction: column-reverse; align-items: flex-start; gap: 6px; }
  .page-art { flex-basis: auto; width: min(260px, 70%); align-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  .bob, .drift, .flip, .draw, .pop, .sway, .snow, .dot, .sel { animation: none; }
  .draw { stroke-dashoffset: 0; }
  .pop, .dot { opacity: 1; }
  .snow { opacity: 0; }
}

/* Motion on the inner pages */
main.content h2 {
  width: fit-content; padding-bottom: 2px;
  background: linear-gradient(var(--navy), var(--navy)) no-repeat left bottom / 0 2px;
  transition: background-size .5s ease, transform .35s ease;
}
main.content h2:hover { background-size: 100% 2px; transform: translateX(10px); }
main.content a { text-decoration: none; background: linear-gradient(var(--navy), var(--navy)) no-repeat left bottom / 100% 1px; transition: background-size .35s ease, color .25s; }
main.content a:hover { background-size: 100% 100%; color: #f6f6f6; }
.page-head h1 { animation: slidein .8s cubic-bezier(.2, .8, .3, 1) backwards; }
.page-art { animation: artin 1s cubic-bezier(.2, .8, .3, 1) .15s backwards; }
.reveal:not(.in) { opacity: 0; }
.reveal.in { animation: reveal .8s cubic-bezier(.2, .8, .3, 1) var(--d, 0s) backwards; }
@keyframes slidein { from { transform: translateX(-34px); } }
@keyframes artin { from { transform: scale(.9) translateY(14px); } }
@keyframes reveal { from { opacity: 0; transform: translateY(26px); } }
@media (prefers-reduced-motion: reduce) {
  .page-head h1, .page-art, .reveal.in { animation: none; }
  .reveal:not(.in) { opacity: 1; }
  a.brand:hover, main.content h2:hover { transform: none; }
}

/* Skills: bulleted lists and spreadsheet animation */
.skill-list { list-style: none; margin: 10px 0 10px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 36px; align-items: start; }
.skill-list li { position: relative; padding-left: 24px; line-height: 1.4; }
.skill-list li::before { content: ''; position: absolute; left: 2px; top: .56em; width: 8px; height: 8px; background: var(--navy); transform: rotate(45deg); transition: transform .35s ease; }
.skill-list li:hover::before { transform: rotate(225deg) scale(1.3); }
.skill-list:has(li:only-child), .skill-list.one { grid-template-columns: 1fr; }
.page-art .faint2 { opacity: .35; }
.page-art .sel { fill: rgba(15, 35, 70, .14); stroke: var(--navy); stroke-width: 3; will-change: transform; animation: sel 8s cubic-bezier(.5, 0, .2, 1) infinite; }
@keyframes sel {
  0%, 6% { transform: translate(0, 0); }
  16% { transform: translate(54px, 0); }
  26% { transform: translate(54px, 24px); }
  36% { transform: translate(108px, 24px); }
  46% { transform: translate(108px, 48px); }
  56% { transform: translate(162px, 48px); }
  66% { transform: translate(162px, 72px); }
  76%, 92% { transform: translate(162px, 96px); }
  100% { transform: translate(0, 0); }
}
@media (max-width: 760px) { .skill-list { grid-template-columns: 1fr; } }

/* More motion */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--navy); transform: scaleX(0); transform-origin: left; z-index: 50; pointer-events: none; will-change: transform; }
@keyframes float { 50% { translate: 0 -7px; } }
.item:hover, .item:focus-visible { animation-play-state: running, paused; }
.center { will-change: translate; }


.timeline { position: relative; padding-left: 46px; margin-top: 8px; --p: 1; }
.js .timeline { --p: 0; }
.timeline::before, .timeline::after { content: ''; position: absolute; left: 9px; top: var(--top, 10px); bottom: var(--bottom, 0); width: 2px; border-radius: 2px; }
.timeline::before { background: rgba(15, 35, 70, .18); }
.timeline::after { background: var(--navy); transform: scaleY(var(--p)); transform-origin: top; will-change: transform; transition: transform .12s linear; }
.timeline h2 { position: relative; }
.timeline h2::before { content: ''; box-sizing: border-box; position: absolute; left: -42px; top: calc(.6em - 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--navy); border: 2px solid var(--navy); transition: background-color .35s ease, transform .35s ease; }
.timeline h2.ahead::before { background: var(--bg); }
.timeline h2:hover::before { transform: translateX(-10px); }
.timeline h2.in::before { animation: dotpop .7s cubic-bezier(.2, .9, .3, 1.6) .15s backwards; }
@keyframes dotpop { from { transform: scale(0); } }

.skill-list li.reveal.in { animation-duration: .6s; }


main.content p.big { margin: 14px 0; }
main.content p.big a { font-size: 32px; display: inline-block; padding: 2px 6px; }
main.content p.big a::after { content: ' \2192'; display: inline-block; transition: transform .35s ease; }
main.content p.big a:hover::after { transform: translateX(12px); }

@media (prefers-reduced-motion: reduce) {
  .js .timeline { --p: 1; }
  .item, .photo::before,   .center { will-change: auto; }
}

main.content p.meta { margin: 6px 0 4px; }

@media (max-width: 760px) { main.content p.big a { font-size: clamp(20px, 5.8vw, 28px); overflow-wrap: anywhere; } }

@media (max-width: 360px) { .item { padding: 14px 10px !important; } .item .t { font-size: 20px !important; } }
@media (max-width: 360px) { .photo { width: 190px; height: 190px; } }

/* Home: ticker tape */
.ticker { background: var(--navy); color: #f6f6f6; overflow: hidden; white-space: nowrap; padding: 14px 0; }
.ticker .track { display: inline-flex; animation: ticker 70s linear infinite; will-change: transform; }
.ticker .grp { display: inline-flex; }
.ticker span { font-size: 24px; letter-spacing: .04em; padding-right: 20px; }
.ticker span::after { content: ''; display: inline-block; width: 7px; height: 7px; background: #f6f6f6; transform: rotate(45deg); margin-left: 20px; vertical-align: middle; }
.ticker:hover .track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .track { animation: none; } }

/* Copy-email button */
button.copy { font: inherit; font-size: 18px; letter-spacing: .04em; color: var(--navy); background: transparent; border: 1px solid var(--navy); padding: 6px 16px; margin-left: 10px; cursor: pointer; vertical-align: middle; transition: background-color .25s, color .25s, transform .25s; }
button.copy:hover, button.copy:focus-visible { background: var(--navy); color: #f6f6f6; transform: translateY(-2px); outline: none; }
button.copy.copied { background: var(--navy); color: #f6f6f6; }
button.copy[hidden] { display: none; }
@media (max-width: 760px) { button.copy { margin: 8px 0 0; display: block; } }

/* Interests: two groups with sub-headings */
main.content h2.group { width: auto; font-size: 40px; margin: 56px 0 8px; padding-bottom: 10px; background: none; border-bottom: 1px solid var(--navy); }
main.content h2.group:first-of-type { margin-top: 18px; }
main.content h2.group:hover { background: none; transform: none; }
main.content h3 {
  width: fit-content; font-weight: normal; font-size: 30px; line-height: 1.2; color: var(--navy); margin: 30px 0 4px; padding-bottom: 2px;
  background: linear-gradient(var(--navy), var(--navy)) no-repeat left bottom / 0 2px;
  transition: background-size .5s ease, transform .35s ease;
}
main.content h3:hover { background-size: 100% 2px; transform: translateX(10px); }
@media (max-width: 760px) { main.content h2.group { font-size: 32px; } main.content h3 { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { main.content h3:hover { transform: none; } }

/* Coursework tiles */
.tiles { list-style: none; margin: 12px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tiles li {
  border: 1px solid var(--navy); padding: 14px 16px; font-size: 21px; line-height: 1.25; color: var(--navy); background: rgba(255, 255, 255, .55);
  display: flex; align-items: center; min-height: 66px;
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.3), background-color .25s, color .25s;
}
.tiles li:hover { transform: translateY(-4px); background: var(--navy); color: #f6f6f6; }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .tiles li { font-size: 19px; padding: 12px 12px; min-height: 60px; } }

/* Coursework tiles are links to the official course descriptions */
.tiles li { padding: 0; }
main.content .tiles li a { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 100%; padding: 14px 16px; color: inherit; text-decoration: none; background: none; }
main.content .tiles li a:hover { background: none; color: inherit; }
.tiles li a::after { content: '\2197'; font-size: 18px; opacity: .55; flex: none; transition: transform .25s ease, opacity .25s ease; }
.tiles li:hover a::after, .tiles li:focus-within a::after { opacity: 1; transform: translate(3px, -3px); }
.tiles li:focus-within { background: var(--navy); color: #f6f6f6; }
.tiles li a:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
@media (max-width: 760px) { main.content .tiles li a { padding: 12px 12px; } }

@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tiles li { min-width: 0; } main.content .tiles li a { overflow-wrap: anywhere; } }
@media (max-width: 420px) { .tiles li a::after { display: none; } }

/* Footer */
.site-footer { text-align: center; padding: 26px 20px 34px; color: var(--muted); font-size: 17px; letter-spacing: .03em; border-top: 1px solid rgba(15, 35, 70, .2); }
.site-footer p { margin: 0; }
.ticker + .site-footer { border-top: 0; }
@media (max-width: 760px) { .site-footer { font-size: 15px; padding: 22px 16px 28px; } }

