body {
    position: absolute;
    overflow: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: url('subtle-pattern.webp') repeat;
    color: #fff;
}

#creature-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#creature {
    font-size: .2vh;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 150em;
    height: 150em;
    flex-wrap: wrap;
}

#creature div {
    transform-style: preserve-3d;
    position: relative;
    width: 4em;
    height: 4em;
    margin: 3em;
    border-radius: 2em;
    will-change: transform;
    mix-blend-mode: plus-lighter;
    background: var(--red);
}

.portfolio-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem;
    box-sizing: border-box;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 1.5rem;
    max-width: 1024px;
    margin: 0 auto;
    height: calc(100vh - 4rem);
}

@media (min-width: 1025px) {
    .grid-container {
        grid-template-columns: repeat(4, minmax(200px, 300px));
        justify-content: center;
    }
}

.card {
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 2rem;
    max-width: 100%;
}

.card:hover {
    border-color: #666;
    box-shadow: 0 8px 25px var(--red);
}

.card h1,
.card h2,
.card h3 {
    margin: 0 0 1rem 0;
    color: #fff;
    text-align: center;
}

.card h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--red);
}

.card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ccc;
}

.card p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
    color: #ddd;
    font-size: 0.8rem;
}

.primary-card {
    grid-column: 1 / 4;
    grid-row: 1 / 5;
}

.primary-card-content {
    display: flex;
    height: 100%;
    gap: 1.5rem;
}

.primary-card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Allows text to shrink if needed */
}

.primary-card-image {
    flex: 0 0 40%; /* Take up 40% of the width, don't grow or shrink */
    display: flex;
    align-items: stretch;
}

.primary-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    opacity: 0.9;
    background: radial-gradient(circle closest-side, #ffffff, #00000000)
}

.clock-card {
    grid-column: 3 / 4;
    grid-row: 7 / 9;
    padding: 1rem;
}

.clock-card h3 {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    text-align: center;
}

#clock {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    flex-direction: column;
    width: 100%;
    height: 100%;
    font-family: monospace;
}

#digital {
    perspective: 1000px;
    display: flex;
    gap: 0.5ch;
    height: 4ch;
    position: relative;
}

.slot {
    position: relative;
    width: 1ch;
    height: 2ch;
    color: #fff;
    display: flex;
    transform-style: preserve-3d;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 2em;
}

.colon {
    transform: translateZ(3ch);
}

.numbers>div {
    position: absolute;
    transform-style: preserve-3d;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    transform-origin: center center 0px;
}

.location-card {
    grid-column: 4 / 5;
    grid-row: 7 / 9;
    text-align: center;
    padding: 0 16px;
}

.map-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 150px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.us-map-svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0.8) contrast(1.2) invert(1);
    pointer-events: none;
}

.seattle-marker {
    position: absolute;
    pointer-events: none;
}

.seattle-dot {
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    filter: drop-shadow(0 0 6px var(--red));
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.us-map {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 1rem 0;
}

.status-card {
    grid-column: 2 / 4;
    grid-row: 6 / 7;
    padding: 0;
}

.status-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0.2rem;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    justify-content: center;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-pill.prev-status,
.status-pill.next-status {
    opacity: 0.4;
    transform: scale(0.8);
    filter: grayscale(0.6);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.status-pill.prev-status .status-text,
.status-pill.next-status .status-text {
    color: #aaa;
    text-shadow: none;
}

.status-pill.prev-status .status-emoji,
.status-pill.next-status .status-emoji {
    opacity: 0.6;
}

.status-pill.sleeping {
    background: linear-gradient(135deg, rgba(100, 100, 150, 0.3), rgba(120, 120, 180, 0.2));
    border-color: rgba(100, 100, 150, 0.4);
}

.status-pill.breakfast {
    background: linear-gradient(135deg, rgba(255, 200, 100, 0.3), rgba(255, 220, 120, 0.2));
    border-color: rgba(255, 200, 100, 0.4);
}

.status-pill.working {
    background: linear-gradient(135deg, rgba(100, 200, 100, 0.3), rgba(120, 220, 120, 0.2));
    border-color: rgba(100, 200, 100, 0.4);
}

.status-pill.lunch {
    background: linear-gradient(135deg, rgba(255, 150, 100, 0.3), rgba(255, 170, 120, 0.2));
    border-color: rgba(255, 150, 100, 0.4);
}

.status-pill.dinner {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.3), rgba(255, 120, 120, 0.2));
    border-color: rgba(255, 100, 100, 0.4);
}

