/* ATS-Friendly Resume Styles */
/* Clean, semantic, and optimized for both ATS parsing and visual appeal */
/* A4 Paper Size: 210mm x 297mm */
/* SEO & Accessibility Optimized */

/* ========================================
   ACCESSIBILITY STYLES
   ======================================== */

/* Skip Link for Keyboard Navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 4px 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

/* Screen Reader Only Content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #006666;
        --text-dark: #000000;
        --text-medium: #1a1a1a;
        --border-color: #000000;
    }
}

/* ========================================
   BASE STYLES
   ======================================== */

@page {
    size: A4;
    margin: 0;
}

@page :first {
    margin: 0;
}

@page :left {
    margin: 0;
}

@page :right {
    margin: 0;
}

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

:root {
    --primary-color: #0d9488;
    --primary-dark: #0f766e;
    --text-dark: #1f2937;
    --text-medium: #374151;
    --text-light: #6b7280;
    --bg-light: #f0fdfa;
    --border-color: #e5e7eb;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 7pt;
    line-height: 1.25;
    color: var(--text-dark);
    background-color: #f3f4f6;
    -webkit-font-smoothing: antialiased;
}

.resume {
    width: 210mm;
    min-height: 297mm;
    margin: 10px auto;
    background: var(--white);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 20px;
    border-bottom: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
}

.header-left h1 {
    font-size: 18pt;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 3px;
    letter-spacing: -0.5px;
}

.header-left .title {
    font-size: 10pt;
    color: var(--text-medium);
    font-weight: 500;
}

.header-left .subtitle {
    font-size: 7pt;
    color: var(--primary-dark);
    font-weight: 500;
    margin-top: 3px;
    line-height: 1.25;
}

.header-right {
    text-align: right;
}

.contact-info {
    list-style: none;
    font-size: 6.5pt;
    color: var(--text-medium);
}

.contact-info li {
    margin-bottom: 2px;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Content Layout */
.content {
    display: flex;
    gap: 0;
}

.left-column {
    width: 30%;
    background-color: var(--bg-light);
    padding: 10px 10px;
    border-right: 1px solid var(--border-color);
}

.right-column {
    width: 70%;
    padding: 10px 12px;
}

/* Section Styles */
.section {
    margin-bottom: 8px;
}

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

h2 {
    font-size: 8pt;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    padding-bottom: 3px;
    border-bottom: 1px solid var(--primary-color);
}

h3 {
    font-size: 7pt;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

h4 {
    font-size: 7.5pt;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    padding-left: 6px;
    border-left: 2px solid var(--primary-color);
}

/* Lists */
ul {
    list-style: none;
    padding-left: 0;
}

.left-column ul li {
    position: relative;
    padding-left: 10px;
    margin-bottom: 2px;
    font-size: 6pt;
    color: var(--text-medium);
}

.left-column ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.right-column ul li {
    position: relative;
    padding-left: 10px;
    margin-bottom: 2px;
    font-size: 6.5pt;
    color: var(--text-medium);
    line-height: 1.3;
}

.right-column ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Skill Groups */
.skill-group {
    margin-bottom: 5px;
}

.skill-group h3 {
    font-size: 6.5pt;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1px;
}

.skill-group p {
    font-size: 6pt;
    color: var(--text-medium);
    line-height: 1.25;
}

/* Education */
.education-item h3 {
    font-size: 6.5pt;
    font-weight: 600;
    margin-bottom: 2px;
}

.education-item p {
    font-size: 6pt;
    color: var(--text-light);
}

/* Job Styles */
.job {
    margin-bottom: 6px;
}

.job-header h3 {
    font-size: 7pt;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1px;
}

.job-meta {
    font-size: 6pt;
    color: var(--text-light);
    margin-bottom: 3px;
    font-style: italic;
}

.project {
    margin-bottom: 6px;
}

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

/* Profile Summary */
.right-column .section:first-child p {
    font-size: 6.5pt;
    line-height: 1.35;
    color: var(--text-medium);
}

/* Strong text emphasis */
strong {
    font-weight: 600;
    color: var(--text-dark);
}

/* Project Styles */
.project {
    margin-bottom: 6px;
}

.project h3 {
    font-size: 7.5pt;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 1px;
}

.project-meta {
    font-size: 6pt;
    color: var(--text-light);
    margin-bottom: 2px;
    font-style: italic;
}

.project ul li {
    position: relative;
    padding-left: 10px;
    margin-bottom: 1px;
    font-size: 6.5pt;
    color: var(--text-medium);
    line-height: 1.3;
}

.project ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Two Column List for Certifications */
.two-column-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 15px;
}

.two-column-list li {
    font-size: 6pt !important;
    margin-bottom: 2px !important;
    padding-left: 10px !important;
}

/* Projects Grid - 2 columns */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 15px;
}

