/* Motion is opt-in and uses transforms/opacity to keep reading and scrolling fluid. */
html[data-motion="on"] { --motion-ease: cubic-bezier(.22,1,.36,1); }
.hero-heading-line { display: block; --line-delay: 1.2s; }
.hero-heading-line:nth-child(1) { --line-delay: .12s; }
.hero-heading-line:nth-child(2) { --line-delay: .3s; }
.hero-heading-line:nth-child(3) { --line-delay: .48s; }
.hero-heading-line:nth-child(4) { --line-delay: .66s; }
.hero-heading-line:nth-child(5) { --line-delay: .84s; }
.hero-heading-line:nth-child(6) { --line-delay: 1.02s; }
.hero-heading-line > em { position: relative; }
html[data-motion="on"] .hero-heading-line {
  animation: headline-arrive .95s var(--motion-ease) var(--line-delay, 0ms) backwards;
}
html[data-motion="on"] .hero-heading-line > em::after {
  content: ''; position: absolute; left: 0; bottom: -.06em; width: 48%; height: 2px;
  background: linear-gradient(90deg, #8ba58199, #8ba58100);
  transform-origin: left;
  animation: headline-accent 1s var(--motion-ease) calc(var(--line-delay, 0ms) + .55s) backwards;
}
html[data-document-hidden="true"] .hero-heading-line,
html[data-document-hidden="true"] .hero-heading-line > em::after { animation-play-state: paused !important; }
@keyframes headline-arrive {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes headline-accent {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}
.education-card { min-width: 0; }
.education-card-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; min-height: 100px; }
.education-card-top .education-year { position: static; flex-shrink: 0; }
.university-logo { display: inline-flex; align-items: center; justify-content: center; width: 244px; max-width: calc(100% - 65px); min-height: 100px; padding: 12px; background: #fff; border: 1px solid #e9ece4; border-radius: 9px; }
.university-logo { min-width: 0; }
.university-logo img { display: block; width: 100%; height: 76px; object-fit: contain; }
.education-symbol { color: #7d966b; }
.education-symbol > .icon { width: 29px; height: 29px; }
.education-card > .resource-list { margin-top: 18px; }
.education-card .resource-row strong { margin: 0; font-family: var(--sans); font-size: 12px; }
.education-card .resource-row small { font-size: 10px; }
.education-posts { margin-top: 30px; }
.education-posts > .resource-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 14px; }
.education-posts .resource-row { height: 100%; }
html[data-motion="on"] .university-logo { transition: transform .55s var(--motion-ease), box-shadow .55s ease, border-color .3s ease; }
html[data-motion="on"] .education-card { transition: border-color .3s ease, box-shadow .4s ease; }
html[data-motion="on"] .university-logo:focus-visible { transform: translateY(-4px); box-shadow: 0 12px 24px -15px #1e4c4055; border-color: #b9caae; }
html[data-motion="on"] .education-card .resource-row .icon,
html[data-motion="on"] .education-posts .resource-row .icon { transition: transform .35s var(--motion-ease); }
@media(max-width:600px) {
  .education-card-top { gap: 12px; }
  .university-logo { padding: 8px; min-height: 84px; }
  .university-logo img { height: 66px; }
  .education-posts > .resource-list { grid-template-columns: 1fr; }
}
/* Timeline hover effects keep the connecting spine and surrounding layout fixed. */
.timeline-item { isolation: isolate; }
.timeline-item::after {
  content: ''; position: absolute; inset: -12px -16px 20px 22px; z-index: -1;
  pointer-events: none; border: 1px solid #dce6d5; border-radius: 12px;
  background: linear-gradient(110deg, #edf2e7, #f5f7f0);
  box-shadow: 0 12px 28px -24px #1e4c4066;
  opacity: 0; transform: translateY(5px) scale(.985); transform-origin: left center;
}
.timeline-dot { position: relative; }
.timeline-dot::after {
  content: ''; position: absolute; inset: -9px; border: 1px solid #6b956c;
  border-radius: 50%; pointer-events: none; opacity: 0; transform: scale(.5);
}
html[data-motion="on"] .timeline-item::after { transition: opacity .35s ease, transform .5s var(--motion-ease); }
html[data-motion="on"] .timeline-item::before { transition: background-color .35s ease; }
html[data-motion="on"] .timeline-dot { transition: background-color .3s ease, outline-color .3s ease, transform .45s var(--motion-ease); }
html[data-motion="on"] .timeline-dot::after { transition: opacity .4s ease, transform .65s var(--motion-ease); }
html[data-motion="on"] .timeline-item :is(.timeline-date,h3,strong,p) { transition: transform .5s var(--motion-ease), color .3s ease; }
/* Keep the large About monogram's original typography and spacing. */
.monogram-panel > .about-monogram > .monogram-letter { display: inline-block; font-size: inherit; color: inherit; }
.monogram-panel > .about-monogram > .monogram-dot { display: inline-block; }
html[data-motion="on"] .about-monogram .monogram-letter {
  transform-origin: 50% 80%;
  animation: monogram-letter-arrive .95s var(--motion-ease) .08s backwards;
  transition: translate .65s var(--motion-ease), rotate .65s var(--motion-ease);
}
html[data-motion="on"] .about-monogram .monogram-letter-two { animation-delay: .22s; }
html[data-motion="on"] .about-monogram .monogram-dot {
  animation: monogram-dot-arrive .8s var(--motion-ease) .45s backwards;
  transition: translate .65s var(--motion-ease);
}
html[data-motion="on"] .monogram-panel::before {
  animation: monogram-ring-arrive 1.4s var(--motion-ease) backwards;
  transition: transform .9s var(--motion-ease);
}
/* The monogram is in place from the first frame (no arrive animation), then responds to pointer and keyboard focus. */
html[data-motion="on"] .site-header .brand-mark {
  transform-origin: 50% 70%;
  transition: rotate .45s var(--motion-ease);
}
html[data-motion="on"] .site-header .brand-mark > span {
  display: inline-block;
  transition: translate .45s var(--motion-ease), rotate .45s var(--motion-ease);
}
html[data-motion="on"] .site-header .brand-mark > i {
  transition: transform .45s var(--motion-ease);
}
html[data-motion="on"] .site-header .brand:focus-visible .brand-mark { rotate: -5deg; }
html[data-motion="on"] .site-header .brand:focus-visible .brand-mark > span { translate: 2px -3px; rotate: 5deg; }
html[data-motion="on"] .site-header .brand:focus-visible .brand-mark > i { transform: scale(1.4); }
html[data-motion="on"] :is(.course-card,.project-card,.notice-card,.resource-row,.media-card) {
  transition: transform .38s var(--motion-ease), box-shadow .38s ease, border-color .25s ease, background-color .25s ease;
}
html[data-motion="on"] :is(.button,.icon-button,.filter-tab,.main-nav a,.anchor-nav a) {
  transition: background-color .22s ease, color .22s ease, transform .3s var(--motion-ease), border-color .22s ease;
}
html[data-motion="on"] :is(.button,.text-link,.project-card,.course-card) .icon {
  transition: transform .35s var(--motion-ease);
}
html[data-motion="on"] :is(.project-cover,.content-gallery > figure,.hero-portrait) { overflow: hidden; }
html[data-motion="on"] :is(.project-cover,.content-gallery > figure,.hero-portrait) img {
  transition: transform .8s var(--motion-ease);
}
.hero-portrait { position: relative; }
html[data-motion="on"] .hero-portrait > img {
  transform-origin: 50% 40%;
  animation: portrait-float 8s ease-in-out infinite;
  transition: scale .8s var(--motion-ease);
}
.portrait-motion-toggle {
  display: none; position: absolute; right: 14px; top: 14px; z-index: 1;
  padding: 7px 10px; border: 1px solid #ced9c8; border-radius: 5px;
  background: #fafbf6ed; color: #1e4c40; font-size: 10px;
}
html[data-motion="on"] .portrait-motion-toggle { display: inline-flex; }
.hero-portrait[data-paused="true"] > img,
html[data-document-hidden="true"] .hero-portrait > img { animation-play-state: paused !important; }
@keyframes portrait-float {
  0%,100% { transform: translateY(0) scale(1.02); }
  50% { transform: translateY(-4px) scale(1.045); }
}
html[data-motion="on"] .main-nav a::before {
  content: ''; position: absolute; bottom: 28%; left: 0; right: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--motion-ease);
}
html[data-motion="on"] .main-nav a:focus-visible::before { transform: scaleX(1); }
html[data-motion="on"] .button:active { transform: translateY(0) scale(.98); }
html[data-motion="on"] .faq-item summary .icon { transition: transform .3s var(--motion-ease); }
html[data-motion="on"] :is(.search-dialog,.media-dialog,.studio-confirm)[open] { animation: dialog-arrive .32s var(--motion-ease) both; }
html[data-motion="on"] dialog[open]::backdrop { animation: backdrop-arrive .25s ease both; }
html[data-motion="on"] .system-orbits { transform-origin: 260px 196px; animation: system-orbit 48s linear infinite; }
html[data-motion="on"] .system-core { animation: system-float 6s ease-in-out infinite; }
html[data-motion="on"] .system-particles { transform-origin: 260px 196px; animation: system-orbit 24s linear infinite reverse; }
html[data-motion="on"] .system-svg .system-signal { transform-box: fill-box; transform-origin: center; animation: system-pulse 4s ease-out infinite; }
html[data-motion="on"] .system-svg .signal-two { animation-delay: -2s; }
.diagram-controls { display: flex; align-items: center; gap: 14px; }
.diagram-motion-toggle { display: none; padding: 4px 7px; border: 1px solid #8eb7a166; border-radius: 4px; background: transparent; color: #d9e7dc; font-size: 9px; letter-spacing: .3px; }
html[data-motion="on"] .diagram-motion-toggle { display: inline-flex; }
.diagram-motion-toggle:hover { background: #ffffff12; }
.systems-visual[data-paused="true"] .system-svg *, html[data-document-hidden="true"] .system-svg * { animation-play-state: paused !important; }
html[data-motion="on"] .system-svg > path { animation: diagram-arrive 1.5s ease both; }
html[data-motion="on"] .system-svg > circle { animation: signal-arrive 1.8s ease both; }
html[data-motion="on"] .tiny-line { transform-origin: left; animation: line-arrive .8s var(--motion-ease) both; }
html[data-motion="on"] .project-visual svg { transition: transform .8s var(--motion-ease); }
@media (hover: hover) and (pointer: fine) {
  html[data-motion="on"] .hero-portrait:not([data-paused="true"]):hover > img { scale: 1.015; }
  html[data-motion="on"] .education-card:hover { border-color: #b9caae; box-shadow: 0 14px 30px -25px #1e4c4055; }
  html[data-motion="on"] .education-card:hover .university-logo { transform: translateY(-4px); box-shadow: 0 12px 24px -15px #1e4c4055; border-color: #b9caae; }
  html[data-motion="on"] .education-card .resource-row:hover .icon:last-child,
  html[data-motion="on"] .education-posts .resource-row:hover .icon:last-child { transform: translate(2px,-2px); }
  html[data-motion="on"] .timeline-item:hover::after { opacity: 1; transform: translateY(0) scale(1); }
  html[data-motion="on"] .timeline-item:hover::before { background-color: #8ba581; }
  html[data-motion="on"] .timeline-item:hover .timeline-dot { background-color: var(--green); outline-color: #6b956c; transform: scale(1.15); }
  html[data-motion="on"] .timeline-item:hover .timeline-dot::after { opacity: .45; transform: scale(1); }
  html[data-motion="on"] .timeline-item:hover .timeline-date { color: var(--green); transform: translateX(3px); }
  html[data-motion="on"] .timeline-item:hover h3 { color: var(--green); transform: translateX(5px); }
  html[data-motion="on"] .timeline-item:hover strong { transform: translateX(5px); transition-delay: 35ms; }
  html[data-motion="on"] .timeline-item:hover p { transform: translateX(5px); transition-delay: 65ms; }
  html[data-motion="on"] .monogram-panel:hover .monogram-letter { translate: 0 -4px; rotate: -3deg; }
  html[data-motion="on"] .monogram-panel:hover .monogram-letter-two { translate: 2px -8px; rotate: 3deg; }
  html[data-motion="on"] .monogram-panel:hover .monogram-dot { translate: 1px -3px; }
  html[data-motion="on"] .monogram-panel:hover::before { transform: translateX(-8px) scale(1.06); }
  html[data-motion="on"] .site-header .brand:hover .brand-mark { rotate: -5deg; }
  html[data-motion="on"] .site-header .brand:hover .brand-mark > span { translate: 2px -3px; rotate: 5deg; }
  html[data-motion="on"] .site-header .brand:hover .brand-mark > i { transform: scale(1.4); }
  html[data-motion="on"] :is(.course-card,.project-card):hover { transform: translateY(-5px); box-shadow: 0 16px 36px -22px #183f3559; }
  html[data-motion="on"] :is(.button,.text-link):hover > .icon:last-child { transform: translateX(3px); }
  html[data-motion="on"] .course-card:hover .card-arrow .icon { transform: translate(2px,-2px); }
  html[data-motion="on"] .project-card:hover .project-visual svg { transform: scale(1.045) translateY(-3px); }
  html[data-motion="on"] .project-card:hover .project-cover img,
  html[data-motion="on"] .content-gallery > figure:hover img { transform: scale(1.035); }
  html[data-motion="on"] .main-nav a:hover::before { transform: scaleX(1); }
}
@media (max-width: 1060px) {
  html[data-motion="on"] .main-nav.is-open { animation: menu-arrive .28s var(--motion-ease) both; }
}
@keyframes dialog-arrive { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes backdrop-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes menu-arrive { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: 0 0; } }
@keyframes system-orbit { to { transform: rotate(360deg); } }
@keyframes system-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes system-pulse { 0% { opacity: .55; transform: scale(.7); } 80%,100% { opacity: 0; transform: scale(1.8); } }
@keyframes diagram-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes signal-arrive { 0% { opacity: 0; } 45% { opacity: .7; } 100% { opacity: .3; } }
@keyframes line-arrive { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes monogram-letter-arrive {
  from { opacity: 0; transform: translateY(16px) rotate(-7deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}
@keyframes monogram-dot-arrive {
  0% { opacity: 0; transform: translateY(-20px) scale(.6); }
  65% { opacity: 1; transform: translateY(3px) scale(1.08); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes monogram-ring-arrive {
  from { opacity: 0; transform: scale(.8); }
  to { opacity: 1; transform: scale(1); }
}
.motion-settings { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px; border: 1px solid var(--line); background: #f6f8f0; border-radius: 10px; }
.motion-settings h3 { margin-bottom: 7px; }
.motion-settings p { font-size: 12px; max-width: 520px; }
.motion-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; flex-shrink: 0; font-size: 12px; font-weight: 600; }
.motion-switch input { appearance: none; width: 48px; height: 28px; border: 1px solid #859381; border-radius: 20px; background: #dce2d7; margin: 0; cursor: pointer; position: relative; }
.motion-switch input::after { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: white; border-radius: 50%; box-shadow: 0 1px 3px #0003; }
.motion-switch input:checked { background: var(--green); border-color: var(--green); }
.motion-switch input:checked::after { left: 23px; }
.motion-setting-note { margin-top: 18px; font-size: 12px; }
@media(max-width:600px) { .motion-settings { align-items: flex-start; flex-direction: column; } }
/* Also neutralize pre-existing transitions and smooth scrolling when stopped. */
html[data-motion="off"], html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
html[data-motion="off"] :is(.button,.course-card,.project-card):hover { transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  html[data-motion="on"] .portrait-motion-toggle { display: none; }
  .hero-portrait > img { scale: none !important; }
  html[data-motion="on"] .diagram-motion-toggle { display: none; }
  html, html *, html *::before, html *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html :is(.button,.course-card,.project-card):hover { transform: none !important; }
}
@media print {
  html *, html *::before, html *::after { animation: none !important; transition: none !important; }
}
