@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Jersey+25&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    background-color: #121212;
    color: white;
    overflow-x: hidden;
}

.animation-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.foreground-pre {
    position: relative;
    z-index: 10;
    background: none;
}

.foreground-text {
    color: white;
    background-color: #121212;
    font-family: monospace;
    text-align: center;
    justify-content: center;
    margin: 0;
    position: relative;
    z-index: 11;
}

.matrix-layer {
    position: absolute;
    z-index: 1;
    color: #00FF00;
    font-family: monospace;
    font-size: 10px;
    line-height: 0.9;
    pointer-events: none;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.title-header {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    color: #f0eafa;
    margin-top: 30px;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #1e1e1e;
    border: 2px solid #2b2b2b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
    text-decoration: none;
}

.social-btn svg {
    width: 22px;
    height: 22px;
}

.social-btn:hover {
    background-color: #2a2a2a;
    border-color: #555;
}

/* Email button expand on hover */
.email-btn-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
}

.email-btn {
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.4s ease, background-color 0.3s ease, border-color 0.3s ease;
    width: 48px;
    height: 48px;
    padding: 0;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 24px;
    justify-content: flex-start;
    padding-left: 11px;
}

.email-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: white;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-width 0.4s ease, margin 0.4s ease;
    margin-left: 0;
    display: inline-block;
}

.email-copied {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #4eff4e;
    position: absolute;
    left: 45px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.email-copied.show {
    opacity: 1;
}

.email-btn:hover {
    width: 290px;
}

.email-btn:hover .email-text {
    opacity: 1;
    max-width: 240px;
    margin-left: 10px;
}

.email-btn:hover .email-icon {
    flex-shrink: 0;
}

.location-indicator {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    color: #a0a0a0;
    font-size: 14px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: -10px;
}

.location-indicator i {
    color: #f0eafa;
}

.terminal-line {
    border: 0;
    width: 80%;
    height: 1.5px;
    background: #2b2b2b8b;
    margin-top: 50px;
}

.companies-header {
    font-size: 45px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    color: #f0eafa;
    margin-top: 50px;
}

.companies {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 70px;
    align-items: center;
}

.companies img {
    height: 125px;
    width: auto;
    filter: brightness(0) invert(1);
    background-color: transparent;
    transition: filter 0.3s ease, transform 0.3s ease;
    transform: scale(0.9);
}

#cybrancee {
    height: 135px;
}

#clique {
    height: 110px;
}
    
.companies img:hover {
    filter: none;
    cursor: pointer;
    transform: scale(1);
}

.company-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    color: white;
    margin-top: 15px;
    margin-bottom: 5px;
}

.duration {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #888;
    margin: 0;
}

.divider {
    width: 4px;
    height: 80px;
    background: #2b2b2b8b;
}

.projects-header {
    font-size: 45px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    color: #f0eafa;
    margin-top: 50px;
}

.projects-key {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: #f0eafa;
}

.key-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.key-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.cybrancee-dot {
    background-color: #9500cc;
}

.clique-dot {
    background-color: #f11d75;
}

.personal-dot {
    background-color: #00cc66;
}

.projects-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    padding: 0 5%;
    flex-wrap: wrap;
}

.project-box {
    background-color: #1e1e1e;
    border: 1px solid #2b2b2b8b;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease;
}

.project-cybrancee {
    border: 2px solid #9500cc;
}

.project-clique {
    border: 2px solid #f11d75;
}

.project-personal {
    border: 2px solid #00cc66;
}

.project-box img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 20px;
}

.project-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    color: #f0eafa;
    margin-bottom: 10px;
}

.project-description {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #888;
    line-height: 1.5;
    margin-bottom: 15px;
}

.project-tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.project-tag {
    background-color: #2a2a2a;
    color: #f0eafa;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid #444;
}

.more-info-btn {
    margin-top: auto;
    padding: 10px 20px;
    background-color: #1e1e1e;
    color: white;
    border: 1px solid #444;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.more-info-btn:hover {
    background-color: #f0eafa;
    color: #121212;
    border-color: #f0eafa;
}

.receipt-header {
    font-size: 45px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    color: #f0eafa;
    margin-top: 50px;
}

/* ---- Receipt Section ---- */

.receipt-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 80px;
    margin-top: 50px;
    padding: 0 5%;
}

.receipt-wrapper {
    flex-shrink: 0;
    width: 320px;
}

