:root {
  --background: #0a0a0a;
  --foreground: #cdcac6;
  --card: #121212;
  --card-foreground: #cdcac6;
  --popover: #121212;
  --popover-foreground: #cdcac6;
  --primary: #ede9e2;
  --primary-foreground: #0a0a0a;
  --secondary: #1f1f1f;
  --secondary-foreground: #cdcac6;
  --muted: #262626;
  --muted-foreground: #8f8d89;
  --accent: #37322f;
  --accent-foreground: #ede9e2;
  --border: #2e2e2e;
  --font-heading: "Darumadrop One", cursive;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; border-color: var(--border); }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--foreground); font-family: var(--font-body); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.noise-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.mpt-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; transition: all .5s; }
.mpt-nav.scrolled { background: rgba(10,10,10,.8); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(46,46,46,.3); }
.mpt-nav-inner { max-width: 72rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; }
.mpt-brand-link { font-size: 1.125rem; letter-spacing: .02em; font-family: var(--font-heading); }
.mpt-brand-name { transition: all .5s; display: inline-block; }
.mpt-brand-hidden { opacity: 0; transform: translateX(-8px); pointer-events: none; }
.mpt-desktop-links { display: flex; gap: 2rem; }
.mpt-nav-link { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-foreground); transition: color .3s; }
.mpt-nav-link:hover { color: var(--foreground); }
.mpt-mobile-trigger { display: none; border: 0; background: transparent; padding: 0; width: 24px; cursor: pointer; }
.mpt-mobile-trigger span { display: block; height: 2px; background: currentColor; margin: 4px 0; }

