:root {
  color-scheme: light;
  --paper: #f8f6f1;
  --surface: #fffefa;
  --ink: #201b2b;
  --muted: #544d60;
  --accent: #4628af;
  --accent-hover: #311781;
  --lavender: #ebe5fa;
  --line: #cfc6da;
  --focus: #4525b5;
  --gutter: clamp(1.125rem, 4vw, 3rem);
  --measure: 72rem;
  font-family: Inter, system-ui, "Segoe UI", sans-serif;
  line-height: 1.62;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration-thickness: .08em;
  text-underline-offset: .22em;
}

a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: .1875rem solid var(--focus);
  outline-offset: .25rem;
}

main:focus { outline: none; }

h1, h2, h3, p, ul, figure { margin: 0; }

h1, h2, h3 {
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -.035em;
}

h2 { font-size: clamp(2rem, 4.25vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.625rem); }
p + p { margin-top: .85rem; }

.wrap {
  width: min(calc(100% - var(--gutter) - var(--gutter)), var(--measure));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(1.9rem, 5vw, 5rem);
  padding-block: clamp(3.4rem, 8.2vw, 7.3rem) clamp(3.6rem, 7vw, 6.25rem);
}

.hero h1 {
  font-size: clamp(2.25rem, 5.7vw, 5.1rem);
  font-weight: 800;
  letter-spacing: -.062em;
  line-height: 1.01;
}

.hero h1 span { display: block; }

.hero-role {
  margin-bottom: .8rem;
  color: var(--accent);
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  font-weight: 720;
}

.hero-description {
  max-width: 37rem;
  margin-top: 1.15rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.55vw, 1.25rem);
}

.hero-meta {
  margin-top: 1rem;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 600;
}

.actions {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.65rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: .64rem 1.04rem;
  border: 1px solid var(--accent);
  border-radius: .4rem;
  background: var(--accent);
  color: #ffffff;
  font-size: .975rem;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #ffffff;
}

.button-secondary {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: var(--lavender);
  color: var(--accent);
}

.hero-photo {
  --offset: clamp(.65rem, 1.45vw, 1.2rem);
  position: relative;
  isolation: isolate;
  justify-self: end;
  width: 100%;
  max-width: 29rem;
  padding: 0 var(--offset) var(--offset) 0;
}

.hero-photo::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: var(--offset) 0 0 var(--offset);
  border: 1px solid var(--ink);
  background: radial-gradient(circle, #826db1 1px, transparent 1.1px) 0 0 / 8px 8px, #ded1f9;
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: auto auto -.65rem -.65rem;
  width: 1.25rem;
  height: 1.25rem;
  border: solid var(--accent);
  border-width: 0 0 2px 2px;
  pointer-events: none;
}

.hero-photo img { width: 100%; border: 1px solid var(--ink); }

.section {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.75rem, 6vw, 5rem);
}

.section h2 { margin-bottom: clamp(1.4rem, 3vw, 2.4rem); }

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .9rem;
}

.case-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(1.15rem, 2.35vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--surface);
}

.case-card:first-child { background: var(--lavender); }
.case-card:last-child { border-top: .24rem solid var(--accent); }

.case-date {
  margin-bottom: .6rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 700;
}

.case-card p:not(.case-date) {
  margin-block: .8rem .95rem;
  color: var(--muted);
}

.case-card .case-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  align-self: flex-start;
  margin-top: auto;
  font-weight: 750;
}

.case-link::after {
  content: "";
  flex-shrink: 0;
  width: .4em;
  height: .4em;
  margin-inline: .62em .2em;
  border: solid currentColor;
  border-width: .105em .105em 0 0;
  transform: rotate(45deg);
}

.experience-layout h2 { margin-bottom: 1.5rem; }

.experience-list { list-style: none; padding: 0; }