.receipt-edge {
    width: 100%;
    height: 20px;
    background: linear-gradient(135deg, #121212 33.33%, transparent 33.33%) 0 0 / 14px 20px,
                linear-gradient(225deg, #121212 33.33%, transparent 33.33%) 0 0 / 14px 20px;
    background-color: #f5f0e1;
}

.receipt-edge-top {
    background-position: top;
}

.receipt-edge-bottom {
    transform: rotate(180deg);
}

.receipt {
    background-color: #f5f0e1;
    padding: 25px 30px;
    font-family: 'VT323', monospace;
    color: #333;
}

.receipt-store {
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #111;
}

.receipt-divider {
    text-align: center;
    color: #999;
    font-size: 16px;
    margin: 12px 0;
    letter-spacing: 2px;
}

.receipt-category {
    font-size: 20px;
    font-weight: bold;
    color: #555;
    margin: 15px 0 8px;
    letter-spacing: 1px;
}

.receipt-item {
    display: flex;
    align-items: baseline;
    font-size: 20px;
    padding: 4px 0;
    cursor: pointer;
    transition: background-color 0.15s ease;
    padding: 4px 6px;
    border-radius: 3px;
}

.receipt-item:hover {
    background-color: #e8e0c8;
}

.receipt-item-name {
    white-space: nowrap;
}

.receipt-item-dots {
    flex: 1;
    border-bottom: 2px dotted #aaa;
    margin: 0 6px;
    min-width: 20px;
    position: relative;
    top: -4px;
}

.receipt-item-check {
    white-space: nowrap;
    color: #2a9d2a;
    font-weight: bold;
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    font-size: 22px;
    font-weight: bold;
    color: #111;
    margin-top: 5px;
    padding: 0 6px;
}

.receipt-footer {
    text-align: center;
    font-size: 18px;
    color: #888;
    margin-top: 15px;
    letter-spacing: 1px;
}

.receipt-barcode {
    text-align: center;
    font-size: 32px;
    letter-spacing: .5px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    font-family: 'Jersey 25', sans-serif;
}

/* ---- Receipt Preview ---- */

.receipt-preview {
    flex: 1;
    max-width: 800px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e1e1e;
    border: 1px solid #2b2b2b8b;
    border-radius: 8px;
    padding: 40px;
}

.receipt-preview-placeholder {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    color: #555;
}

.receipt-preview-content {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    color: #f0eafa;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-radius: 8px;
}

.receipt-preview-content iframe {
    flex: 1;
    width: 100%;
    border: none;
    border-radius: 8px;
}

.receipt-preview-content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #f0eafa;
}

.receipt-preview-content p {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
}

.footer {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    color: #555;
    font-size: 14px;
    margin-top: 50px;
    padding-bottom: 20px;
}

/* ── Pixelated custom scrollbar ── */

/* Track */
::-webkit-scrollbar {
    width: 14px;
    background: #121212;
}

/* Thumb */
::-webkit-scrollbar-thumb {
    background: #ffffff;
    border: 2px solid #121212;
    image-rendering: pixelated;
}

::-webkit-scrollbar-thumb:hover {
    background: #cccccc;
}

/* Up / down buttons */
::-webkit-scrollbar-button {
    background: #121212;
    height: 14px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
}

/* ▲  up arrow – 3×3 pixel triangle, white on transparent */
::-webkit-scrollbar-button:vertical:decrement {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3' shape-rendering='crispEdges'%3E%3Crect x='1' y='0' width='1' height='1' fill='white'/%3E%3Crect x='0' y='1' width='1' height='1' fill='white'/%3E%3Crect x='1' y='1' width='1' height='1' fill='white'/%3E%3Crect x='2' y='1' width='1' height='1' fill='white'/%3E%3Crect x='0' y='2' width='1' height='1' fill='white'/%3E%3Crect x='1' y='2' width='1' height='1' fill='white'/%3E%3Crect x='2' y='2' width='1' height='1' fill='white'/%3E%3C/svg%3E");
    background-size: 6px 6px;
}

/* ▼  down arrow – 3×3 pixel triangle, white on transparent */
::-webkit-scrollbar-button:vertical:increment {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='1' height='1' fill='white'/%3E%3Crect x='1' y='0' width='1' height='1' fill='white'/%3E%3Crect x='2' y='0' width='1' height='1' fill='white'/%3E%3Crect x='0' y='1' width='1' height='1' fill='white'/%3E%3Crect x='1' y='1' width='1' height='1' fill='white'/%3E%3Crect x='2' y='1' width='1' height='1' fill='white'/%3E%3Crect x='1' y='2' width='1' height='1' fill='white'/%3E%3C/svg%3E");
    background-size: 6px 6px;
}

/* Corner (if horizontal bar also shows) */
::-webkit-scrollbar-corner {
    background: #121212;
}

/* Firefox scrollbar (basic, less customisable) */
* {
    scrollbar-width: thin;
    scrollbar-color: #ffffff #121212;
}

/* ═══════════════════════════════════════════
   Mobile / Tablet Responsive
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    /* ── ASCII Art Banner ── */
    .animation-wrapper {
        max-width: 100vw;
    }

    .foreground-pre {
        font-size: clamp(3px, 1.15vw, 13px);
        overflow: hidden;
    }

    .matrix-layer {
        font-size: clamp(2px, 0.9vw, 10px);
    }

    /* ── Title ── */
    .title-header {
        font-size: 20px;
        padding: 0 20px;
    }

    /* ── Social Buttons ── */
    .social-buttons {
        flex-wrap: wrap;
        padding: 0 20px;
    }

    .email-btn-wrapper {
        width: 48px;
        height: 48px;
    }

    .email-btn {
        width: 48px !important;
    }

    .email-btn .email-text {
        opacity: 0 !important;
        max-width: 0 !important;
        margin-left: 0 !important;
    }

    /* ── Section headers ── */
    .companies-header,
    .projects-header,
    .receipt-header {
        font-size: 28px;
        padding: 0 20px;
    }

    /* ── HR lines ── */
    .terminal-line {
        width: 90%;
        margin-top: 40px;
    }

    /* ── Companies ── */
    .companies {
        flex-direction: column;
        gap: 30px;
        margin-top: 40px;
    }

    .divider {
        width: 80px;
        height: 4px;
    }

    .role {
        font-size: 17px;
        text-align: center;
        padding: 0 10px;
    }

    .companies img:hover {
        filter: brightness(0) invert(1);
        transform: none;
        cursor: default;
    }

    /* ── Projects ── */
    .projects-key {
        flex-wrap: wrap;
        gap: 15px;
        font-size: 14px;
        padding: 0 20px;
    }

    .projects-container {
        flex-direction: column;
        align-items: center;
        padding: 0 20px;
        gap: 25px;
        margin-top: 35px;
    }

    .project-box {
        width: 100%;
        max-width: 450px;
    }

    /* ── Receipt Section ── */
    .receipt-section {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        padding: 0 20px;
        margin-top: 35px;
    }

    .receipt-wrapper {
        width: 100%;
        max-width: 320px;
    }

    .receipt-preview {
        display: none;
    }

    .receipt-preview-placeholder p {
        font-size: 15px;
    }

    /* On mobile, show tap hint instead of hover hint */
    .receipt-preview-placeholder p::before {
        content: "Tap an item to view";
        display: block;
    }

    .receipt-preview-placeholder p {
        font-size: 0;
    }

    .receipt-preview-placeholder p::before {
        font-size: 15px;
    }
}

