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

body {
    font-family: 'Source Code Pro', 'Montserrat', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f7;
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* Desktop Layout - Default */
.card-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.card-container:first-child {
    width: 400px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    margin: 0;
    border-radius: 0;
    overflow-y: auto;
    padding-bottom: 2rem;
}

.card-container:not(:first-child) {
    max-width: 720px;
    margin: 1rem 2rem 1rem auto;
    margin-left: 420px;
    position: relative;
    z-index: 1;
}

/* Mobile Layout - Override desktop defaults */
@media (max-width: 767px) {
    body {
        padding: 0;
        margin: 0;
    }
    
    html {
        margin: 0;
        padding: 0;
    }
    
    /* Override desktop card container styles for mobile */
    .card-container {
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    /* Mobile sidebar - hidden by default, but can be controlled by JavaScript */
    .card-container:first-child {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow-y: auto !important;
        padding-bottom: 1rem !important;
        background: white !important;
        z-index: 1000 !important;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.3s ease, visibility 0.3s ease !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Mobile sidebar when open - controlled by JavaScript */
    .card-container:first-child.mobile-open {
        transform: translateX(0) !important;
        visibility: visible !important;
    }
    
    /* Mobile content cards - full width with gaps between cards, no shadows */
    .card-container:not(:first-child) {
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
        border-radius: 16px !important;
        padding: 1.5rem !important;
        background: white !important;
        box-shadow: none !important;
        position: relative !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Remove bottom margin from last card to avoid extra space */
    .card-container:not(:first-child):last-child {
        margin-bottom: 0 !important;
    }
    
    /* Dark theme sidebar */
    body.dark-theme .card-container:first-child {
        background: #2d2d2d !important;
    }
    
    /* Dark theme content cards - no shadows on mobile */
    body.dark-theme .card-container:not(:first-child) {
        background: #2d2d2d !important;
        box-shadow: none !important;
    }
    
    /* First content card starts from top with minimal padding for header buttons */
    .card-container:not(:first-child):first-of-type {
        margin-top: 0 !important;
        padding-top: 1rem !important;
    }
    
    /* Profile card specific mobile adjustments */
    .card-container:not(:first-child):first-of-type .profile {
        padding: 1.5rem !important;
    }
    
    /* Hide print button, download PDF button, and theme toggle button on mobile by default */
    .print-button,
    .pdf-button,
    .theme-button {
        display: none;
    }
    
    /* Allow buttons to be shown when explicitly set */
    .print-button.show,
    .pdf-button.show,
    .theme-button.show {
        display: block !important;
    }
}

@media (min-width: 768px) {
    .card-container:first-child {
        width: 400px;
        height: 100vh;
        position: fixed;
        left: 0;
        top: 0;
        margin: 0;
        border-radius: 0;
        overflow-y: auto;
        padding-bottom: 2rem;
    }
    
    .card-container:not(:first-child) {
        margin: 1rem 2rem 1rem auto;
        margin-left: 420px;
        max-width: 720px;
        position: relative;
        z-index: 1;
    }
}

@media (min-width: 1024px) {
    .card-container:first-child {
        transform: translateX(0) !important;
        visibility: visible !important;
    }
    
    .card-container:not(:first-child) {
        margin: 1rem 2rem 1rem auto;
        margin-left: 420px;
        max-width: 800px;
        width: auto;
        position: relative;
        z-index: 1;
    }
}

@media (min-width: 1440px) {
    .card-container:first-child {
        transform: translateX(0) !important;
        visibility: visible !important;
    }
    
    .card-container:not(:first-child) {
        margin: 1rem 2rem 1rem auto;
        margin-left: 420px;
        max-width: 900px;
        width: auto;
        position: relative;
        z-index: 1;
    }
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 500;
    line-height: 1.333;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* List bullet points with centered plus signs and vertical line structure */
ul li {
    position: relative;
    padding-left: 1.5rem;
}

ul li::before {
    content: "|";
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0.5;
    font-family: monospace;
    line-height: 1.6;
}

ul li:nth-child(3)::before {
    content: "+";
}

/* Full opacity for bullet points in dark mode */
body.dark-theme ul li::before {
    opacity: 1;
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #191919;
}

h2 {
    font-size: 1.25rem;
    color: #666;
    font-weight: 600;
}

h3 {
    font-size: 1rem;
    color: #191919;
    font-weight: 600;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    margin-top: 0rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h3 .icon {
    font-size: 1.2rem;
    color: #191919;
    margin-right: 0.25rem;
}

/* Theme toggle button */
.theme-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.theme-toggle .material-icons {
    font-size: 1.5rem;
    color: #666;
    transition: color 0.3s ease;
}

/* Mobile theme toggle positioning */
@media (max-width: 767px) {
    .theme-toggle {
        top: 1rem;
        right: 1rem;
    }
}

@media (min-width: 768px) {
    .theme-toggle {
        top: 2rem;
        right: 2rem;
    }
}

/* Dark mode styles */
body.dark-theme {
    background: #1a1a1a;
    color: #ffffff;
}

body.dark-theme .card-container {
    background: #2d2d2d;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4 {
    color: #ffffff;
}

body.dark-theme p {
    color: #e0e0e0;
}

body.dark-theme .theme-toggle .material-icons {
    color: #ffffff;
}

body.dark-theme h3 .icon {
    color: #ffffff;
}

body.dark-theme .contact-item,
body.dark-theme .portfolio-item {
    color: #e0e0e0;
}

body.dark-theme .contact-item:hover,
body.dark-theme .portfolio-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}



/* Dark mode button styles */
body.dark-theme .pdf-button,
body.dark-theme .print-button,
body.dark-theme .theme-button,
body.dark-theme .scroll-top-button {
    background: #ffffff !important;
    color: #000000 !important;
}

body.dark-theme .pdf-button .material-icons,
body.dark-theme .print-button .material-icons,
body.dark-theme .theme-button .material-icons,
body.dark-theme .scroll-top-button {
    color: #000000 !important;
}

body.dark-theme .pdf-button:hover,
body.dark-theme .print-button:hover,
body.dark-theme .theme-button:hover,
body.dark-theme .scroll-top-button:hover {
    background: #f0f0f0 !important;
    transform: translateY(-2px) !important;
}

h4 {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: #555;
}

/* Mobile typography adjustments */
@media (max-width: 767px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    h3 {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    h4 {
        font-size: 1rem;
    }
    
    p {
        font-size: 0.9rem;
    }
    
    /* Improve text contrast on mobile for better readability */
    .job-description,
    .achievements li,
    .project-description,
    .project-details li,
    .skill-category li,
    .education-item p,
    .additional-item p {
        color: #4a4a4a;
    }
    
    /* Dark theme mobile improvements */
    body.dark-theme .job-description,
    body.dark-theme .achievements li,
    body.dark-theme .project-description,
    body.dark-theme .project-details li,
    body.dark-theme .skill-category li,
    body.dark-theme .education-item p,
    body.dark-theme .additional-item p {
        color: #f0f0f0;
    }
    
    /* Improve bullet points visibility on mobile */
    body.dark-theme .achievements li:before,
    body.dark-theme .military-achievements li:before,
    body.dark-theme .project-details li:before,
    body.dark-theme .skill-category li:before {
        color: rgba(255, 255, 255, 0.8);
    }
    
    body.dark-theme .job::before,
    body.dark-theme .education-item::before {
        color: rgba(255, 255, 255, 0.8);
    }
    
    body.dark-theme .experience::before,
    body.dark-theme .education::before {
        background: rgba(255, 255, 255, 0.4);
    }
}

/* Header Section */
.header {
    margin-bottom: 1.5rem;
    padding: 2rem 2rem 1.5rem 2rem;
}

/* Name and Title Styling */
.header h1.name {
    color: #191919;
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.header h2.title {
    color: #5f6368;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.3;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    align-items: center;
    text-align: center;
}

.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

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

/* Profile Card Specific Styles */
.profile {
    margin-bottom: 1.5rem;
    padding: 2rem;
    text-align: center;
}

.profile .profile-section {
    padding: 0;
}

.profile .name {
    font-size: 2rem;
    font-weight: 700;
    color: #191919;
    margin: 0;
    line-height: 1.2;
}

.profile .title {
    font-size: 1.2rem;
    color: #5f6368;
    margin: 0;
    font-weight: 500;
    line-height: 1.3;
}

.profile .profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Mobile header adjustments */
@media (max-width: 767px) {
    .profile-section {
        padding: 1rem;
    }
    
    .profile-section h1 {
        font-size: 1.5rem;
    }
    
    .profile-section h2 {
        font-size: 1.1rem;
    }
    
    .profile-image {
        width: 80px;
        height: 80px;
    }
    
    /* Mobile profile card adjustments */
    .profile {
        padding: 1.5rem;
    }
    
    .profile .name {
        font-size: 1.75rem;
    }
    
    .profile .title {
        font-size: 1.1rem;
    }
    
    .profile .profile-image {
        width: 100px;
        height: 100px;
    }
}

/* Legacy mobile adjustments - now handled by main mobile breakpoint */
@media (max-width: 768px) {
    /* This breakpoint is now handled by the main mobile breakpoint above */
    
    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .profile-image {
        width: 100px;
        height: 100px;
        align-self: center;
    }

    .name-title {
        text-align: center;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    .card-container:first-child {
        width: 350px;
    }
    
    .card-container:not(:first-child) {
        margin-left: 370px;
    }
}

/* Sidebar specific styles */
.card-container:first-child .header {
    margin-bottom: 2rem;
    padding: 2rem 2rem 1rem 2rem;
}

.card-container:first-child .contact {
    margin-bottom: 2rem;
    margin-top: 0;
    padding: 1rem 2rem 1rem 2rem;
}

.card-container:first-child .portfolio {
    margin-bottom: 2rem;
    margin-top: 0;
    padding: 1rem 2rem 1rem 2rem;
}



.card-container:first-child h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.card-container:first-child .portfolio-section {
    margin-bottom: 2rem;
}

.card-container:first-child .portfolio-section:last-child {
    margin-bottom: 0;
}

.card-container:first-child .portfolio-section h4 {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 400;
}

.card-container:first-child .portfolio-grid {
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.card-container:first-child .portfolio-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border: 0.1px solid #e0e0e0;
}

.card-container:first-child .contact-grid {
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.card-container:first-child .contact-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border: 0.1px solid #e0e0e0;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.375rem;
    margin-top: 3%;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    border: 0.1px solid #e0e0e0;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.contact-item:hover {
    background-color: #f0f0f0;
    text-decoration: none;
    color: inherit;
}

.contact-text {
    flex: 1;
}

.icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.material-icons {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

/* Button icon styling */
.pdf-button .material-icons,
.print-button .material-icons,
.theme-button .material-icons {
    color: #ffffff;
}

/* Summary Section */
.summary {
    margin-bottom: 2rem;
    padding: 1.5rem 2rem 1.5rem 2rem;
}

.summary p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #5f6368;
}

/* Skills Section */
.skills {
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem 1.5rem 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.skill-category {
    background: white;
    padding: 1.25rem;
    border-radius: 16px;
}

.skill-category h4 {
    color: #191919;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 400;
}

.skill-category ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.skill-category li {
    padding: 0.5rem 0;
    color: #5f6368;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.skill-category li:before {
    content: "+";
    color: #4a4a4a;
    position: absolute;
    left: 0;
    font-weight: normal;
    font-size: 1.2em;
}

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

/* Experience Section */
.experience {
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem 1.5rem 2rem;
    position: relative;
}

.experience::before {
    content: '';
    position: absolute;
    left: 2.5rem;
    top: 10rem;
    bottom: 1rem;
    width: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.job {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    position: relative;
    margin-left: 3rem;
}

.job::before {
    content: '+';
    position: absolute;
    left: -3rem;
    top: 2rem;
    width: 6px;
    height: 6px;
    color: #e0e0e0;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    line-height: 6px;
    z-index: 2;
}

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

/* Military Service Section */
.military {
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem 1.5rem 2rem;
}

.military-item {
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
}

.military-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.military-header h4 {
    color: #191919;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
}

.military-description {
    margin-bottom: 1rem;
    color: #5f6368;
    font-size: 0.95rem;
    line-height: 1.5;
}

.military-achievements {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.military-achievements li {
    padding: 0.5rem 0;
    color: #5f6368;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.military-achievements li:before {
    content: "+";
    color: #4a4a4a;
    position: absolute;
    left: 0;
    font-weight: normal;
    font-size: 1.2em;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.job-header h4 {
    color: #191919;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
}

.company {
    font-weight: 600;
    color: #666;
    font-size: 0.875rem;
}

.duration {
    background: transparent;
    color: #000000;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    align-self: flex-start;
    border: 1px solid #000000;
}

.job-description {
    margin-bottom: 1rem;
    color: #5f6368;
    font-size: 0.95rem;
    line-height: 1.5;
}

.achievements {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.achievements li {
    padding: 0.5rem 0;
    color: #5f6368;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.achievements li:before {
    content: "+";
    color: #4a4a4a;
    position: absolute;
    left: 0;
    font-weight: normal;
    font-size: 1.2em;
}



/* Projects Section */
.projects {
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem 1.5rem 2rem;
}

.project {
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-header h4 {
    color: #191919;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
}

.platform {
    background: transparent;
    color: #000000;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    align-self: flex-start;
    border: 1px solid #000000;
}

.project-description {
    margin-bottom: 1rem;
    color: #5f6368;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

.project-details li {
    padding: 0.5rem 0;
    color: #5f6368;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.project-details li:before {
    content: "+";
    color: #4a4a4a;
    position: absolute;
    left: 0;
    font-weight: normal;
    font-size: 1.2em;
}

.video-link {
    color: #666 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.1) 0%, rgba(128, 128, 128, 0.05) 100%);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(102, 102, 102, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 102, 102, 0.15);
    position: relative;
    overflow: hidden;
}

.video-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.video-link:hover::before {
    left: 100%;
}

.video-link:hover {
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.15) 0%, rgba(128, 128, 128, 0.08) 100%);
    border-color: rgba(102, 102, 102, 0.4);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 16px rgba(102, 102, 102, 0.25);
    text-decoration: none !important;
}

.video-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.video-text {
    flex: 1;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.video-arrow {
    font-size: 0.9rem;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.video-link:hover .video-arrow {
    transform: translateX(3px);
}

/* Video Section */
.video-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e1e5e9;
}

.video-section h4 {
    margin-bottom: 1rem;
    color: #191919;
    font-size: 1rem;
    font-weight: 600;
}

.video-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Portfolio Section */
.portfolio {
    margin-bottom: 1.5rem;
    padding: 0.5rem 2rem 0.5rem 2rem;
}

.portfolio-section {
    margin-bottom: 2rem;
}

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

.portfolio-section h4 {
    color: #191919;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
}

.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.portfolio-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    background: #f8f9fa;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 0.1px solid #e0e0e0;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.portfolio-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.portfolio-text {
    flex: 1;
    font-weight: 400;
}

/* Contact Section */
.contact {
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem 1.5rem 2rem;
}

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Education Section */
.education {
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem 1.5rem 2rem;
    position: relative;
}

.education::before {
    content: '';
    position: absolute;
    left: 2.5rem;
    top: 10rem;
    bottom: 1rem;
    width: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.education-timeline {
    position: relative;
}

.education-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    position: relative;
    margin-left: 3rem;
}

.education-item::before {
    content: '+';
    position: absolute;
    left: -3rem;
    top: 2rem;
    width: 6px;
    height: 6px;
    color: #e0e0e0;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    line-height: 6px;
    z-index: 2;
}

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

.education-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
}

.education-item h4 {
    color: #191919;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
}

.institution {
    color: #666;
    font-weight: 600;
    font-size: 0.875rem;
}

.year {
    background: transparent;
    color: #000000;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8125rem;
    font-weight: 500;
    align-self: flex-start;
    border: 1px solid #000000;
}

/* Additional Information */
.additional {
    margin-bottom: 1.5rem;
    padding: 1.5rem 2rem 1.5rem 2rem;
}

.additional-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.additional-item {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
}

.additional-item h4 {
    color: #191919;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 400;
}

.additional-item p {
    color: #5f6368;
    margin-bottom: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}



/* Print Styles */
@media print {
    body {
        background: black;
        color: white;
    }
    
    .card-container {
        background: black;
        color: white;
        border: none;
        box-shadow: none;
    }
    
    .container {
        box-shadow: none;
        margin: 0;
        padding: 1rem;
    }
    
    .contact-item a {
        color: white;
        text-decoration: none;
    }
    
    .contact-item {
        background: #333;
        color: white;
        box-shadow: none;
        border: none;
    }
    
    .skill-category, .job, .project, .education-item, .additional-item {
        background: black;
        color: white;
        border: none;
        box-shadow: none;
    }
    
    h1, h2, h3, h4 {
        color: white;
    }
    
    p, li {
        color: #ccc;
    }
    
    .company, .institution {
        color: #4a4a4a;
    }
    
    .duration, .year, .platform {
        background: #333;
        color: #ccc;
        border: none;
    }
}

/* Smooth transitions */
.job, .project, .education-item, .skill-category, .additional-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.job:hover, .project:hover, .education-item:hover, .skill-category:hover, .additional-item:hover {
    transform: translateY(-2px);
}

.card-container:first-child .portfolio h3 {
    margin-top: 0rem;
    margin-bottom: 2rem;
}

/* Dark Theme Styles */
.dark-theme {
    background: #1a1a1a;
    color: #ffffff;
}

.dark-theme .card-container {
    background: #2d2d2d;
    color: #ffffff;
}

.dark-theme .header h1.name {
    color: #ffffff;
}

.dark-theme .header h2.title {
    color: #b0b0b0;
}

.dark-theme .profile .name {
    color: #ffffff;
}

.dark-theme .profile .title {
    color: #b0b0b0;
}

.dark-theme h3 {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-theme h4 {
    color: #ffffff;
}

.dark-theme .company {
    color: #b0b0b0;
}

.dark-theme .institution {
    color: #b0b0b0;
}

.dark-theme .duration,
.dark-theme .platform,
.dark-theme .year {
    background: transparent;
    color: #ffffff;
    border: 1px solid #ffffff;
}

.dark-theme .job-description,
.dark-theme .military-description,
.dark-theme .project-description,
.dark-theme .summary p,
.dark-theme .achievements li,
.dark-theme .military-achievements li,
.dark-theme .project-details li,
.dark-theme .skill-category li,
.dark-theme .education-item p,
.dark-theme .additional-item p {
    color: #e0e0e0;
}

.dark-theme .skill-category,
.dark-theme .education-item,
.dark-theme .additional-item,
.dark-theme .job,
.dark-theme .military-item,
.dark-theme .project {
    background: #2d2d2d;
}

.dark-theme .contact-item,
.dark-theme .portfolio-item {
    background: #404040;
    color: #ffffff;
}

.dark-theme .contact-item:hover,
.dark-theme .portfolio-item:hover {
    background: #505050;
}

.dark-theme .portfolio-section h4 {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .achievements li:before,
.dark-theme .military-achievements li:before,
.dark-theme .project-details li:before,
.dark-theme .skill-category li:before {
    color: rgba(255, 255, 255, 0.6);
}

.dark-theme .experience::before {
    background: rgba(255, 255, 255, 0.3);
}

.dark-theme .job::before {
    color: rgba(255, 255, 255, 0.6);
}

.dark-theme .education::before {
    background: rgba(255, 255, 255, 0.3);
}

.dark-theme .education-item::before {
    color: rgba(255, 255, 255, 0.6);
}

/* Dark Theme Button Styling */
.dark-theme .pdf-button,
.dark-theme .print-button,
.dark-theme .theme-button {
    background: #ffffff;
    color: #000000;
}

.dark-theme .pdf-button .material-icons,
.dark-theme .print-button .material-icons,
.dark-theme .theme-button .material-icons {
    color: #ffffff;
}

/* Mobile Navigation Styles */
.mobile-nav-toggle {
    display: none;
}

.mobile-nav-overlay {
    display: none;
}

.mobile-nav-section {
    display: none;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Mobile Navigation Section in Sidebar */
.mobile-nav-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
    padding: 1.5rem;
}

.mobile-nav-section h3 {
    margin: 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
    margin-top: 0rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile navigation close button positioning */
.mobile-nav-section button[class*="close"] {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    z-index: 10;
}

.mobile-nav-section a {
    display: block;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.mobile-nav-section a:hover {
    background-color: #f0f0f0;
}

/* Dark theme mobile navigation */
body.dark-theme .mobile-nav-section {
    background: #2d2d2d;
    color: #ffffff;
}

body.dark-theme .mobile-nav-section h3 {
    color: #ffffff;
}

body.dark-theme .mobile-nav-section a {
    color: #ffffff;
}

body.dark-theme .mobile-nav-section a:hover {
    background-color: #404040;
}

/* Mobile-specific improvements - consolidated with main mobile breakpoint */

/* Tablet-specific adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .mobile-nav-toggle {
        display: none !important;
    }
    
    .card-container:first-child {
        width: 350px;
        transform: translateX(0) !important;
        visibility: visible !important;
    }
    
    .card-container:not(:first-child) {
        margin: 1rem 2rem 1rem auto;
        margin-left: 370px;
        width: auto;
        position: relative;
        z-index: 1;
    }
    
    /* Tablet button positioning */
    .pdf-button,
    .print-button,
    .theme-button {
        font-size: 15px;
        padding: 11px 18px;
    }
}

/* Large mobile devices */
@media (min-width: 480px) and (max-width: 767px) {
    .mobile-nav-menu {
        max-width: 400px;
        padding: 2.5rem;
    }
    
    .mobile-nav-menu a {
        padding: 1.25rem;
        font-size: 1.1rem;
    }
}

/* Small mobile devices */
@media (max-width: 479px) {
    .mobile-nav-menu {
        max-width: 280px;
        padding: 1.5rem;
    }
    
    .mobile-nav-menu a {
        padding: 0.875rem;
        font-size: 1rem;
    }
    
    .mobile-nav-toggle {
        width: 45px;
        height: 45px;
        top: 15px;
        left: 15px;
    }
    
    .pdf-button,
    .print-button,
    .theme-button {
        font-size: 13px;
        padding: 8px 14px;
    }
}

/* Landscape mobile orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .mobile-nav-menu {
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .mobile-nav-menu a {
        padding: 0.75rem;
        margin: 0.25rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .mobile-nav-toggle,
    .pdf-button,
    .print-button,
    .theme-button,
    .scroll-top-button {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 767px) {
    /* Larger touch targets */
    .contact-item,
    .portfolio-item {
        min-height: 44px;
    }
    
    /* Better focus indicators */
    .contact-item:focus,
    .portfolio-item:focus {
        outline: 2px solid #007AFF;
        outline-offset: 2px;
    }
    
    /* Improved contrast for mobile */
    .contact-item,
    .portfolio-item {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
    }
    
    .contact-item:hover,
    .portfolio-item:hover {
        background: #e9ecef;
        border-color: #dee2e6;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .contact-item:hover,
    .portfolio-item:hover,
    .job:hover,
    .skill-category:hover,
    .education-item:hover,
    .additional-item:hover {
        transform: none;
    }
    
    .contact-item:active,
    .portfolio-item:active {
        background-color: #e9ecef;
        transform: scale(0.98);
    }
}
