:root {
    --text-primary: #111111;
    --text-secondary: #777777;
    --bg-color: #ffffff;
    --link-color: #111111;
    font-family: Inter, sans-serif;
    font-feature-settings: 'liga' 1, 'calt' 1;
}
@supports (font-variation-settings: normal) {
    :root { font-family: InterVariable, sans-serif; }
}

[data-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --bg-color: #111111;
    --link-color: #ffffff;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 80px 24px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    transition: transform 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-primary);
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-right: -8px; /* Offset padding */
}

.theme-toggle:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.bio p {
    font-size: 14px;
    margin-bottom: 24px;
    color: var(--text-primary);
    max-width: 600px;
}

a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--text-secondary);
    padding-bottom: 1px;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--text-secondary);
    border-bottom-color: var(--text-primary);
    border-bottom-style: solid;
}

.work {
    margin-top: 64px;
}

.section-title {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.project {
    margin-bottom: 32px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.project:hover {
    transform: translateX(8px);
}

.project h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.project h3 a {
    border-bottom: 1px solid var(--text-primary);
    padding-bottom: 0;
}

.project h3 a:hover {
    color: var(--text-secondary);
    border-bottom-color: var(--text-secondary);
}

.project p {
    font-size: 14px;
    color: var(--text-primary);
}

footer {
    margin-top: 80px;
    font-size: 12px;
    color: var(--text-secondary);
}


/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(56, 56, 56, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.modal-content {
    position: relative;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    margin-bottom: 56px;
}

.social-links {
    display: flex;
    gap: 32px;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    border: none;
    padding-bottom: 0;
    transition: transform 0.2s ease;
}

.social-link:hover {
    transform: scale(1.1);
    color: #ffffff;
    border: none;
}

.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    color: #ffffff;
}

.icon-circle svg {
    width: 24px;
    height: 24px;
}

.social-link span {
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
}

/* Project Hover Preview */
.project-preview {
    position: fixed;
    top: 0;
    left: 0;
    max-width: 560px;
    max-height: 480px;
    width: auto;
    height: auto;
    border-radius: 0;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.project-preview.visible {
    opacity: 1;
    transform: scale(1);
}

/* Resume Modal Specific Styles */
.resume-content {
    width: 90%;
    max-width: 750px;
    height: 90vh;
    background-color: var(--bg-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    align-items: stretch;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
}

.resume-header h2 {
    font-size: 14px;
    font-weight: 500;
}

.resume-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-download {
    padding: 6px 12px;
    background-color: var(--text-primary);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-download:hover {
    opacity: 0.8;
    color: var(--bg-color);
    border-bottom: none;
}

.btn-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    opacity: 0.7;
}

.resume-viewer {
    width: 100%;
    flex: 1;
}

/* Iterations Layout */
.iterations-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.iteration-item {
    width: 100%;
}

.iteration-item img,
.iteration-item video {
    width: 100%;
    display: block;
    background-color: #f0f0f0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.iteration-item:hover img,
.iteration-item:hover video {
    transform: scale(1.02);
}

.iteration-item video {
    pointer-events: none;
}

.iteration-caption {
    font-size: 11px;
    color: #888888;
    margin-top: 12px;
    text-align: left;
}

/* Stasium Hover Card */
.hover-card-trigger {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.hover-card {
    position: absolute;
    bottom: 100%;
    left: 50%;
    width: 300px;
    background-color: var(--bg-color, #fff);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    pointer-events: none;
    text-align: left;
}

.hover-card-trigger:hover .hover-card {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

.hc-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.hc-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.hc-content {
    display: flex;
    flex-direction: column;
}

.hc-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #000);
    margin-bottom: 4px;
    line-height: 1;
}

.hc-desc {
    font-size: 12px;
    color: var(--text-secondary, #666);
    line-height: 1.4;
    margin: 0;
}

/* Scroll Animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(60px) scale(0.96);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 48px 20px;
    }
    
    .avatar {
        margin-bottom: 32px;
    }

    .bio p {
        margin-bottom: 20px;
    }

    .work {
        margin-top: 48px;
    }

    .project {
        margin-bottom: 24px;
    }

    .iterations-grid {
        gap: 16px;
    }

    .modal-avatar {
        width: 140px;
        height: 140px;
        margin-bottom: 32px;
    }

    .social-links {
        gap: 20px;
    }

    .icon-circle {
        width: 48px;
        height: 48px;
    }

    .resume-content {
        width: 95%;
        height: 85vh;
    }
    
    .hover-card {
        width: 250px;
        left: 0;
        transform: translateY(10px);
    }
    
    .hover-card-trigger:hover .hover-card {
        transform: translateY(-8px);
    }
}
