/* GENERAL PAGE STYLES */

body {
    font-family: "Hanken Grotesk", sans-serif;
}

.page {
    max-width: 1104px;
    margin: 0 auto;
}

button {
    cursor: pointer;
}

/* GRID */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 258px);
    grid-auto-rows: 258px;
    gap: 24px;
    justify-content: center;
    margin-bottom: 24px;
    /* keeps the grid centered inside .page */
}


/* Planning Poker (top right, wide) */
#projects.is-wide {
    grid-column: 3 / span 2;
    grid-row: 1 / span 1;
}

/* Nicto: 1 column, 2 rows */
.is-tall {
    grid-column: 3 / span 1;
    grid-row: 2 / span 2;
}

/* Simple Task Manager (bottom left, wide) */
.task-manager {
    grid-column: 1 / span 2;
    grid-row: 3 / span 1;
}

/* Email + Let's Talk stacked in column 4 */
.email-illustration {
    grid-column: 4 / span 1;
    grid-row: 2 / span 1;
}

.contact {
    grid-column: 4 / span 1;
    grid-row: 3 / span 1;
}


/* TOP NAVIGATION BAR */

.topbar {
    display: flex;
    justify-content: center;
    /* centers content horizontally */
    align-items: center;
    padding: 24px 0;
    gap: 16px;
}

/* PROJECTS & EMAIL PILL */

/* Stack both icons on top of each other */
.projects-chip {
    position: relative;
}

.projects-closed,
.projects-opened {
    width: 24px;
    height: 24px;
    transition: opacity 300ms ease, transform 300ms ease;
}

.projects-opened {
    position: absolute;
    left: 16px;
    /* matches pill padding-left */
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    opacity: 0;
}

/* Swap on hover */
.projects-chip:hover .projects-closed {
    opacity: 0;
    transform: scale(0.85);
}

.projects-chip:hover .projects-opened {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.projects-chip:hover {
    color: #202A40;

}

.projects-chip:active,
.projects-chip:focus-visible {
    background-color: #F5F5F5;
}


/* =========================
   PROJECTS DROPDOWN
   ========================= */

.projects-chip-wrap {
    position: relative;
    display: inline-block;
}

/* Dropdown panel */
.projects-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;

    background: #fff;
    border: 2px solid rgba(210, 210, 210, 0.50);
    border-radius: 20px;
    padding: 8px;

    display: flex;
    flex-direction: column;
    gap: 2px;

    /* Hidden by default */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 250ms ease, transform 250ms cubic-bezier(.22, 1, .36, 1);

    z-index: 100;
}

/* Open state */
.projects-chip-wrap.is-open .projects-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Dropdown items — base */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid transparent;

    color: #202A40;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;

    white-space: nowrap;

    position: relative; /* already have this if using absolute, otherwise add */

    transition: background-color 180ms ease, color 180ms ease,
        border-color 180ms ease;
}

.dropdown-icon {
    width: 24px;
    height: 24px;
    transition: opacity 180ms ease;
    flex-shrink: 0;
    /* transition: filter 180ms ease; */
}

/* Planning Poker — purple hover */
.dropdown-item.is-pp:hover {
    background: #EBE7FD;
    color: #6755D4;
    border-color: #6755D4;
}

/* Task Manager — blue hover */
.dropdown-item.is-task:hover {
    background: #EBF2FA;
    color: #266FBE;
    border-color: #266FBE;
}

/* NICTO — grey hover */
.dropdown-item.is-nicto:hover {
    background: #F5F5F5;
    color: #202A40;
    border-color: #C0C0C0;
}

.dropdown-icon.hover-icon {
    position: absolute;
    left: 14px; /* matches your item padding-left */
    opacity: 0;
}

/* On hover: hide default, show colored */
.dropdown-item:hover .default-icon {
    opacity: 0;
}

.dropdown-item:hover .hover-icon {
    opacity: 1;
}