@media (max-width: 480px) {

    /* ── ASCII Art – smaller phones ── */
    .foreground-pre {
        font-size: clamp(2px, 1.05vw, 13px);
    }

    .matrix-layer {
        font-size: clamp(1.5px, 0.8vw, 10px);
    }

    /* ── Title ── */
    .title-header {
        font-size: 16px;
        padding: 0 15px;
    }

    /* ── Section headers ── */
    .companies-header,
    .projects-header,
    .receipt-header {
        font-size: 22px;
        padding: 0 15px;
    }

    /* ── Companies ── */
    .companies img {
        height: 60px;
    }

    #cybrancee {
        height: 60px;
    }

    #clique {
        height: 50px;
    }

    .role {
        font-size: 15px;
    }

    .duration {
        font-size: 12px;
    }

    /* ── Projects ── */
    .projects-key {
        font-size: 13px;
        gap: 10px;
    }

    .projects-container {
        padding: 0 15px;
    }

    .project-title {
        font-size: 20px;
    }

    .project-description {
        font-size: 13px;
    }

    /* ── Receipt ── */
    .receipt-section {
        padding: 0 10px;
    }

    .receipt {
        padding: 20px 18px;
    }

    .receipt-preview {
        display: none;
    }

    .receipt-store {
        font-size: 22px;
    }

    .receipt-item {
        font-size: 18px;
    }

    .receipt-category {
        font-size: 18px;
    }
}