/* Resume CSS - Fixed, Compact & Themed */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* Font Definitions */
@font-face {
    font-family: 'Monument Extended';
    src: url('../assets/fonts/MonumentExtended-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Monument Extended';
    src: url('../assets/fonts/MonumentExtended-Ultrabold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Centrale Sans Pro';
    src: url('../assets/fonts/CentraleSansProLight.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Centrale Sans Pro';
    src: url('../assets/fonts/CentraleSansProBook.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

:root {
    /* Dark Mode (Default) */
    --bg-color: #050505;
    --paper-color: #080808;
    --text-primary: #ededed;
    --text-secondary: #999999;
    --accent-color: #FFFFFF;
    --border-color: rgba(255, 255, 255, 0.08);

    /* Specific Title Vars for Theme Control */
    --name-color: rgba(255, 255, 255, 0.95);
    --section-heading-color: rgba(255, 255, 255, 0.85);

    /* Header Vars */
    --header-bg: rgba(5, 5, 5, 0.7);
    --header-border: rgba(255, 255, 255, 0.1);

    --font-display: 'Monument Extended', sans-serif;
    --font-body: 'Centrale Sans Pro', sans-serif;
    --font-tech: 'Space Grotesk', monospace;

    --a4-width: 210mm;
    --a4-height: 297mm;
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-color: #e5e5e5;
    /* Site background distinct from paper */
    --paper-color: #ffffff;
    --text-primary: #111111;
    --text-secondary: #555555;
    --accent-color: #000000;
    --border-color: rgba(0, 0, 0, 0.1);

    /* Light Mode Title Overrides (Grey instead of Black) */
    --name-color: #444444;
    --section-heading-color: #666666;

    --header-bg: rgba(255, 255, 255, 0.8);
    --header-border: rgba(0, 0, 0, 0.05);
    /* Softer border */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 9.2pt;
    /* Slightly smaller for density */
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0 250px 0;
    /* More bottom padding for menu + scale overflow */
    min-height: 100vh;
    transition: background-color 0.3s ease;
    overflow-x: hidden;
    /* Prevent horizontal scroll from scale if needed */
}

/* --- Site Header Menu (Glass) --- */
.site-header-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--header-border);
    border-bottom: none;
    padding: 1rem 0;
    /* Slightly larger clickable area */
    transition: all 0.3s ease;
}

.menu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.menu-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-nav button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Controls Components */
.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}

.icon-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.separator-v {
    width: 1px;
    height: 20px;
    background: var(--header-border);
}

.lang-switch-group {
    display: flex;
    gap: 0.5rem;
}

.lang-text {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-tech);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    transition: color 0.2s;
}

.lang-text.active {
    color: var(--text-primary);
    border-bottom: 1px solid var(--text-primary);
}

.btn-download-action {
    background: var(--text-primary);
    color: var(--bg-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    font-family: var(--font-tech);
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: transform 0.2s;
}

.btn-download-action:hover {
    transform: translateY(-2px);
}

/* --- A4 Page --- */
.a4-page {
    width: var(--a4-width);
    height: var(--a4-height);
    background: var(--paper-color);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8mm 10mm;
    /* Tighter margins for more content */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;

    /* User Requested Zoom Effect */
    transform: scale(1.5);
    transform-origin: top center;
    margin-bottom: 120mm;
    /* Compensating for the 50% height increase (roughly) */
}

/* Paper Header */
.resume-paper-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--text-primary);
    padding-bottom: 3mm;
    margin-bottom: 4mm;
}

.name {
    font-family: var(--font-display);
    font-size: 18pt;
    font-weight: 400;
    /* Regular weight for a softer look */
    text-transform: uppercase;
    line-height: 0.9;
    margin-bottom: 1.5mm;
    letter-spacing: -0.01em;
    color: var(--name-color);
}

.role {
    font-family: var(--font-tech);
    font-size: 8.5pt;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary);
    margin-bottom: 2.5mm;
}

.contact-row {
    font-family: var(--font-tech);
    font-size: 7.2pt;
    color: var(--text-secondary);
    display: flex;
    gap: 3mm;
    flex-wrap: wrap;
}

.header-visual img {
    width: 18mm;
    height: 18mm;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.12);
    filter: none !important;
}

/* Grid */
.resume-grid {
    display: grid;
    grid-template-columns: 66% 30%;
    gap: 4%;
    flex: 1;
}

