/* ============================================================
   LUDWIG PORTFOLIO V18.0.0 — UX FIRST
   Content-first UX, state restore, accessible actions, icon system.
   Additive layer over V17. No historical route/data removal.
   ============================================================ */
:root{--v18-touch:44px;--v18-pill-h:36px;--v18-sticky-offset:calc(var(--v14-header-height,76px) + 12px);--v18-surface:rgba(16,12,22,.84);--v18-surface-2:rgba(24,18,34,.92);--v18-line:rgba(255,255,255,.10);--v18-muted:#9d93a8;--v18-accent:var(--accent,#A66BF0);--v18-accent2:var(--accent2,var(--accent-2,#65D6FF))}
html[data-v18] :is(button,a,input,select,textarea,[role="button"]):focus-visible{outline:2px solid var(--v18-accent2)!important;outline-offset:3px!important}
html[data-v18] button,html[data-v18] [role="button"]{touch-action:manipulation}
html[data-v18] .v18-touch-target{min-width:var(--v18-touch);min-height:var(--v18-touch)}
html[data-v18] .v18-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
html[data-v18] :is(.filter-btn,.gallery-filter,#resource-filters button,.resource-filter,.v18-pill){min-height:var(--v18-pill-h)!important;border-radius:999px!important;border:1px solid var(--v18-line)!important;background:rgba(14,11,20,.54)!important;color:var(--v18-muted)!important;padding:8px 13px!important;font:600 9px/1 var(--mono,'IBM Plex Mono',monospace)!important;letter-spacing:.075em!important;text-transform:uppercase!important;transition:border-color .2s ease,color .2s ease,background .2s ease,box-shadow .2s ease,transform .2s ease!important}
html[data-v18] :is(.filter-btn,.gallery-filter,#resource-filters button,.resource-filter,.v18-pill):hover{color:var(--ink,#F3EFF6)!important;border-color:color-mix(in srgb,var(--v18-accent) 62%,transparent)!important}
html[data-v18] :is(.filter-btn,.gallery-filter,#resource-filters button,.resource-filter,.v18-pill).active,html[data-v18] :is(.filter-btn,.gallery-filter)[aria-pressed="true"]{color:#fff!important;border-color:color-mix(in srgb,var(--v18-accent) 80%,white 4%)!important;background:linear-gradient(90deg,color-mix(in srgb,var(--v18-accent) 22%,transparent),color-mix(in srgb,var(--v18-accent2) 10%,transparent))!important;box-shadow:0 0 20px color-mix(in srgb,var(--v18-accent) 10%,transparent)!important}
html[data-v18] body[data-v6-page="gallery"] .gallery-intro{padding-top:clamp(94px,8vw,128px)!important;padding-bottom:22px!important;min-height:0!important}
html[data-v18] body[data-v6-page="gallery"] .gallery-title h1{font-size:clamp(52px,6vw,88px)!important;line-height:.84!important}
html[data-v18] body[data-v6-page="gallery"] .gallery-desc{margin-top:14px!important;max-width:720px!important}
html[data-v18] body[data-v6-page="gallery"] .filter-container{margin:18px 0 8px!important}
html[data-v18] body[data-v6-page="gallery"] .gallery-grid{margin-top:14px!important}
html[data-v18] body[data-v6-page="resources"] .resources-page-root .hero{min-height:0!important;padding-top:clamp(105px,8vw,135px)!important;padding-bottom:22px!important}
html[data-v18] body[data-v6-page="resources"] .resources-page-root h1{font-size:clamp(54px,6vw,90px)!important;line-height:.84!important}
html[data-v18] body[data-v6-page="resources"] .resource-filter-panel-fixed{margin-top:10px!important}
html[data-v18] body[data-v6-page="resources"] .resource-grid{margin-top:14px!important}
html[data-v18] body[data-v6-page="quote"] .page-intro{padding-top:clamp(100px,8vw,130px)!important;padding-bottom:18px!important}
html[data-v18] body[data-v6-page="quote"] .quote-section{padding-top:34px!important}
html[data-v18] body[data-v15-animated-portfolio="true"] .hero{min-height:0!important;padding-top:118px!important;padding-bottom:28px!important}
html[data-v18] body[data-v15-animated-portfolio="true"] .hero h1{font-size:clamp(58px,7.5vw,128px)!important;line-height:.78!important;max-width:900px!important}
html[data-v18] body[data-v15-animated-portfolio="true"] .hero p{margin-top:14px!important}
html[data-v18] body[data-v15-animated-portfolio="true"] .hero-bottom{margin-top:18px!important}
html[data-v18] body[data-v15-animated-portfolio="true"] .gallery-filters{margin-top:16px!important}
html[data-v18] .v17-section-nav{position:sticky!important;top:var(--v18-sticky-offset)!important;z-index:38!important;width:min(720px,calc(100% - 30px))!important;margin:12px auto 18px!important;padding:6px!important;border:1px solid var(--v18-line)!important;border-radius:999px!important;background:rgba(9,7,13,.72)!important;backdrop-filter:blur(18px)!important;box-shadow:0 10px 40px rgba(0,0,0,.18)!important}
html[data-v18] .v17-section-nav a{min-height:38px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:999px!important;padding:0 14px!important}
html[data-v18] .hero-actions :is(a,button):first-child,html[data-v18] .v18-primary-action{box-shadow:0 8px 30px color-mix(in srgb,var(--v18-accent) 18%,transparent)!important}
html[data-v18] .hero-actions :is(a,button):not(:first-child){opacity:.92}
.v18-filter-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:8px 0 12px;padding:8px 10px;border:1px solid var(--v18-line);border-radius:14px;background:rgba(12,9,17,.54);font:500 9px/1.25 var(--mono,'IBM Plex Mono',monospace);color:var(--v18-muted)}
.v18-filter-summary .v18-summary-actions{display:flex;gap:7px;align-items:center}.v18-filter-summary button{min-height:34px;border:1px solid var(--v18-line);border-radius:999px;background:transparent;color:inherit;padding:0 11px;font:600 9px/1 var(--mono,'IBM Plex Mono',monospace);cursor:pointer}.v18-filter-summary button:hover{border-color:var(--v18-accent);color:var(--ink,#fff)}.v18-filter-summary [data-v18-active-count]{color:var(--v18-accent2);font-weight:700}
.v18-resource-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:10px 0 14px}.v18-resource-toolbar .v18-group{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.v18-resource-toolbar button{min-height:38px;border:1px solid var(--v18-line);border-radius:999px;padding:0 12px;color:var(--v18-muted);background:rgba(14,11,20,.56);font:600 9px/1 var(--mono,'IBM Plex Mono',monospace);cursor:pointer}.v18-resource-toolbar button[aria-pressed="true"]{color:#fff;border-color:var(--v18-accent);background:rgba(166,107,240,.12)}
#resource-grid.v18-list-view{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}#resource-grid.v18-list-view .resource-card{min-height:84px!important;display:grid!important;grid-template-columns:minmax(160px,.7fr) minmax(240px,1.3fr) auto!important;grid-template-areas:"top title link" "top desc domain"!important;align-items:center!important;column-gap:18px!important;padding:16px 18px!important}#resource-grid.v18-list-view .resource-top{grid-area:top!important}#resource-grid.v18-list-view .resource-card h2{grid-area:title!important;margin:0!important}#resource-grid.v18-list-view .resource-description{grid-area:desc!important;margin:3px 0 0!important}#resource-grid.v18-list-view .resource-domain{grid-area:domain!important;margin:0!important}#resource-grid.v18-list-view .resource-link{grid-area:link!important;margin:0!important}
.resource-card .v18-fav-button{position:absolute;right:12px;top:12px;z-index:7;width:38px;height:38px;border-radius:50%;border:1px solid var(--v18-line);background:rgba(7,6,11,.76);color:#c7bdce;display:grid;place-items:center;cursor:pointer;font-size:16px}.resource-card .v18-fav-button[aria-pressed="true"]{color:#fff;border-color:var(--v18-accent);background:rgba(166,107,240,.22)}.resource-card.v18-hidden-by-favorites{display:none!important}
.v18-animated-controls{position:sticky;top:calc(var(--v18-sticky-offset) + 54px);z-index:42;display:flex;align-items:center;justify-content:center;gap:8px;width:max-content;max-width:calc(100% - 24px);margin:8px auto 12px;padding:6px;border:1px solid var(--v18-line);border-radius:999px;background:rgba(7,6,11,.72);backdrop-filter:blur(18px)}.v18-animated-controls button,.v18-animated-controls a{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:999px;background:transparent;color:var(--ink,#fff);text-decoration:none;font:600 9px/1 var(--mono,'IBM Plex Mono',monospace);padding:0 12px;cursor:pointer}.v18-animated-controls :is(button,a):hover{border-color:var(--v18-line);background:rgba(255,255,255,.04)}.v18-animated-progress{min-width:110px;display:grid;gap:4px;padding:0 6px}.v18-animated-progress span{font:600 8px/1 var(--mono,'IBM Plex Mono',monospace);color:var(--v18-muted);text-align:center}.v18-animated-progress i{display:block;width:100%;height:2px;background:rgba(255,255,255,.08);border-radius:99px;overflow:hidden}.v18-animated-progress i::after{content:"";display:block;height:100%;width:var(--v18-progress,0%);background:linear-gradient(90deg,var(--v18-accent),var(--v18-accent2));transition:width .2s linear}
.v18-ai-nav{display:flex;gap:8px;flex-wrap:wrap;max-width:1180px;margin:10px auto 22px;padding:0 18px}.v18-ai-nav a{min-height:38px;display:inline-flex;align-items:center;border:1px solid var(--v18-line);border-radius:999px;padding:0 12px;color:var(--v18-muted);text-decoration:none;font:600 9px/1 var(--mono,'IBM Plex Mono',monospace)}.v18-ai-nav a:hover{color:var(--ink,#fff);border-color:var(--v18-accent)}
.v18-quote-paths{width:min(1180px,calc(100% - 36px));margin:12px auto 18px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.v18-quote-paths button{min-height:76px;text-align:left;border:1px solid var(--v18-line);border-radius:18px;background:rgba(16,12,22,.7);color:var(--ink,#fff);padding:14px 16px;cursor:pointer}.v18-quote-paths button strong{display:block;font:700 13px/1.2 var(--body,'Inter',sans-serif)}.v18-quote-paths button span{display:block;margin-top:6px;color:var(--v18-muted);font-size:12px;line-height:1.4}.v18-quote-paths button:hover{border-color:var(--v18-accent);background:rgba(166,107,240,.07)}
.v18-mobile-actions{position:fixed;left:50%;bottom:max(10px,env(safe-area-inset-bottom));translate:-50% 0;z-index:9000;display:none;align-items:center;gap:5px;padding:5px;border:1px solid var(--v18-line);border-radius:999px;background:rgba(8,7,12,.88);backdrop-filter:blur(20px);box-shadow:0 14px 50px rgba(0,0,0,.32)}.v18-mobile-actions a,.v18-mobile-actions button{min-width:44px;min-height:44px;border:0;border-radius:999px;background:transparent;color:#fff;text-decoration:none;display:flex;align-items:center;justify-content:center;padding:0 11px;font:600 9px/1 var(--mono,'IBM Plex Mono',monospace)}.v18-mobile-actions :is(a,button).primary{background:rgba(166,107,240,.20);color:#fff}
.v18-admin-zone-tools{position:absolute!important;right:12px!important;top:12px!important;z-index:55!important;display:flex!important;gap:6px!important;pointer-events:auto!important}.v18-admin-zone-tools button{min-height:34px!important;border:1px solid rgba(166,107,240,.45)!important;border-radius:999px!important;background:rgba(8,7,12,.82)!important;color:#fff!important;padding:0 10px!important;font:600 8px/1 var(--mono,'IBM Plex Mono',monospace)!important}.v18-admin-zone-tools button:hover{border-color:var(--v18-accent2)!important}.v18-zone-hidden{display:none!important}
.social-card{position:relative}.social-card .v18-social-icon{width:28px;height:28px;object-fit:contain;display:block;margin-bottom:8px;filter:none}.social-card .social-code.v18-has-icon{display:none!important}
.v18-state{border:1px dashed var(--v18-line);border-radius:18px;padding:28px;text-align:center;color:var(--v18-muted);background:rgba(14,11,20,.45)}.v18-state strong{display:block;color:var(--ink,#fff);font-size:16px;margin-bottom:6px}.v18-skeleton{position:relative;overflow:hidden;background:linear-gradient(90deg,rgba(255,255,255,.03),rgba(255,255,255,.08),rgba(255,255,255,.03));background-size:220% 100%;animation:v18Skeleton 1.5s linear infinite}@keyframes v18Skeleton{to{background-position:-220% 0}}
.v18-404{min-height:70vh;display:grid;place-items:center;padding:120px 24px 70px;text-align:center}.v18-404-inner{max-width:820px}.v18-404 .code{font:900 clamp(90px,18vw,240px)/.7 var(--display,'Big Shoulders Display',sans-serif);letter-spacing:-.05em;color:transparent;background:linear-gradient(90deg,var(--v18-accent),var(--v18-accent2));background-clip:text;-webkit-background-clip:text}.v18-404 h1{font-size:clamp(28px,4vw,52px);margin:20px 0 10px}.v18-404 p{color:var(--v18-muted);line-height:1.65}.v18-404-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:24px}.v18-404-actions a{min-height:44px;display:inline-flex;align-items:center;border:1px solid var(--v18-line);border-radius:999px;padding:0 16px;text-decoration:none}
html[data-v12-theme="day"]{--v18-surface:rgba(255,255,255,.88);--v18-surface-2:rgba(248,245,252,.95);--v18-line:rgba(36,28,48,.14);--v18-muted:#6a5f74}html[data-v12-theme="day"] .v18-mobile-actions,html[data-v12-theme="day"] .v18-animated-controls,html[data-v12-theme="day"] .v17-section-nav{background:rgba(250,248,253,.9)!important;color:#241c30!important}
@media(max-width:900px){:root{--v18-touch:44px}.v18-mobile-actions{display:flex}html[data-v18] body{padding-bottom:70px}.v18-quote-paths{grid-template-columns:1fr}#resource-grid.v18-list-view .resource-card{grid-template-columns:1fr!important;grid-template-areas:"top" "title" "desc" "domain" "link"!important}html[data-v18] .v17-section-nav{position:relative!important;top:auto!important;overflow:auto!important;justify-content:flex-start!important;white-space:nowrap!important}.v18-animated-controls{position:relative;top:auto;margin-top:4px}}
@media(max-width:620px){html[data-v18] body[data-v6-page="gallery"] .gallery-title h1{font-size:clamp(46px,15vw,70px)!important}html[data-v18] body[data-v15-animated-portfolio="true"] .hero h1{font-size:clamp(52px,16vw,78px)!important}.v18-filter-summary{align-items:flex-start}.v18-animated-progress{min-width:86px}}
@media(prefers-reduced-motion:reduce){html[data-v18] .v18-skeleton{animation:none!important}html[data-v18] *{scroll-behavior:auto!important}}
.v18-nav-gallery-icon{width:16px;height:16px;display:inline-block;flex:0 0 auto;background:currentColor;vertical-align:-3px;margin-right:6px;-webkit-mask-position:center;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;mask-position:center;mask-size:contain;mask-repeat:no-repeat;opacity:.86}
.v18-continuation{width:min(1180px,calc(100% - 36px));margin:42px auto 24px;padding:18px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;border:1px solid var(--v18-line);border-radius:18px;background:rgba(14,11,20,.45)}.v18-continuation>span{color:var(--v18-muted);font:600 8px/1 var(--mono,'IBM Plex Mono',monospace);letter-spacing:.12em;margin-right:6px}.v18-continuation a{min-height:40px;display:inline-flex;align-items:center;border:1px solid var(--v18-line);border-radius:999px;padding:0 13px;text-decoration:none;color:var(--ink,#fff);font:600 9px/1 var(--mono,'IBM Plex Mono',monospace)}.v18-continuation a:hover{border-color:var(--v18-accent)}
.v18-unsaved-badge{position:fixed;right:24px;bottom:24px;z-index:100120;padding:10px 13px;border-radius:999px;border:1px solid rgba(255,159,28,.35);background:rgba(16,12,22,.94);color:#ffd166;font:700 9px/1 var(--mono,'IBM Plex Mono',monospace);box-shadow:0 12px 40px rgba(0,0,0,.32)}
html[data-v18].v18-compact-floating :is(#back-to-top,.back-to-top){width:44px!important;height:44px!important}
html[data-v18].v18-compact-floating :is(.v14-admin-entry,.v15-admin-button,.v9-feedback-tab){transform:scale(.94);transform-origin:right bottom}
