/* CSS Variables for Design Tokens */
:root {
    --background: #eef1f6;
    --paper-background: #ffffff;
    --text-primary: #1b1b1c;
    --text-secondary: #5d5e60;
    --text-disabled: #8f9194;
    --border-default: #e0e3e7;
    --neutrals-100: #eef1f6;
    --neutrals-200: #e0e3e7;
    --radius-full: 1000px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --link-hover: #0099FF;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #111111;
        --paper-background: #1c1c1e;
        --text-primary: #ffffff;
        --text-secondary: #a0a0a5;
        --text-disabled: #636366;
        --border-default: #3a3a3c;
        --neutrals-100: #2c2c2e;
        --neutrals-200: #3a3a3c;
    }
}

/* Force Light Mode */
:root.light-mode {
    --background: #eef1f6;
    --paper-background: #ffffff;
    --text-primary: #1b1b1c;
    --text-secondary: #5d5e60;
    --text-disabled: #8f9194;
    --border-default: #e0e3e7;
    --neutrals-100: #eef1f6;
    --neutrals-200: #e0e3e7;
}

/* Force Dark Mode */
:root.dark-mode {
    --background: #111111;
    --paper-background: #1c1c1e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a5;
    --text-disabled: #636366;
    --border-default: #3a3a3c;
    --neutrals-100: #2c2c2e;
    --neutrals-200: #3a3a3c;
}

/* Footer Section (Removed) */
/* .cv-footer {
    display: none;
} */

.theme-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;

    background: var(--paper-background);
    border: 1px solid var(--border-default);
    color: var(--text-primary);

    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

    font-size: 20px;
    /* Icon size */
    transition: all 0.3s ease;
    pointer-events: auto;
}

.theme-toggle:hover {
    background: var(--neutrals-100);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Back to Top Button */
.back-to-top {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--paper-background);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    /* Initially disabled */
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: var(--neutrals-100);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Floating Controls Container */
.floating-controls {
    position: fixed;
    bottom: 32px;
    left: 50%;
    /* Center reference */
    transform: translateX(384px);
    /* Move to right edge of content (768/2) */
    width: auto;
    max-width: none;
    display: flex;
    flex-direction: row;
    gap: 12px;
    /* User preferred gap */
    padding: 0 0 0 48px;
    /* Add spacing from content */
    pointer-events: none;
    z-index: 100;
}

/* Show on Mobile/Tablet */
@media (max-width: 1024px) {
    .floating-controls {
        left: 0;
        right: 0;
        transform: none;
        width: 100%;
        justify-content: space-between;
        padding: 0 32px;
        gap: 0;
    }
}

@media print {

    .cv-footer,
    .back-to-top,
    .floating-controls {
        display: none !important;
    }
}

/* Animations */
@keyframes wave {
    0% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(14deg);
    }

    20% {
        transform: rotate(-8deg);
    }

    30% {
        transform: rotate(14deg);
    }

    40% {
        transform: rotate(-4deg);
    }

    50% {
        transform: rotate(10deg);
    }

    60% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.wave-emoji {
    display: inline-block;
    animation: wave 2.5s infinite;
    transform-origin: 70% 70%;
    cursor: pointer;
}

.wave-emoji.thumbs-up {
    animation: none;
    transform: none;
}

/* Fade in content on load */
.cv-container {
    animation: fadeIn 0.8s ease-out forwards;
}

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

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

a {
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover) !important;
}

/* Typography */
h1 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.3;
    letter-spacing: -1.2px;
    color: var(--text-primary);
    text-wrap: balance;
}

h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    text-transform: uppercase;
    text-wrap: balance;
}

h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    text-wrap: balance;
}

