/* Björk Theme CSS - Exact Recreation */

/* Font Face */
@font-face {
    font-family: "Albert Sans";
    font-weight: 100 900;
    font-style: normal;
    font-stretch: normal;
    src: url("../fonts/AlbertSans-VariableFont_wght.woff2") format("woff2");
}

@font-face {
    font-family: "Albert Sans";
    font-weight: 100 900;
    font-style: italic;
    font-stretch: normal;
    src: url("../fonts/AlbertSans-Italic-VariableFont_wght.woff2") format("woff2");
}

/* CSS Variables from Björk theme.json */
:root {
    /* Colors */
    --wp--preset--color--foreground: #111111;
    --wp--preset--color--background: #FFFFFF;
    --wp--preset--color--primary: #5857FF;
    --wp--preset--color--secondary: #6B6A6A;
    --wp--preset--color--tertiary: #E2E2E2;
    --wp--preset--color--quaternary: #F3F2F2;
    
    /* Typography */
    --wp--preset--font-family--default: "Albert Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    
    /* Font Sizes - Fluid Typography */
    --wp--preset--font-size--tiny: clamp(14px, 1.75vw, 16px);
    --wp--preset--font-size--small: clamp(16px, 2vw, 18px);
    --wp--preset--font-size--medium: clamp(17px, 2.125vw, 21px);
    --wp--preset--font-size--large: clamp(21px, 2.625vw, 24px);
    --wp--preset--font-size--extra-large: clamp(24px, 3vw, 32px);
    --wp--preset--font-size--huge: clamp(36px, 4.5vw, 64px);
    --wp--preset--font-size--gigantic: clamp(64px, 8vw, 96px);
    
    /* Heading Font Sizes */
    --wp--preset--font-size--heading-1: clamp(36px, 4.5vw, 64px);
    --wp--preset--font-size--heading-2: clamp(33px, 4.125vw, 56px);
    --wp--preset--font-size--heading-3: clamp(30px, 3.75vw, 48px);
    --wp--preset--font-size--heading-4: clamp(27px, 3.375vw, 40px);
    --wp--preset--font-size--heading-5: clamp(24px, 3vw, 32px);
    --wp--preset--font-size--heading-6: clamp(21px, 2.625vw, 27px);
    
    /* Custom Spacing */
    --wp--custom--spacing--baseline: 16px;
    --wp--custom--spacing--small: min(32px, 6.4vw);
    --wp--custom--spacing--gutter: clamp(calc(2 * var(--wp--custom--spacing--baseline)), 6.666vw, calc(4 * var(--wp--custom--spacing--baseline)));
    --wp--custom--spacing--outer: var(--wp--custom--spacing--gutter);
    
    /* Custom Typography */
    --wp--custom--typography--letter-spacing--body: -0.01em;
    --wp--custom--typography--letter-spacing--heading: -0.02em;
    --wp--custom--typography--letter-spacing--gigantic: -0.03em;
    --wp--custom--typography--line-height--body: 1.5em;
    --wp--custom--typography--line-height--headings--gigantic: 1.05;
    --wp--custom--typography--line-height--headings--large: 1.15;
    --wp--custom--typography--line-height--headings--small: 1.25;
    
    /* Layout */
    --content-width: 720px;
    --wide-width: 1680px;
    
    /* Spacing Sizes */
    --wp--preset--spacing--10: 8px;
    --wp--preset--spacing--20: 12px;
    --wp--preset--spacing--30: 16px;
    --wp--preset--spacing--40: 24px;
    --wp--preset--spacing--50: 32px;
    --wp--preset--spacing--60: clamp(32px, 7.5vw, 40px);
    --wp--preset--spacing--70: clamp(48px, 9vw, 64px);
    --wp--preset--spacing--80: clamp(64px, 6.666vw, 96px);
    --wp--preset--spacing--body-gutter: clamp(32px, 5vw, 64px);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

/* Global smooth transitions for theme switching */
*, *::before, *::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, fill 0.3s ease, stroke 0.3s ease;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--wp--preset--font-family--default);
    font-size: var(--wp--preset--font-size--medium);
    font-weight: 500;
    letter-spacing: var(--wp--custom--typography--letter-spacing--body);
    line-height: var(--wp--custom--typography--line-height--body);
    color: var(--wp--preset--color--foreground);
    background-color: var(--wp--preset--color--background);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