/* Section Common */
.section-title {
    font-family: var(--font-display);
    font-size: 8.2pt;
    font-weight: 400;
    /* Regular weight as requested */
    text-transform: uppercase;
    color: var(--section-heading-color);
    /* Softer white */
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1mm;
    margin-bottom: 2.5mm;
    letter-spacing: 0.1em;
    /* Increased spacing for airy feel */
}

.section {
    margin-bottom: 3.5mm;
}

.summary-text {
    font-size: 8.5pt;
    color: var(--text-primary);
    text-align: justify;
    font-weight: 300;
    line-height: 1.3;
}

/* Experience */
.experience-item {
    margin-bottom: 2.5mm;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.2mm;
}

.exp-role {
    font-family: var(--font-display);
    font-size: 8pt;
    font-weight: 400;
    color: var(--text-primary);
}

.exp-date {
    font-family: var(--font-tech);
    font-size: 6.8pt;
    color: var(--text-secondary);
}

.exp-company {
    font-family: var(--font-tech);
    font-size: 7.2pt;
    text-transform: uppercase;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5mm;
    display: block;
}

.exp-desc {
    font-size: 8pt;
    color: var(--text-secondary);
    line-height: 1.25;
    text-align: justify;
}

/* Courses */
.courses-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2mm 5mm;
}

.course-item {
    margin-bottom: 1mm;
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.course-title {
    font-family: var(--font-display);
    font-size: 7.5pt;
    font-weight: 400;
    color: var(--text-primary);
}

.course-date {
    font-family: var(--font-tech);
    font-size: 6.5pt;
    color: var(--text-secondary);
}

.course-school {
    font-size: 6.8pt;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
    display: block;
}

/* Sidebar */
.sidebar-section {
    margin-bottom: 4mm;
}

.edu-item {
    margin-bottom: 2mm;
}

.edu-degree {
    font-family: var(--font-display);
    font-size: 7.5pt;
    font-weight: 400;
    color: var(--text-primary);
}

.edu-school {
    font-size: 7pt;
    color: var(--text-secondary);
    display: block;
}

.edu-year {
    font-family: var(--font-tech);
    font-size: 6.5pt;
    color: var(--text-secondary);
    opacity: 0.7;
}

.skills-list,
.tools-list,
.lang-list {
    list-style: none;
}

.skills-list li,
.tools-list li,
.lang-list li {
    font-size: 7.5pt;
    color: var(--text-secondary);
    padding: 0.8mm 0;
    border-bottom: 1px solid var(--border-color);
}

/* Footer Badge */
.resume-footer {
    position: absolute;
    bottom: 6mm;
    left: 10mm;
    right: 10mm;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    opacity: 0.4;
}

.resume-channels {
    display: flex;
    gap: 3.5mm;
}

.resume-channels a {
    color: var(--text-primary);
    font-size: 10pt;
    transition: opacity 0.2s;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 12pt;
    font-weight: 800;
    color: var(--text-primary);
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    body {
        padding: 80px 0 0 0;
        /* Space for top menu */
        justify-content: flex-start;
        overflow-y: scroll;
        /* Allow scroll */
    }

    .menu-container {
        padding: 0 1rem;
        /* Less padding on mobile */
    }

    .menu-nav {
        gap: 0.8rem;
        /* Tighter spacing */
    }

    .btn-download-action {
        padding: 0.4rem 0.6rem;
        font-size: 0.65rem;
    }

    .site-header-menu {
        top: 0;
        bottom: auto;
        border-top: none;
        border-bottom: 1px solid var(--header-border);
    }

    .a4-page {
        transform: scale(0.45);
        /* Fit ~360px width screens (210mm is ~794px) */
        transform-origin: top center;
        /* Negative margin to pull footer up since scale leaves white space */
        margin-bottom: -140mm;
        margin-top: 10px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
        /* Softer shadow for mobile */
    }
}

/* Print Overrides */
@media print {
    @page {
        size: A4;
        margin: 0;
    }

    body {
        margin: 0;
        padding: 0;
        background: var(--paper-color) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        display: block;
    }

    .site-header-menu {
        display: none !important;
    }

    .a4-page {
        margin: 0 auto !important;
        border: none !important;
        width: 210mm !important;
        height: 297mm !important;
        padding: 20mm !important;
        /* Generous 2cm margin */
        background: var(--paper-color) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        transform: none !important;
        box-shadow: none !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        overflow: hidden !important;
    }

    .resume-footer {
        left: 20mm !important;
        /* Align with content padding */
        right: 20mm !important;
        bottom: 10mm !important;
        /* Slight push up */
        opacity: 1 !important;
        /* Ensure visibility */
    }
}