/* ===== Self-hosted Inter Font ===== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/inter-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/inter-medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/inter-semibold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/inter-bold.woff2') format('woff2');
}

/* ===== CSS Variables — Light Mode (default) ===== */
:root {
    --color-bg: #f8f9fc;
    --color-surface: transparent;
    --color-text: #0f1117;
    --color-text-muted: #5a6478;
    --color-accent: #6e00c2;
    --color-accent-light: rgba(37, 99, 235, 0.08);
    --color-border: rgba(0, 0, 0, 0.08);
    --shadow-sm: none;
    --shadow-md: none;
    --radius: 8px;
    --transition: all 0.2s ease;
}

/* ===== Dark Mode ===== */
[data-theme="dark"] {
    --color-bg: #0a0a0a;
    --color-surface: transparent;
    --color-text: #e8eaf0;
    --color-text-muted: #8892a4;
    --color-accent: #FFD933;
    --color-accent-light: rgba(96, 165, 250, 0.12);
    --color-border: rgba(255, 255, 255, 0.07);
    --shadow-sm: none;
    --shadow-md: none;
}

/* ===== Utility Classes ===== */
.hidden {
    display: none;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    background-image:
        linear-gradient(var(--color-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
    background-size: 40px 40px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Container ===== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ===== Header ===== */
.header {
    text-align: center;
    padding: 40px 0 48px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-border);
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    margin-bottom: 20px;
    border: 2px solid var(--color-border);
    box-shadow: none;
}

.name {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.title {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.tagline {
    font-size: 1rem;
    color: var(--color-text-muted);
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto 20px;
}

.contact-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-bar .icon {
    vertical-align: -2px;
    margin-right: 4px;
}

.contact-bar a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.contact-bar a:hover {
    color: var(--color-accent);
    background-color: var(--color-accent-light);
}

.contact-bar a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.contact-bar .location {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding: 6px 12px;
}

.contact-bar .divider {
    color: var(--color-border);
    font-weight: 300;
}

/* ===== Sections ===== */
.section {
    background: transparent;
    border-radius: 0;
    padding: 32px 0;
    margin-bottom: 0;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--color-border);
}

.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-accent-light);
}

/* ===== About ===== */
.about-text {
    font-size: 1.05rem;
    color: var(--color-text);
    line-height: 1.8;
}

/* ===== Entries (Experience & Education) ===== */
.entry {
    margin-bottom: 28px;
}

.entry:last-child {
    margin-bottom: 0;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 16px;
}

.entry-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 2px;
}

.entry-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 400;
}

.entry-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
    white-space: nowrap;
    background: var(--color-accent-light);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.entry-details {
    list-style: none;
    padding-left: 0;
}

.entry-details li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--color-text);
    font-size: 0.95rem;
}

.entry-details li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

.entry-description {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* ===== Client Bar ===== */
.client-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 14px;
}

.client-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--color-accent-light);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 6px;
    font-size: 0.82rem;
}

[data-theme="dark"] .client-pill {
    border-color: rgba(96, 165, 250, 0.2);
}

.client-name {
    font-weight: 600;
    color: var(--color-text);
}

.client-dates {
    color: var(--color-text-muted);
    font-weight: 400;
}

.client-loc {
    color: var(--color-accent);
    font-weight: 500;
    font-size: 0.78rem;
    background: var(--color-accent-light);
    padding: 1px 7px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
}

.client-divider {
    display: none;
}

/* ===== Skills ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.skill-category-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #690cff;
    background-color: #f5f3ff;
    border: 1px solid #ddd6fe;
    padding: 5px 14px;
    border-radius: 6px;
    transition: var(--transition);
    cursor: default;
}

.skill-tag:hover {
    background-color: #ede9fe;
    border-color: #c4b5fd;
    transform: translateY(-1px);
}

[data-theme="dark"] .skill-tag {
    color: #c4b5fd;
    background-color: rgba(109, 40, 217, 0.12);
    border-color: rgba(196, 181, 253, 0.25);
}

[data-theme="dark"] .skill-tag:hover {
    background-color: rgba(109, 40, 217, 0.22);
    border-color: rgba(196, 181, 253, 0.45);
}

/* ===== Placeholder ===== */
.placeholder-text {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    padding: 20px 0;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 40px 0 20px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .container {
        padding: 32px 20px;
    }

    .header {
        padding: 50px 0;
    }

    .name {
        font-size: 2.4rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .container {
        padding: 24px 16px;
    }

    .header {
        padding: 40px 0;
    }

    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1.1rem;
    }

    .section {
        padding: 24px 0;
    }

    .entry-header {
        flex-direction: column;
        gap: 8px;
    }

    .entry-date {
        align-self: flex-start;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Action Buttons ===== */
.action-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background-color: var(--color-accent-light);
    color: var(--color-text-muted);
    cursor: pointer;
    box-shadow: none;
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--color-accent);
    color: white;
    transform: translateY(-2px);
}