/* Links */
a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration: none;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: var(--wp--custom--typography--letter-spacing--heading);
    margin-top: 0.75em;
    margin-bottom: 1em;
}

h1 {
    font-size: var(--wp--preset--font-size--heading-1);
    line-height: var(--wp--custom--typography--line-height--headings--large);
}

h2 {
    font-size: var(--wp--preset--font-size--heading-2);
    line-height: var(--wp--custom--typography--line-height--headings--large);
}

h3 {
    font-size: var(--wp--preset--font-size--heading-3);
    line-height: var(--wp--custom--typography--line-height--headings--large);
}

h4 {
    font-size: var(--wp--preset--font-size--heading-4);
    line-height: var(--wp--custom--typography--line-height--headings--large);
}

h5 {
    font-size: var(--wp--preset--font-size--heading-5);
    line-height: var(--wp--custom--typography--line-height--headings--small);
}

h6 {
    font-size: var(--wp--preset--font-size--heading-6);
    line-height: var(--wp--custom--typography--line-height--headings--small);
}

/* Paragraphs */
p {
    line-height: var(--wp--custom--typography--line-height--body);
    margin-bottom: var(--wp--custom--spacing--small);
}

/* Layout Structure */
.wp-site-blocks {
    padding: var(--wp--preset--spacing--body-gutter);
}

.wp-block-group {
    margin-top: 0;
    margin-bottom: 0;
}

.wp-block-columns {
    display: flex;
    gap: var(--wp--custom--spacing--gutter);
    margin-bottom: 0;
}

.wp-block-column {
    flex-grow: 1;
}

.site-sidebar-col {
    flex-basis: 23%;
    flex-shrink: 0;
}

.site-main-col {
    flex-basis: 77%;
}

/* Sidebar Styles */
.site-sidebar {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - (var(--wp--custom--spacing--outer) * 2));
    position: sticky;
    top: var(--wp--custom--spacing--outer);
}

.site-sidebar .wp-block-group {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Profile Image */
.sidebar-profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--wp--preset--color--tertiary);
    margin-top: -1em;
    margin-bottom: 1em;
    display: block;
    background-image: url('../img/zezhen-profile.jpg');
    background-size: cover;
    background-position: 60% center;
    background-repeat: no-repeat;
}

