@media (max-width: 1040px) {
html.portfolio-page .hero-grid,
html.portfolio-page .featured-project-card,
html.portfolio-page .section-heading,
html.portfolio-page .research-layout,
html.portfolio-page .skills-layout,
html.portfolio-page .about-layout,
html.portfolio-page .contact-card,
html.portfolio-page .list-row,
html.flower-app-page .hero-grid,
html.flower-app-page .two-col,
html.flower-app-page .media-text,
html.praxisautomat-page .meta-row,
html.cv-page .page{
    grid-template-columns: 1fr;
  }

html.portfolio-page .hero,
html.portfolio-page .section{
    padding-top: 64px;
    padding-bottom: 64px;
  }

html.portfolio-page .featured-project-card{
    gap: 28px;
    padding: 28px;
  }

html.portfolio-page .visual-split{
    grid-template-columns: minmax(0, 1fr) clamp(92px, 28vw, 140px);
    max-width: 100%;
  }

html.portfolio-page .topbar-inner{
    flex-wrap: wrap;
    row-gap: 12px;
  }

html.portfolio-page .menu{
    gap: clamp(10px, 2.4vw, 28px);
  }

html.portfolio-page .project-visual,
html.portfolio-page .project-copy,
html.portfolio-page .section-heading > :first-child,
html.portfolio-page .section-heading > p,
html.portfolio-page .research-layout > :first-child,
html.portfolio-page .research-layout > :last-child,
html.portfolio-page .skills-layout > :first-child,
html.portfolio-page .skills-layout > :not(:first-child),
html.portfolio-page .about-photo,
html.portfolio-page .about-body,
html.portfolio-page .contact-card > .contact-layout,
html.portfolio-page .list-meta,
html.portfolio-page .list-content,
html.flower-app-page .hero-grid > :first-child,
html.flower-app-page .hero-grid > :last-child,
html.flower-app-page .two-col > *,
html.flower-app-page .media-text > *{
    grid-column: auto;
  }

html.portfolio-page .detail-grid,
html.flower-app-page .meta-row,
html.praxisautomat-page .achievements,
html.praxisautomat-page .mockup-gallery.triple{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

html.flower-app-page .hero-phone{
    max-width: 220px;
    margin: 0 auto;
  }

html.flower-app-page .tablet-gallery,
html.flower-app-page .browser-gallery{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

html.praxisautomat-page .achievements,
html.praxisautomat-page .mockup-gallery,
html.praxisautomat-page .mockup-gallery.triple{
    gap: 20px;
  }

html.cv-page body{
    background: #f4edf5;
  }

html.cv-page .page{
    width: min(calc(100% - 24px), 920px);
    min-height: 0;
    margin: 12px auto;
  }

html.cv-page .sidebar,
html.cv-page .main{
    padding: 24px 20px;
  }

html.cv-page .photo-wrapper{
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 768px) {
html.portfolio-page{
    --page-gutter: clamp(20px, 5.5vw, 28px);
  }

html.portfolio-page .topbar-inner,
html.flower-app-page .topbar-inner,
html.praxisautomat-page .topbar-inner{
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
  }

html.portfolio-page .menu{
    width: 100%;
    gap: 12px 16px;
    justify-content: flex-start;
  }

html.portfolio-page .hero{
    padding-top: 40px;
    padding-bottom: 48px;
  }

html.portfolio-page .hero h1,
html.flower-app-page .case-hero h1,
html.praxisautomat-page .case-hero h1{
    max-width: none;
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

html.portfolio-page .hero-copy{
    padding-top: 12px;
  }

html.portfolio-page .hero-actions,
html.portfolio-page .contact-channels{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

html.portfolio-page .hero-actions-dot{
    display: none;
  }

html.portfolio-page .contact-channel{
    width: 100%;
    box-sizing: border-box;
  }

html.portfolio-page .detail-grid,
html.portfolio-page .mini-grid,
html.flower-app-page .meta-row,
html.flower-app-page .tablet-gallery,
html.flower-app-page .browser-gallery,
html.flower-app-page .image-slider,
html.praxisautomat-page .meta-row,
html.praxisautomat-page .achievements,
html.praxisautomat-page .mockup-gallery,
html.praxisautomat-page .mockup-gallery.triple{
    grid-template-columns: 1fr;
  }

html.portfolio-page .featured-project{
    padding: 12px 0;
  }

html.portfolio-page .featured-project-card,
html.portfolio-page .mini-card,
html.portfolio-page .research-card,
html.portfolio-page .contact-card{
    padding: 20px;
    gap: 20px;
  }

html.portfolio-page .visual-split,
html.portfolio-page .visual-double{
    grid-template-columns: 1fr;
    gap: 14px;
  }

html.portfolio-page .visual-split .phone-shell{
    max-width: 160px;
    margin: 0 auto;
  }

html.portfolio-page .project-index{
    font-size: 2.2rem;
  }

html.portfolio-page .project-copy h3{
    font-size: 1.55rem;
  }

html.portfolio-page .project-summary,
html.portfolio-page .detail-card p,
html.portfolio-page .list-content p,
html.portfolio-page .about-block p,
html.portfolio-page .contact-card p,
html.flower-app-page .case-section p,
html.flower-app-page .case-section ul,
html.praxisautomat-page .case-section p{
    font-size: 0.92rem;
  }

html.portfolio-page .section-heading{
    gap: 18px;
  }

html.portfolio-page .section-heading::before{
    position: static;
    display: block;
    margin-bottom: 10px;
  }

html.flower-app-page .case-hero,
html.praxisautomat-page .case-hero{
    padding-top: 40px;
    padding-bottom: 32px;
  }

html.flower-app-page .case-section,
html.praxisautomat-page .case-section{
    padding-top: 40px;
    padding-bottom: 40px;
  }

html.flower-app-page .phone-showcase,
html.praxisautomat-page .phone-row{
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding-left: 20px;
    padding-right: 20px;
  }

html.flower-app-page .phone-frame,
html.praxisautomat-page .phone-row .mockup-frame.phone{
    flex: 0 1 130px;
  }

html.cv-page{
    font-size: 13px;
  }

html.cv-page .page{
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

html.cv-page .sidebar,
html.cv-page .main{
    padding: 20px 16px;
  }

html.cv-page .exp-header,
html.cv-page .award-item{
    flex-direction: column;
    align-items: flex-start;
  }

html.cv-page .exp-date,
html.cv-page .award-date{
    white-space: normal;
  }
}

@media (max-width: 480px) {
html.portfolio-page{
    --page-gutter: clamp(22px, 6.5vw, 32px);
  }

html.portfolio-page .topbar,
html.flower-app-page .topbar,
html.praxisautomat-page .topbar{
    position: static;
  }

html.flower-app-page .shell,
html.praxisautomat-page .shell{
    width: min(calc(100% - 16px), var(--content-width));
  }

html.portfolio-page .menu{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

html.portfolio-page .hero{
    padding-top: 28px;
    padding-bottom: 36px;
  }

html.portfolio-page .featured-project-card,
html.portfolio-page .mini-card,
html.portfolio-page .research-card,
html.portfolio-page .contact-card,
html.flower-app-page .meta-item,
html.flower-app-page .achievement-card,
html.flower-app-page .tablet-frame,
html.flower-app-page .browser-frame,
html.praxisautomat-page .meta-item,
html.praxisautomat-page .achievement-card,
html.praxisautomat-page .mockup-frame{
    padding: 16px;
  }

html.portfolio-page .portrait-stack{
    justify-content: center;
    min-height: 0;
    padding: 12px 0 20px;
  }

html.portfolio-page .portrait-frame{
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
  }

html.portfolio-page .portrait-bloom{
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: min(288px, 90vw);
  }

html.portfolio-page .hero h1,
html.flower-app-page .case-hero h1,
html.praxisautomat-page .case-hero h1{
    font-size: clamp(1.8rem, 9vw, 2.3rem);
  }

html.portfolio-page .project-index{
    font-size: 1.9rem;
  }

html.portfolio-page .project-copy h3,
html.portfolio-page .list-content h3{
    font-size: 1.3rem;
  }

html.portfolio-page .mockup-card{
    padding: 12px;
  }

html.portfolio-page .visual-split .phone-shell{
    max-width: 132px;
  }

html.portfolio-page .tag-row{
    gap: 6px;
    margin-bottom: 14px;
  }

html.portfolio-page .tag-row span{
    padding: 5px 8px;
    font-size: 0.62rem;
  }

html.portfolio-page .list-row{
    padding: 20px 0;
  }

html.flower-app-page .hero-phone,
html.praxisautomat-page .mockup-frame.phone{
    max-width: 160px;
    margin-left: auto;
    margin-right: auto;
  }

html.flower-app-page .phone-frame,
html.praxisautomat-page .phone-row .mockup-frame.phone{
    flex-basis: 116px;
  }

html.flower-app-page .case-hero,
html.praxisautomat-page .case-hero{
    padding-top: 32px;
    padding-bottom: 24px;
  }

html.flower-app-page .case-section,
html.praxisautomat-page .case-section{
    padding-top: 32px;
    padding-bottom: 32px;
  }

html.cv-page .sidebar,
html.cv-page .main{
    padding: 16px 14px;
  }

html.cv-page .photo-wrapper{
    width: 96px;
    height: 96px;
  }

html.cv-page .contact-list li{
    word-break: break-word;
  }
}

@media (min-width: 1041px) {
html.portfolio-page [data-panel]{
    min-height: 100svh;
  }

html.portfolio-page .hero[data-panel],
html.portfolio-page main > .section[data-panel]{
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
  }

html.portfolio-page .hero[data-panel]{
    padding-top: 88px;
  }

html.portfolio-page .hero-grid{
    min-height: calc(100svh - 88px);
    align-content: center;
  }

html.portfolio-page #projects .featured-stack{
    gap: 0;
  }

html.portfolio-page #projects .section-heading[data-panel]{
    min-height: 100svh;
    margin-bottom: 0;
    place-content: center;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
  }

html.portfolio-page #projects .featured-project[data-panel]{
    min-height: 100svh;
    margin: 0;
    place-content: center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

html.portfolio-page #projects .featured-project-card{
    max-height: none;
    align-content: start;
  }
}

@media print {
html.cv-page body{
    background: none;
    margin: 0;
  }

html.cv-page .page{
    margin: 0;
    box-shadow: none;
    width: 100%;
    height: 297mm;
    min-height: 0;
    overflow: hidden;
  }
}

@media (min-width: 769px) {
html.portfolio-page .project-visual{
    display: grid;
    width: 100%;
    min-width: 0;
  }

html.portfolio-page .mockup-card{
    padding: 28px;
    width: 100%;
    min-width: 0;
  }

html.portfolio-page .visual-split{
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 18px;
    width: 100%;
    height: 100%;
  }

html.portfolio-page .visual-double{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
    height: 100%;
  }

html.portfolio-page .featured-project-card > *,
html.portfolio-page .visual-split > *,
html.portfolio-page .visual-double > *{
    min-width: 0;
  }

html.portfolio-page .screen,
html.portfolio-page .phone-shell{
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    border-radius: 10px;
  }

html.portfolio-page .phone-shell{
    margin: 0;
    padding: 4px;
  }

html.portfolio-page .screen::before{
    height: 26px;
  }

html.portfolio-page .screen img,
html.portfolio-page .screen video{
    width: 100%;
    height: auto;
    object-fit: initial;
  }

html.portfolio-page .phone-shell img{
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 9 / 19.5;
    background: transparent;
  }
}

/* Final mobile override */
@media (max-width: 768px) {
html.portfolio-page .hero-grid,
html.portfolio-page .section-heading,
html.portfolio-page .featured-project-card,
html.portfolio-page .research-layout,
html.portfolio-page .skills-layout,
html.portfolio-page .about-layout,
html.portfolio-page .contact-card,
html.portfolio-page .list-row,
html.flower-app-page .hero-grid,
html.flower-app-page .two-col,
html.flower-app-page .media-text,
html.praxisautomat-page .meta-row,
html.cv-page .page{
    display: block;
  }

html.portfolio-page .hero-grid > *,
html.portfolio-page .section-heading > *,
html.portfolio-page .featured-project-card > *,
html.portfolio-page .research-layout > *,
html.portfolio-page .skills-layout > *,
html.portfolio-page .about-layout > *,
html.portfolio-page .contact-card > *,
html.portfolio-page .list-row > *,
html.flower-app-page .hero-grid > *,
html.flower-app-page .two-col > *,
html.flower-app-page .media-text > *{
    width: 100%;
  }

html.portfolio-page .project-visual,
html.portfolio-page .project-copy,
html.portfolio-page .research-layout > * + *,
html.portfolio-page .skills-layout > * + *,
html.portfolio-page .about-layout > * + *,
html.portfolio-page .contact-card > * + *,
html.portfolio-page .list-content,
html.flower-app-page .hero-phone,
html.flower-app-page .two-col > * + *,
html.flower-app-page .media-text > * + *{
    margin-top: 20px;
  }

html.portfolio-page .featured-project-card{
    padding: 18px;
  }

html.portfolio-page .project-visual{
    display: block;
    width: 100%;
  }

html.portfolio-page .mockup-card{
    padding: 8px;
    min-height: 0;
    width: 100%;
  }

html.portfolio-page .visual-split,
html.portfolio-page .visual-double{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    height: auto;
    gap: 8px;
    width: 100%;
  }

html.portfolio-page .screen,
html.portfolio-page .phone-shell,
html.portfolio-page .screen img,
html.portfolio-page .screen video{
    width: 100%;
    height: auto;
  }

html.portfolio-page .screen,
html.portfolio-page .phone-shell{
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

html.portfolio-page .phone-shell{
    width: 100%;
    margin: 0;
    padding: 6px;
  }

html.portfolio-page .screen::before{
    height: 18px;
  }

html.portfolio-page .screen img,
html.portfolio-page .screen video{
    height: calc(100% - 18px);
    object-fit: cover;
  }

html.portfolio-page .phone-shell img{
    height: 100%;
    width: 100%;
    object-fit: contain;
    aspect-ratio: auto;
    background: #fff;
  }

html.portfolio-page .detail-grid,
html.flower-app-page .meta-row,
html.flower-app-page .tablet-gallery,
html.flower-app-page .browser-gallery,
html.flower-app-page .image-slider,
html.praxisautomat-page .meta-row,
html.praxisautomat-page .achievements,
html.praxisautomat-page .mockup-gallery,
html.praxisautomat-page .mockup-gallery.triple{
    grid-template-columns: 1fr;
    gap: 14px;
  }

html.portfolio-page .contact-card > * + *{
    margin-top: 16px;
  }

html.portfolio-page .contact-layout{
    display: block;
  }

html.portfolio-page .contact-channels{
    margin-top: 24px;
  }

html.portfolio-page .contact-card h2{
    max-width: none;
  }

html.flower-app-page .hero-phone{
    max-width: 180px;
    margin-left: auto;
    margin-right: auto;
  }

html.flower-app-page .phone-showcase,
html.praxisautomat-page .phone-row{
    padding: 20px 16px;
    gap: 12px;
  }

html.flower-app-page .phone-frame,
html.praxisautomat-page .phone-row .mockup-frame.phone{
    flex: 0 1 120px;
  }

html.cv-page .page{
    width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 480px) {
html.portfolio-page .featured-project-card,
html.portfolio-page .mini-card,
html.portfolio-page .research-card,
html.portfolio-page .contact-card,
html.flower-app-page .meta-item,
html.flower-app-page .achievement-card,
html.flower-app-page .tablet-frame,
html.flower-app-page .browser-frame,
html.praxisautomat-page .meta-item,
html.praxisautomat-page .achievement-card,
html.praxisautomat-page .mockup-frame{
    padding: 14px;
  }

html.portfolio-page .phone-shell{
    width: 100%;
  }

html.portfolio-page .screen,
html.portfolio-page .phone-shell{
    aspect-ratio: 10 / 13;
    border-radius: 10px;
  }

html.portfolio-page .phone-shell{
    padding: 4px;
  }

html.portfolio-page .project-visual,
html.portfolio-page .project-copy{
    margin-top: 16px;
  }

html.flower-app-page .hero-phone,
html.praxisautomat-page .mockup-frame.phone{
    max-width: 150px;
  }
}

@media (max-width: 1040px) {
html.portfolio-page #projects .featured-project-card .project-visual{
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    align-self: stretch;
  }

html.portfolio-page #projects .featured-project-card .mockup-card{
    display: block;
    flex: none;
    min-height: 0;
  }

html.portfolio-page #projects .featured-project-card .visual-split{
    flex: none;
    min-height: 0;
    height: auto;
  }

html.portfolio-page #projects .featured-project-card .visual-split .screen{
    height: auto;
    min-height: 0;
    align-self: stretch;
  }

html.portfolio-page #projects .featured-project-card .visual-split .screen > img,
html.portfolio-page #projects .featured-project-card .visual-split .screen > video{
    flex: none;
    min-height: 0;
    width: 100%;
    object-fit: cover;
    object-position: top center;
  }

html.portfolio-page #projects .featured-project-card .visual-split .phone-shell{
    align-self: auto;
    width: 100%;
    height: auto;
  }

html.portfolio-page #projects .featured-project-card .visual-split .phone-shell img{
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 19.5;
    object-fit: cover;
  }
}