.experience-list > li {
  display: grid;
  grid-template-columns: minmax(0, 10.5rem) minmax(0, 1fr);
  gap: .35rem clamp(1.25rem, 3vw, 2.75rem);
  padding-block: 1.15rem;
  border-top: 1px solid var(--line);
}

.experience-list > li:first-child { padding-top: 0; border-top: 0; }

.experience-list > li > div { max-width: 78ch; }

.date {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
}

.experience-list h3 { font-size: 1.225rem; }
.experience-list h4 {
  margin: .85rem 0 0;
  font-size: 1.02rem;
  font-weight: 750;
  line-height: 1.35;
}
.experience-list .job { margin-top: .25rem; font-weight: 650; }
.experience-list .detail { margin-top: .42rem; color: var(--muted); }
.work-details { margin-top: .58rem; padding-inline-start: 1.18rem; color: var(--muted); }
.work-details li + li { margin-top: .45rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem 2rem;
}

.skills-grid > div {
  border-top: 2px solid var(--accent);
  padding-top: .95rem;
}

.skills-grid ul, .case-body ul {
  margin-top: .65rem;
  padding-inline-start: 1.18rem;
  color: var(--muted);
}

.work-details, .skills-grid ul, .case-body ul {
  list-style-type: disc;
  list-style-image: url("list-spark.svg");
}

.skills-grid li + li, .case-body li + li { margin-top: .3rem; }

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.32fr);
  gap: 1.75rem clamp(1.25rem, 5vw, 5rem);
  align-items: start;
}

.about-layout h2 { margin-bottom: .9rem; }
.about-text { max-width: 38ch; color: var(--muted); font-size: 1.1rem; }
.about-text p { margin-top: .7rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.gallery figure {
  padding: .35rem;
  border: 1px solid var(--ink);
  background: var(--surface);
}

.gallery figure:last-child { background: var(--lavender); }

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
}

.gallery figcaption {
  padding: .38rem .28rem .22rem;
  font-size: .875rem;
  font-weight: 650;
}

.credentials-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.3rem clamp(1.4rem, 6vw, 5rem);
}

.credentials-layout h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 3.45vw, 2.7rem);
}

.credential-list {
  display: grid;
  gap: .65rem;
  padding: 0;
  list-style: none;
}

.credential-list > li {
  min-width: 0;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--surface);
}

.credential-list h3, .channel-feature h3 {
  font-size: 1.08rem;
  line-height: 1.35;
  letter-spacing: -.012em;
}

.credential-list p, .channel-feature p {
  margin-top: .25rem;
  color: var(--muted);
}

.plain-list { list-style: none; padding: 0; }

.plain-list li { padding-block: .66rem; border-top: 1px solid var(--line); }
.plain-list li:first-child { padding-top: 0; border-top: 0; }
.plain-list p { color: var(--muted); }
.plain-list a { display: inline-flex; align-items: center; min-height: 2rem; font-weight: 700; }

.plain-list > li.channel-feature {
  margin-bottom: .75rem;
  padding: .85rem 1rem .55rem;
  border: 1px solid var(--line);
  border-inline-start: .22rem solid var(--accent);
  border-radius: .5rem;
  background: var(--lavender);
}

.channel-feature a {
  max-width: 100%;
  min-height: 2.75rem;
  margin-top: .2rem;
  overflow-wrap: anywhere;
}

.contact {
  --focus: #ffffff;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.4rem clamp(1.4rem, 5vw, 4.5rem);
  padding: clamp(1.5rem, 4.6vw, 3.7rem);
  border-radius: .6rem;
  background: #362376;
  color: #ffffff;
}

