/* CSS Reset & Variables */
:root {
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-muted: #666666;
    --border-color: rgba(0, 0, 0, 0.1);
    --font-primary: 'Aster', 'Playfair Display', Georgia, serif;
    --font-sans: 'Söhne', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-speed: 0.3s;
}

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

body,
html {
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    overflow-wrap: break-word;
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

ul {
    list-style: none;
}

/* Layout Wrapper */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem 4rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.header-favicon {
    height: 1.5rem;
    width: auto;
    object-fit: contain;
}

.nav-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}


/* Main Grid Layout */
.grid-container {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Common Section Styles */
.grid-cell {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.section-title {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* Cell 1: Hero (Spans Top Left) */
.hero-cell {
    justify-content: center;
    padding-right: 2rem;
}

.hero-title {
    font-family: var(--font-sans);
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -2px;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: var(--text-muted);
}

.hero-list {
    margin-top: 1rem;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: var(--text-muted);
    padding-left: 1.5rem;
    list-style-type: disc;
}

.hero-list li {
    margin-bottom: 0.5rem;
}

.name-glow {
    text-shadow: 0 0 20px rgba(255, 182, 193, 0.8), 0 0 40px rgba(255, 182, 193, 0.4);
}

/* Colored name letters */
.letter-l {
    color: #f03e79;
}

/* dark pink */
.letter-a {
    color: #a82523;
}

/* red */
.letter-u {
    color: #4fc3f7;
}

/* light blue */
.letter-r {
    color: #1e88e5;
}

/* strong blue */

/* Cell 2: Projects (Spans Top Right) */
.projects-cell {
    justify-content: center;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-item {
    display: block;
    transition: transform var(--transition-speed);
}

.project-item:hover {
    transform: translateX(10px);
}

.project-item h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.project-icon {
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0.3;
    transition: opacity var(--transition-speed) ease;
}

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

.project-item p {
    font-size: clamp(0.85rem, 1vw, 1rem);
    color: var(--text-muted);
}

/* Cell 3: History (Bottom Left) */
.past-cell {
    justify-content: flex-start;
}

.compact-timeline li {
    margin-bottom: 1.5rem;
}

.compact-timeline .date {
    display: block;
    font-size: clamp(0.75rem, 1vw, 0.9rem);
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.compact-timeline strong {
    font-weight: 500;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
}

.timeline-desc {
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* Fun Facts Keyboard Graphic */
.keyboard-graphic {
    display: flex;
    position: relative;
    height: clamp(80px, 12vw, 120px);
    width: clamp(186px, 28vw, 280px);
    margin-top: 2rem;
    align-self: center;
    border-radius: 4px;
    background-color: var(--surface-bg);
}

.key {
    box-sizing: border-box;
    border-radius: 0 0 4px 4px;
    border: 2px solid #000;
    cursor: pointer;
    transition: filter 0.1s ease;
}

.key:active {
    filter: brightness(0.8);
}

.white-key {
    flex: 1;
    height: 100%;
    background-color: white;
    z-index: 1;
}

.black-key {
    position: absolute;
    width: clamp(16px, 2.4vw, 24px);
    height: 65%;
    background-color: #222;
    z-index: 2;
    top: 0;
    margin-left: clamp(-12px, -1.2vw, -8px);
}

/* Positioning Black Keys */
.key-cs {
    left: calc(100% / 7 * 1);
}

.key-ds {
    left: calc(100% / 7 * 2);
}

.key-fs {
    left: calc(100% / 7 * 4);
}

.key-gs {
    left: calc(100% / 7 * 5);
}

.key-as {
    left: calc(100% / 7 * 6);
}

/* User's Synesthesia Colors */
.key-c {
    background-color: #eaccb8;
    /* light tan */
}

.key-cs {
    background-color: #e722a2;
    /* pink */
}

.key-d {
    background-color: white;
    /* no color */
}

.key-ds {
    background-color: #9ed433;
    /* yellow-green */
}

.key-e {
    background-color: #7ee07b;
    /* light green */
}

.key-f {
    background-color: #ff5900;
    /* orange */
}

.key-fs {
    background-color: #c4260e;
    /* red */
}

.key-g {
    background-color: #a0d4e6;
    /* light blue */
}

.key-gs {
    background-color: #910c7b;
    /* dark magenta */
}

.key-a {
    background-color: #710271;
    /* purple */
}

.key-as {
    background-color: #222288;
    /* dark blue */
}

.key-b {
    background-color: #3737e2;
    /* blue */
}

/* Cell 5: Contact (Bottom Right) */
.contact-cell {
    justify-content: flex-start;
}

/* Cell 6: Geese Images */
.geese-cell {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    padding-left: 3rem;
}

.goose-bg,
.goose-fg {
    max-height: clamp(200px, 25vw, 320px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.goose-fg {
    max-height: clamp(110px, 14vw, 180px);
    width: auto;
    object-fit: contain;
    transform: scaleX(-1);
    margin-top: 5rem;
}

.goose-bg {
    mix-blend-mode: multiply;
}

.contact-content {
    padding-left: 1.5rem;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

a.contact-link {
    transition: color var(--transition-speed) ease;
}

a.contact-link:hover {
    color: var(--text-muted);
}

.icon-link {
    margin-top: 0.5rem;
}

.social-icon {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.6rem;
}

/* Load Animations */
.anim-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards ease-out;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustment for small screens */
@media (max-width: 900px) {

    body,
    html {
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .page-container {
        height: auto;
        padding: 2rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 3rem;
    }

    .hero-cell,
    .geese-cell {
        padding-right: 0;
        padding-left: 0;
    }

    .hero-title {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
}

@media (max-width: 600px) {
    .page-container {
        padding: 1.5rem 1.25rem;
    }

    .geese-cell {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .goose-fg {
        margin-top: 2rem;
    }

    .hero-list {
        padding-left: 1rem;
    }
}