/* EMAIL CHIP TOP */


.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 12px 20px 12px 16px;

    border-radius: 51px;
    border: 2px solid rgba(210, 210, 210, 0.50);

    color: #ADACA9;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
}

.email-chip img {
    cursor: pointer;
}

.email-chip {
    background: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    /* reset button defaults */
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 500;
    /* smooth border on hover */
    transition: border-color 200ms ease, color 200ms ease, background-color 200ms ease;
}

.email-chip:hover {
    border-color: rgba(210, 210, 210, 1);
    color: #202A40;
}

.email-chip:active {
    background-color: #F5F5F5;
}


/* Label swap — both labels sit in the same grid cell */
.email-chip .email-label {
    grid-area: 1 / 1;
    transition: opacity 200ms ease, transform 200ms ease;
    white-space: nowrap;
}

.email-chip .email-label.default {
    opacity: 1;
    transform: translateY(0);
}

.email-chip .email-label.copied {
    position: absolute;
    left: 16px; /* matches pill padding */
    opacity: 0;
    transform: translateY(6px);
}

/* Copied state */
.email-chip.is-copied .email-label.default {
    opacity: 0;
    transform: translateY(-6px);
}

.email-chip.is-copied .email-label.copied {
    opacity: 1;
    transform: translateY(0);
}

/* Icon wrapper */
.email-icon-wrap {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Hide the actual img tags, but keep the HTML as-is */
.email-icon-wrap .copy-icon {
    display: none;
}

/* Shared masked icon styles */
.email-icon-wrap::before,
.email-icon-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 24px;
    height: 24px;

    background-color: currentColor;

    transition:
        opacity 200ms ease,
        transform 250ms cubic-bezier(.22, 1, .36, 1);
}

