.portfolio {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body-font);
  font-size: var(--body-size);
  line-height: 1.65;
  overflow-wrap: anywhere;
  min-height: 100vh;
  isolation: isolate;
}
.portfolio * {
  box-sizing: border-box;
}
.portfolio a {
  color: inherit;
  text-decoration: none;
}
.portfolio a:focus-visible,
.portfolio button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 5px;
}
.portfolio button {
  font: inherit;
}
.portfolio h1,
.portfolio h2,
.portfolio h3 {
  font-family: var(--title-font);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0;
}
.portfolio p {
  margin: 0;
}
.portfolio-container {
  max-width: var(--page-width);
  padding-inline: 42px;
  margin-inline: auto;
}
.portfolio .skip {
  position: fixed;
  left: 20px;
  top: -100px;
  padding: 12px 20px;
  background: var(--surface);
  z-index: 100;
}
.portfolio .skip:focus {
  top: 15px;
}
.portfolio-header {
  position: relative;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.with-sticky-nav .portfolio-header {
  position: sticky;
  top: 0;
}
.header-inner {
  min-height: 94px;
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
}
.portfolio .brand {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
  flex-shrink: 0;
}
.portfolio .brand span {
  color: var(--secondary-accent);
}
.portfolio nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 15px;
}
.portfolio nav a {
  position: relative;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portfolio nav a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.portfolio nav a:hover:after {
  transform: scaleX(1);
}
.header-note {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  max-width: 180px;
  text-align: right;
}
.portfolio-hero {
  position: relative;
  overflow: hidden;
}
.gradient-field {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: var(--gradient-strength);
  pointer-events: none;
}
.gradient-soft {
  background:
    radial-gradient(ellipse at 8% 20%, var(--accent), transparent 60%),
    radial-gradient(ellipse at 92% 70%, var(--secondary-accent), transparent 62%),
    linear-gradient(var(--gradient-angle), transparent, var(--gradient-middle));
  background-size: 160% 160%;
}
.gradient-linear {
  background: linear-gradient(
    var(--gradient-angle),
    var(--accent),
    var(--gradient-middle) 50%,
    var(--secondary-accent)
  );
  background-size: 200% 200%;
}
.gradient-none {
  display: none;
}
.gradient-moving {
  animation: color-drift 18s ease-in-out infinite alternate;
}
.hero-content {
  padding-top: calc(var(--section-space) * 0.95);
  padding-bottom: 30px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 35px;
}
.hero-content:has(.hero-portrait) {
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.8fr);
  align-items: center;
}
.portfolio .eyebrow {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.095em;
  text-transform: uppercase;
  margin-bottom: 24px;
  line-height: 1.6;
  flex-wrap: wrap;
}
.status-dot {
  height: 7px;
  width: 7px;
  flex-shrink: 0;
  background: var(--accent);
  border-radius: 50%;
}
.eyebrow-separator {
  color: var(--secondary-accent);
  padding-inline: 5px;
}
.portfolio h1 {
  font-size: clamp(46px, 8.2vw, var(--title-size));
  margin-bottom: 38px;
  line-height: 0.98;
  max-width: 100%;
}
.portfolio .accent-text {
  color: var(--accent);
}
.gradient-text {
  background: linear-gradient(
    var(--gradient-angle),
    var(--accent) 18%,
    var(--secondary-accent) 95%
  );
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.hero-bottom {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
}
.hero-bottom > p {
  font-size: 1.08em;
  color: var(--muted);
  max-width: 430px;
}
.hero-buttons {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.portfolio-button {
  display: inline-flex;
  gap: 30px;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  color: var(--accent-text) !important;
  padding: 15px 22px;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--corner);
  min-height: 52px;
}
.portfolio .text-link {
  display: inline-block;
  font-weight: 600;
  border-bottom: 1px solid var(--accent);
  padding: 6px 0;
  font-size: 15px;
}
.hero-rule {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: calc(var(--section-space) * 0.6);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.hero-rule span:last-child {
  font-size: 24px;
  color: var(--secondary-accent);
}
.hero-portrait img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  aspect-ratio: 4/5;
  border-radius: var(--corner);
  display: block;
}
.hero-center .hero-content:not(:has(.hero-portrait)) {
  text-align: center;
}
.hero-center .hero-content:not(:has(.hero-portrait)) .eyebrow {
  justify-content: center;
}
.hero-center .hero-content:not(:has(.hero-portrait)) .hero-bottom {
  margin: auto;
  flex-direction: column;
  gap: 24px;
}
.portfolio-section {
  padding-block: var(--section-space);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 110px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 28px;
}
.portfolio h2 {
  font-size: clamp(33px, 4vw, 52px);
  max-width: 900px;
}
.section-head .eyebrow {
  margin-bottom: 14px;
}
.project-count {
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 7px;
}
.section-intro {
  max-width: 730px;
  color: var(--muted);
  font-size: 1.05em;
  margin-bottom: 36px !important;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: 34px;
}
.project {
  min-width: 0;
}
.project-visual {
  position: relative;
  border-radius: var(--corner);
  overflow: hidden;
  background: var(--line);
}
.project-visual img {
  width: 100%;
  height: 100%;
  aspect-ratio: var(--image-ratio);
  object-fit: var(--image-fit);
  display: block;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.project-placeholder {
  aspect-ratio: var(--image-ratio);
  display: grid;
  place-items: center;
  font-family: var(--title-font);
  font-size: 85px;
  background: linear-gradient(130deg, var(--accent), var(--secondary-accent));
  color: #fff;
  opacity: 0.85;
}
.project-number {
  position: absolute;
  top: 15px;
  left: 15px;
  border: 1px solid #ffffff77;
  background: #ffffffde;
  color: #142441;
  font-size: 12px;
  padding: 3px 11px;
  border-radius: 30px;
}
.project-body {
  padding: 26px 0 10px;
}
.project-body h3 {
  font-size: 34px;
  margin: 10px 0 18px;
}
.project-body > p {
  color: var(--muted);
  font-size: 0.95em;
}
.small-label {
  font-size: 11px !important;
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--muted);
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 20px 0 22px;
  padding: 0;
}
.project-tags li {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 3px 12px;
  font-size: 11px;
  color: var(--muted);
}
.contribution {
  border-left: 2px solid var(--secondary-accent);
  padding-left: 15px;
  margin: 25px 0 15px;
}
.contribution p {
  font-size: 0.92em;
  margin-top: 4px;
}
.team-note {
  font-size: 12px !important;
  line-height: 1.7;
}
.project-actions {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 23px;
  font-size: 14px;
  font-weight: 600;
}
.project-actions a {
  display: flex;
  gap: 16px;
  align-items: center;
}
.project-actions a:hover {
  color: var(--accent);
}
.layout-cards .project {
  border: 1px solid var(--line);
  border-radius: var(--corner);
  background: var(--surface);
  overflow: hidden;
}
.layout-cards .project-body {
  padding: 25px;
}
.layout-cards .project-visual {
  border-radius: 0;
}
.layout-editorial .project:nth-child(even) {
  margin-top: 55px;
}
.project-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 25px;
}
.project-filters button {
  border: 1px solid var(--line);
  padding: 5px 14px;
  background: transparent;
  border-radius: 30px;
  color: var(--text);
  font-size: 13px;
}
.project-filters button[aria-pressed='true'] {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.source-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 35px !important;
  max-width: 800px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 70px;
  margin-top: 50px;
}
.about-signature {
  display: flex;
  align-items: center;
  gap: 24px;
}
.about-signature > span {
  font: 600 75px/1 var(--title-font);
  letter-spacing: -0.08em;
  color: var(--accent);
  border-right: 1px solid var(--line);
  padding-right: 30px;
}
.about-signature p {
  font-weight: 600;
}
.about-signature small {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}
.about-copy p {
  margin-bottom: 20px;
  font-size: 1.08em;
}
.muted {
  color: var(--muted);
}
.preserve-lines {
  white-space: pre-line;
}
.custom-content {
  font-size: 1.08em;
  max-width: 900px;
}
.custom-content.with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: none;
  align-items: center;
}
.custom-content img {
  width: 100%;
  height: auto;
  border-radius: var(--corner);
}
.custom-content .text-link {
  margin-top: 22px;
}
.section-contact {
  position: relative;
}
.contact-email {
  display: inline-block;
  font-family: var(--title-font);
  font-size: clamp(24px, 3.3vw, 46px);
  line-height: 1.3;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  max-width: 100%;
  margin-bottom: 35px;
}
.contact-email span {
  color: var(--secondary-accent);
}
.contact-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 26px;
  font-size: 15px;
}
.portfolio-footer {
  padding-block: 35px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  flex-wrap: wrap;
}
.footer-inner p,
.footer-inner > a:not(.brand) {
  font-size: 12px;
  color: var(--muted);
}
.with-hover .project:hover .project-visual img {
  transform: scale(1.035);
}
.with-hover .portfolio-button {
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.with-hover .portfolio-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px #00000016;
}
.motion-ready .reveal:not(.is-revealed) {
  opacity: 0;
}
.motion-ready.motion-slide .reveal:not(.is-revealed) {
  transform: translateY(22px);
}
.motion-ready .reveal {
  transition:
    opacity var(--motion-duration) ease,
    transform var(--motion-duration) cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes color-drift {
  0% {
    background-position: 0% 20%;
  }
  100% {
    background-position: 100% 80%;
  }
}

@media (max-width: 950px) {
  .portfolio-container {
    padding-inline: 28px;
  }
  .header-note {
    display: none;
  }
  .hero-content:has(.hero-portrait) {
    grid-template-columns: 1fr;
  }
  .hero-portrait {
    max-width: 420px;
  }
  .hero-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 25px;
  }
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .about-grid {
    gap: 35px;
    grid-template-columns: 1fr 1.3fr;
  }
  .about-signature {
    flex-direction: column;
    align-items: flex-start;
  }
  .about-signature > span {
    border-right: 0;
  }
  .portfolio nav {
    gap: 20px;
  }
  .project-body h3 {
    font-size: 29px;
  }
}
@media (max-width: 620px) {
  .portfolio-container {
    padding-inline: 22px;
  }
  .header-inner {
    min-height: 82px;
    gap: 16px;
    flex-wrap: wrap;
    padding-block: 20px;
  }
  .portfolio nav {
    font-size: 13px;
    gap: 16px;
    justify-content: flex-start;
    max-width: 100%;
  }
  .portfolio .brand {
    font-size: 27px;
  }
  .hero-content {
    padding-top: 56px;
  }
  .portfolio h1 {
    font-size: clamp(44px, 12vw, 76px);
    margin-bottom: 28px;
  }
  .portfolio .eyebrow {
    font-size: 10px;
    gap: 7px;
  }
  .hero-rule {
    margin-top: 30px;
  }
  .portfolio-section {
    padding-block: calc(var(--section-space) * 0.7);
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .layout-editorial .project:nth-child(even) {
    margin-top: 0;
  }
  .about-grid,
  .custom-content.with-image {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .about-signature {
    flex-direction: row;
    align-items: center;
  }
  .about-signature > span {
    font-size: 58px;
    padding-right: 8px;
  }
  .project-body h3 {
    font-size: 32px;
  }
  .footer-inner {
    gap: 20px;
  }
  .footer-inner p {
    width: 100%;
    order: 3;
  }
  .hero-buttons {
    gap: 15px;
  }
  .hero-portrait {
    max-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portfolio * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .portfolio .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .with-hover .project:hover img,
  .with-hover .portfolio-button:hover {
    transform: none !important;
  }
}

.portfolio .project-grid[data-columns='1'] {
  grid-template-columns: 1fr;
}
.portfolio .project-grid[data-columns='1'] .project {
  margin-top: 0;
}

/* Personal profile: an actual portrait when supplied, never a stock substitute. */
.about-me {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.35fr);
  align-items: start;
  gap: clamp(32px, 6vw, 84px);
  margin-top: 44px;
}
.about-me.without-portrait {
  display: block;
  max-width: 860px;
}
.about-portrait {
  margin: 0;
  position: relative;
  border-radius: var(--corner);
  overflow: hidden;
  max-width: 430px;
  border-bottom: 4px solid var(--secondary-accent);
  background: var(--surface);
}
.about-portrait img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}
.about-portrait.portrait-square img,
.about-portrait.portrait-circle img {
  aspect-ratio: 1;
}
.about-portrait.portrait-circle {
  border-radius: 50%;
  border-bottom: 0;
  outline: 1px solid var(--line);
  outline-offset: 10px;
  margin: 10px;
}
.about-introduction {
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 26px;
}
.portfolio .about-introduction h3 {
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.about-introduction > p {
  color: var(--accent);
  font-size: 16px;
  margin-top: 10px;
  font-weight: 600;
}
.about-biography > p {
  font-size: 1.05em;
  margin: 0 0 20px;
}
.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 28px;
  margin: 30px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
}
.about-details dt {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 7px;
}
.about-details dd {
  font-size: 16px;
  margin: 0;
}
.about-details > div:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.about-interests {
  margin-top: 28px;
}
.about-interests h4 {
  font: 600 17px/1.5 var(--body-font);
  margin: 0 0 10px;
}
.about-interests p {
  color: var(--muted);
  font-size: 16px;
}
.footer-signature {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
}
@media (max-width: 760px) {
  .about-me {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .about-portrait {
    width: min(100%, 360px);
  }
  .about-portrait.portrait-circle {
    width: min(calc(100% - 20px), 330px);
  }
  .about-details {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .about-me.without-portrait {
    max-width: none;
  }
}

/* Page controls and editorial extensions. */
.portfolio {
  line-height: var(--body-leading, 1.65);
}
.portfolio h1,
.portfolio h2,
.portfolio h3 {
  font-weight: var(--heading-weight, 600);
  letter-spacing: var(--heading-spacing, -0.035em);
}
.portfolio .project-grid {
  gap: var(--card-gap, 34px);
}
.button-outline .portfolio-button {
  background: transparent;
  color: var(--accent) !important;
  border: 1px solid var(--accent);
}
.with-image-shadow .project-visual,
.with-image-shadow .about-portrait,
.with-image-shadow .hero-portrait {
  box-shadow: 0 15px 35px #00000016;
}
.hero-compact .hero-content {
  padding-top: 40px;
}
.hero-compact .hero-rule {
  margin-top: 24px;
}
.portfolio-section.surface-tinted {
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
  padding-inline: 30px;
  border-radius: var(--corner);
  margin-block: 24px;
}
.portfolio-section.surface-boxed {
  background: var(--surface);
  border: 1px solid var(--line);
  padding-inline: 30px;
  border-radius: var(--corner);
  margin-block: 24px;
}
.portfolio-section.align-center > .section-head {
  justify-content: center;
  text-align: center;
}
.portfolio-section.align-center > .section-head .eyebrow {
  justify-content: center;
}
.portfolio-section.spacing-compact {
  padding-block: calc(var(--section-space) * 0.65);
}
.portfolio-section.spacing-airy {
  padding-block: calc(var(--section-space) * 1.35);
}
.portfolio-section.section-narrow {
  max-width: 920px;
  margin-inline: auto;
}
.availability-note {
  display: inline-block;
  color: var(--accent);
  border-left: 2px solid var(--secondary-accent);
  padding: 3px 14px;
  margin-bottom: 24px !important;
  font-size: 15px;
  max-width: 640px;
}
.featured-project {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 25px;
  padding: 3px 12px;
  margin-bottom: 12px;
}
.portfolio img[data-loading='true'] {
  filter: blur(4px);
  opacity: 0.55;
}
.portfolio img {
  transition:
    filter 0.3s,
    opacity 0.3s,
    transform 0.65s;
}
.with-page-transition > main {
  animation: page-enter 0.4s ease both;
}
@keyframes page-enter {
  from {
    opacity: 0.45;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.skills-grid article {
  border-top: 2px solid var(--accent);
  padding: 24px 0;
  min-width: 0;
}
.skills-grid h3 {
  font-size: 26px;
  margin: 8px 0 16px;
}
.skills-grid article > p:not(.small-label) {
  font-size: 16px;
  color: var(--muted);
}
.skill-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 20px;
  font-size: 14px;
}
.skill-projects a {
  border-bottom: 1px solid var(--line);
}
.career-timeline {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
}
.career-timeline li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 35px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.career-timeline li > div {
  font-size: 15px;
  color: var(--muted);
}
.career-timeline strong {
  display: block;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  margin-top: 8px;
}
.career-timeline h3 {
  font-size: 27px;
  margin-bottom: 12px;
}
.timeline-organization {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 12px !important;
}
.career-timeline article > p:last-child {
  color: var(--muted);
  font-size: 16px;
}
.project-detail-hero {
  padding-block: 70px 45px;
}
.project-detail h1 {
  font-size: clamp(45px, 7vw, 90px);
  margin: 0 0 28px;
}
.project-detail .project-lead {
  max-width: 900px;
  font-size: 21px;
  color: var(--muted);
  margin-bottom: 24px;
}
.project-title-image {
  max-width: 900px;
  max-height: 330px;
  width: 100%;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 25px;
}
.project-cover {
  width: 100%;
  max-height: 640px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--corner);
  margin-top: 25px;
}
.project-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 22px;
  margin: 30px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.project-facts dt {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 5px;
}
.project-facts dd {
  margin: 0;
  font-size: 16px;
}
.detail-block {
  padding-block: 55px;
  border-top: 1px solid var(--line);
}
.detail-block > h2 {
  font-size: clamp(30px, 4vw, 44px);
  margin-bottom: 28px;
}
.detail-block > p {
  max-width: 850px;
  margin-bottom: 20px;
  white-space: pre-line;
}
.case-study {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
.case-study article > span {
  font-size: 15px;
  color: var(--secondary-accent);
  font-weight: 600;
}
.case-study h3 {
  font-size: 24px;
  margin: 15px 0;
}
.case-study p {
  color: var(--muted);
  font-size: 16px;
}
.project-video {
  margin: 0;
}
.project-video video,
.project-video iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  background: #101722;
  border-radius: var(--corner);
  display: block;
}
.project-video figcaption,
.gallery-grid figcaption {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 12px;
}
.video-consent {
  position: relative;
  aspect-ratio: 16/9;
  background: #142441;
  border-radius: var(--corner);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.video-consent > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}
.video-consent > div {
  position: relative;
  text-align: center;
  color: white;
  padding: 25px;
}
.video-consent p {
  font-size: 14px;
  margin-top: 15px;
}
.video-consent button {
  background: white;
  color: #142441;
  padding: 14px 24px;
  border-radius: 6px;
  min-height: 44px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}
.gallery-grid figure {
  margin: 0;
}
.gallery-grid button {
  position: relative;
  width: 100%;
  display: block;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: var(--line);
  border-radius: var(--corner);
  overflow: hidden;
}
.gallery-grid img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}
.gallery-grid button > span:not(.gif-frame) {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #fff;
  color: #142441;
  border-radius: 50%;
  height: 32px;
  width: 32px;
  display: grid;
  place-items: center;
}
.gallery-dialog[data-slot='dialog-content'] {
  max-width: min(1100px, calc(100vw - 32px));
  max-height: 92vh;
  overflow: auto;
}
.gallery-dialog > img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
}
.gallery-controls {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.project-outlinks {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.related-projects {
  padding: 45px 0 65px;
  display: flex;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}
.related-projects h2 {
  width: 100%;
  font-size: 30px;
  margin-bottom: 15px;
}
.related-projects a {
  font-size: 16px;
  border-bottom: 1px solid var(--line);
}
.copy-email {
  display: block;
  margin-top: -20px;
  margin-bottom: 30px;
  font-size: 14px;
}
.copy-email button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.copy-email > span {
  display: block;
  color: var(--muted);
}
.contact-form {
  max-width: 800px;
  margin-top: 44px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--corner);
  background: var(--surface);
  text-align: left;
}
.contact-form h3 {
  font-size: 28px;
  margin-bottom: 14px;
}
.contact-form > p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 24px;
}
.contact-form form {
  display: grid;
  gap: 20px;
}
.contact-form label:not(.contact-consent) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 5px;
}
.contact-form textarea {
  resize: vertical;
}
.contact-form [data-slot='native-select-wrapper'] {
  width: 100%;
}
.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.contact-consent button {
  flex-shrink: 0;
  margin-top: 4px;
  border: 1px solid var(--line);
  width: 16px;
  height: 16px;
  background: var(--bg);
}
.contact-consent button[data-state='checked'] {
  background: var(--accent);
  color: var(--accent-text);
}
.contact-form button[type='submit'],
.contact-success > button {
  background: var(--accent);
  color: var(--accent-text);
  min-height: 46px;
  padding: 12px 22px;
  border-radius: var(--corner);
  justify-self: start;
}
.contact-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.contact-form .error {
  color: var(--secondary-accent);
  font-size: 14px;
}
.contact-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-success {
  padding: 35px;
}
.contact-success > button {
  margin-top: 20px;
}
.dino-game {
  font-family: 'Source Sans 3', Arial, sans-serif;
  background: white;
  border: 1px solid #d9e1ee;
  border-radius: 12px;
  padding: 22px;
  color: #142441;
  max-width: 760px;
  margin: auto;
  text-align: left;
}
.dino-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.dino-heading h3 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 8px;
  font-weight: 600;
}
.dino-heading p {
  font-size: 14px;
  color: #57647a;
  line-height: 1.5;
  margin: 0;
}
.dino-heading > span {
  font: 600 18px monospace;
  color: #123cac;
}
.dino-game canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e5eaf4;
  border-radius: 8px;
  touch-action: manipulation;
}
.dino-game canvas:focus-visible {
  outline: 3px solid #123cac;
  outline-offset: 3px;
}
.dino-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.dino-actions button {
  font-size: 14px;
  min-height: 38px;
  padding: 8px 16px;
}
.dino-actions > span {
  font-size: 14px;
  color: #57647a;
}
.dino-dialog[data-slot='dialog-content'] {
  max-width: min(850px, calc(100vw - 24px));
  max-height: 94vh;
  overflow: auto;
}
.dino-dialog .dino-game {
  width: 100%;
}
.loading-game-gate {
  position: fixed;
  z-index: 45;
  bottom: 20px;
  right: 20px;
  width: min(700px, calc(100vw - 40px));
  max-height: 90vh;
  overflow: auto;
  background: #f5f7fc;
  color: #142441;
  box-shadow: 0 20px 70px #0004;
  border: 1px solid #cbd5e5;
  border-radius: 14px;
  padding: 20px;
}
.loading-game-gate > p {
  font-size: 14px;
  margin: 0 0 12px;
}
.loading-game-gate > button {
  margin-top: 12px;
  background: white;
  border: 1px solid #cbd5e5;
  padding: 8px 16px;
  border-radius: 6px;
  color: #142441;
}
.route-loading {
  min-height: 70vh;
  max-width: 800px;
  margin: 8vh auto;
  padding: 24px;
}
.route-loading > p {
  font-size: 16px;
  margin-bottom: 20px;
}
.game-launcher {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.not-found {
  display: grid;
  place-items: center;
  padding: 60px 25px;
}
.not-found > div {
  max-width: 850px;
}
.not-found h1 {
  font-size: clamp(40px, 7vw, 85px);
}
.not-found > div > p:not(.eyebrow) {
  margin: 30px 0;
  color: var(--muted);
  font-size: 18px;
}
.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: 850px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .case-study {
    grid-template-columns: 1fr;
  }
  .case-study article {
    border-bottom: 1px solid var(--line);
    padding-bottom: 24px;
  }
  .project-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .career-timeline li {
    grid-template-columns: 130px 1fr;
    gap: 24px;
  }
  .project-detail-hero {
    padding-top: 45px;
  }
}
@media (max-width: 600px) {
  .skills-grid,
  .gallery-grid,
  .contact-form-grid {
    grid-template-columns: 1fr;
  }
  .contact-form {
    padding: 22px;
  }
  .career-timeline li {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .career-timeline li > div {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  .career-timeline strong {
    margin: 0;
  }
  .portfolio-section.surface-tinted,
  .portfolio-section.surface-boxed {
    padding-inline: 18px;
  }
  .project-detail .project-lead {
    font-size: 18px;
  }
  .dino-game {
    padding: 16px;
  }
  .dino-heading {
    gap: 12px;
  }
  .dino-heading h3 {
    font-size: 20px;
  }
  .dino-actions {
    gap: 8px;
  }
  .dino-actions button {
    padding: 8px 12px;
  }
  .loading-game-gate {
    bottom: 12px;
    right: 12px;
    width: calc(100vw - 24px);
    padding: 12px;
  }
  .detail-block {
    padding-block: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portfolio img,
  .with-page-transition > main {
    animation: none !important;
    transition: none !important;
  }
  .portfolio img[data-loading='true'] {
    filter: none;
  }
  .portfolio .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* The isolated portfolio keeps its ambient canvas above its background,
   below all content, and entirely outside pointer/keyboard interaction. */
.portfolio {
  position: relative;
}
.portfolio > .boids-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}
@media (prefers-reduced-motion: reduce) {
  .portfolio > .boids-background {
    display: none;
  }
}