.mpt-mobile-sheet { position: fixed; inset: 0 0 0 auto; width: 20rem; transform: translateX(100%); transition: transform .3s; z-index: 90; background: var(--background); border-left: 1px solid rgba(46,46,46,.3); }
.mpt-mobile-sheet.open { transform: translateX(0); }
.mpt-mobile-sheet-content { padding: 3rem 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.mpt-mobile-link { font-size: .875rem; letter-spacing: .15em; text-transform: uppercase; }

.mpt-hero { min-height: 100vh; position: relative; overflow: hidden; }
.mpt-hero-bg { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; will-change: transform; }
.mpt-hero-left, .mpt-hero-right { position: relative; }
.mpt-artist-image, .mpt-hero-artwork { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mpt-artist-image { filter: grayscale(1); }
.mpt-hero-artwork { opacity: 0; transition: opacity 1s; }
.mpt-hero-artwork.active { opacity: 1; }
.mpt-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,.6), rgba(0,0,0,.4)); }
.mpt-hero-content { position: relative; z-index: 10; min-height: 100vh; display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; text-align: right; padding: 0 4rem 7rem 1.5rem; margin-left: auto; max-width: 50%; }
.mpt-hero-content h1 { font-size: clamp(3.5rem, 8vw, 9rem); line-height: 1; margin-bottom: 1.5rem; color: #fff; }
.mpt-hero-content p { color: rgba(255,255,255,.8); max-width: 42rem; font-style: italic; font-size: 1.0625rem; line-height: 1.7; }
.mpt-hero-actions { margin-top: 3rem; display: flex; gap: 1rem; }
.mpt-btn-outline, .mpt-btn-filled { border: 2px solid #fff; padding: 1rem 2.5rem; font-size: .75rem; letter-spacing: .3em; text-transform: uppercase; transition: all .3s; }
.mpt-btn-outline { color: #fff; }
.mpt-btn-outline:hover { background: rgba(255,255,255,.85); color: #000; }
.mpt-btn-filled { background: #fff; color: #000; }
.mpt-btn-filled:hover { background: rgba(255,255,255,.2); color: #fff; }

.torn-edge { position: relative; height: 40px; overflow: hidden; }
.torn-edge::before { content:""; position:absolute; top:-20px; left:-5%; width:110%; height:60px; background: var(--background);
  mask-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 30 Q30 10 60 30 Q90 50 120 30 Q150 10 180 30 Q210 50 240 30 Q270 10 300 30 Q330 50 360 30 Q390 10 420 30 Q450 50 480 30 Q510 10 540 30 Q570 50 600 30 Q630 10 660 30 Q690 50 720 30 Q750 10 780 30 Q810 50 840 30 Q870 10 900 30 Q930 50 960 30 Q990 10 1020 30 Q1050 50 1080 30 Q1110 10 1140 30 Q1170 50 1200 30 L1200 60 L0 60Z' fill='white'/%3E%3C/svg%3E");
}

.reveal { opacity: 0; transform: translateY(30px); filter: blur(2px); transition: opacity .8s, transform .8s, filter .8s; }
.reveal.visible { opacity: 1; transform: translateY(0); filter: blur(0); }
.mpt-portfolio { padding: 6rem 1.5rem; max-width: 72rem; margin: 0 auto; }
.mpt-portfolio h2, .mpt-publications h2 { text-align: center; font-size: clamp(2.5rem, 5vw, 3.2rem); margin-bottom: 1rem; }
.mpt-portfolio-toggle { display: flex; justify-content: center; align-items: center; gap: .25rem; margin: 0 0 4rem; position: relative; z-index: 9999; touch-action: manipulation; isolation: isolate; pointer-events: auto; }
.mpt-portfolio-toggle button { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 0; background: transparent; color: var(--muted-foreground); padding: 0.5rem; cursor: pointer; border-radius: 0.375rem; transition: color 0.2s, background-color 0.2s; touch-action: manipulation; -webkit-tap-highlight-color: rgba(255,255,255,.08); }
.mpt-portfolio-toggle button:hover { color: var(--foreground); }
.mpt-portfolio-toggle button.active { background-color: var(--muted); color: var(--foreground); }
.mpt-portfolio-toggle svg { display: block; width: 1rem; height: 1rem; }
#mpt-portfolio-columns { column-gap: 2rem; transition: all .3s; }
#mpt-portfolio-columns.columns-1 { column-count: 1; }
#mpt-portfolio-columns.columns-2 { column-count: 2; }
#mpt-portfolio-columns.columns-3 { column-count: 3; }
.paper-card { background: #ebe3d5; padding: 8px 8px 20px; margin-bottom: 2.5rem; break-inside: avoid; cursor: pointer; box-shadow: 2px 3px 8px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.2); position: relative; transition: transform .35s, box-shadow .35s; }
.paper-card::before { content:''; position:absolute; inset:0; opacity:.04; mix-blend-mode:multiply;
background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E"); pointer-events:none; }
.paper-card:hover { transform: rotate(0deg) scale(1.03) translateY(-4px) !important; box-shadow: 4px 6px 16px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.3); z-index: 10; }
.paper-card img { width: 100%; display: block; }
.tape-strip { position: absolute; width: 40px; height: 14px; background: rgba(229,218,202,.6); top: -5px; left: 50%; transform: translateX(-50%); z-index: 2; box-shadow: 0 1px 2px rgba(0,0,0,.15); }

.mpt-publications { padding: 6rem 1.5rem; max-width: 48rem; margin: 0 auto; }
.mpt-publications-list { display: grid; gap: 2.5rem; }
.mpt-publication-item { border-bottom: 1px solid rgba(46,46,46,.3); padding-bottom: 2rem; }
.mpt-publication-item h3 { font-size: clamp(1.35rem, 3vw, 2rem); margin-bottom: .25rem; }
.mpt-pub-details { font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: .75rem; }
.mpt-pub-desc { font-size: .875rem; line-height: 1.6; color: var(--muted-foreground); }

.mpt-cta { padding: 8rem 1.5rem; text-align: center; }
.mpt-cta h2 { font-size: clamp(3rem, 9vw, 4.7rem); margin-bottom: 1.5rem; }
.mpt-cta p { color: var(--muted-foreground); font-size: 1.125rem; font-style: italic; margin: 0 auto 3rem; max-width: 28rem; }
.mpt-cta-email { display: inline-block; margin-bottom: 3rem; text-decoration: underline; text-underline-offset: 8px; font-size: clamp(1.25rem, 3vw, 2rem); }
.mpt-cta-social { margin-top: 2rem; }
.mpt-social-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5rem 2rem; }
.mpt-social-link { color: var(--muted-foreground); transition: color .3s; transform: scale(1.25); display: flex; align-items: center; justify-content: center; }
.mpt-social-link:hover { color: var(--foreground); }
.mpt-social-icon svg { width: 22px; height: 22px; display: block; }

.mpt-contact { padding: 3rem 1.5rem; border-top: 1px solid rgba(46,46,46,.3); }
.mpt-contact-inner { max-width: 64rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.mpt-copyright { font-size: .75rem; color: rgba(143,141,137,.5); letter-spacing: .03em; }
.mpt-built-by { font-size: .75rem; color: var(--muted-foreground); text-decoration: underline; text-underline-offset: 4px; }

.mpt-hidden { display: none !important; }
.mpt-dynamic-hidden { display: none !important; }
.lightbox-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.85); backdrop-filter: blur(12px); display:flex; align-items:center; justify-content:center; cursor:pointer; animation: lightbox-fade-in .3s ease-out forwards; }
.lightbox-backdrop.closing { animation: lightbox-fade-out .25s ease-in forwards; }
.lightbox-backdrop img { max-width: 90vw; max-height: 80vh; object-fit: contain; border: 8px solid #ebe3d5; box-shadow: 0 20px 60px rgba(0,0,0,.6); cursor: default; animation: lightbox-image-in .4s cubic-bezier(.22,1,.36,1) forwards; }
.lightbox-backdrop.closing img { animation: lightbox-image-out .25s ease-in forwards; }

@keyframes ink-fade-in { from { opacity: 0; transform: translateY(30px); filter: blur(4px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.animate-ink-in { animation: ink-fade-in 1s ease-out forwards; }
.animate-ink-in-delay-1 { animation: ink-fade-in 1s ease-out .2s forwards; opacity: 0; }
.animate-ink-in-delay-2 { animation: ink-fade-in 1s ease-out .4s forwards; opacity: 0; }
@keyframes lightbox-fade-in { from {opacity:0;} to {opacity:1;} }
@keyframes lightbox-fade-out { from {opacity:1;} to {opacity:0;} }
@keyframes lightbox-image-in { from {opacity:0; transform:scale(.7) rotate(-3deg);} to {opacity:1; transform:scale(1) rotate(0);} }
@keyframes lightbox-image-out { from {opacity:1; transform:scale(1) rotate(0);} to {opacity:0; transform:scale(.7) rotate(3deg);} }

@media (max-width: 900px) {
  .mpt-desktop-links { display: none; }
  .mpt-mobile-trigger { display: block; color: #fff; }
  .mpt-hero-bg { grid-template-columns: 1fr; }
  .mpt-hero-left { display: none; }
  .mpt-hero-content { max-width: 100%; margin-left: 0; align-items: center; text-align: center; padding: 0 1.5rem 5rem; }
  .mpt-hero-actions { flex-direction: column; }
  .mpt-portfolio-toggle button { min-width: 2.75rem; min-height: 2.75rem; width: 2.75rem; height: 2.75rem; padding: 0.625rem; }
  .mpt-contact-inner { flex-direction: column; }
}