p {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Main Container */
.cv-container {
    background-color: var(--background);
    min-height: 100vh;
    padding: 64px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    max-width: 768px;
    /* Reduced for single column readability */
    margin: 0 auto;
    animation: fadeIn 0.8s ease-out forwards;
}

@media (max-width: 1024px) {
    .cv-container {
        padding-bottom: 96px;
    }
}

/* Content Layout */
.content {
    display: flex;
    flex-direction: column;
    /* Single column layout */
    gap: 32px;
    align-items: flex-start;
    flex: 1;
}

/* Columns */
.col-left {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 48px;
    /* Slightly reduced gap */
    justify-content: flex-start;
}

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

/* Paper Component (White Cards) */
.paper {
    background-color: var(--paper-background);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.section-header h2 {
    margin: 0;
}

.section-note {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.section-note a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-skip-ink: none;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Profile Section */
.profile-section {
    padding: 0 16px;
    background-image: url('assets/profile-bg.png');
    background-repeat: no-repeat;
    background-position: right top;
    background-size: 140px auto;
    /* reasonable size constraint */
}

.profile-header {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
}

.profile-image {
    width: 86px;
    height: 86px;
    margin-bottom: -8px;
    position: relative;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-text {
    margin-bottom: -8px;
}

.profile-text h1 {
    margin-bottom: 0;
}

.subtitle {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-top: 0;
    text-wrap: balance;
}

.profile-description {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-description p {
    margin: 0;
}

.profile-description strong {
    font-weight: 600;
}

/* Experience Section */
.experience-section {
    flex: 1;
}

.experience-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.experience-item {
    display: flex;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-default);
}

.experience-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.company-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.company-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.experience-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.experience-header h3 {
    margin: 0;
    white-space: nowrap;
}

.experience-date {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: normal;
    color: var(--text-secondary);
    text-transform: uppercase;
    white-space: nowrap;
}

.experience-role {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: normal;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: flex;
    gap: 4px;
    align-items: flex-start;
}

.experience-content p {
    margin: 0;
}

/* Education Section */
.education-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.education-item {
    display: flex;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-default);
}

.education-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.education-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.education-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.education-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.education-header h3 {
    margin: 0;
    white-space: nowrap;
}

.education-year {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: normal;
    color: var(--text-secondary);
    text-transform: uppercase;
    white-space: nowrap;
}

.education-institution {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: normal;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.education-specialty {
    margin: 0;
}

/* Pill/Tag Components */
.pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.pill {
    background-color: var(--neutrals-100);
    padding: 6px 8px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: normal;
    color: var(--text-primary);
    text-transform: uppercase;
    white-space: nowrap;
}

.pill img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    object-fit: contain;
}

.pill-emoji {
    font-size: 18px;
    line-height: normal;
}

.pill-disabled {
    background-color: var(--paper-background);
    border: 1px solid var(--neutrals-200);
    color: var(--text-disabled);
    opacity: 0.5;
}

.pill-disabled img {
    opacity: 0.5;
}

/* Industries, Tools, and UX Skills sections inherit styles from .paper */

/* Soft Skills Section */
.soft-skills-section {
    flex: 1;
}

.soft-skills-list {
    list-style-position: inside;
    margin: 0;
    padding: 0;
    text-align: left;
}

.soft-skills-list li {
    margin-bottom: 0;
    margin-left: 21px;
}

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

/* Skills & Hobbies Row */
.skills-hobbies-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.soft-skills-section {
    flex: 1;
}

.hobbies-languages-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Hobbies Section */
.hobbies-section p {
    margin: 0;
    text-align: left;
}

/* Languages Section */
.languages-section {
    flex: 1;
}

.languages-section p {
    margin: 0;
    text-align: left;
}

/* TL;DR Section */
.tldr-content {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.tldr-content p {
    flex: 1;
    margin: 0;
}

.dunning-kruger-chart {
    position: relative;
    width: auto;
    height: 64px;
    flex-shrink: 0;
}

.dunning-kruger-chart img {
    width: auto;
    height: 100%;
    display: block;
    object-fit: contain;
}







/* Contact Section */
.contact-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
    margin-top: auto;
}

.contact-item {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.contact-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: -0.5px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.contact-arrow-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    padding-right: 2px;
}

.contact-line {
    flex: 1;
    height: 1px;
    border-bottom: 1px solid #8F9194;
    /* Match Figma stroke color */
    margin-top: 2px;
}

.contact-arrow-head {
    width: 6px;
    height: 6px;
    border-right: 1px solid #8F9194;
    border-top: 1px solid #8F9194;
    transform: rotate(45deg);
    margin-left: -5px;
    margin-top: 2px;
}

.contact-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-skip-ink: none;
    white-space: nowrap;
}

.contact-item.phone-row {
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .cv-container {
        padding: 64px 48px;
    }

    .content {
        flex-direction: column;
    }

    .col-left,
    .col-right {
        width: 100%;
    }

    .footer-note {
        width: 100%;
        max-width: 1088px;
    }
}

@media (max-width: 768px) {
    .cv-container {
        padding: 32px 16px 96px 16px;
    }

    h1 {
        font-size: 36px;
    }

    .subtitle {
        font-size: 18px;
    }

    .experience-header,
    .education-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }





    .contact-section {
        height: auto;
    }

    .contact-item {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .contact-link {
        text-align: right;
    }
}

@media print {
    @page {
        margin: 0.5cm;
        size: auto;
    }

    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        background-color: var(--background) !important;
    }

    .cv-container {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Force 2-column layout */
    .content {
        display: flex !important;
        flex-direction: row !important;
        gap: 24px !important;
    }

    .col-left {
        width: 60% !important;
    }

    .col-right {
        width: 40% !important;
    }

    .paper {
        break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        border: 1px solid var(--border-default);
    }

    .experience-item,
    .education-item,
    .contact-item {
        break-inside: avoid;
    }

    /* Ensure contact section fits at bottom or flows naturally */
    .contact-section {
        break-inside: avoid;
        padding: 0 !important;
    }
}