.projects-grid .project {
    margin-bottom: 6px;
}

.projects-grid .project h3 {
    font-size: 7pt;
}

.projects-grid .project-meta {
    font-size: 5.5pt;
}

.projects-grid .project ul li {
    font-size: 5.5pt !important;
    margin-bottom: 1px !important;
    line-height: 1.25;
}

/* PDF Download Button */
.pdf-download-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.pdf-download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.4);
}

.pdf-download-btn svg {
    flex-shrink: 0;
}

@media print {
    body {
        background: white;
        font-size: 6.5pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        margin: 0;
        padding: 0;
    }
    
    .resume {
        box-shadow: none;
        margin: 0;
        width: 100%;
        min-height: auto;
        max-height: 297mm;
        overflow: hidden;
    }
    
    .header {
        padding: 8px 12px;
    }
    
    .header-left h1 {
        font-size: 15pt;
        margin-bottom: 2px;
    }
    
    .header-left .subtitle {
        font-size: 5.5pt;
        margin-top: 2px;
    }
    
    .contact-info {
        font-size: 5.5pt;
    }
    
    .left-column,
    .right-column {
        padding: 8px 10px;
    }
    
    a {
        color: var(--primary-color);
        text-decoration: none;
    }
    
    h2 {
        font-size: 6.5pt;
        page-break-after: avoid;
        margin-bottom: 3px;
    }
    
    h3 {
        font-size: 5.5pt;
        margin-bottom: 1px;
    }
    
    .left-column ul li {
        font-size: 5pt;
        margin-bottom: 1px;
    }
    
    .right-column ul li {
        font-size: 5.5pt;
        margin-bottom: 1px;
    }
    
    .skill-group h3 {
        font-size: 5.5pt;
    }
    
    .skill-group p {
        font-size: 5pt;
    }
    
    .job-header h3 {
        font-size: 5.5pt;
    }
    
    .job-meta {
        font-size: 4.5pt;
    }
    
    .project h3 {
        font-size: 5.5pt;
    }
    
    .project-meta {
        font-size: 4.5pt;
    }
    
    .project ul li {
        font-size: 4.5pt !important;
    }
    
    .two-column-list li {
        font-size: 4.5pt !important;
    }
    
    .job, .project {
        page-break-inside: avoid;
        margin-bottom: 3px;
    }
    
    .section {
        margin-bottom: 4px;
    }
    
    .pdf-download-btn {
        display: none;
    }
    
    /* Force single page */
    html, body {
        height: 297mm;
        overflow: hidden;
    }
    
    * {
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
        page-break-before: avoid !important;
    }
}

/* ========================================
   FIXED A4 SIZE - NO RESPONSIVE LAYOUT CHANGES
   The resume maintains exact A4 proportions on all screens
   Scales down on smaller screens while preserving layout
   ======================================== */

/* Container for scaling */
html {
    overflow-x: auto;
}

body {
    min-width: 210mm;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
}

/* Scale the resume on smaller screens while maintaining A4 layout */
@media screen and (max-width: 850px) {
    body {
        padding: 0;
        align-items: flex-start;
    }
    
    .resume {
        transform-origin: top left;
        transform: scale(0.9);
        margin: 5px;
    }
}

@media screen and (max-width: 768px) {
    .resume {
        transform: scale(0.8);
        margin: 5px;
    }
}

@media screen and (max-width: 680px) {
    .resume {
        transform: scale(0.7);
        margin: 5px;
    }
}

@media screen and (max-width: 600px) {
    .resume {
        transform: scale(0.6);
        margin: 5px;
    }
}

@media screen and (max-width: 520px) {
    .resume {
        transform: scale(0.5);
        margin: 5px;
    }
}

@media screen and (max-width: 440px) {
    .resume {
        transform: scale(0.45);
        margin: 5px;
    }
}

@media screen and (max-width: 400px) {
    .resume {
        transform: scale(0.4);
        margin: 5px;
    }
}

@media screen and (max-width: 360px) {
    .resume {
        transform: scale(0.35);
        margin: 5px;
    }
}
