* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #F8F8F8;
    font-family: "Inter", sans-serif;
    transition: background 0.35s ease;
}

body.dark {
    background: #171717;
}

.panel {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    transform-origin: center top;
}


.cursor {
    position: fixed;
    top: 0;
    left: 0;

    height: 20px;
    width: 20px;

    border-radius: 50%;
    background: #171717;

    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: none;
    z-index: 99999;

    transform: translate(-50%, -50%);
    transition:
        width 0.25s ease,
        height 0.25s ease,
        border-radius 0.25s ease,
        background 0.25s ease,
        padding 0.25s ease;
}

.cursor-text {
    font-size: 10px;
    color: #F8F8F8;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}
.cursor.active {
    width: 90px;
    height: 32px;
    border-radius: 999px;
    background: #171717;
}

.cursor.active .cursor-text {
    opacity: 1;
}

/* ================================
   NAVBAR
   ================================ */

.navbarLight {
    width: 100%;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

/* LEFT */

.logo img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

/* CENTER */

.navMiddle {
    display: flex;
    justify-content: center;
    align-items: center;
}

.menuWrapper {
    position: relative;
}

/* MENU BUTTON */

.menuBtn {
    height: 2.5rem;
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 999px;
    background: #171717;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
    z-index: 10;
    white-space: nowrap;
    transition: background 0.35s ease;
}

body.dark .menuBtn {
    background: #2A2A2A;
}

/* MENU ICON */

.menuIcon {
    width: 1rem;
    height: 0.8rem;
    position: relative;
    flex-shrink: 0;
}

.menuLine {
    position: absolute;
    left: 0;
    width: 100%;
    height: 0.09375rem;
    background: #F8F8F8;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.menuLine.top    { top: 0.1rem; }
.menuLine.bottom { bottom: 0.1rem; }

/* MENU TEXT */

.menuText {
    color: #F8F8F8;
    font-size: 0.85rem;
    font-weight: 400;
    flex-shrink: 0;
}

/* DIVIDER */

.divider {
    width: 0.0625rem;
    height: 1rem;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
}

/* SCROLL WRAPPER */

.scrollWrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* THEME ICON */

.themeIcon {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 0.015625rem solid rgba(255,255,255,0.35);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.iconImg {
    width: 0.9rem;
    height: 0.9rem;
    position: absolute;
    transition: opacity 0.35s ease, transform 0.4s ease;
}

.sunImg  { opacity: 1; transform: rotate(0deg) scale(1); }
.moonImg { opacity: 0; transform: rotate(-90deg) scale(0.4); }

body.dark .sunImg  { opacity: 0; transform: rotate(90deg) scale(0.4); }
body.dark .moonImg { opacity: 1; transform: rotate(0deg) scale(1); }

/* SCROLL TRACK */

.scrollTrack {
    width: 3.3rem;
    height: 1.6rem;
    border-radius: 999px;
    background: #696969;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

body.dark .scrollTrack { background: #444444; }

.scrollFill {
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    height: 100%;
    background: #9f9f9f;
    transition: width 0.2s linear;
}

body.dark .scrollFill { background: #8E8E8E; }

.scrollText {
    position: relative;
    z-index: 2;
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 400;
}

/* DROPDOWN */

.dropdownMenu {
    position: absolute;
    top: -0.35rem;
    left: 50%;
    transform: translateX(-50%) translateY(-0.625rem);
    width: 13.4rem;
    padding: 4rem 1.4rem 1.4rem 1.4rem;
    border-radius: 2rem;
    background: #D9D9D9;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.35s ease;
}

body.dark .dropdownMenu { background: #222222; }

.menuWrapper.active .dropdownMenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdownLabel {
    color: #777777;
    font-size: 0.625rem;
    font-weight: 400;
    letter-spacing: 0.01875rem;
    margin-bottom: 0.2rem;
}

.dropdownMenu a {
    text-decoration: none;
    color: #171717;
    font-size: 1.125rem;
    font-weight: 500;
    letter-spacing: 0.03375rem;
    transition: opacity 0.2s ease;
}

body.dark .dropdownMenu a { color: #F8F8F8; }

.dropdownMenu a:hover { opacity: 0.6; }

/* CONTACT BUTTON */

.contactBtn {
    width: 6.25rem;
    height: 2.375rem;
    border: none;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 400;
    background: #171717;
    cursor: pointer;
    overflow: hidden;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: #F8F8F8;
    text-decoration: none;
    position: relative;
    transition: transform 0.4s cubic-bezier(.22,1,.36,1);
    will-change: transform;
}

body.dark .contactBtn { background: #2A2A2A; }

.contactBtn span {
    display: block;
    transition: transform .325s cubic-bezier(0.66, 0, 0.34, 1);
}

/* ================================
   HERO
   ================================ */

.hero {
    min-height: 103vh;
    margin: 1.25rem; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-bottom: 60vh; 
}

.heroTop h1,
.heroTop p {
    display: block;
}

.heroTop {
    margin-bottom: 18rem;
    text-align: right;      
    flex-shrink: 0;
}

.heroTop h1 {
    font-family: "Inter";
    font-size: 1.24rem;
    font-weight: 600;
    color: #171717;
    line-height: 1.1;
    overflow: hidden;     
    height: 1.1em;            
}

.heroTop p {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #777777;
    overflow: hidden;      
    height: 1.2em;           
    line-height: 1.2;
}

body.dark .heroTop h1 { color: #F8F8F8; }
body.dark .heroTop p  { color: #B0B0B0; }

.heroBottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    padding-bottom: 2rem;
}

.heroName {
    font-size: clamp(5rem, 18vw, 17rem);
    font-weight: 600;
    letter-spacing: -0.7rem;
    line-height: 0.85;
    color: #171717;
    overflow: hidden;
    height: 0.9em;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
}

body.dark .heroName { color: #F8F8F8; }

.heroText { 
    position: relative;
    margin-left: -1.25rem;
 }

.heroText span {
    display: block;
    transition: transform .325s cubic-bezier(0.66, 0, 0.34, 1);
}

.heroText span:last-child {
    position: absolute;
    top: 100%;
    left: 0;
}

.heroName:hover .heroText span { transform: translateY(-100%); }

/* PROFILE CIRCLE */

.imgCircle {
    width: 8rem;
    height: 8rem;
    border-radius: 100%;
    margin-bottom: 1.25rem;
    overflow: hidden;
    flex-shrink: 0;
    border: 0.0625rem solid rgba(248,248,248,0.40);
}

.imgCircle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================
   ABOUT
   ================================ */

.about {
    min-height: 100vh;
    padding: 1.5rem;
    background: #fff;
    color: #171717;
    position: relative;
    z-index: 2;
    overflow: hidden;
    margin-bottom: 100vh; /* WAS 100vh — this was causing the jank */
}

body.dark .about {
    background: #171717;
    color: #f8f8f8;
}

.abt-head,
.abt-headbtm {
    font-family: "Instrument Serif";
    font-size: clamp(4rem, 9vw, 7rem);
    line-height: 0.92;
    letter-spacing: -0.1875rem;
}

.abt-head {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
}

.small-head {
    font-size: clamp(1.6rem, 3vw, 3.5rem);
    font-weight: 400;
    letter-spacing: 0.0625rem;
}

.abt-body {
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6rem;
}

.abt-text { 
    max-width: 25rem;
}
.mail {
    margin-top: 12.5rem;
}
.abt-label {
    color: #C8C8C8;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.abt-labelE {
    color: #C8C8C8;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: right;
}


body.dark .abt-label { color: #7A7A7A; }

.abt-text p,
.abt-canvas {
    font-size: 1rem;
    line-height: 1.1;
    color: #2A2A2A;
    margin-bottom: 1.375rem;
    display: block;
    width: 100%;
    text-align: right;
}

body.dark .abt-text p,
body.dark .abt-canvas { color: #D4D4D4; }

/* CENTER SPACER + DRAGGABLE IMAGE */

.me-wrapper {
    flex-shrink: 0;
    width: 9.8125rem;
    height: 10.92581rem;
    margin-top: 2.5rem;
    visibility: hidden;
    pointer-events: none;
}

.me {
    width: 9.8125rem;
    height: 10.92581rem;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
    cursor: grab;
    transition: opacity 0.3s cubic-bezier(0.15, 0.9, 0.34, 0.95);
    will-change: transform;
}

.me.dragging {
    box-shadow: 0 1.25rem 3rem rgba(0,0,0,0.22);
    cursor: grabbing;
}

body.dark .me { border: 0.0625rem solid rgba(248,248,248,0.30); }

/* EMAIL CONNECT */

.connect {
    margin-top: 0.5rem;
    margin-bottom: 0.875rem;
    font-size: 2rem;
    font-family: "Instrument Serif";
}

.email-link {
    text-decoration: underline;
    cursor: pointer;
}

/* ================================
   WORK SECTION (scroll-driven)
   ================================ */

.work-section {
    position: relative;
    background: #f8f8f8;
    transition: background 0.35s ease;
    z-index: 3;
    padding: 0 1.25rem;
}

body.dark .work-section { background: #171717; }

.work-spacer {
    height: 500vh;
    position: relative;
}

.work-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.work-inner {
    width: 100%;
    max-width: 90rem; 
    margin: 0 auto;       
}

.work-header { padding: 8rem 0 0; }

.work-header h1 {
    font-family: 'Instrument Serif', serif;
    font-size: 7rem;
    font-weight: 400;
    line-height: 1;
    color: #111;
    transition: color 0.35s ease;
}

body.dark .work-header span { color: #F8F8F8; }

.work-header p {
    margin-top: .5rem;
    color: #7b7b7b;
    font-size: 1.2rem;
    transition: color 0.35s ease;
}

body.dark .work-header p { color: #B0B0B0; }

/* LAYOUT GRID */

.work-layout {
    position: relative;
    display: grid;
    grid-template-columns:
        minmax(10rem, 20rem)
        minmax(0, 1fr)
        minmax(5rem, 7.5rem);
    gap: 0 clamp(1.5rem, 8vw, 10rem);
    margin-top: 8rem;
    align-items: center;
}

/* LEFT: project names */

.project-list {
    position: relative;
    height: fit-content;
    margin-bottom: 10rem;
}

.project {
    display: flex;
    gap: 0.875rem;
    align-items: baseline;
    margin-bottom: 1.25rem;
    opacity: .28;
    cursor: pointer;
    transition: opacity .45s ease, transform .45s ease;
}

.project.active { opacity: 1; }

.project span {
    color: #000;
    font-family: Inter;
    font-size: 1.125rem;
    font-weight: 400;
    transition: color 0.35s ease;
}

body.dark .project span { color: #F8F8F8; }

.project a {
    color: #000;
    font-family: Inter;
    font-size: 0.875rem;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.35s ease;
}

body.dark .project a { color: #D4D4D4; }

.stack-card {
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.stack-inner:hover .stack-card {
    opacity: 0.96;
    filter: brightness(0.969);
}


.stack-container {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 150rem;
    transform-style: preserve-3d;
}

.stack-inner {
    position: relative;
    width: 100%;
    max-width: 50rem;
    aspect-ratio: 8 / 5;
    height: auto;
    margin: 0 auto;
}



.stack-card {
    position: absolute;
    top: -7.25rem;
    left: -0.625rem;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transform: translateZ(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
    border: 0.041875rem solid #cdcbcb;
}

.stack-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-width: 0;
}

.card-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    color: white;
    z-index: 2;
}

.card-info h3 {
    font-family: 'Instrument Serif', serif;
    font-size: 1.6rem;
    font-weight: 400;
    line-height: 1.1;
}

.card-info span {
    font-size: .7rem;
    letter-spacing: .12em;
    opacity: .7;
}

/* RIGHT: thumbnails */

.thumbs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
}

.thumb {
    width: 4rem;
    height: 4rem;
    border-radius: 0.2rem;
    overflow: hidden;
    opacity: 0.2;
    cursor: pointer;
    position: relative;
    top: -6.25rem;
    left: 3rem;
    border: 0.0625rem solid #cdcbcb;
    transition: opacity .45s ease, transform .45s ease;
}

.thumb.active {
    opacity: 1;
    transform: scale(1.04) translateX(-0.125rem);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ================================
   LARAVEL SECTION
   ================================ */

.laravel {
    position: relative;
    z-index: 4;
    padding-top: 8.25rem;
    background: #f8f8f8;
    padding-bottom: 1rem;
}

.laravel-header {
    position: relative;
    height: 7.5rem;
    margin: 0 1.25rem;
}

.project-title {
    font-family: "Instrument Serif";
    font-size: 6rem;
    line-height: 1;
    margin: 0;
    position: absolute;
    left: 0;
    bottom: 0;
}

.github-btn {
    position: absolute;
    right: 0;
    bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.75rem 0.875rem;
    background: #171717;
    color: #F8F8F8;
    text-decoration: none;
    border-radius: 25rem;
    width: 6.1875rem;
}

.github-btn h1 {
    font-size: 0.8rem;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

.github-btn img {
    width: 0.8125rem;
    height: 0.8125rem;
    transition: filter 0.35s ease;
}

.section-line {
    height: 0.0625rem;
    background: #171717;
    width: 100%;
    transform-origin: left center;
    transition: background 0.35s ease;
}

.project-card {
    background: #171717;
    min-height: 31.25rem;
    border-radius: 0.5rem;
}

.project-card p {
    color: #F8F8F8;
    padding: 1.25rem;
    font-size: 1.125rem;
}

/* LARAVEL — dark mode */

body.dark .laravel          { background: #171717; }
body.dark .project-title    { color: #F8F8F8; }
body.dark .github-btn       { background: #F8F8F8; color: #171717; }
body.dark .github-btn img   { filter: invert(1); }
body.dark .section-line     { background: #444; }
body.dark .project-wrapper  { background: #222222; }
body.dark .project-card     { background: #F8F8F8; }
body.dark .project-card p   { color: #171717; }

/* ================================
   CONTACT / TOUCH
   ================================ */

.touch {
    background: #171717;
    height: 30rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    padding: 0 2rem 0 2rem;

}

body:not(.dark) .touch { background: #f8f8f8; }

.touch p {
    color: #F8F8F8;
    font-family: Inter;

    font-weight: 500;
    letter-spacing: -0.06rem;
    max-width: 40rem;
}

body:not(.dark) .touch p { color: #171717; }

.email-btn {
    position: relative;
    overflow: hidden;

    border-radius: 25rem;
    background: #F8F8F8;
    color: #171717;

    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 7.5rem;
    transition:
        width 0.5s cubic-bezier(.22,1,.36,1),
        background 0.3s ease;
    height: 2.5rem;

    font-size: 0.8rem;
    font-weight: 500;
}

body:not(.dark) .email-btn {
    background: #171717;
    color: #F8F8F8;
}

.text-wrap {
    position: relative;
    height: 1rem;
    overflow: hidden;
    width: 100%;
}

.text-default,
.text-hover {
    display: block;
    white-space: nowrap;
    width: 100%;
    text-align: center;
    transition: transform 0.5s cubic-bezier(.22,1,.36,1);
}

.text-hover {
    position: absolute;
    left: 0;
    top: 100%;
}

.email-btn:hover {
    width: 13rem;
}

/* Hover animation */
.email-btn:hover .text-default {
    transform: translateY(-100%);
}

.email-btn:hover .text-hover {
    transform: translateY(-100%);
}

body:not(.dark) .touch a {
    background: #171717;
    color: #F8F8F8;
}

.touch img {
    width: 1rem;
    height: 1rem;
}

.touch h1 {
    color: #F8F8F8;
    font-family: Inter;
    font-size: 15rem;
    font-weight: 900;
    letter-spacing: -0.5rem;
    line-height: 0.9;
    text-align: center;
}

body:not(.dark) .touch h1 { color: #171717; }

/* mail icon swap */
.mailLight { display: none; }

body.dark .mailDark  { display: none; }
body.dark .mailLight { display: block; }

/* ================================
   FOOTER
   ================================ */

.footer {
    background: #171717;
    position: relative;
    overflow: hidden;
    height: 26.25rem;
    padding: 1.25rem 1.25rem 0 1.25rem;
    border-top: 0.0625rem solid rgba(248,248,248,0.30);
}

.logo {
    display: inline-flex;
    transform-origin: center;
    will-change: transform;
}

.logo:hover {
    animation: logoSpin 1s cubic-bezier(0.16,1,0.3,1);
}

@keyframes logoSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.foot-top .logo {
    margin-left: auto;
    padding-right: 0.6rem;
}

.foot-top {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.foot-top p {
    color: #F8F8F8;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.0125rem;
}

.foot-top a {
    color: #F8F8F8;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05rem;
    position: relative;
    overflow: hidden;
    display: inline-block;
    transition: color 0.3s ease;
}

.foot-top a > span {
    display: block;
    transition: transform .325s cubic-bezier(0.66, 0, 0.34, 1);
}

.foot-top a:hover > span { transform: translateY(-100%); }

.foot-top a > span:last-child {
    position: absolute;
    top: 100%;
    left: 0;
}

.foot-btm {
    position: absolute;
    bottom: 2.25rem;
    left: 1.25rem;
}

.foot-btm p {
    color: #F8F8F8;
    font-size: 0.8125rem;
    font-weight: 400;
}

.foot-name {
    position: absolute;
    bottom: 0.6875rem;
    right: 1.25rem;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
}

.foot-name a {
    color: #F8F8F8;
    text-decoration: none;
    font-size: 17.5rem;
    font-weight: 600;
    letter-spacing: -0.75rem;
    display: block;
    position: relative;
    line-height: 0.9;
}

.foot-name a > span {
    display: block;
    transition: transform .325s cubic-bezier(0.66, 0, 0.34, 1);
}

.foot-name a:hover > span { transform: translateY(-100%); }

.foot-name a > span:last-child {
    position: absolute;
    top: 100%;
    left: 0;
}

/* ================================
   PAGE LOAD SEQUENCE (panels)
   ================================ */

.page-fade-sequence__container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: auto;
}

.page-fade-sequence__text-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    text-transform: uppercase;
    font-family: "Instrument Serif", sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    color: #F8F8F8;
    letter-spacing: 0.2475rem;
    padding: 0 1.5rem;
    pointer-events: none;
}

.page-fade-sequence__text-wrapper h2 {
    margin: 0;
    line-height: 1;
    overflow: hidden;
}

.page-fade-sequence__text-wrapper span {
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    font-style: italic;
}

.page-fade-sequence__item {
    position: absolute;
    top: 0;
    height: 100vh;
    width: 20vw;
    background: #131313;
    transform-origin: left;
    will-change: transform;
}

.page-fade-sequence__item:nth-child(2) { left: 0;    }
.page-fade-sequence__item:nth-child(3) { left: 20vw; }
.page-fade-sequence__item:nth-child(4) { left: 40vw; }
.page-fade-sequence__item:nth-child(5) { left: 60vw; }
.page-fade-sequence__item:nth-child(6) { left: 80vw; }

/* ================================
   ABOUT — PRETEXT FLOW CONTAINER
   ================================ */

.abt-flow-container {
    position: relative;
    width: 25rem;
    font-size: 1.15rem;
    line-height: 1.32;
    color: #2A2A2A;
}

body.dark .abt-flow-container {
    color: #D4D4D4;
}

.abt-flow-line {
    position: absolute;
    display: block;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

/* ================================
   WORK HEADER MASK REVEAL
   ================================ */

.work-header-mask {
  padding: 2rem 0 2rem;
}

.work-header-mask .abt-head,
.work-header-mask .abt-headbtm {
  overflow: hidden;
}

.work-header-mask .abt-head span,
.work-header-mask .abt-headbtm span {
  display: block;
  transform: translateY(110%);
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-header-mask .abt-head.revealed span,
.work-header-mask .abt-headbtm.revealed span {
  transform: translateY(0%);
}

.work-header-mask .abt-headbtm.revealed span {
  transition-delay: 0.15s;
}

.work-sub {
  margin-top: 0.5rem;
  color: #7b7b7b;
  font-size: 1.2rem;
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.8s ease, transform 0.8s ease;
  transition-delay: 0.3s;
}

.work-sub.revealed {
  opacity: 1;
  transform: translateY(0);
}

body.dark .work-sub {
  color: #B0B0B0;
}

/* ================================
   LARAVEL PROJECT CARD LINK
   ================================ */

.project-card-link {
    display: block;
    text-decoration: none;
    margin: 1.25rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card-link:hover {
    transform: translateY(-0.25rem);
}

.project-card-link:hover .project-card {
    box-shadow: 0 0.5rem 1.875rem rgba(0, 0, 0, 0.15);
}

.project-card-link .project-card {
    margin: 0;
    transition: box-shadow 0.3s ease;
}

body.dark .project-card-link:hover .project-card {
    box-shadow: 0 0.5rem 1.875rem rgba(255, 255, 255, 0.1);
}


/* ================================
   RESPONSIVE STYLES
   ================================ */

/* Large Desktop (1441px and up) */
@media screen and (min-width: 1441px) {
    .laravel-header,
    .laravel .project-card-link {
        max-width: 75rem;
        margin-inline: auto;
    }

    .touch h1 {
        font-size: clamp(15rem, 12vw, 18rem);
    }

    .foot-name a {
        font-size: clamp(17.5rem, 14vw, 21rem);
    }

    .work-inner {
        max-width: 87.5rem;
    }

    .work-layout {
        gap: 0 10rem;
    }
}

/* Laptop (1025px - 1440px) */
@media screen and (min-width: 1025px) and (max-width: 1440px) {
    .abt-body {
        gap: 3rem;
    }

    .me-wrapper,
    .me {
        width: 8rem;
        height: 9rem;
    }

    .abt-body .abt-text:last-child {
        max-width: 16rem;
    }

    .touch h1 {
        font-size: clamp(6rem, 11vw, 15rem);
    }

    .project-title {
        font-size: clamp(3rem, 5.5vw, 6rem);
    }
}

/* Tablet (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .work-layout {
        grid-template-columns: 12.5rem minmax(0, 1fr) 5rem;
        gap: 0 1.875rem;
        margin-top: 3rem;
    }
    
    .stack-inner {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 8 / 5;
    }

    .navbarLight {
        padding: 1rem;
    }
    
    .scrollWrapper {
        display: none;
    }
    
    .divider {
        display: none;
    }
    
    .hero {
        min-height: 90vh;
        padding: 10rem 1.2rem 2rem 1.2rem;
    }
    
    .heroTop h1 {
        font-size: 1.8rem;
    }
    
    .heroName {
        font-size: clamp(4rem, 14vw, 12rem);
        letter-spacing: -0.5rem;
    }
    
    .imgCircle {
        width: 6rem;
        height: 6rem;
    }
    
    .about {
        min-height: auto;
        padding: 1.2rem;
    }
    
    .abt-head,
    .abt-headbtm {
        font-size: clamp(3rem, 7vw, 5rem);
    }
    
    .small-head {
        font-size: clamp(1.2rem, 2.5vw, 2.5rem);
    }
    
    .abt-body {
        margin-top: 3rem;
        gap: 3rem;
        flex-wrap: wrap;
    }
    
    .abt-text {
        max-width: 100%;
        flex: 1 1 18.75rem;
    }
    
    .me-wrapper {
        width: 7rem;
        height: 8rem;
    }
    
    .me {
        width: 7rem;
        height: 8rem;
    }
    
    .abt-flow-container {
        width: 100%;
        font-size: 1rem;
    }
    
    .connect {
        font-size: 1.6rem;
    }
    
    .work-spacer {
        height: 400vh;
    }
    
    .work-sticky {
        align-items: center;
    }
    
    .work-inner {
        width: 100%;
        max-width: 100%;
        padding-inline: 1.25rem;
    }
    
    .work-header {
        padding: 4rem 0 2rem;
    }
    
    .work-header-mask .abt-head span {
        font-size: clamp(3rem, 7vw, 6rem);
    }
    
    .work-sub {
        font-size: 1rem;
    }
    
    .work-layout {
        grid-template-columns: 12.5rem 1fr 5rem;
        gap: 0 1.875rem;
        margin-top: 3rem;
    }
    
    .project {
        margin-bottom: 0.875rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .project span {
        font-size: 0.9rem;
    }
    
    .project a {
        font-size: 0.75rem;
    }
    
    .stack-inner {
        width: 100%;
        max-width: 100%;
        height: 20rem;
    }
    
    .stack-card {
        top: -3.75rem;
        left: -0.3125rem;
    }
    
    .card-info {
        padding: 1.2rem;
    }
    
    .card-info h3 {
        font-size: 1.2rem;
    }
    
    .thumbs {
        gap: 0.625rem;
        justify-content: flex-start;
    }
    
    .thumb {
        width: 3.5rem;
        height: 3.5rem;
        left: 0;
        top: 0;
        position: relative;
    }
    
    .laravel {
        padding-top: 3.75rem;
    }
    
    .laravel-header {
        height: 6.25rem;
        margin: 0 1rem;
    }
    
    .project-title {
        font-size: 3.5rem;
    }
    
    .github-btn {
        bottom: 0.5rem;
        padding: 0.625rem 0.75rem;
        width: auto;
    }
    
    .project-card {
        min-height: 21.875rem;
        margin: 1rem;
    }
    
    .touch {
        min-height: 25rem;
        gap: 1.2rem;
        padding: 2rem 1.5rem 0 1.5rem;
    }
    
    .touch h1 {
        font-size: clamp(6rem, 12vw, 10rem);
        letter-spacing: -0.3rem;
    }
    
    .footer {
        height: 20rem;
        padding: 1rem 1rem 0 1rem;
    }
    
    .foot-top {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .foot-name a {
        font-size: 11.25rem;
        letter-spacing: -0.5rem;
    }
    
    .foot-btm {
        bottom: 1.75rem;
    }
}
/* Mobile (320px - 767px) */
@media screen and (max-width: 767px) {
    
    /* Override panel behavior on mobile */
    .panel {
        position: relative;
        height: auto;
        min-height: auto;
        overflow: visible;
    }
    
    /* NAVBAR */
    .navbarLight {
        padding: 0.8rem;
        align-items: center;
    }
    
    .logo img {
        width: 1.6rem;
        height: 1.6rem;
    }
    
    .menuBtn {
        height: 2rem;
        padding: 0.3rem 0.5rem;
        gap: 0.5rem;
    }
    
    .menuText {
        font-size: 0.75rem;
    }
    
    .scrollWrapper {
        display: none;
    }
    
    .divider {
        display: none;
    }
    
    .contactBtn {
        width: 5rem;
        height: 2rem;
        font-size: 0.7rem;
    }
    
    .dropdownMenu {
        width: 11rem;
        padding: 3.5rem 1.2rem 1.2rem 1.2rem;
        border-radius: 1.5rem;
    }
    
    .dropdownMenu a {
        font-size: 1rem;
    }
    
    /* HERO - Normal scrolling */
    .hero {
        min-height: 80vh;
        padding: 8rem 1rem 1.5rem 1rem;
        margin-bottom: 0;
        position: relative;
        height: auto;
    }
    
    .heroTop h1 {
        font-size: 1.4rem;
    }
    
    .heroTop p {
        font-size: 0.85rem;
    }
    
    .heroBottom {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .heroName {
        font-size: clamp(3rem, 16vw, 8rem);
        letter-spacing: -0.3rem;
    }
    
    .imgCircle {
        width: 5rem;
        height: 5rem;
        margin-bottom: 0;
        align-self: flex-end;
    }
    
    /* ABOUT - Normal scrolling */
    .about {
        min-height: auto;
        padding: 1rem;
        margin-bottom: 0;
        position: relative;
        height: auto;
    }
    
    .abt-head,
    .abt-headbtm {
        font-size: clamp(2.5rem, 8vw, 4rem);
        letter-spacing: -0.125rem;
    }
    
    .small-head {
        font-size: clamp(1rem, 3vw, 1.8rem);
    }
    
    .abt-body {
        margin-top: 2.5rem;
        gap: 2rem;
        flex-direction: column;
    }
    
    .abt-text {
        max-width: 100%;
    }
    
    /* Hide the Email section on mobile */
    .abt-body .abt-text:last-child {
        display: none;
    }
    
    .abt-label {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    /* Hide the draggable image and its spacer */
    .me-wrapper {
        display: none;
    }
    
    .me {
        display: none;
    }
    
    .abt-flow-container {
        width: 100%;
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .connect {
        font-size: 1.4rem;
        margin-top: 0.25rem;
    }
    
    .email-link {
        font-size: 0.9rem;
    }
    
    /* WORK SECTION - Normal scrolling */
    .work-section {
        position: relative;
        z-index: 3;
        background: #f8f8f8;
        padding-bottom: 2rem;
    }

    body.dark .work-section { 
        background: #171717; 
    }

    .work-spacer {
        height: auto;
        position: relative;
    }

    .work-sticky {
        position: relative;
        height: auto;
        top: auto;
        overflow: visible;
        display: block;
        padding: 2rem 0;
    }

    .work-inner {
        width: 100%;
        max-width: 100%;
        padding-inline: 1rem;
    }

    .work-header {
        padding: 2rem 0 1rem;
    }

    .work-header-mask .abt-head span {
        font-size: clamp(2rem, 6vw, 3rem);
        transform: translateY(0%);
    }

    .work-header-mask .abt-head.revealed span,
    .work-header-mask .abt-headbtm.revealed span {
        transform: translateY(0%);
    }

    .work-sub {
        font-size: 0.85rem;
        margin-top: 0.25rem;
        opacity: 1;
        transform: translateY(0);
    }

    .work-sub.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .work-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    /* Project list - horizontal scrollable pills */
    .project-list {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
        margin-bottom: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.5rem;
    }

    .project-list::-webkit-scrollbar {
        display: none;
    }

    .project {
        margin-bottom: 0;
        padding: 0.375rem 0.875rem;
        background: rgba(0,0,0,0.05);
        border-radius: 1.25rem;
        opacity: 0.5;
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    .project.active {
        opacity: 1;
        background: rgba(0,0,0,0.1);
    }

    body.dark .project {
        background: rgba(255,255,255,0.08);
    }

    body.dark .project.active {
        background: rgba(255,255,255,0.15);
    }

    .project span {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .project a {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    /* Stack container */
    .stack-container {
        width: 100%;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        perspective: 150rem;
        transform-style: preserve-3d;
    }

    .stack-inner {
        position: relative;
        width: 100%;
        max-width: 100%;
        aspect-ratio: 8 / 5;
        height: auto;
        margin: 0 auto;
        overflow: hidden;
    }

    .stack-card {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        transform: translateZ(0);
        transition: opacity 0.4s ease, transform 0.4s ease;
        border: 0.041875rem solid #cdcbcb;
        will-change: transform, opacity;
    }

    .stack-card:nth-child(1) { z-index: 4; }
    .stack-card:nth-child(2) { z-index: 3; }
    .stack-card:nth-child(3) { z-index: 2; }
    .stack-card:nth-child(4) { z-index: 1; }

    .stack-card:nth-child(1) {
        opacity: 1;
    }

    .stack-card:nth-child(2),
    .stack-card:nth-child(3),
    .stack-card:nth-child(4) {
        opacity: 0;
        transform: translateY(100%);
    }

    .stack-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        min-width: 0;
    }

    .card-info {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        color: white;
        z-index: 2;
    }

    .card-info h3 {
        font-family: 'Instrument Serif', serif;
        font-size: 1rem;
        font-weight: 400;
        line-height: 1.1;
    }

    .card-info span {
        font-size: 0.65rem;
        letter-spacing: .12em;
        opacity: .7;
    }

    /* HIDE THUMBNAILS ON MOBILE */
    .thumbs {
        display: none;
    }
    
    /* LARAVEL */
    .laravel {
        padding-top: 2.5rem;
        padding-bottom: 2rem;
        position: relative;
        z-index: 4;
    }
    
    .laravel-header {
        height: auto;
        margin: 0 0.75rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        position: static;
    }
    
    .project-title {
        font-size: 2.5rem;
        position: static;
    }
    
    .github-btn {
        position: static;
        align-self: flex-start;
        width: auto;
        padding: 0.5rem 1rem;
    }
    
    .github-btn h1 {
        font-size: 0.7rem;
    }
    
    .project-card {
        min-height: 15.625rem;
        margin: 0.75rem;
    }
    
    .project-card p {
        font-size: 0.9rem;
        padding: 1rem;
    }
    
    /* CONTACT */
    .touch {
        min-height: 20rem;
        height: auto;
        gap: 1rem;
        padding: 2rem 1rem;
    }
    
    .touch p {
        font-size: 0.85rem;
    }
    
    .touch a {
        width: 7rem;
        height: 2.2rem;
        font-size: 0.85rem;
    }
    
    .touch h1 {
        font-size: clamp(3.5rem, 14vw, 6rem);
        letter-spacing: -0.2rem;
    }
    
    /* FOOTER */
    .footer {
        height: auto;
        min-height: 15.625rem;
        padding: 1rem 0.75rem 0.75rem 0.75rem;
        position: relative;
        z-index: 5;
    }
    
    .foot-top {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .foot-top p,
    .foot-top a {
        font-size: 0.6875rem;
    }
    
    .foot-top .logo {
        margin-left: 0;
        order: -1;
    }
    
    .foot-top .logo img {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .foot-name a {
        font-size: 6.25rem;
        letter-spacing: -0.25rem;
    }
    
    .foot-btm {
        bottom: 1.25rem;
        left: 0.75rem;
    }
    
    .foot-btm p {
        font-size: 0.6875rem;
    }
    
    .foot-name {
        bottom: 0.5rem;
        right: 0.75rem;
    }
    
    /* LOADER */
    .page-fade-sequence__text-wrapper {
        font-size: 0.9rem;
        gap: 0.3rem;
    }
    
    .page-fade-sequence__item {
        width: 25vw;
    }
    
    .page-fade-sequence__item:nth-child(3) { left: 25vw; }
    .page-fade-sequence__item:nth-child(4) { left: 50vw; }
    .page-fade-sequence__item:nth-child(5) { left: 75vw; }
    .page-fade-sequence__item:nth-child(6) { display: none; }
}