/* Animated Greeting */
.animated-greeting {
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    background: linear-gradient(90deg, #1e3a8a, #3b82f6, #60a5fa, #93c5fd, #dbeafe, #93c5fd, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.animated-greeting.fade-out,
.animated-name.fade-out {
    opacity: 0;
}

/* Global Toolbar */
.global-toolbar {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

.toolbar-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--wp--preset--color--tertiary);
    background-color: var(--wp--preset--color--background);
    color: var(--wp--preset--color--foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toolbar-button:hover {
    background-color: var(--wp--preset--color--tertiary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: var(--wp--preset--color--foreground);
}

.toolbar-button svg {
    width: 20px;
    height: 20px;
}

/* Dark mode styles */
[data-theme="dark"] {
    --wp--preset--color--foreground: #ffffff;
    --wp--preset--color--background: #111111;
    --wp--preset--color--primary: #60a5fa;
    --wp--preset--color--secondary: #9ca3af;
    --wp--preset--color--tertiary: #374151;
    --wp--preset--color--quaternary: #1f2937;
}

[data-theme="dark"] .toolbar-button {
    border-color: var(--wp--preset--color--tertiary);
    background-color: var(--wp--preset--color--background);
}

/* Hide sun in light mode, moon in dark mode */
[data-theme="light"] .sun-icon,
[data-theme="dark"] .moon-icon {
    display: none;
}

/* Site Title and Tagline */
.wp-block-site-title {
    font-size: var(--wp--preset--font-size--heading-5);
    font-weight: 600;
    margin: 0 0 0.5em 0;
}

.wp-block-site-title a {
    text-decoration: none;
}

.wp-block-site-title a:hover {
    text-decoration: underline;
}

.wp-block-site-tagline {
    font-size: var(--wp--preset--font-size--medium);
    margin: 0 0 2em 0;
    color: var(--wp--preset--color--secondary);
}

/* Navigation */
.wp-block-navigation {
    font-size: var(--wp--preset--font-size--small);
    margin-top: 6.8em;
}

.wp-block-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wp-block-navigation li {
    margin-bottom: 0.5em;
}

.wp-block-navigation a {
    text-decoration: none;
    display: block;
    padding: 0.25em 0;
}

.wp-block-navigation a:hover,
.wp-block-navigation .current-menu-item a {
    text-decoration: underline;
}

/* Social Links */
.wp-block-social-links {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: var(--wp--preset--font-size--small);
    padding: 0;
    margin: 0;
}

.wp-block-social-links a {
    color: black;
    text-decoration: none;
}

.wp-block-social-links a:hover {
    color: var(--wp--preset--color--primary);
}

.wp-block-social-links .separator {
    color: black;
    font-weight: bold;
}

/* Cover Block (Hero Section) */
.wp-block-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: auto;
    padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--60);
    padding-top: 10vh;
}

.wp-block-cover.is-light {
    color: var(--wp--preset--color--foreground);
}

.wp-block-cover__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.has-quaternary-background-color {
    background-color: var(--wp--preset--color--quaternary);
}

.wp-block-cover__inner-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--wide-width);
}

/* Buttons */
.wp-block-buttons {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    align-items: center;
}

.wp-block-button__link {
    display: inline-block;
    padding: 0.75em 1.5em;
    background-color: white;
    color: black;
    text-decoration: none;
    border-radius: 999px;
    border: 2px solid black;
    font-size: var(--wp--preset--font-size--small);
    font-weight: 600;
    line-height: var(--wp--custom--typography--line-height--headings--large);
    transition: all 0.2s ease;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    background-color: black;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wp-block-button.linkedin-button .wp-block-button__link {
    background-color: white;
    color: #0077B5;
    border: 2px solid #0077B5;
}

.wp-block-button.linkedin-button .wp-block-button__link:hover {
    background-color: #0077B5;
    color: white;
    border-color: #0077B5;
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.3);
}

.is-style-outline .wp-block-button__link {
    background-color: white;
    border: 2px solid black;
    color: black;
}

.is-style-outline .wp-block-button__link:hover {
    background-color: black;
    color: white;
    border-color: black;
}

.wp-block-button.medium-button .wp-block-button__link {
    background-color: white;
    color: #292929;
    border: 2px solid #292929;
}

.wp-block-button.medium-button .wp-block-button__link:hover {
    background-color: #292929;
    color: white;
    border-color: #292929;
    box-shadow: 0 4px 12px rgba(41, 41, 41, 0.3);
}

/* Separator */
.wp-block-separator {
    border: none;
    height: 1px;
    background-color: var(--wp--preset--color--tertiary);
    margin: var(--wp--preset--spacing--60) 0;
}