.status-pill.family {
    background: linear-gradient(135deg, rgba(200, 100, 255, 0.3), rgba(220, 120, 255, 0.2));
    border-color: rgba(200, 100, 255, 0.4);
}

.status-emoji {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.status-text {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.status-time {
    font-size: 0.9rem;
    color: #aaa;
    font-weight: 500;
}

.playground-card {
    grid-column: 1 / 3;
    grid-row: 7 / 9;
}

.playground-link {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    display: inline-block;
}

.playground-link:hover {
    text-decoration: underline;
}

.experience-card {
    grid-column: 4 / 5;
    grid-row: 1 / 5;
    overflow-y: auto;
}

.randomizer-card {
    grid-column: 3 / 4;
    grid-row: 5 / 6;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
}

.randomize-btn {
    background: var(--red);
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.randomize-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--red);
    opacity: 0.9;
}

.randomize-btn:active {
    transform: translateY(0);
}

.primary-social-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    background: var(--red);
    text-decoration: none;
    padding: 1rem;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.social-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--red);
    opacity: 0.9;
}

.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timeline-item {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #ddd;
    border-left: 3px solid var(--red);
    padding-left: 1rem;
}

.current-role-card {
    grid-column: 1 / 2;
    grid-row: 5 / 7;
}

.ai-wave-card {
    grid-column: 4 / 5;
    grid-row: 5 / 7;
}

.ai-assisted-card {
    grid-column: 2 / 3;
    grid-row: 5 / 6;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ai-tools {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}

.ai-assisted-card p {
    margin: 0;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.tool-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.tool-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.anime-js svg {
    width: 64px;
}

.location-content {
    width: 204px;
}

.resume-link {
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    display: inline-block;
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid #333;
    margin-top: 1rem;
}

.resume-link:hover {
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .grid-container {
        max-width: 800px;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 1.5rem;
        height: auto;
        min-height: calc(100vh - 4rem);
    }

    .card {
        min-height: 2rem;
    }

    .primary-card,
    .experience-card {
        min-height: 12rem;
    }

    .current-role-card,
    .ai-wave-card,
    .playground-card,
    .clock-card,
    .location-card {
        min-height: 4.5rem;
    }

    .primary-card {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .experience-card {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .current-role-card,
    .ai-wave-card,
    .ai-assisted-card,
    .randomizer-card,
    .status-card,
    .playground-card,
    .clock-card,
    .location-card {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 1024px) {
    .grid-container {
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .portfolio-content {
        padding: 1rem;
    }

    .grid-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        max-width: 100%;
        height: auto;
        min-height: auto;
    }

    .card {
        min-height: 3rem;
        /* Slightly taller for mobile readability */
        max-width: 100%;
    }

    .primary-card {
        min-height: 8rem;
    }

    .experience-card {
        min-height: 10rem;
    }

    .status-card,
    .playground-card {
        min-height: 4rem;
    }

    .clock-card,
    .location-card,
    .current-role-card,
    .ai-wave-card {
        min-height: 3.5rem;
    }

    .primary-card,
    .contact-card,
    .clock-card,
    .location-card,
    .status-card,
    .playground-card,
    .skills-card,
    .experience-card,
    .current-role-card,
    .ai-wave-card,
    .ai-assisted-card,
    .randomizer-card {
        grid-column: unset;
        grid-row: unset;
    }

    .primary-card h1 {
        font-size: 2rem;
    }

    .primary-card-content {
        flex-direction: column;
        gap: 1rem;
    }

    .primary-card-image {
        flex: 0 0 200px; /* Fixed height for mobile */
        max-height: 200px;;
    }

    .primary-card-image img {
        object-position: center top; /* Focus on the top of the image for mobile */
    }
}

@media (max-width: 480px) {
    .portfolio-content {
        padding: 0.5rem;
    }

    .grid-container {
        gap: 0.75rem;
    }

    .card {
        padding: 0.75rem;
        min-height: 2.5rem;
    }

    .primary-card {
        min-height: 6rem;
    }

    .experience-card {
        min-height: 8rem;
    }
}

.portfolio-content::-webkit-scrollbar {
    width: 8px;
}

.portfolio-content::-webkit-scrollbar-track {
    background: #111;
}

.portfolio-content::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.portfolio-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}