﻿:root {

            --split: 50%;

            --dark: #182225;

            --dark-soft: #243236;

            --cream: #f5f0e6;

            --ink: #29231f;

            --muted: #9da9a7;

            --line: rgba(255, 255, 255, 0.18);

            --serif: Georgia, "Times New Roman", serif;

            --sans: Inter, "Segoe UI", Arial, sans-serif;

        }



        * {

            box-sizing: border-box;

        }



        html,

        body {

            margin: 0;

            min-height: 100%;

        }



        body {

            font-family: var(--sans);

            overflow: hidden;

        }



        button {

            font: inherit;

        }



        button:focus-visible,

        a:focus-visible {

            outline: 3px solid #d4a56b;

            outline-offset: 4px;

        }



        /* MAIN SPLIT SCREEN */



        .portfolio {

            position: relative;

            width: 100%;

            height: 100vh;

            height: 100dvh;

            min-height: 600px;

            overflow: hidden;

            isolation: isolate;

            background: var(--dark);

        }



        .panel {

            position: absolute;

            inset-block: 0;

            overflow: hidden;

            transition: none;

        }



        .programming {

            left: 0;

            width: var(--split);

            color: #f5f7f5;

            background:

                radial-gradient(ellipse at 20% 40%,

                    rgba(31, 113, 105, .18),

                    transparent 48%),

                linear-gradient(140deg, #172124, #202a2d 65%, #151d20);

        }



        .writing {

            right: 0;

            width: calc(100% - var(--split));

            color: var(--ink);

            background:

                radial-gradient(ellipse at 75% 45%,

                    rgba(255, 255, 255, .8),

                    transparent 48%),

                var(--cream);

        }



/* PROGRAMMING: CONTENT ALIGNED LEFT */

.programming .panel-inner {

  align-items: flex-start;

}



.programming .panel-title,

.programming .panel-subtitle,

.programming .panel-content,

.programming .panel-footer {

  align-self: flex-start;

}



/* NOVEL WRITING: CONTENT ALIGNED RIGHT */

.writing .panel-inner {

  align-items: flex-end;

  text-align: right;

}



.writing .eyebrow {

  justify-content: flex-end;

}



.writing .panel-title,

.writing .panel-subtitle,

.writing .panel-content,

.writing .panel-footer {

  align-self: flex-end;

}



.writing .panel-content {

  align-items: flex-end;

}



.writing .section-label {

  text-align: right;

}



.writing .bookshelf {

  margin-left: auto;

}



.writing .panel-footer {

  width: 100%;

  flex-direction: row-reverse;

  text-align: right;

}



.writing .explore-link {

  padding-left: 0;

  padding-right: 9px;

}



@media (max-width: 760px) {

  .writing .panel-inner {

    align-items: flex-start;

    text-align: left;

  }



  .writing .eyebrow {

    justify-content: flex-start;

  }



  .writing .panel-title,

  .writing .panel-subtitle,

  .writing .panel-content,

  .writing .panel-footer {

    align-self: flex-start;

  }



  .writing .panel-content {

    align-items: flex-start;

  }



  .writing .section-label {

    text-align: left;

  }



  .writing .bookshelf {

    margin-left: 0;

  }



  .writing .panel-footer {

    flex-direction: row;

    text-align: left;

  }



  .writing .explore-link {

    padding-right: 0;

    padding-left: 9px;

  }

}





        /* DECORATIVE BACKGROUNDS */



        .code-texture {

            position: absolute;

            inset: 0;

            overflow: hidden;

            pointer-events: none;

            opacity: .15;

            background-image:

                repeating-linear-gradient(0deg,

                    transparent 0 24px,

                    rgba(92, 190, 166, .09) 25px);

        }



        .code-texture::before {

            content: "const create = async () => {\A"

            "  return await initialize();\A"

            "};\A\A"

            "function renderExperience(data) {\A"

            "  return data.map(item => item);\A"

            "}\A\A"

            "class Portfolio extends Component {\A"

            "  constructor(props) {\A"

            "    super(props);\A"

            "  }\A"

            "}";

            white-space: pre;

            position: absolute;

            top: 15%;

            left: 5%;

            font: 11px/2 monospace;

            color: #6bd6b5;

            transform: rotate(-4deg);

        }



        .network {

            position: absolute;

            width: 100%;

            height: 100%;

            inset: 0;

            opacity: .18;

            pointer-events: none;

        }



        .writing-texture {

            position: absolute;

            inset: 0;

            opacity: .13;

            pointer-events: none;

            background-image: radial-gradient(#8c7258 0.65px,

                    transparent 0.65px);

            background-size: 15px 15px;

            mask-image: linear-gradient(to bottom,

                    black,

                    transparent 85%);

        }



        /* PANEL CONTENT */



        .panel-inner {

            position: relative;

            z-index: 2;

            height: 100%;

            padding: clamp(22px, 4vw, 58px);

            display: flex;

            flex-direction: column;

        }



        .eyebrow {

            display: flex;

            align-items: center;

            gap: 9px;

            font-size: 10px;

            font-weight: 700;

            letter-spacing: .2em;

            text-transform: uppercase;

            opacity: .7;

        }



        .eyebrow-dot {

            width: 7px;

            height: 7px;

            border-radius: 50%;

            background: #65c7a9;

            box-shadow: 0 0 12px #65c7a9;

        }



        .writing .eyebrow-dot {

            background: #b47850;

            box-shadow: 0 0 12px #b47850;

        }



        .panel-title {

            font-family: var(--serif);

            font-size: clamp(34px, 4.6vw, 66px);

            font-weight: 400;

            line-height: 1;

            letter-spacing: -.045em;

            margin: 22px 0 0;

            max-width: 100%;

        }



        .panel-subtitle {

            max-width: 330px;

            font-size: 13px;

            line-height: 1.8;

            opacity: .65;

            margin-top: 14px;

        }



        .panel-content {

            flex: 1;

            min-height: 0;

            display: flex;

            flex-direction: column;

            justify-content: center;

            padding-block: 22px;

        }



        .section-label {

            margin-bottom: 17px;

            font-size: 9px;

            font-weight: 700;

            letter-spacing: .2em;

            text-transform: uppercase;

            opacity: .5;

        }



        /* PROGRAMMING PROJECTS */



        .project-grid,

.bookshelf {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));

  gap: clamp(8px, 1.5vw, 18px);

  width: 100%;

  max-width: none;

  align-items: start;

}



        .project {

            min-width: 0;

            border: 1px solid rgba(255, 255, 255, .12);

            border-radius: 16px;

            background: rgba(255, 255, 255, .045);

            color: white;

            padding: 12px 5px 10px;

            cursor: pointer;

            display: flex;

            flex-direction: column;

            align-items: center;

            gap: 8px;

            transition:

                transform .2s ease,

                border-color .2s ease,

                background .2s ease;

        }



        .project:hover {

            transform: translateY(-5px);

            border-color: rgba(101, 199, 169, .65);

            background: rgba(101, 199, 169, .09);

        }



        .project-icon {

            width: clamp(36px, 4.3vw, 54px);

            aspect-ratio: 1;

            border-radius: 13px;

            display: grid;

            place-items: center;

            font-size: clamp(16px, 2vw, 24px);

            font-weight: 800;

            color: white;

            background: #344347;

            border: 1px solid rgba(255, 255, 255, .12);

        }



        .project:nth-child(3n + 1) .project-icon {

            color: #72d3b1;

            background: #203c38;

        }



        .project:nth-child(3n + 2) .project-icon {

            color: #91bbf8;

            background: #253449;

        }



        .project:nth-child(3n) .project-icon {

            color: #f3c46b;

            background: #443829;

        }



        .project-name {

            font-size: clamp(9px, 1vw, 11px);

            font-weight: 600;

            text-align: center;

            line-height: 1.35;

            overflow-wrap: anywhere;

        }



        .project-type {

            font-size: 8px;

            opacity: .48;

        }



        /* NOVEL / BOOK COLLECTION */



        .bookshelf {

            display: grid;

            grid-template-columns: repeat(3, minmax(0, 1fr));

            gap: clamp(10px, 1.7vw, 20px);

            width: 100%;

            max-width: 420px;

            align-items: center;

        }



        .book-button {

            border: 0;

            padding: 0;

            background: transparent;

            cursor: pointer;

            min-width: 0;

            color: var(--ink);

            text-align: left;

            transition: transform .25s ease;

            width: 100%;

        }



        .book-button:hover {

            transform: translateY(-7px) rotate(-1deg);

        }



        .book-cover {

            width: 100%;

            aspect-ratio: 3 / 4.25;

            position: relative;

            overflow: hidden;

            display: flex;

            flex-direction: column;

            justify-content: space-between;

            padding: clamp(8px, 1.2vw, 15px);

            color: #f7f0e4;

            box-shadow:

                3px 5px 12px rgba(40, 31, 23, .16),

                inset 3px 0 0 rgba(255, 255, 255, .12);

            background: #283b3e;

            border-radius: 2px 5px 5px 2px;

        }



        .book-cover::before {

            content: "";

            position: absolute;

            inset: 0;

            border: 1px solid rgba(255, 255, 255, .17);

            pointer-events: none;

        }



        .book-cover::after {

            content: "";

            position: absolute;

            top: 0;

            left: 5px;

            bottom: 0;

            width: 1px;

            background: rgba(255, 255, 255, .14);

        }



        .book-cover.cover-2 {

            background: linear-gradient(155deg, #173c45, #142b35 70%);

        }



        .book-cover.cover-3 {

            background: linear-gradient(155deg, #b87f60, #79503e);

        }



        .book-cover.cover-4 {

            background: linear-gradient(150deg, #344d58, #172d39);

        }



        .book-cover.cover-5 {

            background: linear-gradient(150deg, #a75b43, #65352f);

        }



        .book-cover.cover-6 {

            background: linear-gradient(150deg, #8b876d, #4d5a4d);

        }



        .book-title {

            position: relative;

            z-index: 1;

            font-family: var(--serif);

            font-size: clamp(10px, 1.5vw, 18px);

            font-weight: 700;

            line-height: 1.13;

            text-transform: uppercase;

            overflow-wrap: anywhere;

        }



        .book-art {

            position: absolute;

            left: 0;

            right: 0;

            bottom: 25%;

            height: 33%;

            opacity: .9;

            background:

                radial-gradient(ellipse at 50% 90%,

                    #d9c6a1 0 9%,

                    transparent 10%),

                linear-gradient(155deg,

                    transparent 35%,

                    rgba(205, 174, 125, .65) 36% 60%,

                    transparent 61%);

        }



        .book-meta {

            position: relative;

            z-index: 1;

            font-size: 7px;

            line-height: 1.5;

            letter-spacing: .13em;

            opacity: .85;

        }



        .book-info {

            padding-top: 10px;

        }



        .book-info strong {

            display: block;

            font-family: var(--serif);

            font-size: clamp(10px, 1.2vw, 14px);

            font-weight: 500;

            line-height: 1.3;

        }



        .book-info span {

            display: block;

            margin-top: 5px;

            font-size: 9px;

            opacity: .55;

        }



        /* FOOTER */



        .panel-footer {

            display: flex;

            justify-content: space-between;

            align-items: end;

            gap: 12px;

            border-top: 1px solid var(--line);

            padding-top: 18px;

        }



        .writing .panel-footer {

            border-color: rgba(40, 31, 23, .16);

        }



        .role-title {

            font-size: 10px;

            font-weight: 800;

            text-transform: uppercase;

            letter-spacing: .06em;

        }



        .role-description {

            margin-top: 6px;

            font-size: 10px;

            line-height: 1.5;

            opacity: .6;

        }



        .explore-link {

            flex-shrink: 0;

            border: 0;

            padding: 9px 0 9px 9px;

            color: inherit;

            background: transparent;

            cursor: pointer;

            font-size: 10px;

            font-weight: 700;

            white-space: nowrap;

        }



        .explore-link span {

            margin-left: 5px;

        }



        /* CENTRAL PHOTO */



        .portrait-layer {

            position: absolute;

            z-index: 5;

            inset: 0;

            pointer-events: none;

            overflow: hidden;

        }





.portrait {

  position: absolute;

  bottom: 0;

  left: 50%;

  height: min(92%, 820px);

  width: min(31vw, 410px);

  transform: translateX(-50%) scale(var(--portrait-scale, 1));

  transform-origin: center top;

  transition: transform .55s cubic-bezier(.22, .61, .36, 1);

  object-fit: contain;

  object-position: center bottom;

  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .15));

  pointer-events: none;

  user-select: none;

}





/* CENTER PROFILE CARD */

.profile-card {

  position: fixed;

  z-index: 8;



  left: 50%;

  bottom: 0;

  transform: translateX(-50%);



  width: min(390px, calc(100% - 36px));

  max-height: calc(100dvh - 24px);

  overflow-y: auto;



  padding: 22px 26px 18px;

  border-top-left-radius: 30px;

  border-top-right-radius: 30px;



  color: #f5f4ef;

  text-align: center;



  background: rgba(26, 34, 36, 0.91);

  border: 1px solid rgba(255, 255, 255, 0.2);



  box-shadow:

    0 16px 45px rgba(0, 0, 0, 0.28),

    inset 0 1px 0 rgba(255, 255, 255, 0.1);



  backdrop-filter: blur(18px);

  -webkit-backdrop-filter: blur(18px);

}



.profile-heading {

  padding-bottom: 15px;

}



.profile-eyebrow {

  display: block;

  margin-bottom: 9px;



  font-size: 9px;

  font-weight: 700;

  letter-spacing: 0.19em;



  color: #83cbb3;

}



.profile-name {

  margin: 0;



  font-family: Georgia, "Times New Roman", serif;

  font-size: clamp(25px, 3vw, 34px);

  font-weight: 400;

  line-height: 1.2;

  letter-spacing: -0.035em;

}



.profile-role {

  margin: 9px 0 0;



  font-size: 10px;

  line-height: 1.7;

  color: rgba(255, 255, 255, 0.68);

}



/* BIO ACCORDION */

.bio-accordion {

  border-top: 1px solid rgba(255, 255, 255, 0.16);

  text-align: left;

}



.bio-accordion summary {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 2px;



  padding: 4px 0 2px;



  cursor: pointer;

  list-style: none;



  font-size: 12px;

  font-weight: 600;

}



.bio-accordion summary::-webkit-details-marker {

  display: none;

}



.accordion-icon {

  display: grid;

  place-items: center;



  width: 25px;

  height: 25px;

  flex-shrink: 0;



  border: 1px solid rgba(255, 255, 255, 0.24);

  border-radius: 50%;



  font-size: 17px;

  font-weight: 400;



  transition: transform 0.2s ease;

}



.bio-accordion[open] .accordion-icon {

  transform: rotate(45deg);

}



.bio-content {

  padding: 10px 0 2px;



  color: rgba(255, 255, 255, 0.75);

  font-size: 11px;

  line-height: 1.85;

}



.bio-content p {

  margin: 0 0 10px;

}



.bio-content p:last-child {

  margin-bottom: 4px;

}



@media (max-width: 760px) {

  .profile-card {

    position: relative;

    left: auto;

    bottom: auto;

    transform: none;



    width: calc(100% - 36px);

    max-height: none;

    margin: -45px auto 28px;



    z-index: 8;

  }

}







        /* DRAGGABLE DIVIDER */



        .divider-control {

            position: absolute;

            z-index: 7;

            top: 0;

            bottom: 0;

            left: var(--split);

            width: 42px;

            transform: translateX(-50%);

            display: flex;

            justify-content: center;

            align-items: center;

            cursor: ew-resize;

            touch-action: none;

            user-select: none;

            outline: none;

        }



        .divider-line {

            position: absolute;

            width: 1px;

            height: 100%;

            background: rgba(255, 255, 255, .72);

            box-shadow: 0 0 12px rgba(0, 0, 0, .15);

        }



        .divider-handle {

            position: relative;

            z-index: 1;

            width: 40px;

            height: 40px;

            border-radius: 12px;

            display: grid;

            place-items: center;

            background: rgba(255, 255, 255, .94);

            color: #20282a;

            border: 1px solid rgba(0, 0, 0, .1);

            box-shadow: 0 4px 15px rgba(0, 0, 0, .17);

            font-size: 22px;

            transition: transform .2s ease;

        }



        .divider-control:hover .divider-handle {

            transform: scale(1.08);

        }



        .divider-control:focus-visible .divider-handle {

            outline: 3px solid #d4a56b;

            outline-offset: 5px;

        }



        .drag-hint {

            position: absolute;

            left: 50%;

            bottom: 22px;

            transform: translateX(-50%);

            z-index: 11;

            font-size: 9px;

            letter-spacing: .13em;

            text-transform: uppercase;

            color: rgba(255, 255, 255, .7);

            background: rgba(15, 22, 24, .45);

            border: 1px solid rgba(255, 255, 255, .12);

            border-radius: 30px;

            padding: 8px 12px;

            white-space: nowrap;

            pointer-events: none;

        }



        /* MODAL */



        .modal {

            position: fixed;

            inset: 0;

            z-index: 100;

            display: none;

            align-items: center;

            justify-content: center;

            padding: 22px;

            background: rgba(8, 13, 15, .7);

            backdrop-filter: blur(8px);

        }



        .modal.is-open {

            display: flex;

            animation: fade-in .18s ease-out;

        }



        @keyframes fade-in {

            from {

                opacity: 0;

            }



            to {

                opacity: 1;

            }

        }



        .modal-card {

            position: relative;

            width: min(100%, 600px);

            max-height: min(85vh, 750px);

            overflow-y: auto;

            border-radius: 18px;

            padding: clamp(25px, 5vw, 44px);

            color: #f5f5f0;

            background: #202a2d;

            border: 1px solid rgba(255, 255, 255, .13);

            box-shadow: 0 25px 100px rgba(0, 0, 0, .4);

        }



        .modal-card.writing-modal {

            color: var(--ink);

            background: var(--cream);

            border-color: rgba(40, 31, 23, .12);

        }



        .modal-close {

            position: absolute;

            top: 15px;

            right: 15px;

            width: 36px;

            height: 36px;

            border: 1px solid rgba(127, 127, 127, .25);

            border-radius: 50%;

            background: transparent;

            color: inherit;

            cursor: pointer;

            font-size: 20px;

        }



        .modal-kicker {

            margin-bottom: 16px;

            font-size: 10px;

            font-weight: 700;

            letter-spacing: .2em;

            text-transform: uppercase;

            opacity: .6;

        }



        .modal-title {

            max-width: 90%;

            font-family: var(--serif);

            font-size: clamp(30px, 5vw, 44px);

            font-weight: 400;

            line-height: 1.1;

            margin: 0 0 20px;

        }



        .modal-description {

            font-size: 14px;

            line-height: 1.9;

            opacity: .8;

            white-space: pre-line;

        }



        .modal-details {

            display: grid;

            grid-template-columns: repeat(2, minmax(0, 1fr));

            gap: 18px;

            margin-top: 28px;

            padding-top: 22px;

            border-top: 1px solid rgba(127, 127, 127, .22);

        }



        .detail-label {

            font-size: 9px;

            letter-spacing: .15em;

            text-transform: uppercase;

            opacity: .55;

            margin-bottom: 8px;

        }



        .detail-value {

            font-size: 12px;

            line-height: 1.6;

            overflow-wrap: anywhere;

        }



        .modal-link {

            display: inline-flex;

            align-items: center;

            gap: 8px;

            margin-top: 28px;

            border: 1px solid currentColor;

            border-radius: 30px;

            padding: 12px 18px;

            color: inherit;

            text-decoration: none;

            font-size: 12px;

            font-weight: 700;

        }



        .modal-link[hidden] {

            display: none;

        }



        .empty-note {

            margin-top: 14px;

            font-size: 10px;

            opacity: .5;

            line-height: 1.7;

        }



        /* RESPONSIVE */



        @media (min-width: 1500px) {

            .panel-inner {

                padding-inline: 6vw;

            }

        }



        @media (max-width: 760px) {

            body {

                overflow: auto;

            }



            .portfolio {

                height: auto;

                min-height: 100dvh;

                overflow: hidden;

            }



            .programming,

            .writing {

                position: relative;

                inset: auto;

                width: 100%;

                height: auto;

                min-height: 690px;

            }



            .programming {

                padding-bottom: 35px;

            }



            .writing {

                padding-bottom: 35px;

            }



            .panel-inner {

                min-height: 690px;

                padding: 30px 24px;

            }



            .panel-title {

                font-size: clamp(40px, 10vw, 58px);

            }



            .panel-content {

                justify-content: center;

                padding-block: 35px;

            }



            @media (max-width: 760px) {

  .project-grid,

  .bookshelf {

    grid-template-columns: repeat(3, minmax(0, 1fr));

  }

}



            .project-icon {

                width: 48px;

            }



            .project-name {

                font-size: 11px;

            }



            .book-title {

                font-size: clamp(12px, 3vw, 18px);

            }



            .book-info strong {

                font-size: 12px;

            }



            .divider-control,

            .drag-hint {

                display: none;

            }



            .portrait-mobile {

                display: block;

                width: 160px;

                height: 200px;

                object-fit: contain;

                object-position: center bottom;

                margin: 24px auto -30px;

                position: relative;

                z-index: 2;

            }



            .mobile-photo-wrap {

                background: linear-gradient(90deg,

                        var(--dark) 0 50%,

                        var(--cream) 50% 100%);

                display: flex;

                justify-content: center;

                align-items: end;

                height: 180px;

            }



            .mobile-photo-wrap img {

                height: 230px;

                max-width: 85%;

                object-fit: contain;

                object-position: center bottom;

            }

        }



        @media (min-width: 761px) {



            .mobile-photo-wrap,

            .portrait-mobile {

                display: none;

            }

        }



        @media (max-width: 380px) {

            .panel-inner {

                padding-inline: 17px;

            }



            .project-grid,

            .bookshelf {

                gap: 7px;

            }



            .project {

                padding-inline: 3px;

            }



            .project-icon {

                width: 40px;

            }



            .book-info span {

                font-size: 8px;

            }



            .role-title {

                font-size: 9px;

            }

        }



        @media (prefers-reduced-motion: reduce) {



            *,

            *::before,

            *::after {

                scroll-behavior: auto !important;

                animation-duration: .01ms !important;

                transition-duration: .01ms !important;

            }

        }



.more-card {

  min-height: 100px;

  align-self: stretch;

  justify-content: center;

  border-style: dashed;

  background: rgba(255, 255, 255, 0.025);

}



.more-card .project-icon {

  border-radius: 50%;

  font-size: 25px;

}



.more-card:hover {

  border-color: rgba(101, 199, 169, 0.65);

}



    
        /* STABLE COLLECTION LAYOUT OVERRIDES */
        .project-grid,
        .bookshelf {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
            gap: clamp(8px, 1.5vw, 18px);
            width: 100%;
            max-width: none;
            align-items: start;
        }
        .bookshelf { gap: clamp(10px, 1.7vw, 20px); }
        .project-grid > *,
        .bookshelf > * { min-width: 0; }
        .project.more-card {
            min-height: 100px;
            justify-content: center;
            border: 1px dashed rgba(255,255,255,.24);
            background: rgba(255,255,255,.025);
        }
        .project.more-card .project-icon {
            border-radius: 50%;
            font-size: 25px;
        }
        .more-card-book .more-book-cover {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border: 1px dashed rgba(41,35,31,.4);
            background: rgba(41,35,31,.035);
            color: var(--ink);
        }
        .more-book-plus { font-size: 30px; line-height: 1; }
        .more-book-label {
            font-size: 8px;
            letter-spacing: .12em;
            font-weight: 700;
        }
        .more-card-book .book-info { text-align: left; }
        @media (max-width: 760px) {
            .project-grid, .bookshelf {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }
        @media (max-width: 380px) {
            .project-grid, .bookshelf { gap: 7px; }
        }


/* FINAL LAYOUT FIX: keep collection containers full-width inside each panel. */
.programming .panel-inner,
.writing .panel-inner {
  box-sizing: border-box;
  min-width: 0;
}
.programming .panel-title,
.programming .panel-subtitle,
.programming .panel-content,
.programming .panel-footer {
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}
.writing .panel-title,
.writing .panel-subtitle,
.writing .panel-content,
.writing .panel-footer {
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}
.programming .panel-content,
.writing .panel-content {
  min-width: 0;
}
.project-grid {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(10px, 1.2vw, 16px) !important;
  align-items: start;
}
.bookshelf {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(10px, 1.2vw, 16px) !important;
  align-items: start;
}
.project,
.book-button {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.project-name,
.project-type,
.book-title,
.book-info {
  min-width: 0;
  overflow-wrap: anywhere;
}
.more-card-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.more-book-cover {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 0.64;
  border: 1px dashed rgba(40,31,23,.32);
  border-radius: 4px;
  background: rgba(40,31,23,.035);
  box-shadow: none;
}
.more-book-plus {
  font: 400 38px/1 sans-serif;
  color: rgba(40,31,23,.65);
}
.more-book-label {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}
@media (max-width: 900px) and (min-width: 761px) {
  .programming .panel-inner,
  .writing .panel-inner { padding-inline: 24px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 760px) {
  .programming .panel-title,
  .programming .panel-subtitle,
  .programming .panel-content,
  .programming .panel-footer,
  .writing .panel-title,
  .writing .panel-subtitle,
  .writing .panel-content,
  .writing .panel-footer { width: 100%; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .bookshelf { max-width: 100% !important; }
}

/* =====================================================================
   FINAL BEHAVIOR OVERRIDE (menang atas semua aturan di atas)
   - Ukuran kartu FIX, tidak pernah membesar/mengecil.
   - Jumlah KOLOM otomatis mengikuti lebar area (auto-fill).
   - Jumlah BARIS dibatasi: programming 3 baris, buku 2 baris.
   - Kartu yang tidak muat dalam frame ter-clip (hilang), dan muncul
     kembali satu per satu saat area diperlebar.
   ===================================================================== */

.programming .panel-content,
.writing .panel-content {
  overflow: hidden !important;
  justify-content: flex-start !important;
}

.project-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, 118px) !important;
  grid-auto-rows: max-content !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: none !important;
  justify-content: start !important;
  align-content: start !important;
  max-height: calc(3 * 108px + 2 * 14px) !important;
  overflow: hidden !important;
}

.bookshelf {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, 120px) !important;
  grid-auto-rows: max-content !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: none !important;
  justify-content: start !important;
  align-content: start !important;
  max-height: calc(2 * 212px + 1 * 16px) !important;
  overflow: hidden !important;
}

.writing .bookshelf {
  justify-content: end !important;
  margin-left: auto !important;
}

.project {
  width: 118px !important;
  box-sizing: border-box !important;
}
.book-button {
  width: 120px !important;
  box-sizing: border-box !important;
}

.book-cover {
  width: 100% !important;
  max-width: none !important;
  aspect-ratio: auto !important;
  height: 158px !important;
  margin-inline: 0 !important;
}

.writing .book-button,
.writing .book-info { text-align: left !important; }

/* =====================================================================
   MOBILE: foto mini (elemen khusus) + card bio, FIXED pojok kiri bawah.
   Pakai .mobile-corner-photo tersendiri agar bebas konflik dgn .portrait.
   ===================================================================== */
.mobile-corner-photo { display: none; }

@media (max-width: 760px) {
  /* Sembunyikan foto tengah desktop di mobile. */
  .portrait-layer { display: none !important; }

  /* Card bio mini: fixed pojok kiri bawah. Default hanya nama + tombol.
     z-index lebih tinggi dari foto, jadi saat accordion terbuka card
     tumbuh ke atas dan boleh menutupi foto. */
  .profile-card {
    position: fixed !important;
    left: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    margin: 0 !important;
    width: 190px !important;
    max-width: calc(100vw - 12px) !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    padding: 10px 12px !important;
    border-radius: 0 16px 0 0 !important;
    text-align: left !important;
    z-index: 60 !important;
  }

  /* Default (accordion tertutup): ringkas, hanya nama + tombol. */
  .profile-card .profile-heading { padding-bottom: 0 !important; }
  .profile-card .profile-eyebrow { display: none !important; }
  .profile-card .profile-role { display: none !important; }
  .profile-card .profile-name { font-size: 16px !important; margin: 0 !important; }

  .profile-card .bio-accordion { border-top: 0 !important; margin-top: 6px !important; }
  .profile-card .bio-accordion summary { font-size: 11px !important; padding: 2px 0 !important; }
  .profile-card .accordion-icon { width: 20px !important; height: 20px !important; font-size: 14px !important; }
  .profile-card .bio-content { font-size: 10px !important; line-height: 1.7 !important; }

  /* Foto mini: fixed, duduk TEPAT DI ATAS card bio tertutup.
     bottom = perkiraan tinggi card tertutup (~54px). z-index di bawah card. */
  .mobile-corner-photo {
    display: block !important;
    position: fixed !important;
    left: 6px !important;
    bottom: 54px !important;
    width: 104px !important;
    height: 150px !important;
    object-fit: contain !important;
    object-position: left bottom !important;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,.25)) !important;
    pointer-events: none !important;
    user-select: none !important;
    z-index: 55 !important;
  }
}
/* =====================================================================
   SAMPUL BUKU PAKAI GAMBAR (assets/img/book1-4.jpg) - data dummy.
   Gambar menutup penuh; overlay gelap untuk keterbacaan judul;
   garis lipat (.book-cover::after) tetap tampil di atas gambar.
   ===================================================================== */
.book-cover.has-cover-image {
  background-color: #283b3e;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.book-cover.has-cover-image::before {
  /* overlay gelap gradasi agar judul & meta terbaca */
  background: linear-gradient(180deg, rgba(10,14,16,.55) 0%, rgba(10,14,16,.15) 40%, rgba(10,14,16,.65) 100%);
  border: 1px solid rgba(255,255,255,.17);
}
/* garis lipat tetap tampil di atas gambar */
.book-cover.has-cover-image::after {
  z-index: 2;
}
/* sembunyikan ornamen pita bawaan saat ada gambar */
.book-cover.has-cover-image .book-art {
  display: none;
}

/* =====================================================================
   BACKGROUND GAMBAR FADE SAAT SLIDER DIGESER.
   - Geser kanan (programming melebar): programming.png fade-in.
   - Geser kiri (writing melebar): writing.png fade-in.
   Opacity dikontrol oleh --prog-bg / --write-bg dari JS (setSplit).
   ===================================================================== */
.programming::after,
.writing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none;
}
.programming::after {
  background-image: url("../img/programming2.png");
  background-size: 100vw 100%;
  background-position: left center;
  opacity: var(--prog-bg, 0);
  transform: scale(var(--prog-bg-scale, 1));
  transition: opacity .6s ease, transform .6s cubic-bezier(.22, .61, .36, 1);
}
.writing::after {
  background-image: url("../img/writing2.png");
  background-size: 100vw 100%;
  background-position: right center;
  opacity: var(--write-bg, 0);
  transform: scale(var(--write-bg-scale, 1));
  transition: opacity .6s ease, transform .6s cubic-bezier(.22, .61, .36, 1);
}
/* pastikan konten & tekstur tetap di atas gambar background */
.panel-inner { z-index: 2; }
.code-texture, .writing-texture, .network { z-index: 1; }

/* Cover buku dibuat clean: judul & nama penulis di dalam cover disembunyikan
   (judul sudah diwakili teks di bawah cover). */
.book-cover .book-title,
.book-cover .book-meta {
  display: none !important;
}

/* Logo gambar di card programming (data dummy, logo1-5.png acak). */
.project-icon.has-logo-image {
  background: rgba(255, 255, 255, .06);
  padding: 6px;
  overflow: hidden;
}
.project-icon.has-logo-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* =====================================================================
   DUAL PORTRAIT: mangedod.png (kiri) + mangedod2.png (kanan).
   Keduanya diposisikan identik di tengah. Masing-masing di-clip
   sesuai --split sehingga terlihat seperti satu foto yang dibelah.
   Geser slider kiri → mangedod2 makin utuh; kanan → mangedod makin utuh.
   ===================================================================== */
.portrait-left,
.portrait-right {
  /* transisi smooth saat clip-path berubah mengikuti slider */
  transition: clip-path .05s linear, transform .55s cubic-bezier(.22, .61, .36, 1);
}
.portrait-left {
  /* nilai awal: tampil penuh di kiri (diatur ulang oleh JS setiap setSplit) */
  clip-path: inset(0 50% 0 0);
}
.portrait-right {
  /* nilai awal: tampil penuh di kanan */
  clip-path: inset(0 0 0 50%);
}

/* portrait-right harus identik posisi & ukuran dengan portrait-left. */
.portrait-right {
  position: absolute;
  bottom: 0;
  left: 50%;
  height: min(92%, 820px);
  width: min(31vw, 410px);
  transform: translateX(-50%) scale(var(--portrait-scale, 1));
  transform-origin: center top;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .15));
  pointer-events: none;
  user-select: none;
}