/* Copy icon */
.email-icon-wrap::before {
    -webkit-mask: url("assets/copy-mail.svg") center / contain no-repeat;
    mask: url("assets/copy-mail.svg") center / contain no-repeat;

    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Smiley/check icon */
.email-icon-wrap::after {
    -webkit-mask: url("assets/smiley-mail.svg") center / contain no-repeat;
    mask: url("assets/smiley-mail.svg") center / contain no-repeat;

    opacity: 0;
    transform: scale(0.7) rotate(12deg);
}

/* Hover: icon follows the text color because it uses currentColor */
.email-chip:hover .email-icon-wrap::before {
    transform: scale(1.15) rotate(-8deg);
}

/* Copied state */
.email-chip.is-copied .email-icon-wrap::before {
    opacity: 0;
    transform: scale(0.7) rotate(12deg);
}

.email-chip.is-copied .email-icon-wrap::after {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}


/* ALL CARD STYLES */
/* sizes are now controlled by spans, not fixed widths/heights */
.card {
    border-radius: 24px;
    padding: 24px;
    border: 2px solid #EDEDED;
    background: white;
}

.arrow-btn {
    position: absolute;
    left: 24px;
    bottom: 24px;
    border-radius: 100px;
    border: 3px solid #CCC;
    background: #FFF;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    cursor: pointer;
    text-decoration: none;
}

.arrow-btn i {
    font-size: 24px;
    color: #808080;
}

/* Hover (mouse) */
.arrow-btn:hover {
    box-shadow: 0 4px 8px 0 rgba(48, 48, 48, 0.10);
    border: 3px solid white;
    transform: translateY(-2px);
}

.arrow-btn:hover i {
    color: #202A40;
}

/* Focus (keyboard only) */
.arrow-btn:focus-visible {
    box-shadow: 0 4px 8px rgba(48, 48, 48, 0.10);
    border: 3px solid white;
    transform: translateY(-2px);
    outline: none;
    /* remove default browser outline */
}

/* Click feedback */
.arrow-btn:active {
    transform: translateY(0) scale(0.97);
}

.arrow-btn {
    transition: transform 250ms cubic-bezier(.22, 1, .36, 1),
        background-color 250ms ease,
        border-color 250ms ease,
        box-shadow 250ms ease;
    will-change: transform;
}

.arrow-btn i {
    transition: transform 250ms cubic-bezier(.22, 1, .36, 1),
        color 250ms ease,
        opacity 250ms ease;
}

.arrow-btn {
    transition: transform 250ms cubic-bezier(.22, 1, .36, 1),
        box-shadow 250ms ease,
        border-color 250ms ease;
}


.card-header h2 {
    color: #BDBDBD;
    font-size: 32px;
    font-style: normal;
    font-weight: 900;
    line-height: 35px;
    /* 109.375% */
    letter-spacing: 0.96px;
    margin: 0;
}

/* BIO CARD - DESCRIPTION */
.bio-card {
    grid-column: 1 / span 2;
    grid-row: 1 / span 2;
}

p {
    color: rgba(37, 36, 41, 0.80);
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.bio-title {
    color: #202A40;
    font-family: "Hanken Grotesk";
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin-top: 0;
}

.role {
    color: #878A90;
    font-weight: 500;
}


/* PROJECTS */

.project-card {
    position: relative;
}


/* =========================
   PLANNING POKER (final layout)
   ========================= */

.pp-project {
    position: relative;
    overflow: hidden;
    background: #fff;
}

/* full card canvas */
.pp-contents {
    width: 100%;
    height: 100%;
    position: relative;
}

/* RESTING state: title + button as a centered group */
.pp-stack {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* centers the group vertically */
    gap: 16px;
    /* space between title and button */
}

/* Title: 1 line */
.pp-project .card-header h2 {
    white-space: nowrap;
    /* prevents wrapping into 2 lines */
}

/* Stage holds button + avatars (avatars overlay) */
.pp-stage {
    position: relative;
    display: grid;
    place-items: center;
}

/* Reveal button styling */
.reveal-btn {
    background-color: #BDBDBD;
    color: #fff;

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

    padding: 8px 28px;
    border: none;
    border-radius: 100px;

    text-transform: uppercase;
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0.48px;

    white-space: nowrap;
    cursor: pointer;

    transform-origin: center;
    will-change: transform;
}

/* Avatars overlay (do NOT affect layout) */
.pp-avatars {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateY(-24px);

    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;

    pointer-events: none;
}

/* 80x80 avatar circles */
.pp-avatar {
    width: 80px;
    height: 80px;

    border-radius: 50%;
    border: 4px solid #9381FF;

    display: grid;
    place-items: center;

    font-size: 32px;
    font-weight: 700;
    color: #202A40;

    background: transparent;
}

/* 3D flip support */
.pp-avatar {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform, filter;
}

.pp-project {
    perspective: 1000px;
    /* gives depth to the flip */
}

/* Confetti canvas overlay */
.pp-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    /* above avatars/button */
}


/* =========================
   SIMPLE TASK MANAGER (scroll version)
   ========================= */
.task-manager {
    position: relative;
    overflow: hidden;
}

.task-manager .card-header {
    position: relative;
    z-index: 2;
    max-width: 55%;
}

/* mask clips the scrolling column to the right half of the card */
.tm-scroll-mask {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 55%;
    overflow: hidden;
    z-index: 1;
    /* fade out top and bottom edges for a soft clip */
    -webkit-mask-image: linear-gradient(to bottom,
            transparent 0%,
            black 18%,
            black 82%,
            transparent 100%);
    mask-image: linear-gradient(to bottom,
            transparent 0%,
            black 18%,
            black 82%,
            transparent 100%);
}

/* vertical column of cards */
.tm-scroll-track {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 0;
    will-change: transform;
}

/* each individual task card image */
.tm-card-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    flex-shrink: 0;

    /* grayscale at rest */
    filter: grayscale(100%);
    transition: filter 0.4s ease;
    will-change: filter;
}

