:root {
  color-scheme: light dark;
  --ink: light-dark(#202d45, #e1e7f3);
  --muted: light-dark(#56647a, #a1aec5);
  --paper: light-dark(#eef2f8, #111722);
  --blue: light-dark(#244bd6, #14265c);
  --line: light-dark(#ced6e3, #2c3649);
  --accent: light-dark(#244bd6, #a7beff);
  --profile-ink: light-dark(#ffffff, #e2eaff);
  --profile-muted: light-dark(#d5dfff, #adbee6);
  --profile-line: light-dark(#6381e5, #374c7e);
  --profile-accent: light-dark(#afc8ff, #90afff);
  --button-bg: light-dark(#ffffff, #c2d3ff);
  --button-hover: light-dark(#dce6ff, #e1eaff);
  --button-ink: #1735a2;
  --image-bg: light-dark(#d8e1f1, #34415a);
  --scroll-thumb: light-dark(#a0acc1, #52617c);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-size: 16px;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--paper);
}

:root[data-theme="light"] {
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  font: inherit;
  cursor: pointer;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}
::selection {
  color: var(--paper);
  background: var(--ink);
}
h1,
h2,
p {
  margin: 0;
}
img {
  max-width: 100%;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.duo-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
}

.profile-panel,
.work-panel {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  container-type: inline-size;
}

.profile-panel {
  position: relative;
  isolation: isolate;
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  color: var(--profile-ink);
  background: var(--blue);
  scrollbar-color: var(--profile-line) var(--blue);
  padding: 0 clamp(24px, 4vw, 60px);
}

.profile-art {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 80px;
  right: 0;
  width: 48%;
  height: auto;
}

.profile-header,
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 80px;
  font-size: 16px;
}

.handle {
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
}
.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--profile-muted);
  background: transparent;
  border: 1px solid var(--profile-line);
  border-radius: 50%;
}
.theme-toggle[hidden] {
  display: none;
}
.theme-toggle svg {
  grid-area: 1 / 1;
  transition:
    opacity 180ms ease-out,
    transform 180ms ease-out;
}
.theme-toggle .theme-sun,
.theme-toggle[aria-pressed="true"] .theme-moon {
  opacity: 0;
  transform: rotate(-30deg) scale(0.95);
}
.theme-toggle[aria-pressed="true"] .theme-sun {
  opacity: 1;
  transform: none;
}
.profile-main {
  margin-block: auto;
  padding-block: 12px 30px;
}
.portrait {
  display: block;
  width: clamp(144px, 36cqi, 208px);
  height: auto;
  margin-bottom: 20px;
}
h1 {
  font-size: clamp(72px, 20cqi, 112px);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: -0.04em;
}
h1 span {
  color: var(--profile-accent);
}
.profile-role {
  font-size: clamp(20px, 4.8cqi, 28px);
  line-height: 1.4;
  font-weight: 600;
  margin-top: 24px;
}
.profile-bio {
  color: var(--profile-muted);
  font-size: 18px;
  line-height: 1.6;
  margin-top: 20px;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
  font-size: 17px;
  font-weight: 600;
}
.profile-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.resume-link {
  justify-content: space-between;
  gap: 28px;
  background: var(--button-bg);
  color: var(--button-ink);
  border-radius: 8px;
  padding: 12px 18px;
  text-decoration: none;
}
.profile-footer {
  padding-block: 20px 28px;
  border-top: 1px solid var(--profile-line);
}
.profile-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}
.profile-footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 16px;
  text-decoration: none;
  padding-block: 8px;
  white-space: nowrap;
}
.profile-footer svg {
  fill: currentColor;
  stroke: none;
  flex-shrink: 0;
}
.profile-footer img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.work-panel {
  grid-column: 1;
  grid-row: 1;
  background: var(--paper);
  scrollbar-color: var(--scroll-thumb) var(--paper);
}
.work-header,
.work-intro,
.work-content,
.footer {
  padding-inline: clamp(24px, 4vw, 60px);
}
.site-name {
  font-weight: 700;
  text-decoration: none;
}
.llms-link {
  color: var(--muted);
  text-decoration: none;
  padding-block: 14px;
}
.work-intro {
  padding-top: 20px;
  padding-bottom: 26px;
}
.work-intro h2 {
  font-size: clamp(36px, 8cqi, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
}
.work-intro p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 36ch;
  margin-top: 20px;
}
.work-nav {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding: 12px clamp(24px, 4vw, 60px);
  background: var(--paper);
  border-block: 1px solid var(--line);
}
.work-nav a {
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  padding-block: 12px;
}
@supports (backdrop-filter: blur(16px)) {
  .work-nav {
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
}
.work-content {
  padding-top: 32px;
}
.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.experience {
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 86px;
}
.experienceheading {
  display: none;
}
.companyDetails > :last-child {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 3px 12px;
}
.companyLogo {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
}
.companyLogo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.companyName {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.companyPeriod {
  grid-column: 2;
  font-size: 15px;
  color: var(--muted);
}
.companySkills {
  display: flex;
  flex-wrap: wrap;
  grid-column: 2;
  gap: 6px 12px;
  margin-top: 6px;
}
.companySkillName {
  font-size: 14px;
  color: var(--muted);
}
.experienceSection {
  margin-top: 16px;
}
.experienceItem + .experienceItem {
  margin-top: 18px;
}
.experienceName {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}
.experienceDesc {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  max-width: 70ch;
}
.experienceDesc + .experienceName {
  margin-top: 24px;
}
.experienceLead {
  margin-bottom: 12px;
}
.experienceHighlights {
  margin: 0;
  padding: 0;
  list-style: none;
}
.experienceHighlights li {
  margin-top: 14px;
}
.experienceHighlights a {
  color: var(--accent);
}
.experienceHighlights span {
  display: block;
}
.skills {
  display: grid;
  gap: 12px;
  padding-block: 36px;
  border-bottom: 1px solid var(--line);
}
.skillSection {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.skillHeader {
  font-size: 18px;
  font-weight: 600;
}
.skillNameSection {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 12px;
}
.skillName {
  font-size: 16px;
  color: var(--muted);
}
.projects,
.ossHeader,
.blogsHeader,
.contact {
  margin-top: 40px;
  scroll-margin-top: 86px;
}
.aboutHeading {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: none;
  letter-spacing: -0.02em;
}
.projectName {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}
.projectDesc,
.blogsDesc {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
}
.projectHeader {
  position: relative;
  padding-bottom: 30px;
}
.projectHeader > a {
  display: inline-flex;
  padding: 12px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.projectLink {
  width: 18px;
  height: 18px;
}
.blogsMore {
  display: inline-flex;
  padding-block: 12px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
}
.ossSortBlock,
.ossSort {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ossHeadingRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.ossHeadingRow .aboutHeading {
  margin: 0;
}
.ossHeadingRow .blogsMore {
  white-space: nowrap;
}
.ossHeader {
  margin-bottom: 20px;
}
.ossSortLabel {
  font-size: 15px;
  color: var(--muted);
  margin-right: 4px;
}
.ossSortBtn {
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  color: var(--muted);
  background: transparent;
}
.ossSortBtn.is-active {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
}
.ossCategory {
  margin-top: 24px;
}
.ossCategoryName {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}
.ossItem {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px 12px;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.ossLogo {
  grid-row: 1 / 3;
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: var(--logo-filter);
}
.ossRepo {
  font-size: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ossDesc {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 4px;
}
.ossMeta {
  grid-column: 2;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.ossArrow {
  display: none;
}
.blogsTitle {
  font-size: 28px;
  font-weight: 700;
}
.blogsTitle .blogsDesc {
  display: block;
  margin-top: 10px;
  font-weight: 400;
}
.blogsControls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-block: 12px;
}
.blogsNav {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}
.blogsNav:disabled {
  opacity: 0.35;
  cursor: default;
}
.blogsControls .blogsMore {
  margin-left: 8px;
}
.blogsHeader > div:first-child .blogsTitle {
  font-size: 24px;
}
.blogsHeader .blogsDesc {
  font-size: 16px;
  margin-top: 6px;
}
.blogsWrap {
  position: relative;
}
.blogs {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scroll-margin-top: 86px;
}
.blogs.is-animating,
.blogs.is-dragging {
  scroll-snap-type: none;
}
.blogSection {
  position: relative;
  flex: 0 0 44%;
  min-width: 0;
  text-decoration: none;
  scroll-snap-align: start;
  padding-bottom: 20px;
}
.blogImage {
  aspect-ratio: 16 / 9;
  background: var(--image-bg);
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 8px;
}
.blogImage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blogTitle {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}
.blogMeta {
  font-size: 12px;
  margin-top: 10px;
  color: var(--muted);
}
.blogLinkArrow {
  display: none;
}
.contact {
  padding-block: 28px;
  border-block: 1px solid var(--line);
}
.contactName {
  font-size: clamp(40px, 9cqi, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.contactButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--paper);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  margin-top: 16px;
}
.contactEmail {
  font-size: 16px;
  color: var(--muted);
  margin-top: 8px;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-block: 28px;
  color: var(--muted);
  font-size: clamp(10px, 3cqi, 14px);
  white-space: nowrap;
}
.easterEgg {
  opacity: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.easterEgg:focus-visible {
  opacity: 1;
}

:where(
  .theme-toggle,
  .resume-link,
  .contactButton,
  .ossSortBtn,
  .blogsNav,
  .projectHeader > a
) {
  transition:
    transform 150ms cubic-bezier(0.215, 0.61, 0.355, 1),
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}
.easterEgg {
  transition: opacity 150ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover {
    color: var(--profile-ink);
    background: var(--profile-line);
  }
  .resume-link:hover {
    background: var(--button-hover);
  }
  .contactButton:hover {
    background: color-mix(in srgb, var(--accent) 85%, var(--ink));
  }
  .ossSortBtn:not(.is-active):hover,
  .blogsNav:not(:disabled):hover,
  .projectHeader > a:hover {
    color: var(--accent);
    border-color: var(--accent);
  }
  .profile-footer a:hover {
    text-decoration: underline;
  }
  .llms-link:hover,
  .work-nav a:hover,
  .ossItem:hover .ossRepo {
    color: var(--accent);
    text-decoration: underline;
  }
  .easterEgg:hover {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: no-preference) {
  :is(
      .theme-toggle,
      .resume-link,
      .contactButton,
      .ossSortBtn,
      .blogsNav,
      .projectHeader > a
    ):not(:disabled):not(:focus-visible):active {
    transform: scale(0.97);
  }
}

:is(
  .theme-toggle,
  .resume-link,
  .contactButton,
  .ossSortBtn,
  .blogsNav,
  .projectHeader > a,
  .easterEgg
):focus-visible,
.theme-toggle:focus-visible svg {
  transition: none;
}

@container (max-width: 420px) {
  .blogSection {
    flex-basis: 62%;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  .duo-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 100dvh;
  }
  .profile-panel {
    min-height: 100dvh;
    overflow: clip;
    padding-inline: max(28px, env(safe-area-inset-left));
  }
  .profile-main {
    padding-block: 28px;
  }
  .profile-header {
    min-height: 76px;
    padding-top: env(safe-area-inset-top);
  }
  .profile-footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  .portrait {
    width: 180px;
  }
  h1 {
    font-size: clamp(80px, 24cqi, 104px);
  }
  .work-panel {
    overflow: visible;
  }
  .work-header,
  .work-intro,
  .work-content,
  .footer {
    padding-inline: 28px;
  }
  .work-nav {
    padding-inline: 28px;
    gap: 4px 16px;
  }
  .work-intro h2 {
    font-size: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle,
  .theme-toggle svg,
  .resume-link,
  .contactButton,
  .ossSortBtn,
  .blogsNav,
  .projectHeader > a,
  .easterEgg {
    transition: none;
  }
}

@media (min-width: 641px) and (max-height: 740px) {
  .profile-header {
    min-height: 64px;
  }
  .profile-main {
    padding-block: 8px 20px;
  }
  .portrait {
    width: 124px;
    margin-bottom: 14px;
  }
  h1 {
    font-size: 72px;
  }
  .profile-role {
    margin-top: 18px;
  }
  .profile-bio {
    margin-top: 12px;
    font-size: 16px;
  }
  .profile-actions {
    margin-top: 16px;
  }
  .profile-footer {
    padding-block: 12px 16px;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .profile-panel,
  .work-header,
  .work-intro,
  .work-content,
  .work-nav,
  .footer {
    padding-inline: 20px;
  }
  .profile-header {
    min-height: 52px;
  }
  .profile-main {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    column-gap: 16px;
    padding-block: 8px 12px;
  }
  .portrait {
    width: 68px;
    margin: 0;
    align-self: center;
  }
  h1 {
    font-size: clamp(36px, 10cqi, 48px);
    align-self: center;
  }
  h1 br {
    display: none;
  }
  .profile-role,
  .profile-bio,
  .profile-actions {
    grid-column: 1 / -1;
  }
  .profile-role {
    font-size: 18px;
    margin-top: 12px;
  }
  .profile-bio {
    font-size: 14px;
    margin-top: 10px;
  }
  .profile-actions {
    font-size: 15px;
    margin-top: 12px;
    gap: 16px;
  }
  .profile-footer {
    padding-block: 4px 8px;
  }
  .profile-footer nav {
    gap: 0 12px;
  }
  .profile-footer a {
    font-size: 13px;
    gap: 5px;
  }
  .profile-footer svg,
  .profile-footer img {
    width: 16px;
    height: 16px;
  }
  .profile-art {
    top: 52px;
    width: 40%;
  }
  .work-intro h2 {
    font-size: 34px;
  }
  .work-nav {
    gap: 0 12px;
  }
  .work-nav a {
    font-size: 14px;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .work-nav {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media print {
  .duo-shell {
    display: block;
    width: 100%;
    height: auto;
  }
  .profile-panel,
  .work-panel {
    display: block;
    height: auto;
    overflow: visible;
  }
  .theme-toggle {
    display: none;
  }
}

:root {
  --logo-filter: brightness(0.25);
  --portrait-filter: none;
  --art-opacity: 1;
  --arrow-filter: none;
}
:root[data-theme="dark"] {
  --logo-filter: brightness(0.85);
  --portrait-filter: brightness(0.8) sepia(0.5) saturate(2) hue-rotate(175deg);
  --art-opacity: 0.65;
  --arrow-filter: invert(1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --logo-filter: brightness(0.85);
    --portrait-filter: brightness(0.8) sepia(0.5) saturate(2) hue-rotate(175deg);
    --art-opacity: 0.65;
    --arrow-filter: invert(1);
  }
}
.companyLogo img {
  filter: var(--logo-filter);
}
.portrait {
  filter: var(--portrait-filter);
}
.profile-art {
  opacity: var(--art-opacity);
}
.projectLink {
  filter: var(--arrow-filter);
}
