:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #ffffff;
  --ink: #171918;
  --muted: #565d59;
  --line: #dedfda;
  --tint: #eeefeb;
  --accent: #236354;
  --dot: #00000030;
  --dock-background: #ffffffed;
  --shadow: #26352a16;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #000000;
  --surface: #101010;
  --ink: #f2f4ed;
  --muted: #b6beb6;
  --line: #373e38;
  --tint: #272f29;
  --accent: #a1dfc9;
  --dot: #ffffff30;
  --dock-background: #111111ed;
  --shadow: #0005;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 1rem/1.65 "Inter", "Avenir Next", system-ui, sans-serif;
}

body::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 9rem;
  background: radial-gradient(circle, var(--dot) .8px, transparent 1px) 0 0 / 5px 5px;
  mask-image: linear-gradient(#000, transparent);
  content: "";
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: #c3e5d4; color: #14372b; }
[hidden] { display: none !important; }

.skip {
  position: fixed;
  z-index: 3;
  top: .75rem;
  left: .75rem;
  padding: .55rem .85rem;
  border-radius: .5rem;
  background: var(--ink);
  color: var(--background);
  transform: translateY(-200%);
}

.skip:focus { transform: none; }
.page { width: min(100% - 3rem, 45rem); margin-inline: auto; padding: 6.8rem 0 8rem; }
.page [id] { scroll-margin-top: 2.25rem; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2.6rem, 6vw, 3.6rem); letter-spacing: -.07em; }
h2 { font-size: 1.45rem; letter-spacing: -.035em; }
h3 { font-size: 1.12rem; letter-spacing: -.026em; }
p { color: var(--muted); }

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.5rem);
}
.hero p { margin-top: .8rem; max-width: 31rem; font-size: clamp(1.08rem, 3vw, 1.35rem); line-height: 1.48; }
.monogram {
  display: grid;
  width: clamp(5rem, 15vw, 9.5rem);
  aspect-ratio: 1;
  place-items: center;
  border: .32rem solid var(--surface);
  border-radius: 50%;
  outline: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg, #ffffff17 0 1px, transparent 1px 8px),
    radial-gradient(circle at 16% 18%, #a9e3c2, transparent 62%),
    linear-gradient(150deg, #80bcae, #235346);
  color: #132f26;
  box-shadow: 0 5px 16px var(--shadow);
  font-size: clamp(1.7rem, 5vw, 3rem);
  font-weight: 750;
  letter-spacing: -.085em;
}

.section { margin-top: 4.1rem; }
.section > h2 { margin-bottom: 1.3rem; }
.section > p { line-height: 1.75; }
.section p a { color: var(--ink); font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: .19em; }
.section p a:hover { color: var(--accent); }

.entry + .entry { border-top: 1px solid var(--line); }
.entry :is(summary, .row) {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .85rem;
  padding: .65rem .05rem;
}
.entry summary, .more-projects summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.entry summary:hover .entry-title strong, .more-projects summary:hover { color: var(--accent); }
.mark {
  display: grid;
  width: 2.75rem;
  aspect-ratio: 1;
  place-items: center;
  flex: none;
  border-radius: 50%;
  color: #232b28;
  font-size: 1rem;
  font-weight: 750;
}
.indigo { background: #dcdcf4; }
.terracotta { background: #f3d9cd; }
.moss { background: #d5e9db; }
.sand { background: #ebe3cc; }
.entry-title { display: grid; line-height: 1.4; }
.entry-title span, .entry-date { color: var(--muted); font-size: .875rem; }
.entry-date { text-align: right; }
.chevron {
  display: block;
  width: .47rem;
  height: .47rem;
  margin-inline: .15rem;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) translateY(-2px);
}
details[open] > summary .chevron { transform: rotate(225deg); }
.entry-body { padding: .35rem .5rem 1rem 3.65rem; color: var(--muted); }
.entry-body ul { margin: 0; padding-left: 1.1rem; }
.entry-body li + li { margin-top: .35rem; }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0; }
.tags li { padding: .19rem .66rem; border: 1px solid var(--line); border-radius: .45rem; background: var(--tint); font-size: .875rem; font-weight: 600; }
.feature { margin-top: 5rem; }
.section-heading { margin-bottom: 1.7rem; text-align: center; }
.section-heading > span { display: flex; align-items: center; justify-content: center; gap: .9rem; color: var(--accent); font-size: .875rem; font-weight: 700; }
.section-heading > span::before, .section-heading > span::after { width: 2.8rem; height: 1px; background: var(--line); content: ""; }
.section-heading h2 { margin-top: .45rem; font-size: clamp(2.05rem, 5vw, 2.7rem); letter-spacing: -.06em; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .95rem; }
.project { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.cover { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; aspect-ratio: 1.85; }
.project-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 1.15rem; }
.project-body p { margin-top: .55rem; line-height: 1.55; }
.project-body .metadata { margin-top: .35rem; color: var(--accent); font-size: .875rem; font-weight: 650; }
.project-body .button { margin-top: auto; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  border-radius: .45rem;
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
  text-underline-offset: .2em;
}
.button:hover { color: var(--accent); }
.credit { background: radial-gradient(ellipse at 15% 10%, #c0e5c5, transparent 70%), #79af96; }
.credit-orbit { position: absolute; z-index: -1; width: 83%; aspect-ratio: 1; border: 1px solid #ebffe786; border-radius: 50%; box-shadow: 0 0 0 18px #ebffe738, 0 0 0 38px #ebffe722; }
.credit-pass { display: grid; align-content: center; gap: .45rem; width: 52%; aspect-ratio: 1.63; padding: 8%; border-radius: .7rem; border: 1px solid #ecfff94f; background: linear-gradient(150deg, #34564b, #122d27); color: #f2faf4; transform: rotate(-10deg); box-shadow: 0 16px 30px #173a3273; font-size: clamp(.73rem, 2.7vw, 1rem); font-weight: 750; line-height: 1; }
.credit-pass span span { color: #a5dcb9; }
.credit-chip { width: 1.22rem; height: .8rem; border-radius: .22rem; box-shadow: inset 0 0 0 1px #fff3; background: linear-gradient(135deg, #e7d487, #a79a61); }
.credit-pass i { width: 78%; height: 2px; border-radius: 3px; background: #a5dcb994; }
.credit-pass i:last-child { width: 48%; opacity: .55; }
.heart { background: radial-gradient(ellipse at 58% 0, #906376, transparent 70%), #382d47; }
.heart-screen { display: flex; align-items: center; justify-content: center; gap: 3%; width: 72%; height: 57%; border: 1px solid #c798ae78; border-radius: .75rem; background: repeating-linear-gradient(0deg, transparent 0 15px, #f4afca24 15px 16px), repeating-linear-gradient(90deg, #241e1e44 0 15px, #ffc6d626 15px 16px), #412c3e; box-shadow: 0 15px 32px #2018279c; }
.heart-screen i { width: 2.5%; height: 12%; border-radius: 2rem; background: #f6adbf; box-shadow: 0 0 10px #f6adc08c; }
.heart-screen i:nth-child(3n) { height: 20%; }
.heart-screen i:nth-child(5n) { height: 29%; }
.heart-screen i:nth-child(7n) { height: 68%; }
.heart-screen i:nth-child(8n) { height: 39%; }
.medical { background: radial-gradient(ellipse at 80% 10%, #d9e6ff, transparent 70%), #8da7c7; }
.med-panel { display: grid; position: absolute; z-index: 1; align-content: center; gap: .44rem; width: 51%; height: 61%; padding: .9rem; border: 1px solid #fff; border-radius: .7rem; background: #f1f7ff; transform: translateX(-13%) rotate(-9deg); box-shadow: 0 10px 24px #314c7290; }
.med-back { z-index: 0; transform: translateX(22%) rotate(14deg); background: repeating-linear-gradient(0deg, #b8cbe3 0 1px, transparent 1px 16px) #cbdcf3; border-color: #e2edff; }
.med-plus { width: 1.5rem; aspect-ratio: 1; background: linear-gradient(#3c628c, #3c628c) center / .35rem 1rem no-repeat, linear-gradient(#3c628c, #3c628c) center / 1rem .35rem no-repeat, #dce8fb; border-radius: .25rem; }
.med-panel span { width: 94%; height: 3px; border-radius: 4px; background: #9ab0cc; }
.med-panel span:nth-of-type(2) { width: 67%; }
.med-panel span:nth-of-type(3) { width: 76%; opacity: .55; }
.curio { background: radial-gradient(circle at 15% 17%, #ffedba, transparent 70%), #e3a878; }
.curio-shapes { display: flex; align-items: center; gap: .55rem; transform: rotate(-8deg); }
.curio-shapes b { width: clamp(2.55rem, 7vw, 4.2rem); aspect-ratio: 1; border: 1px solid #fff8; border-radius: 50%; background: #ec8267; box-shadow: 0 9px 11px #975f4f48; }
.curio-shapes b:nth-child(2) { border-radius: .75rem; transform: translateY(-.45rem) rotate(17deg); background: #8cb395; }
.curio-shapes b:nth-child(3) { border-radius: 50% 50% .7rem .7rem; transform: rotate(9deg); background: #b79bd3; }
.more-projects { margin-top: 1rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: .75rem; }
.more-projects summary { display: flex; justify-content: space-between; align-items: center; font-weight: 650; }
.more-projects dl { margin: .9rem 0 .1rem; }
.more-projects dt { font-weight: 650; }
.more-projects dd { margin: 0 0 .75rem; color: var(--muted); }

.timeline { margin: 0 0 0 1.35rem; padding: 0 0 0 2.25rem; border-left: 1px solid var(--line); list-style: none; }
.timeline li { position: relative; min-height: 3rem; padding: .13rem 0 .5rem; }
.timeline li + li { margin-top: 1rem; }
.timeline .mark { position: absolute; top: 0; left: -3.65rem; box-shadow: 0 0 0 4px var(--background); }
.timeline p { margin-top: .25rem; font-size: .94rem; }
.credentials { margin: 0; padding: 0; list-style: none; }
.credentials li { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; padding-block: .7rem; border-bottom: 1px solid var(--line); }
.credentials li:first-child { border-top: 1px solid var(--line); }
.credentials span { color: var(--muted); white-space: nowrap; font-size: .875rem; }
.contact { text-align: center; }
.contact .section-heading { margin-bottom: .8rem; }
.contact .primary { margin-top: 1rem; padding-inline: .9rem; background: var(--ink); color: var(--background); text-decoration: none; }
.contact .primary:hover { text-decoration: underline; }

.dock { display: flex; gap: .34rem; align-items: center; position: fixed; z-index: 2; bottom: max(1rem, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); padding: .44rem; border: 1px solid var(--line); border-radius: 6rem; background: var(--dock-background); box-shadow: 0 5px 20px var(--shadow); backdrop-filter: blur(14px); }
.dock :is(a, button) { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; transition: transform .16s ease, background .16s ease; }
.dock :is(a, button):hover { background: var(--tint); transform: translateY(-4px); }
.dock-divider { height: 1.3rem; width: 1px; background: var(--line); }
.dock-icon { position: relative; width: .9rem; height: .9rem; border: 1.5px solid currentColor; border-radius: .17rem; }
.home-icon { height: .67rem; margin-top: .34rem; }
.home-icon::before { content: ""; position: absolute; left: .045rem; top: -.37rem; width: .6rem; height: .6rem; border: solid currentColor; border-width: 1.5px 0 0 1.5px; transform: rotate(45deg); background: var(--surface); }
.project-icon::after { content: ""; position: absolute; inset: .23rem 0 auto; border-top: 1.5px solid currentColor; }
.award-icon { border-radius: 50%; margin-top: -.31rem; width: .75rem; height: .75rem; }
.award-icon::after { content: ""; position: absolute; width: .46rem; height: .42rem; left: .06rem; top: .55rem; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 66%, 0 100%); }
.github-icon, .linkedin-icon { font-weight: 800; font-size: .65rem; }
.linkedin-icon { padding-inline: .18rem; line-height: 1.25; border-radius: .16rem; background: var(--ink); color: var(--surface); font-size: .74rem; }
.dock .theme-icon { font-size: 1.3rem; line-height: 1; }

@media (max-width: 620px) {
  .page { padding-top: 4.6rem; }
  .section { margin-top: 3.35rem; }
  .feature { margin-top: 4rem; }
  .credentials li { flex-direction: column; }
}

@media (max-width: 520px) {
  .page { width: calc(100% - 2rem); }
  .hero { gap: .75rem; }
  h1 { font-size: clamp(2.05rem, 8.6vw, 2.8rem); }
  .monogram { width: clamp(3.85rem, 17vw, 5.5rem); border-width: .23rem; }
  .entry :is(summary, .row) { grid-template-columns: auto minmax(0, 1fr) auto; gap: .15rem .65rem; }
  .entry .mark { grid-row: span 2; }
  .entry .entry-date { grid-column: 2; text-align: left; }
  .entry .chevron { grid-row: 1 / span 2; grid-column: 3; }
  .entry-body { padding-left: 3.4rem; }
  .project-grid { grid-template-columns: 1fr; }
  .curio-shapes b { width: clamp(2.55rem, 13vw, 4.2rem); }
  .dock { gap: .26rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dock :is(a, button) { transition: none; }
}