.is-style-bjork-angled-separator-wide {
    background-color: transparent !important;
    background-image: linear-gradient(-45deg, currentColor 25%, transparent 25%, transparent 50%, currentColor 50%, currentColor 75%, transparent 75%, transparent);
    background-size: 5px 5px;
    height: 10px !important;
    width: 100% !important;
    max-width: 100%;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Alignment Classes */
.alignwide {
    max-width: var(--wide-width);
    width: 100%;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Has Background Classes */
.has-background {
    padding: min(1em, var(--wp--custom--spacing--small));
}

.has-primary-color {
    color: var(--wp--preset--color--primary);
}

.has-secondary-color {
    color: var(--wp--preset--color--secondary);
}

.has-tertiary-color {
    color: var(--wp--preset--color--tertiary);
}

.has-extra-large-font-size {
    font-size: var(--wp--preset--font-size--extra-large);
}

/* Footer */
.site-footer {
    margin-top: var(--wp--preset--spacing--80);
    padding-top: var(--wp--preset--spacing--60);
    border-top: 1px solid var(--wp--preset--color--tertiary);
    font-size: var(--wp--preset--font-size--small);
    color: var(--wp--preset--color--secondary);
}

/* Mobile Styles */
@media (max-width: 781px) {
    .site-sidebar-col {
        display: none !important;
    }
    
    .site-main-col {
        flex-basis: 100%;
    }
    
    .wp-block-columns {
        flex-direction: column;
    }
    
    .wp-block-cover {
        min-height: 70vh;
        padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
    }
    
    h1 {
        font-size: clamp(28px, 7vw, 48px);
    }
    
    .mobile-header {
        display: block;
        padding: var(--wp--preset--spacing--40);
        background-color: var(--wp--preset--color--quaternary);
        margin-bottom: var(--wp--preset--spacing--40);
        position: relative;
    }
    
    /* Mobile header title with profile image */
    .mobile-header-title {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .mobile-profile-image {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 2px solid var(--wp--preset--color--tertiary);
        background-image: url('../img/zezhen-profile.jpg');
        background-size: cover;
        background-position: 60% center;
        background-repeat: no-repeat;
        flex-shrink: 0;
    }
    
    /* Mobile navigation */
    .mobile-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: var(--wp--preset--spacing--40);
    }
    
    .mobile-nav ul {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: var(--wp--preset--spacing--20);
        flex-wrap: wrap;
    }
    
    .mobile-nav li {
        margin: 0;
    }
    
    .mobile-nav a {
        color: var(--wp--preset--color--foreground);
        text-decoration: none;
        font-size: var(--wp--preset--font-size--small);
        font-weight: 600;
        padding: 8px 12px;
        border-radius: 20px;
        transition: all 0.2s ease;
    }
    
    .mobile-nav a:hover,
    .mobile-nav .current-menu-item a {
        background-color: var(--wp--preset--color--tertiary);
        color: var(--wp--preset--color--foreground);
    }
    
    .mobile-social {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: var(--wp--preset--font-size--tiny);
        margin-top: var(--wp--preset--spacing--20);
    }
    
    .mobile-social a {
        color: var(--wp--preset--color--secondary);
        text-decoration: none;
        font-size: 12px;
    }
    
    .mobile-social .separator {
        color: var(--wp--preset--color--tertiary);
    }
    
    /* Mobile toolbar adjustments */
    .global-toolbar {
        top: 15px;
        right: 15px;
        z-index: 9999;
    }
    
    .toolbar-button {
        width: 44px;
        height: 44px;
        border-width: 1px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    
    .toolbar-button svg {
        width: 22px;
        height: 22px;
    }
    
    /* Mobile text wrapping for Biscuit page */
    .biscuit-text {
        white-space: normal !important;
        max-width: 90vw;
        word-wrap: break-word;
    }
    
    .biscuit-container {
        max-width: 90vw;
        padding: 1rem;
    }
    
    /* Mobile CV container adjustments */
    .cv-container {
        height: calc(100vh - 300px) !important;
        min-height: 500px;
        margin: 0 -1rem;
        width: calc(100% + 2rem);
    }
    
    .cv-container embed {
        width: 100% !important;
        height: 100% !important;
        min-height: 500px;
    }
    
    /* Mobile PDF fallback */
    .mobile-pdf-fallback {
        display: none;
        text-align: center;
        padding: 3rem 1rem;
        background: var(--wp--preset--color--quaternary);
        border-radius: 8px;
        margin-top: 1rem;
    }
    
    .mobile-pdf-fallback h3 {
        margin-bottom: 1rem;
        color: var(--wp--preset--color--foreground);
    }
    
    .mobile-pdf-fallback p {
        margin-bottom: 2rem;
        color: var(--wp--preset--color--secondary);
    }
}

@media (min-width: 782px) {
    .mobile-header {
        display: none !important;
    }
}