/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark mode (default) */
    --bg-color: #000000;
    --text-primary: #FFFFFF;
    --text-secondary: #ABABAB;
    --border-color: #383838;
}

[data-theme="light"] {
    /* Light mode */
    --bg-color: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #555555;
    --border-color: #E0E0E0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Geist', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.landing-with-grid {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 30px 10px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px;
    padding-bottom: 160px;
    padding-top: 0;
}

.header-name {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.name-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    transition: opacity 0.2s;
}

.name-link:hover {
    opacity: 0.7;
}

.logo-svg {
    height: 1.3em;
    width: auto;
    flex-shrink: 0;
}

/* Dark mode - white logo */
.logo-svg {
    filter: invert(1);
}

/* Light mode - black logo */
[data-theme="light"] .logo-svg {
    filter: invert(0);
}

.name {
    font-family: 'Geist', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -0.48px;
    color: var(--text-primary);
    white-space: nowrap;
}

.title {
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -0.48px;
    color: var(--text-secondary);
}

.about-link {
    font-family: 'Geist', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -0.48px;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.about-link:hover {
    opacity: 0.7;
}

nav {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Theme Toggle Switch */
.theme-toggle {
    display: flex;
    align-items: center;
    background-color: var(--border-color);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.theme-toggle-option {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
    padding: 0;
}

.theme-toggle-option svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: color 0.2s ease;
}

.theme-toggle-option.active {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .theme-toggle-option.active {
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.theme-toggle-option:hover {
    color: var(--text-primary);
    opacity: 0.8;
}

.theme-toggle-option:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

.nav-link {
    font-family: 'Geist', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -0.48px;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.7;
}

/* Header Contact Wrapper (Experience page only) */
.header-contact-wrapper {
    width: 100%;
    max-width: 1400px;
}

.header-contact-wrapper > .main-content {
    padding-bottom: 64px;
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 64px;
    width: 100%;
    max-width: 1400px;
    align-items: flex-start;
    padding-bottom: 64px;
}



/* Contact Info (Left Sidebar) */
.contact-info {
    flex: 0 0 auto;
    width: 368px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 64px;
    align-self: flex-start;
}

.contact-wrapper {
    display: flex;
    flex-direction: column;
}

.bio {
    border-top: 1px solid var(--border-color);
    padding: 30px 40px 40px 6px;
    min-height: 202px;
}

.bio p {
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.15px;
    color: var(--text-primary);
    max-width: 420px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 6px;
    border-top: 0.5px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity 0.2s;
    line-height: 1.3;
}

.contact-link:hover {
    opacity: 0.7;
}

.contact-link:first-of-type {
    font-family: 'Geist', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: -0.065px;
}

.contact-link:not(:first-of-type) {
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: -0.12px;
}

.arrow {
    display: inline-block;
    width: 9.867px;
    height: 9.867px;
    margin-left: 0;
    vertical-align: baseline;
    flex-shrink: 0;
}

/* CV Content (Right Column) */
.cv-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* About Content (Right Column) */
.about-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Landing Content (Right Column) */
.landing-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.landing-section {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 37px;
}

.landing-media {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.media-placeholder {
    aspect-ratio: 16 / 9;
    background-color: var(--border-color);
    width: 100%;
    min-width: 0;
    min-height: 200px;
    flex-shrink: 0;
    border-top: 1px solid var(--border-color);
}

.media-placeholder:first-child {
    border-top: none;
}

.media-placeholder img,
.media-placeholder video {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

/* Section Styles */
.section {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    padding-bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 37px;
}

/* About Section */
.about-section .section-content {
    padding-right: 20px;
}

.about-text {
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 1.45;
    letter-spacing: -0.24px;
    color: var(--text-primary);
    max-width: 720px;
}

.about-text p {
    margin-bottom: 0;
}

.about-text p:not(:last-child) {
    margin-bottom: 0;
}

/* About Image Placeholder */
.about-image-placeholder {
    background-color: var(--border-color);
    width: 100%;
    max-width: 100%;
    height: 405px;
    flex-shrink: 0;
    margin-bottom: 0;
}

.about-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Client List Section */
/* Uses standard .section styles */

.client-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    height: 210px;
    align-items: center;
}

.client-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    min-height: 81.82px;
    max-height: 109.09px;
    padding: 30px 40px 30px 0;
    width: 160px;
    overflow: hidden;
}

.logo-container {
    flex: 1;
    min-width: 0;
    min-height: 0;
    width: 110px;
    position: relative;
    mix-blend-mode: exclusion;
}

[data-theme="light"] .logo-container {
    mix-blend-mode: normal;
    filter: invert(1);
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    opacity: 0.3;
}

.logo-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
    pointer-events: none;
}

.section-heading {
    font-family: 'Geist', sans-serif;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: -0.065px;
    color: var(--text-primary);
    min-width: 220px;
}

/* Experience Section */
.experience-section .section-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding-right: 20px;
}

.job-entry {
    border-top: 0.5px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
}

.job-header {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.job-title {
    font-family: 'Geist', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: -0.16px;
    color: var(--text-primary);
}

.job-meta {
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.15px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.company {
    display: inline-block;
}

.company-link {
    color: inherit;
    text-decoration: none;
    margin-left: 12px;
}

.job-description {
    flex: 1;
    min-width: 300px;
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.075px;
    color: var(--text-primary);
}

.job-description ul {
    list-style: disc;
    margin-left: 0;
    padding-left: 20px;
}

.job-description li {
    margin-bottom: 8px;
    margin-left: 0;
    padding-left: 0;
}

.job-description li:last-child {
    margin-bottom: 0;
}

/* Skills Section */
.skills-content {
    display: flex;
    flex-wrap: wrap;
    gap: 37px;
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.3;
    letter-spacing: -0.15px;
    color: var(--text-primary);
}

.skills-column {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.skill-category {
    width: 100%;
}

.skill-category-title {
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.3;
    color: var(--text-secondary);
    margin-top: 12px;
    margin-bottom: 0;
    padding-top: 12px;
    padding-bottom: 12px;
}

.skill-list {
    list-style: disc;
    margin-left: 0;
    padding-left: 20px;
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
}

.skill-list li {
    margin-bottom: 5px;
    margin-left: 0;
    padding-left: 0;
    line-height: 1.3;
}

.skill-list li:last-child {
    margin-bottom: 0;
}

/* Education Section */
.education-content {
    display: flex;
    gap: 37px;
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.15px;
    color: var(--text-primary);
    flex-wrap: wrap;
}

.education-institution {
    flex: 1;
    min-width: 220px;
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.15px;
    color: var(--text-primary);
}

.education-details {
    flex: 1;
    min-width: 220px;
}

.education-details h4 {
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.15px;
    color: var(--text-primary);
    margin-bottom: 0;
}

.education-specialization {
    font-family: 'Geist', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.15px;
    color: var(--text-secondary);
    margin-top: 0;
}

/* Footer */
.footer {
    border-top: 0.5px solid var(--border-color);
    padding: 20px 0;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.footer-link {
    font-family: 'Geist', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: -0.48px;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s;
    flex: 1;
}

.footer-link:hover {
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-info {
        width: 320px;
    }
    
    .main-content {
        gap: 64px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 20px 10px;
    }
    
    .header {
        padding-bottom: 80px;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .name,
    .title,
    .about-link,
    .nav-link {
        font-size: 20px;
    }
    
    nav {
        gap: 15px;
    }
    
    .main-content {
        flex-direction: column;
        gap: 0;
    }
    
    .landing-content {
        padding-left: 0;
        width: 100%;
    }
    
    .landing-media {
        padding-right: 0;
        gap: 12px;
    }
    
    .media-placeholder {
        aspect-ratio: 16 / 9;
        width: 100%;
        min-height: 200px;
    }
    
    .landing-section {
        padding-bottom: 60px;
    }
    
    /* About page responsive */
    .about-section .section-content {
        padding-right: 0;
    }
    
    .about-text {
        font-size: 20px;
        max-width: 100%;
    }
    
    .about-image-placeholder {
        width: 100%;
        max-width: 720px;
        height: auto;
        aspect-ratio: 720 / 405;
    }
    
    .client-logos {
        height: auto;
        min-height: 210px;
    }
    
    .client-logo {
        width: calc(50% - 10px);
        min-width: 150px;
        max-width: 200px;
    }
    
    .header-contact-wrapper {
        position: static;
    }
    
    .header-contact-wrapper > .header {
        padding-bottom: 32px;
        margin: 0;
    }
    
    .contact-info {
        width: calc(100% + 40px);
        position: sticky;
        top: 0;
        margin-left: -20px;
        margin-right: -20px;
        margin-top: -20px;
        margin-bottom: 40px;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 20px;
        padding-bottom: 20px;
        z-index: 10;
        background-color: var(--bg-color);
    }
    
    .contact-wrapper {
        position: static;
    }
    
    .header-contact-wrapper > .main-content {
        padding-bottom: 0;
    }
    
    .bio {
        border-top: none;
        padding: 20px 20px 30px 0;
        min-height: auto;
    }
    
    .section {
        padding-bottom: 60px;
    }
    
    .job-entry {
        flex-direction: column;
        gap: 20px;
    }
    
    .job-description {
        min-width: 100%;
    }
    
    .skills-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .skills-column {
        min-width: 100%;
        gap: 40px;
    }
    
    .education-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .education-institution,
    .education-details {
        min-width: 100%;
    }
    
    .footer {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px 15px 10px;
    }
    
    .header {
        padding-bottom: 60px;
    }
    
    .name,
    .title,
    .about-link,
    .nav-link {
        font-size: 18px;
    }
    
    nav {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .bio {
        padding: 20px 0 30px 0;
    }
    
    .section {
        padding-top: 25px;
        padding-bottom: 50px;
        gap: 30px;
    }
    
    .experience-section .section-content {
        padding-right: 0;
        gap: 40px;
    }
    
    .job-header {
        min-width: 100%;
    }
    
    .footer {
        min-height: 150px;
    }
    
    .footer-link {
        font-size: 20px;
    }
    
    /* About page responsive */
    .about-section .section-content {
        padding-right: 0;
    }
    
    .about-text {
        font-size: 18px;
    }
    
    .about-image-placeholder {
        width: 100%;
        max-width: 720px;
        height: auto;
        aspect-ratio: 720 / 405;
    }
    
    .client-logos {
        height: auto;
        min-height: 210px;
    }
    
    .client-logo {
        width: calc(50% - 10px);
        min-width: 150px;
    }
    
    .landing-media {
        gap: 10px;
    }
    
    .media-placeholder {
        aspect-ratio: 16 / 9;
        width: 100%;
        min-height: 180px;
    }
    
    .landing-section {
        padding-bottom: 50px;
    }
}

/* Infinite Grid Styles */
#infinite-grid-hero {
    width: 100%;
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
    cursor: grab;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    touch-action: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

html.dragging #infinite-grid-hero {
    cursor: grabbing;
}

#infinite-grid-container {
    width: 100%;
    height: 100%;
    display: inline-block;
    white-space: nowrap;
    position: relative;
    touch-action: none;
}

#infinite-grid-container .item {
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    white-space: normal;
}

#infinite-grid-container .item-wrapper {
    will-change: transform;
}

#infinite-grid-container .item-image {
    overflow: hidden;
}

#infinite-grid-container .item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
    display: block;
}

#infinite-grid-container small {
    width: 100%;
    display: block;
    font-size: 11px;
    line-height: 1.4;
    margin-top: 8px;
    color: var(--text-secondary);
    font-family: 'Geist', sans-serif;
    font-weight: 400;
}

/* Landing page with infinite grid */
.landing-with-grid .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: transparent;
    padding: 20px 30px;
    max-width: 100%;
}

.landing-with-grid .main-content {
    padding-top: 0;
    padding-bottom: 0;
    gap: 0;
    max-width: 100%;
}

.landing-with-grid .contact-info {
    position: fixed;
    left: 30px;
    top: 120px;
    z-index: 90;
    background-color: rgba(var(--bg-color-rgb), 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

:root {
    --bg-color-rgb: 0, 0, 0;
}

[data-theme="light"] {
    --bg-color-rgb: 255, 255, 255;
}

@media (max-width: 768px) {
    .landing-with-grid .header {
        padding: 15px 20px;
    }
    
    .landing-with-grid .contact-info {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        margin: 80px 0 0 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    #infinite-grid-hero {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh; /* Use dynamic viewport height for mobile browsers */
    }
}

/* Print Styles */
@media print {
    .container {
        padding: 0;
    }
    
    .contact-info {
        position: static;
        page-break-inside: avoid;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