.action-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.action-btn svg {
    width: 18px;
    height: 18px;
}


/* ===== Print & PDF Generation Styles ===== */
@media print {
    :root {
        --color-bg: #ffffff;
        --color-surface: #ffffff;
        --color-text: #1a1a2e;
        --color-text-muted: #4a5568;
        --color-accent: #2563eb;
        --color-accent-light: #e8f0fe;
        --color-border: #d1d5db;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    @page {
        margin: 0.35in 0.4in;
        size: A4;
    }

    html, body {
        background: white !important;
        background-image: none !important;
        font-size: 10pt;
        line-height: 1.3;
        color: #1a1a2e !important;
    }

    .action-buttons {
        display: none !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .header {
        padding: 0 0 2px 0;
        margin-bottom: 2px;
        border-bottom: 1px solid #d1d5db !important;
        width: 100%;
        float: none;
        text-align: center;
    }

    .profile-photo {
        display: none !important;
    }

    .name {
        font-size: 12pt;
        margin-bottom: 8px;
        color: #1a1a2e !important;
        line-height: 1;
    }

    .title {
        font-size: 8.5pt;
        margin-bottom: 1px;
        line-height: 1;
    }

    .tagline {
        display: none !important;
    }

    .contact-bar {
        margin-top: 2px;
        gap: 0;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

    .contact-bar a, .contact-bar .location {
        color: #1a1a2e !important;
        font-size: 6.5pt;
        padding: 0 3px;
        line-height: 1.2;
        display: inline;
    }

    .contact-bar .divider {
        display: inline;
        margin: 0 1px;
        font-size: 6.5pt;
        color: #d1d5db;
    }

    .section {
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        border-top: 1px solid #d1d5db !important;
        border-radius: 0;
        padding: 3px 0;
        margin-bottom: 18px;
        page-break-inside: avoid;
    }

    .section-title {
        font-size: 7.5pt;
        margin-bottom: 3px;
        padding-bottom: 1px;
        border-bottom: 1px solid #e8f0fe;
        color: #2563eb !important;
    }

    .about-text {
        font-size: 8pt;
        line-height: 1.3;
        margin-bottom: 8px;
        color: #1a1a2e !important;
    }

    .section:first-of-type {
        width: 100%;
        float: none;
        padding: 3px 0;
        border-top: 1px solid #d1d5db !important;
        border-left: none !important;
    }

    .section:first-of-type .section-title {
        margin-top: 0;
    }

    .section:nth-of-type(2) {
        clear: none;
        border-top: 1px solid #d1d5db !important;
        padding: 3px 0;
        margin-top: 0;
    }

    .entry {
        margin-bottom: 18px;
        page-break-inside: avoid;
    }

    .entry-header {
        margin-bottom: 2px;
    }

    .entry-title {
        font-size: 9pt;
        color: #1a1a2e !important;
    }

    .entry-subtitle {
        font-size: 7.5pt;
        color: #4a5568 !important;
    }

    .entry-date {
        font-size: 6.5pt;
        padding: 1px 5px;
        background: #f3f4f6 !important;
        color: #4a5568 !important;
        border: none !important;
    }

    .entry-details li {
        font-size: 7.5pt;
        margin-bottom: 1px;
        padding-left: 10px;
        line-height: 1.25;
        color: #1a1a2e !important;
    }

    .entry-details li::before {
        width: 3px;
        height: 3px;
        top: 5px;
        background-color: #2563eb !important;
    }

    .entry-description {
        font-size: 7.5pt;
        color: #4a5568 !important;
    }

    .client-bar {
        margin-bottom: 6px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .client-pill {
        font-size: 6.5pt;
        padding: 1px 5px;
    }

    .client-divider {
        display: none;
    }

    .client-name {
        font-size: 6.5pt;
    }

    .client-dates {
        font-size: 6pt;
    }

    .client-loc {
        font-size: 6pt;
        padding: 1px 4px;
    }

    .skills-grid { 
        gap: 6px; 
    }

    .skill-category-title {
        font-size: 7.5pt;
        margin-bottom: 3px;
        color: #1a1a2e !important;
    }

    .skill-tags { 
        gap: 2px; 
    }

    .skill-tag {
        font-size: 6.5pt;
        padding: 1px 5px;
        background-color: #e8f0fe !important;
        color: #2563eb !important;
        transform: none !important;
    }

    .footer {
        padding: 6px 0 0;
        font-size: 6.5pt;
        color: #4a5568 !important;
    }

    p, li { 
        orphans: 3; 
        widows: 3; 
    }

    h2, h3 { 
        page-break-after: avoid; 
    }
}
