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

:root {
    --color-bg: #242424;
    --color-drawer: #292929;
    --color-card: #242424;
    --color-text: #ffffff;
    --color-text-muted: #888;
    --color-text-dim: #666;
    --color-accent: #f5a623;
    --color-border: #333;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --drawer-width: 550px;
    --transition-speed: 0.5s;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
}

.page-wrapper {
    display: flex;
    height: 100%;
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.page-wrapper.drawer-open {
    transform: translateX(calc(var(--drawer-width) * -1));
}

.main-content {
    flex: 1;
    min-width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

header {
    height: 120px;
}

.logo {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    justify-content: center;
    transition: left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

body.drawer-open .logo {
    left: calc(50% - var(--drawer-width) / 2);
}

.logo::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: var(--color-bg);
    border-radius: 50%;
    top: 50%;
    left: calc(50% + 3px);
    transform: translate(-50%, -50%);
    z-index: -1;
}

.logo svg {
    width: 80px;
    height: 80px;
}

.logo-base {
    position: relative;
}

.logo-multiply {
    position: absolute;
    left: 6px;
    top: 0;
    mix-blend-mode: multiply;
}

.drawer-toggle {
    position: fixed;
    top: 40px;
    right: 40px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 13px;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    transition: background 0.2s ease;
}

@media (hover: hover) {
    .drawer-toggle:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .drawer-toggle:hover .toggle-arrow {
        transform: translateX(2px);
    }
}

.toggle-arrow {
    order: 1;
    transition: transform 0.3s ease-out, font-size 0.3s ease-out;
    display: inline-block;
    line-height: 1;
}

.drawer-toggle.open .toggle-arrow {
    font-size: 15px;
    line-height: 1;
    position: relative;
    top: -1px;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.hero {
    text-align: center;
    padding: 0 40px;
    margin-top: -80px;
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

body.drawer-open .hero {
    transform: translateX(calc(var(--drawer-width) / 2));
}

.hero-intro {
    display: block;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 19px;
    color: #7c7c7c;
    margin-bottom: 2px;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: 84px;
    font-weight: 400;
    line-height: 0.85;
    color: #bbbbbb;
}

.ampersand {
    font-family: var(--font-serif);
    font-style: normal;
    font-size: 90px;
    display: inline-block;
    transform: rotate(-13.5deg) translateY(16px) translateX(-3px);
    color: #7c7c7c;
}

/* Drawer */
.drawer {
    width: var(--drawer-width);
    min-width: var(--drawer-width);
    background: var(--color-drawer);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.sheet-handle {
    display: none;
}

.drawer-scroll {
    height: 100%;
    overflow-y: auto;
    padding: 100px 30px 30px 30px;
}

.drawer-blur-top,
.drawer-blur-bottom {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 10;
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    background: linear-gradient(to bottom, rgba(41, 41, 41, 0.7), transparent);
}

.drawer-blur-top {
    top: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgba(41, 41, 41, 0.8), transparent);
    mask-image: linear-gradient(to bottom, black 0%, black 30%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 30%, transparent 100%);
}

.drawer-blur-bottom {
    bottom: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(41, 41, 41, 0.8), transparent);
    mask-image: linear-gradient(to top, black 0%, black 30%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 0%, black 30%, transparent 100%);
}

.drawer-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card {
    background: var(--color-card);
    border-radius: 40px;
    padding: 30px;
    transition: opacity 0.15s ease-out;
}

.card-row {
    transition: opacity 0.15s ease-out;
}

.card-label {
    display: block;
    font-family: var(--font-serif);
    font-size: 22px;
    color: #bbbbbb;
    margin-bottom: 50px;
}

.card h2 {
    font-family: var(--font-sans);
    font-size: 30px;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 5px;
    transition: color 0.3s ease-in-out;
}

.location-card:hover h2 {
    color: #FFAE00;
}

.strava-link {
    text-decoration: none;
    display: block;
    width: fit-content;
}

.strava-link h2 {
    position: relative;
    display: inline-block;
}

.strava-link h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: #FFAE00;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.card:has(.strava-link):hover h2 {
    color: #FFAE00;
}

.card:has(.strava-link):hover .strava-link h2::after {
    opacity: 0.5;
}

a.card-link {
    text-decoration: none;
    display: block;
}

.card-detail {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 400;
    color: #bbbbbb;
}

.work-card .card-label {
    margin-bottom: 30px;
}

.current-job {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.current-job-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.current-company {
    font-family: var(--font-sans);
    font-size: 30px;
    font-weight: 300;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
    position: relative;
    display: inline-block;
    width: fit-content;
    margin-bottom: 5px;
}

.current-company::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: #FFAE00;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.work-card:hover .current-company {
    color: #FFAE00;
}

.work-card:hover .current-company::after {
    opacity: 0.5;
}

.work-history a.company:hover {
    color: #FFAE00;
}

.work-history a.company:hover::after {
    opacity: 0.5;
}

.current-badge {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 400;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.work-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.work-history {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.work-history li {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.work-history .company {
    color: var(--color-text);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease-in-out;
}

.work-history a.company::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: #FFAE00;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}


.work-history .dots {
    flex: 1;
    margin: 15px 12px;
    height: 3px;
    align-self: flex-end;
    margin-bottom: 0;
    background: radial-gradient(circle at center, var(--color-text-dim) 0.5px, transparent 0.5px);
    background-size: 7px 3px;
    background-repeat: repeat-x;
    margin-bottom: 5px;
}

.work-history .dates {
    color: var(--color-text-muted);
    white-space: nowrap;
}

.contact-email {
    display: block;
    width: fit-content;
    font-size: 24px;
    font-weight: 300;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
    position: relative;
    margin-bottom: 5px;
    cursor: pointer;
}

.contact-email::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: #FFAE00;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.card:hover .contact-email {
    color: #FFAE00;
}

.card:hover .contact-email::after {
    opacity: 0.5;
}

/* Scrollbar styling for drawer */
.drawer::-webkit-scrollbar {
    width: 6px;
}

.drawer::-webkit-scrollbar-track {
    background: transparent;
}

.drawer::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --drawer-width: 100vw;
        --sheet-height: calc(100vh - 120px);
        --sheet-height: calc(100dvh - 120px);
    }
    
    header {
        padding: 24px;
    }
    
    .logo {
        top: 30px;
    }
    
    .logo svg {
        width: 64px;
        height: 64px;
    }
    
    .logo::before {
        width: 80px;
        height: 80px;
    }
    
    body.drawer-open .logo {
        left: 50%;
    }
    
    .drawer-toggle {
        top: auto;
        bottom: 24px;
        left: 24px;
        right: 24px;
        transform: none;
        width: calc(100% - 48px);
        justify-content: center;
        padding: 14px 20px;
        transition: opacity 0.2s ease, background 0.2s ease;
    }
    
    .drawer-toggle.open {
        opacity: 0;
        pointer-events: none;
    }
    
    .drawer-toggle.open .toggle-arrow {
        display: none;
    }
    
    .hero {
        margin-top: -120px;
    }
    
    body.drawer-open .hero {
        transform: none;
    }
    
    .page-wrapper {
        flex-direction: column;
    }
    
    .page-wrapper.drawer-open {
        transform: none;
    }
    
    .main-content {
        min-width: 100%;
        transition: opacity var(--transition-speed) ease;
    }
    
    .page-wrapper.drawer-open .main-content {
        opacity: 0.3;
    }
    
    .drawer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        min-width: 100%;
        height: var(--sheet-height);
        border-radius: 30px 30px 0 0;
        transform: translateY(100%);
        transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 90;
    }
    
    .page-wrapper.drawer-open .drawer,
    body.drawer-open .drawer {
        transform: translateY(0);
    }
    
    .drawer-scroll {
        padding: 40px 24px 30px 24px;
    }
    
    .sheet-handle {
        display: block;
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
        z-index: 20;
    }
    
    .drawer-blur-top {
        height: 50px;
        border-radius: 30px 30px 0 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: linear-gradient(to bottom, var(--color-drawer) 0%, transparent 100%);
        mask-image: none;
        -webkit-mask-image: none;
    }
    
    .drawer-blur-bottom {
        display: none;
    }
    
    .drawer-content .card,
    .drawer-content .card-row {
        opacity: 1 !important;
    }
    
    .card-row {
        grid-template-columns: 1fr;
    }
}