.contact h2 { margin-bottom: .8rem; color: inherit; }
.contact p { max-width: 46ch; color: #f1ebff; }
.contact ul { align-self: center; padding: 0; list-style: none; }
.contact li + li { margin-top: .5rem; }

.contact-label {
  display: block;
  color: #f1ebff;
  font-size: .9rem;
  font-weight: 650;
}

.contact a {
  display: inline-flex;
  max-width: 100%;
  min-height: 2.75rem;
  align-items: center;
  color: #ffffff;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact a:hover { color: #e9dfff; }

.hero-contact-link,
.case-page .case-contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 650;
}

.case-page { padding-block: clamp(2.25rem, 6vw, 5rem) clamp(3rem, 6vw, 5rem); }
.case-page .back { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 700; }

.case-heading {
  margin-top: 1.6rem;
  padding: clamp(1.2rem, 4.5vw, 3.4rem);
  border: 1px solid var(--ink);
  border-radius: .4rem;
  background: var(--lavender);
  box-shadow: .42rem .42rem 0 #b8a8e5;
}

.case-heading h1 { max-width: 19ch; font-size: clamp(2rem, 6vw, 4.65rem); }

.case-heading .lead {
  max-width: 57ch;
  margin-top: .95rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.65vw, 1.25rem);
}

.case-body {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  align-items: start;
  gap: 2rem clamp(1.5rem, 5vw, 5rem);
  margin-top: clamp(2.3rem, 5vw, 4rem);
}

.case-body h2 { margin-bottom: .65rem; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.case-body section + section { margin-top: 1.8rem; }
.case-body p { color: var(--muted); }

.case-facts {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--surface);
}

.case-facts dl { margin: 0; }
.case-facts dt { font-weight: 740; }
.case-facts dd { margin-inline-start: 0; color: var(--muted); }
.case-facts dd + dt { margin-top: .7rem; }
.case-page .case-contact-link { margin-block-start: 1.4rem; }

@media (max-width: 57rem) {
  .hero { gap: 2rem; }
  .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 43rem) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 2.75rem; }
  .hero h1 { font-size: clamp(2.25rem, 9.5vw, 4.6rem); }
  .hero-photo { width: min(100%, 26rem); justify-self: start; }
  .case-grid, .skills-grid, .about-layout, .credentials-layout, .contact, .case-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .case-card:last-child { grid-column: auto; }
  .experience-list > li { grid-template-columns: minmax(0, 1fr); }
  .about-text { max-width: 50ch; }
}

@media (max-width: 30rem) {
  .gallery { grid-template-columns: minmax(0, 1fr); gap: .85rem; }
  .contact { padding-inline: 1.15rem; }
  .case-heading { padding-inline: .95rem; }
  .case-heading h1 { max-width: none; font-size: clamp(1.5rem, 6.6vw, 2rem); }
}

@media (forced-colors: active) {
  .button, .contact { border: 1px solid ButtonText; }
  .button { text-decoration: underline; }
  .work-details, .skills-grid ul, .case-body ul { list-style-image: none; }
  :focus-visible { outline-color: Highlight; }
}

@media print {
  :root { --paper: #ffffff; --surface: #ffffff; --ink: #111111; --muted: #282828; --accent: #222222; }
  .actions, .hero-photo, .gallery, .case-page :is(.back, .case-contact-link), .download { display: none; }
  .wrap { width: 100%; }
  .hero, .case-grid, .skills-grid, .about-layout, .credentials-layout, .contact, .case-body {
    display: block;
  }
  .hero, .section, .case-page { padding-block: .85rem; }
  .hero h1 { font-size: 2rem; }
  .hero h1 span { display: inline; }
  h2, .credentials-layout h2, .case-heading h1 { font-size: 1.5rem; }
  .case-heading, .case-card, .case-card:first-child, .contact { background: #ffffff; box-shadow: none; }
  .contact { color: var(--ink); padding-inline: 0; }
  .contact a, .contact p, .contact-label { color: var(--ink); }
  .experience-list > li { display: block; }
  .experience-list > li > div { max-width: none; }
  .case-card, .work-details li, .case-facts, .plain-list li, .credential-list > li { break-inside: avoid; }
  h1, h2, h3, h4 { break-after: avoid; }
  .case-card, .credentials-layout section + section, .skills-grid > div + div { margin-top: .65rem; }
}
