/* Portfolio presentation, including theme-matched contact-form overrides. */
.portfolio {
  --page: #f5f8fc;
  --ink: #202e42;
  --muted: #52647b;
  --accent: #285a9b;
  --line: #d4dfed;
  --panel: #e7eff9;
  --image-surround: #b9c9df;
  background: var(--page);
  color: var(--ink);
  line-height: 1.65;
}
.dw-darkmode .portfolio {
  --page: #141f2e;
  --ink: #f4fafe;
  --muted: #b3c3d7;
  --accent: #80b7ff;
  --line: #334862;
  --panel: #1b2d43;
  --image-surround: #0b1421;
}
.dw-darkmode .preview-forms { background: #263e5b; color: #d5e8ff !important; }
.dw-darkmode .preview-calendar { background: #22364d; color: #d5e8ff !important; }
.portfolio *, .portfolio *::before, .portfolio *::after { box-sizing: border-box; }
.portfolio main { width: 100%; }
.page-width, .site-header { width: min(1200px, calc(100% - 112px)); margin-inline: auto; }
.portfolio h1, .portfolio h2, .portfolio h3, .portfolio h4, .portfolio p { margin: 0; }
.portfolio a { color: inherit; }
.portfolio :focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.portfolio section[id], .portfolio main { scroll-margin-top: 24px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 29px; }
.wordmark { font-family: "Knewave", "Work Sans", sans-serif; font-size: 1.5rem; font-weight: 400; letter-spacing: normal; text-decoration: none; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 30px; font-size: .78rem; font-weight: 500; }
.site-nav a { text-decoration: none; padding-block: 10px; }
.site-nav a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--panel); }
.theme-toggle[aria-pressed="true"] { background: var(--panel); }
.hero { padding-block: 80px 78px; }
.eyebrow { font-size: .65rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.portfolio h1 { margin-top: 28px; font-size: clamp(2.7rem, 5.4vw, 4.55rem); line-height: 1.09; letter-spacing: -.065em; font-weight: 550; }
.portfolio h1 > span { font-weight: 400; letter-spacing: -.04em; color: var(--accent); }
.hero-bottom { display: flex; justify-content: space-between; gap: 60px; margin-top: 34px; }
.hero-intro { max-width: 640px; }
.hero-intro > p { font-size: 1rem; color: var(--muted); line-height: 1.75; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; margin-top: 29px; }
.action { display: inline-flex; justify-content: center; align-items: center; gap: 22px; min-height: 48px; padding: 12px 20px; border: 1px solid var(--accent); border-radius: 999px; text-decoration: none; font-size: .75rem; font-weight: 550; }
.portfolio .action-primary { background: var(--accent); color: var(--page); }
.action:hover { filter: brightness(1.15); }
.text-link { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; text-decoration: none; font-weight: 550; font-size: .75rem; }
.file-type { font-size: .55rem; color: var(--muted); font-weight: 400; }
.hero-note { align-self: flex-start; padding-left: 22px; border-left: 1px solid var(--line); font-size: .75rem; min-width: 235px; line-height: 1.9; }
.note-label { display: block; text-transform: uppercase; letter-spacing: .14em; font-size: .57rem; color: var(--muted); margin-bottom: 10px; }
.work-section { border-top: 1px solid var(--line); padding-top: 40px; padding-bottom: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.portfolio h2 { font-size: clamp(1.65rem, 2.7vw, 2.35rem); font-weight: 500; letter-spacing: -.045em; line-height: 1.2; }
.section-heading h2 { margin-top: 12px; }
.section-heading > p { font-size: .76rem; line-height: 1.65; color: var(--muted); text-align: right; }
.project { margin-bottom: 64px; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; }
.project:has(.preview-forms) { background: #dce8f7; }
.project:has(.preview-calendar) { background: #e3e9ef; }
.dw-darkmode .project:has(.preview-forms) { background: #263e5b; }
.dw-darkmode .project:has(.preview-calendar) { background: #22364d; }
.project-preview { display: block; padding: 22px 40px 0; overflow: hidden; border-radius: 23px 23px 0 0; text-decoration: none; }
.preview-forms { background: #dce8f7; color: #304d70 !important; }
.preview-calendar { background: #e3e9ef; color: #354557 !important; }
.project-preview img { display: block; width: 100%; height: auto; box-shadow: 0 10px 40px #172b4518; border-radius: 5px 5px 0 0; transition: filter .2s ease; }
.project-preview:focus-visible img { filter: brightness(.94); }
@media (hover: hover) {
  .project-preview:hover img { filter: brightness(.94); }
}
@media (prefers-reduced-motion: reduce) {
  .project-preview img { transition: none; }
}
.project-body { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; padding: 32px 40px 40px; }
.project-intro h3 { font-size: 1.65rem; font-weight: 550; letter-spacing: -.045em; line-height: 1.2; margin-block: 12px 16px; }
.project-summary { font-size: 1.15rem; line-height: 1.5; max-width: 390px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 23px 0 0; list-style: none; }
.tags li { padding: 4px 10px; border: 1px solid var(--muted); border-radius: 3px; font-size: .58rem; color: var(--muted); }
.project-details h4 { font-size: .71rem; font-weight: 600; margin-bottom: 6px; }
.project-details p { font-size: .78rem; line-height: 1.75; color: var(--muted); }
.project-details h4:not(:first-child) { margin-top: 18px; }
.project-details .project-note { font-size: .66rem; line-height: 1.65; margin-top: 15px; }
.project-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 15px 22px; margin-top: 23px; }
.project-actions .text-link { font-size: .68rem; }
.about-section { background: var(--panel); padding-block: 65px; }
.previous-work { border-top: 1px solid var(--line); padding-block: 30px 75px; }
.previous-intro { max-width: 780px; color: var(--muted); font-size: .9rem; margin-bottom: 30px !important; }
.work-carousel { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; }
#work-slides { padding: clamp(20px, 3vw, 36px); }
.work-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px clamp(20px, 3vw, 36px); background: var(--image-surround); border-radius: 23px 23px 0 0; }
.work-controls[hidden], .past-project[hidden], .screenshot-thumbnails[hidden] { display: none; }
.work-step { display: inline-flex; gap: 12px; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; font: 500 .78rem "Work Sans", sans-serif; cursor: pointer; }
.work-step:hover { border-color: var(--accent); }
.work-dots { display: flex; margin-right: auto; }
.work-dot { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 50%; }
.work-dot span { display: block; width: 9px; height: 9px; border: 1px solid var(--muted); border-radius: 50%; }
.work-dot[aria-current="true"] span { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--panel); }
.past-project + .past-project:not([hidden]) { margin-top: 32px; }
.past-project[hidden] + .past-project { margin-top: 0; }
.past-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.past-heading h3 { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.2; letter-spacing: -.04em; font-weight: 550; margin-top: 12px; }
.past-heading > p { max-width: 300px; color: var(--muted); font-size: .85rem; text-align: right; }
.past-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 35px; align-items: start; }
.past-gallery, .past-copy { min-width: 0; }
.past-gallery figure { margin: 0; }
.screenshot-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding: 6px 6px 12px; margin: -6px -6px 12px; }
.screenshot-thumbnail { flex: 0 0 112px; padding: 5px; border: 2px solid var(--line); border-radius: 9px; background: var(--page); color: var(--muted); font: 400 .6rem/1.4 "Work Sans", sans-serif; text-align: left; cursor: pointer; }
.screenshot-thumbnail img { display: block; width: 100%; height: 65px; object-fit: cover; object-position: top; border-radius: 4px; }
.screenshot-thumbnail span { display: block; margin-top: 6px; }
.screenshot-thumbnail:hover { border-color: var(--muted); }
.screenshot-thumbnail[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: var(--panel); box-shadow: 0 0 0 1px var(--accent); }
.screenshot-window { height: 390px; overflow: hidden; background: var(--image-surround); border: 1px solid var(--line); border-radius: 10px; }
.screenshot-link { display: block; width: 100%; cursor: zoom-in; }
.screenshot-window:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.image-modal { width: min(var(--modal-image-width, 1200px), 1200px, 94vw); max-width: 94vw; height: fit-content; max-height: 90vh; max-height: 90dvh; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--page); color: var(--ink); overflow: hidden; }
.image-modal[open] { display: flex; flex-direction: column; }
.image-modal::backdrop { background: rgb(3 10 20 / .8); }
.image-modal-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.portfolio .image-modal-header h2 { min-width: 0; overflow-wrap: anywhere; font-size: .95rem; line-height: 1.4; letter-spacing: normal; }
.image-modal-header button { flex-shrink: 0; }
.image-modal-scroll { overflow: auto; min-height: 0; flex: 0 1 auto; background: var(--image-surround); padding: 12px; overscroll-behavior: contain; }
.image-modal-scroll img { display: block; max-width: 100%; height: auto; margin-inline: auto; }
.portfolio:has(.image-modal[open]) { overflow: hidden; }
.screenshot-window img { display: block; width: 100%; height: auto; margin: auto; }
.screenshot-window img[width="375"], .screenshot-window img[width="856"] { max-width: 300px; }
.past-gallery figcaption { margin-top: 12px; font-size: .72rem; color: var(--ink); }
.past-gallery .screenshot-hint { margin-top: 5px; font-size: .65rem; color: var(--muted); }
.past-copy h4 { font-size: .75rem; font-weight: 600; margin-bottom: 7px; }
.past-copy p { font-size: .82rem; line-height: 1.75; color: var(--muted); }
.past-copy > h4:not(:first-child) { margin-top: 22px; }
.past-result { margin-top: 24px; padding: 20px; background: var(--page); border-radius: 12px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 25px; flex-basis: 100%; }
.footer-nav a { font-size: .72rem; padding-block: 8px; text-underline-offset: 4px; }
@media (max-width: 1000px) {
  .site-header { flex-wrap: wrap; }
  .site-nav { flex-wrap: wrap; }
  .past-layout { grid-template-columns: 1fr; }
  .past-heading { align-items: start; }
}
@media (max-width: 700px) {
  .previous-work { padding-block: 20px 45px; }
  .past-heading { flex-direction: column; gap: 14px; }
  .past-heading > p { max-width: none; }
  .past-heading .eyebrow { font-size: .58rem; }
  .work-controls { gap: 4px; padding: 12px; }
  .work-step { padding-inline: 8px; gap: 4px; }
  .work-dot { width: 24px; }
  .screenshot-window { height: 310px; }
  #work-slides { padding: 18px; }
}
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 95px; }
.about-layout h2 { margin-block: 16px 23px; }
.about-intro { font-size: .85rem; color: var(--muted); max-width: 440px; }
.about-layout .text-link { margin-top: 18px; }
.focus-list > div { display: flex; gap: 24px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.focus-list > div:first-child { padding-top: 0; }
.focus-list > div:last-child { border-bottom: 0; }
.focus-list > div > span { font-size: .65rem; color: var(--muted); padding-top: 3px; }
.focus-list h3 { font-size: .9rem; font-weight: 550; margin-bottom: 6px; }
.focus-list p { font-size: .76rem; color: var(--muted); }
.contact-section { display: grid; grid-template-columns: 1fr 1fr; gap: 95px; padding-block: 75px; }
.contact-intro h2 { margin-block: 16px 23px; }
.contact-intro > p:not(.eyebrow) { font-size: .86rem; color: var(--muted); max-width: 430px; }
.contact-intro .contact-note { margin-top: 20px; }
.contact-form-wrap { min-width: 0; }
.contact-form-wrap .dw-form {
  margin-block: 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: none;
}
.contact-form-wrap .dw-control__label { color: var(--ink); font-size: .78rem; font-weight: 550; margin-bottom: 8px; }
.contact-form-wrap .dw-control__text,
.contact-form-wrap .dw-control__textarea {
  background: var(--page);
  color: var(--ink);
  border: 1px solid var(--muted);
  border-radius: 4px;
  outline: none;
  min-height: 48px;
  padding: 12px;
  font-size: 1rem;
}
.contact-form-wrap .dw-control__text:focus,
.contact-form-wrap .dw-control__textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: none;
}
.contact-form-wrap .dw-control-row { display: flex; justify-content: flex-start; margin-top: 22px; }
.contact-form-wrap .dw-control-row > span { display: none; }
.contact-form-wrap .dw-control-row .dw-control { margin: 0; }
.contact-form-wrap .dw-button.dw-button--primary {
  background: var(--accent);
  color: var(--page);
  border: 1px solid var(--accent);
  border-radius: 999px;
  min-height: 48px;
  padding: 12px 20px;
  font-size: .75rem;
  font-weight: 550;
  line-height: 1.65;
  box-shadow: none;
}
.contact-form-wrap .dw-button.dw-button--primary:hover { filter: brightness(1.15); }
.contact-form-wrap .dw-button.dw-button--primary:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.contact-form-wrap .dw-form-results:not(:empty) { margin-top: 18px; color: var(--ink); font-size: .8rem; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; padding-block: 30px; }
.site-footer > p { font-size: .65rem; color: var(--muted); margin-right: auto; }
.site-footer small { flex-basis: 100%; font-size: .6rem; color: var(--muted); }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 10; background: var(--page); padding: 12px 20px; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (min-width: 1600px) { .hero { padding-block: 100px; } }
@media (max-width: 1000px) {
  .page-width, .site-header { width: calc(100% - 64px); }
  .hero-note { display: none; }
  .hero-intro { max-width: 660px; }
  .project-body { gap: 35px; padding-inline: 25px; }
  .about-layout, .contact-section { gap: 40px; }
  .project-preview { padding-inline: 25px; }
  .section-heading > p { max-width: 220px; }
}
@media (max-width: 700px) {
  .page-width, .site-header { width: calc(100% - 40px); }
  .site-header { flex-wrap: wrap; gap: 12px; padding-block: 20px 14px; }
  .wordmark { font-size: 1.35rem; }
  .site-nav { width: 100%; justify-content: space-between; gap: 10px; font-size: .7rem; }
  .theme-toggle { width: 40px; height: 40px; }
  .hero { padding-block: 47px 48px; }
  .hero .eyebrow { font-size: .55rem; letter-spacing: .09em; }
  .portfolio h1 { font-size: clamp(2.05rem, 7.8vw, 3.2rem); margin-top: 23px; }
  .hero-bottom { margin-top: 25px; }
  .hero-intro > p { font-size: .87rem; }
  .hero-actions { gap: 14px 22px; }
  .section-heading { display: block; margin-bottom: 25px; }
  .section-heading > p { max-width: none; margin-top: 16px; text-align: left; }
  .desktop-break { display: none; }
  .work-section { padding-top: 29px; }
  .project-preview { padding: 15px 12px 0; }
  .project-body, .about-layout, .contact-section { grid-template-columns: 1fr; gap: 28px; }
  .project-body { padding: 24px 18px 28px; }
  .project-summary { max-width: none; }
  .project { margin-bottom: 48px; }
  .project-details p { font-size: .83rem; }
  .project-details .project-note { font-size: .72rem; }
  .about-section { padding-block: 42px; }
  .contact-section { padding-block: 46px; }
  .site-footer { gap: 8px 20px; }
  .site-footer > p { flex-basis: 100%; }
}