/* colorize on card hover */
.task-manager:hover .tm-card-img {
    filter: brightness(100%) saturate(100%);
}


/* =========================
   NICTO PROJECT CARD (GSAP-driven)
   ========================= */

.nicto-project {
    position: relative;
    overflow: hidden;
    border: none;
}

/* stacked images */
.nicto-project .nicto-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    will-change: opacity, transform, filter;
}

.nicto-project .nicto-gray {
    filter: grayscale(100%);
    opacity: 1;
}

.nicto-project .nicto-color {
    opacity: 0;
}

/* header sits above images */
.nicto-header {
    position: absolute;
    left: 24px;
    top: 24px;
    z-index: 2;

    display: inline-block;
    width: max-content;
    pointer-events: none;
}

/* title (32px default) */
.nicto-title {
    margin: 0;
    color: #BDBDBD;
    font-size: 32px;
    line-height: 35px;
    font-weight: 900;
    letter-spacing: 0.96px;
    transform-origin: top left;
    will-change: transform, opacity, font-size, line-height, color;
}

/* subtitle (hidden by default, GSAP reveals) */
.nicto-subtitle {
    margin: -10px 0 0;
    color: #202A40;
    font-size: 28px;
    line-height: 31px;
    font-weight: 900;
    letter-spacing: 0.96px;
    will-change: transform, opacity;
}

/* .nicto-subtitle {
    margin: 12px 0 0;
    color: #BDBDBD;
    font-size: 24px;
    line-height: 27px;
    font-weight: 900;
    letter-spacing: 0.96px;
} */

/* keep arrow button above everything */
.nicto-project .arrow-btn {
    z-index: 3;
}


/* NICTO coming soon button — layout only, GSAP handles animation */
.nicto-project .locked-btn {
    width: 54px;
    height: 54px;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 100px;
    border: 3px solid #CCC;
    background: #FFF;
    color: #808080;
    cursor: default;
    pointer-events: auto;
    will-change: width, box-shadow;
}

.nicto-project .locked-btn-inner {
    position: relative;
    width: 184px;
    height: 100%;
    white-space: nowrap;
}

.nicto-project .locked-btn i {
    position: absolute;
    top: 50%;
    left: 24px;

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

    width: 24px;
    height: 24px;

    font-size: 24px;
    line-height: 1;
    color: currentColor;

    transform: translate(-50%, -50%);
    will-change: color;
}

.nicto-project .locked-btn-text {
    position: absolute;
    left: 56px;
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    opacity: 0;
    /* color: #202A40; */
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    will-change: transform, opacity;
}

/* Prevent locked NICTO button from inheriting arrow button hover movement */
.nicto-project .locked-btn:hover,
.nicto-project .locked-btn:focus-visible,
.nicto-project .locked-btn:active {
    transform: none;
}

/* Keep the border visible during hover */
.nicto-project .locked-btn:hover,
.nicto-project .locked-btn:focus-visible {
    border-color: #CCC;
}

/* =========================
   EMAIL CARD
   ========================= */

.email-illustration {
    position: relative;
    overflow: hidden;
}

/* --- Illustration --- */
.email-illustration .mail-wrap {
    position: absolute;
    left: 50%;
    top: 50%;

    width: 75%;
    height: 65%;

    transform: translate(-50%, -50%);
    transition: transform 350ms cubic-bezier(.22, 1, .36, 1);
}

.email-illustration .mail-img {
    width: 100%;
    height: 100%;
    object-fit: contain;

    /* Default state */
    filter: grayscale(100%);
    opacity: 0.9;

    transition: filter 300ms ease, opacity 300ms ease;
}

/* Hover: color + move up + slightly smaller */
.email-illustration:hover .mail-img {
    filter: grayscale(0%);
    opacity: 1;
}

.email-illustration:hover .mail-wrap {
    transform: translate(-50%, calc(-52% - 20px)) scale(0.88);
}

