/* Reset and Base Styles */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */

h1, h2, h3 {
    line-height: 1.2;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Sidebar Header */

.sidebar-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .name {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-size: 1.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-header .title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    font-weight: 400;
}

/* Sidebar Download Link */

.sidebar-download {
    display: block;
    text-align: center;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all var(--transition-speed);
}

.sidebar-download:hover {
    background: var(--accent);
    color: white;
    text-decoration: none;
}

/* Contact Section */

.contact-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.contact-item a {
    color: var(--text-secondary);
}

.contact-item a:hover {
    color: var(--accent);
}

/* Social Section */

.social-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.social-section .section-heading {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* Main Container */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    flex: 1;
}

/* Two-Column Layout */

.content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

.sidebar {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.sidebar .resume-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
}

.sidebar .resume-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar .section-heading {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.sidebar .skills-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.sidebar .skill-category {
    background: transparent;
    padding: 0;
    border: none;
}

.sidebar .skill-category-title {
    font-size: 0.85rem;
}

.sidebar .skill-list li {
    font-size: 0.8rem;
    padding: 0.3rem 0;
}

.main-content {
    min-width: 0;
}

/* Resume Sections */

.resume-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.resume-section:last-child {
    border-bottom: none;
}

.section-heading {
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    border-bottom: none;
}

.section-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Skills Section */

.skills-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.skill-category-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.skill-list {
    list-style: none;
}

.skill-list li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.skill-list li:last-child {
    border-bottom: none;
}

.skill-list li::before {
    content: "▹ ";
    color: var(--accent);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Experience Section - Timeline */

#experience {
    position: relative;
}

#experience .section-heading {
    margin-left: 2rem;
}

.job {
    margin-bottom: 2rem;
    padding-left: 2rem;
    position: relative;
}

/* Timeline line */
.job::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 8px;
    bottom: -2rem;
    width: 2px;
    background: var(--border-color);
}

.job:last-child::before {
    bottom: 0;
}

/* Timeline bullet */
.job::after {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--text-muted);
}

.job-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.job-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.job-duties {
    list-style: none;
    margin-left: 0;
}

.job-duties li {
    color: var(--text-secondary);
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
    line-height: 1.6;
    font-size: 0.9rem;
}

.job-duties li::before {
    content: "•";
    color: var(--text-muted);
    position: absolute;
    left: 0;
}

/* Education Section */

.education-item {
    margin-bottom: 1.5rem;
}

.education-item:last-child {
    margin-bottom: 0;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.degree {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.education-period {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.institution {
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.field {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.education-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

/* Footer */

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    text-align: center;
    margin-top: auto;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive Design */

@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1rem;
    }

    .container {
        padding: 2rem 1.5rem;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        padding: 1.5rem;
    }

    .sidebar-header .name {
        font-size: 1.5rem;
    }

    .education-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 20px;
        top: 15px;
        right: 15px;
    }

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

    #experience .section-heading {
        margin-left: 0;
    }

    .job {
        padding-left: 1.5rem;
    }

    .job::before {
        left: 3px;
    }

    .job::after {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .sidebar {
        padding: 1rem;
    }
}

/* Print Styles */

@media print {
    /* Hide interactive elements */
    .theme-toggle,
    .sidebar-download,
    .site-footer {
        display: none !important;
    }

    /* Optimize for print */
    body {
        background: white;
        color: black;
        font-size: 11pt;
        line-height: 1.4;
    }

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

    /* Sidebar layout for print */
    .content-wrapper {
        grid-template-columns: 220px 1fr;
        gap: 1.5rem;
    }

    .sidebar {
        background: white;
        border: none;
        border-right: 1px solid #ccc;
        padding: 0 1rem 0 0;
    }

    .sidebar-header {
        border-bottom-color: #ccc;
    }

    .contact-section,
    .social-section {
        border-bottom-color: #ccc;
    }

    .resume-section {
        page-break-inside: avoid;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }

    .section-heading {
        color: #000;
    }

    .job,
    .education-item {
        page-break-inside: avoid;
    }

    .job::before {
        background: #ccc;
    }

    .job::after {
        border-color: #666;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    /* Ensure good page breaks */
    h2, h3 {
        page-break-after: avoid;
    }

    ul {
        page-break-before: avoid;
    }

    /* Remove shadows and backgrounds */
    .skill-category {
        background: white;
        border: none;
    }

    /* Adjust colors for print */
    .job-duties li,
    .skill-list li,
    .section-content,
    .contact-item a {
        color: #333;
    }
}
