:root {
  color: #1c1c1e;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; }
a { color: #007aff; text-decoration: none; }
a:visited { color: #007aff; }
a:hover { color: #0a5dc2; }
.page-shell { width: min(920px, calc(100% - 36px)); margin: 22px auto 42px; }
.site-banner { height: 280px; position: relative; overflow: hidden; background: #f2f2f7; border-radius: 18px; }
.banner-slideshow { position: absolute; inset: 0; }
.banner-slide { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; transition: opacity .8s ease; backface-visibility: hidden; }
.banner-slide.is-active { opacity: 1; }
.banner-slide--contain { object-fit: contain; background: #111; }
.image-fallback { display: none; align-items: center; justify-content: center; color: #6e6e73; background: #f2f2f7; }
.banner-fallback { position: absolute; inset: 0; font-size: 1.35rem; letter-spacing: .08em; }
.profile { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; padding: 16px 0 0; }
.profile-copy { min-width: 0; flex: 1; }
.profile-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 2.25rem; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
h2 { margin-bottom: 8px; font-size: 1.35rem; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
p { margin-bottom: 8px; }
.contact-links { display: flex; align-items: center; gap: 14px; margin: 4px 0 0; flex-shrink: 0; }
.contact-links a { display: inline-flex; line-height: 0; text-decoration: none; color: #1c1c1e; }
.contact-links a:visited { color: #1c1c1e; }
.contact-links a:hover { color: #6e6e73; }
.contact-links svg { width: 22px; height: 22px; fill: currentColor; }
.profile-photo-wrap { width: 220px; flex: 0 0 220px; position: relative; background: #f2f2f7; border-radius: 16px; overflow: hidden; }
.profile-photo { display: block; width: 100%; height: auto; }
.profile-fallback { position: absolute; inset: 0; font-size: 2.2rem; }
.section-rule { padding-top: 14px; margin-top: 11px; }
.education { display: flex; align-items: center; gap: 14px; }
.education p { margin-bottom: 2px; }
.school-logo-wrap { position: relative; width: 72px; height: 72px; flex: 0 0 72px; border-radius: 14px; overflow: hidden; }
.school-logo { width: 72px; height: 72px; object-fit: contain; }
.logo-fallback { position: absolute; inset: 0; font-size: .65rem; text-align: center; }
ul { margin: 4px 0 0 22px; padding: 0; }
li { padding-left: 2px; margin-bottom: 3px; }
.experience-item + .experience-item { margin-top: 16px; }
.entry-heading { display: flex; justify-content: space-between; gap: 20px; }
.entry-heading span { white-space: nowrap; }
.experience-item p { margin-bottom: 4px; }
.project + .project { margin-top: 6px; }
.project-toggle { appearance: none; border: 0; border-radius: 14px; color: inherit; background: transparent; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 14px; text-align: left; padding: 10px 12px; margin: 0 -12px; width: calc(100% + 24px); font: inherit; cursor: pointer; transition: background .15s ease; }
.project-toggle:hover { background: #f2f2f7; }
.project-toggle:focus-visible { outline: 2px solid #007aff; outline-offset: 3px; }
.project-thumb-wrap { width: 96px; height: 72px; background: #f2f2f7; border-radius: 12px; position: relative; overflow: hidden; }
.project-thumb { width: 100%; height: 100%; display: block; object-fit: cover; }
.project-thumb-wrap .image-fallback { position: absolute; inset: 0; font-size: .63rem; text-align: center; }
.project-summary { min-width: 0; }
.project-title { display: inline; color: #1c1c1e; font-weight: 600; }
.project-description { display: block; margin-top: 2px; color: #6e6e73; font-size: .95rem; }
.project-chevron { font-size: 1.1rem; width: 18px; text-align: center; color: #c7c7cc; transition: transform .2s ease; }
.project-toggle[aria-expanded="true"] .project-chevron { transform: rotate(90deg); }
.project-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.project-panel.is-open { grid-template-rows: 1fr; }
.project-panel-inner { overflow: hidden; min-height: 0; padding: 0; }
.project-panel.is-open .project-panel-inner { padding: 2px 0 16px 110px; }
.slideshow { margin: 0 0 18px; }
.slideshow-viewport { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.slideshow-media { aspect-ratio: 16 / 9; position: relative; background: #111; overflow: hidden; border-radius: 14px; }
.slideshow-media img, .slideshow-media video, .slideshow-media .youtube-embed { position: absolute; inset: 0; width: 100%; height: 100%; }
.slideshow-media img, .slideshow-media video { object-fit: contain; background: #111; }
.slideshow-media.is-video { background: #000; }
.slideshow-media.is-missing::after { content: "Media unavailable"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: .9rem; }
.youtube-embed iframe { width: 100%; height: 100%; border: 0; }
.youtube-facade { position: absolute; inset: 0; display: block; background: #000; color: #fff; text-decoration: none; }
.youtube-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.youtube-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; background: #f00; border-radius: 12px; }
.youtube-play::before { content: ""; position: absolute; left: 26px; top: 14px; border-style: solid; border-width: 10px 0 10px 18px; border-color: transparent transparent transparent #fff; }
.youtube-facade-label { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: .85rem; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.slideshow-nav { appearance: none; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(0, 0, 0, .08); border-radius: 50%; background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 8px rgba(0, 0, 0, .08); color: #3a3a3c; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: color .15s ease, background .15s ease, box-shadow .15s ease; }
.slideshow-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.slideshow-nav:hover { color: #1c1c1e; background: rgba(255, 255, 255, .8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 12px rgba(0, 0, 0, .12); }
.slideshow-nav:focus-visible { outline: 2px solid #007aff; outline-offset: 2px; }
.slideshow-dots { display: flex; justify-content: center; gap: 7px; margin-top: 10px; }
.slideshow-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #d1d1d6; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.slideshow-dot.is-active { background: #1c1c1e; transform: scale(1.15); }
.slideshow-dot:focus-visible { outline: 2px solid #007aff; outline-offset: 2px; }
.project-panel h3 { font-size: 1.05rem; font-weight: 600; margin: 14px 0 5px; }
.tech-list { margin-top: 2px; color: #6e6e73; }
.project-actions { margin: 18px 0 0; }
.project-view { display: inline-block; padding: 9px 24px; border: 1px solid rgba(0, 0, 0, .08); border-radius: 12px; background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(16px) saturate(180%); backdrop-filter: blur(16px) saturate(180%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 10px rgba(0, 0, 0, .08); color: #1c1c1e; text-decoration: none; font-size: 1rem; font-weight: 500; transition: background .15s ease, box-shadow .15s ease; }
.project-view:visited { color: #1c1c1e; }
.project-view:hover { background: rgba(255, 255, 255, .92); color: #1c1c1e; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 4px 14px rgba(0, 0, 0, .12); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 620px) {
  .page-shell { width: min(100% - 24px, 920px); margin-top: 12px; }
  .site-banner { height: 200px; }
  .profile { flex-direction: column; gap: 12px; }
  .profile-photo-wrap { width: min(100%, 280px); flex-basis: auto; }
  .entry-heading { display: block; }
  .entry-heading span { display: block; }
  .project-toggle { grid-template-columns: 80px minmax(0, 1fr) auto; gap: 10px; }
  .project-thumb-wrap { width: 80px; height: 60px; }
  .project-panel.is-open .project-panel-inner { padding-left: 0; }
  .slideshow-viewport { gap: 6px; }
  .slideshow-nav { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .banner-slide { transition: none; }
}