/* --- Button --- */
.copy-mail-btn {
    position: absolute;
    left: 50%;
    bottom: 24px;

    transform: translate(-50%, 12px) scale(0.96);
    opacity: 0;
    pointer-events: none;

    white-space: nowrap;

    background: #F6A654;
    color: #fff;

    padding: 8px 28px;
    border: none;
    border-radius: 100px;

    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.48px;
    text-transform: uppercase;

    display: grid;
    place-items: center;
    overflow: hidden;

    transition: opacity 200ms ease, transform 250ms cubic-bezier(.22, 1, .36, 1);
}

/* Reveal button AFTER image changes */
.email-illustration:hover .copy-mail-btn {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
    pointer-events: auto;
    transition-delay: 250ms;
}

/* --- Smooth label swap --- */
.copy-mail-btn .label {
    grid-area: 1 / 1;
    transition: opacity 200ms ease, transform 200ms ease;
}

.copy-mail-btn .default {
    opacity: 1;
    transform: scale(1);
}

.copy-mail-btn .copied {
    opacity: 0;
    transform: scale(0.95);
}

.copy-mail-btn.is-copied .default {
    opacity: 0;
    transform: scale(0.95);
}

.copy-mail-btn.is-copied .copied {
    opacity: 1;
    transform: scale(1);
}

.copy-mail-btn:hover {
    cursor: pointer;
}

.copy-mail-btn.is-copied {
    animation: pop 400ms cubic-bezier(.22, 1, .36, 1);
}

@keyframes pop {
    0% {
        transform: translate(-50%, 0) scale(1);
    }

    50% {
        transform: translate(-50%, 0) scale(1.08);
    }

    100% {
        transform: translate(-50%, 0) scale(1);
    }
}


/* MADE WITH LOVE CARD */

/* MADE WITH LOVE CARD (base only; GSAP handles animation) */
.contact {
    position: relative;
    overflow: hidden;
    /* keeps corners clean */
}

/* center the stack */
.contact-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* image stage */
.cutie-wrap {
    position: relative;
    width: 80%;
    aspect-ratio: 1 / 1;
}

/* stack the two images */
.cutie-wrap .card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* keep text styled, but let GSAP control visibility/movement */
.made-with-love {
    margin: 0;
    color: #202A40;
    font-family: "Caveat Brush", cursive;
    font-size: 24px;
    line-height: 35px;
    letter-spacing: 0.6px;
}

.contact-inner {
    position: relative;
    /* allows absolutely positioned text */
}

.made-with-love {
    position: absolute;
    left: 50%;
    top: calc(50% + 88px);
    /* base “rest” position; GSAP will override on hover */
    transform: translateX(-50%);
    width: max-content;
}



/* 1199px → 580px  */
@media (max-width: 1199px) {
    .grid {
        grid-template-columns: repeat(2, 258px);
        /* 2 cols */
        grid-auto-rows: 258px;
        justify-content: center;
    }

    /* Row map:
     bio: rows 1-2 (wide)
     planning: row 3 (wide)
     task: row 4 (wide)
     nicto: col 1, rows 5-6 (tall)
     email: col 2, row 5
     contact: col 2, row 6
  */

    .bio-card {
        grid-column: 1 / span 2;
        grid-row: 1 / span 2;
    }

    #projects.is-wide {
        grid-column: 1 / span 2;
        grid-row: 3 / span 1;
    }

    .task-manager {
        grid-column: 1 / span 2;
        grid-row: 4 / span 1;
    }

    .nicto-project.is-tall {
        grid-column: 1 / span 1;
        grid-row: 5 / span 2;
    }

    .email-illustration {
        grid-column: 2 / span 1;
        grid-row: 5 / span 1;
    }

    .contact {
        grid-column: 2 / span 1;
        grid-row: 6 / span 1;
    }

    .topbar {
        max-width: 540px;
        margin: 0 auto;
        justify-content: space-between;
    }
}