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

body {
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.4;
    color: #000;
    background-color: #fff;
    padding: 0.75in 1in;
    font-size: 11pt;
}

.cv-container {
    width: 100%;
    max-width: 8.5in;
    margin: 0 auto;
    background-color: #fff;
}

/* Header Styles */
.cv-header {
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 2px solid #000;
}

.name {
    font-size: 28pt;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.2;
}

.contact-info {
    font-size: 10pt;
    color: #000;
    font-weight: normal;
    text-align: center;
    margin-bottom: 0;
    padding-bottom: 16px;
}

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

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

.master-toggle-row {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 8px;
    padding-bottom: 0;
}

.section-title-row.master-toggle-row {
    border-bottom: none !important;
    padding-bottom: 0;
    margin-bottom: 0;
}

.portfolio-link {
    font-size: 11pt;
    color: #0066cc;
    text-decoration: underline;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
}

.portfolio-link:hover {
    color: #004499;
}

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

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
    gap: 15px;
}

.section-title-row.master-toggle-row {
    border-bottom: none !important;
    padding-bottom: 0;
}

.section-title {
    font-size: 11pt;
    font-weight: bold;
    text-transform: uppercase;
    font-family: 'Times New Roman', Times, serif;
    letter-spacing: 0.3px;
    margin: 0;
}

.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-hint {
    font-size: 9pt;
    color: #666;
    font-style: italic;
    font-family: 'Times New Roman', Times, serif;
    white-space: nowrap;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 36px;
    height: 18px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.2s;
    border: 1px solid #999;
    display: flex;
    align-items: center;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 1px;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    transition: 0.2s;
    border: 1px solid #ccc;
}

input:checked + .toggle-slider {
    background-color: #000;
    border-color: #000;
}

input:checked + .toggle-slider:before {
    transform: translateX(18px) translateY(-50%);
    background-color: white;
    border-color: #999;
}

.toggle-switch:hover .toggle-slider {
    border-color: #000;
}

input:checked + .toggle-slider:hover {
    border-color: #000;
}

.section-content {
    display: block;
}

.section-content.hidden {
    display: none;
}

/* Projects Scroll Container */
.projects-scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.projects-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.projects-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.projects-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.projects-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.projects-scroll-wrapper {
    display: flex;
    gap: 20px;
    padding-bottom: 10px;
}

.project-card {
    flex: 0 0 280px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.project-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: #f5f5f5;
}

.project-card-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card-title {
    font-size: 11pt;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.project-card-description {
    font-size: 9pt;
    line-height: 1.4;
    color: #333;
    margin-bottom: 10px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.project-card-tag {
    font-size: 8pt;
    padding: 2px 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #000;
    border-radius: 2px;
    font-family: 'Times New Roman', Times, serif;
}

/* Modal Styles */
.project-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.project-modal.active {
    display: flex;
}

.project-modal-content {
    background-color: #fff;
    padding: 30px;
    border: 1px solid #000;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    margin: 20px;
}

.project-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid #000;
    padding-bottom: 10px;
}

.project-modal-title {
    font-size: 14pt;
    font-weight: bold;
    font-family: 'Times New Roman', Times, serif;
    flex: 1;
}

.project-modal-close {
    background: none;
    border: none;
    font-size: 20pt;
    cursor: pointer;
    color: #000;
    padding: 0;
    margin-left: 20px;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.project-modal-close:hover {
    color: #666;
}

.project-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.project-modal-tag {
    font-size: 9pt;
    padding: 4px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #000;
    border-radius: 2px;
    font-family: 'Times New Roman', Times, serif;
}

.project-modal-description {
    font-size: 10pt;
    line-height: 1.6;
    color: #000;
    margin-bottom: 20px;
    white-space: pre-wrap;
    font-family: 'Times New Roman', Times, serif;
}

.project-modal-link {
    font-size: 10pt;
    color: #000;
    text-decoration: underline;
    font-family: 'Times New Roman', Times, serif;
}

.project-modal-link:hover {
    color: #666;
}

/* Achievements Grid Styles */
.achievements-flip-hint {
    font-size: 10pt;
    font-family: 'Times New Roman', Times, serif;
    color: #666;
    font-style: italic;
    text-align: center;
    margin: 0 0 15px 0;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.achievement-image-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #f9f9f9;
}

.achievement-image-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.achievement-grid-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.achievement-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.achievement-placeholder-text {
    font-size: 10pt;
    font-weight: bold;
    font-family: 'Times New Roman', Times, serif;
    color: #666;
    text-align: center;
    padding: 20px;
}

/* Achievement Modal Styles */
.achievement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.achievement-modal.show {
    opacity: 1;
}

.achievement-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 4px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    font-family: 'Times New Roman', Times, serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.achievement-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    font-family: Arial, sans-serif;
}

.achievement-modal-close:hover {
    color: #666;
}

.achievement-modal-title {
    font-size: 14pt;
    font-weight: bold;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
    margin: 0 0 15px 0;
    padding-right: 30px;
}

.achievement-modal-description {
    font-size: 11pt;
    line-height: 1.6;
    color: #000;
    margin: 0;
    font-family: 'Times New Roman', Times, serif;
    white-space: pre-wrap;
}

/* Item Styles */
.experience-item,
.education-item,
.project-item,
.skills-item {
    margin-bottom: 10px;
    padding-left: 0;
}

.item-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 4px;
}

.item-title {
    font-size: 11pt;
    font-weight: bold;
    line-height: 1.4;
    font-family: 'Times New Roman', Times, serif;
    flex: 1;
}

.item-date {
    font-size: 10pt;
    color: #000;
    font-style: italic;
    font-weight: normal;
    padding-left: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.item-details {
    list-style-type: disc;
    padding-left: 20px;
    font-size: 10pt;
    line-height: 1.6;
    margin: 0;
    margin-top: 4px;
}

.item-details li {
    margin-bottom: 4px;
    color: #000;
    font-weight: normal;
}

/* Skills Content */
.skills-content {
    padding-left: 0;
    margin-top: 0;
}

.skills-category {
    margin-bottom: 8px;
    font-size: 10pt;
    line-height: 1.6;
    font-weight: normal;
}

.skills-category strong {
    font-weight: bold;
    display: inline;
}

/* Carousel Styles */
.carousel-container {
    overflow: hidden;
    width: 100%;
    margin-top: 8px;
    position: relative;
    height: 35px;
    display: block;
}

.carousel-track {
    display: flex;
    gap: 20px;
    animation: scroll 30s linear infinite;
    white-space: nowrap;
    width: max-content;
}

.carousel-track-reverse {
    animation: scroll-reverse 35s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-reverse {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

.carousel-item {
    display: inline-flex;
    align-items: center;
    font-size: 10pt;
    color: #333;
    font-family: 'Times New Roman', Times, serif;
    padding: 4px 12px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Achievement Categories */
.achievement-category {
    margin-bottom: 15px;
}

.category-header {
    margin-bottom: 8px;
}

.category-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.category-title-with-items {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex: 1;
}

.achievement-category-title {
    font-size: 12pt;
    font-weight: bold;
    margin: 0;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
}

.category-items-inline {
    font-size: 10pt;
    color: #333;
    font-style: italic;
    font-family: 'Times New Roman', Times, serif;
    cursor: pointer;
}

.category-items-inline:hover {
    color: #000;
    text-decoration: underline;
}

.category-expand-btn,
.category-collapse-btn {
    background: none;
    border: none;
    font-size: 9pt;
    color: #666;
    cursor: pointer;
    padding: 0;
    font-family: 'Times New Roman', Times, serif;
    text-decoration: underline;
    font-style: italic;
}

.category-expand-btn:hover,
.category-collapse-btn:hover {
    color: #000;
}

.category-expanded {
    margin-top: 8px;
}

.category-expanded.hidden {
    display: none;
}

.achievement-category .item-details {
    margin-top: 4px;
    margin-bottom: 8px;
}

.achievement-category .item-details li {
    margin-bottom: 6px;
}

/* Research Papers Styles */
.research-papers-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.research-paper-item {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.research-paper-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.research-paper-title {
    font-size: 10pt;
    color: #000;
    text-decoration: none;
    font-family: 'Times New Roman', Times, serif;
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
}

.research-paper-title:hover {
    text-decoration: underline;
    color: #333;
}

.research-paper-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.research-paper-tag {
    font-size: 8pt;
    padding: 2px 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #000;
    border-radius: 2px;
    font-family: 'Times New Roman', Times, serif;
}

/* Education Alternate View Styles */
.education-year-section {
    margin-bottom: 24px;
}

.education-year-title {
    font-size: 11pt;
    font-weight: bold;
    margin-bottom: 8px;
    margin-left: 0;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
    text-transform: uppercase;
}

.module-list {
    padding-left: 20px;
    margin-top: 4px;
}

.module-item {
    margin-bottom: 12px;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.module-name {
    font-size: 10pt;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
    flex: 1;
}

.module-mark {
    font-size: 10pt;
    font-weight: bold;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
    margin-left: 12px;
    flex-shrink: 0;
}

.module-mark.in-progress {
    font-weight: normal;
    font-style: italic;
    color: #666;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
}

/* Responsive Styles for Achievements Grid */
@media (max-width: 1200px) {
    .achievements-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .achievements-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Print Styles */
@media print {
    body {
        padding: 50px 60px;
    }
}

/* Footer Styles */
.cv-footer {
    text-align: center;
    padding: 30px 20px 20px 20px;
    margin-top: 40px;
    border-top: 1px solid #ddd;
    font-size: 9pt;
    color: #666;
    font-family: 'Times New Roman', Times, serif;
}

.cv-footer p {
    margin: 0;
    margin-bottom: 8px;
}

.cv-footer p:last-child {
    margin-bottom: 0;
}

.footer-note {
    font-size: 8pt;
    color: #999;
    font-style: italic;
}

.footer-note a {
    color: #666;
    text-decoration: underline;
}

.footer-note a:hover {
    color: #000;
}

/* Experience Timeline Styles */
.experience-timeline-wrapper {
    position: relative;
    width: 100%;
    min-height: 400px;
    padding: 20px 0;
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 0;
}

.experience-timeline-line {
    display: none;
}

.experience-timeline-container {
    position: relative;
    display: flex;
    gap: 100px;
    padding: 0 80px;
    align-items: center;
    min-width: max-content;
    z-index: 2;
    height: 100%;
}

.experience-timeline-item {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 280px;
    height: 100%;
}

.experience-timeline-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    width: 100%;
}

.timeline-above {
    margin-bottom: 0;
}

.timeline-below {
    margin-top: 0;
}

.timeline-date {
    font-size: 11pt;
    font-weight: bold;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
    text-align: center;
    white-space: nowrap;
    margin: 0;
}

.timeline-card {
    background-color: #f5f5f5;
    border: none;
    border-radius: 8px;
    padding: 16px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 240px;
    max-width: 300px;
}

.timeline-title {
    font-size: 11pt;
    font-weight: bold;
    color: #000;
    font-family: 'Times New Roman', Times, serif;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.timeline-subtitle {
    font-size: 9pt;
    color: #666;
    font-family: 'Times New Roman', Times, serif;
    margin: 0;
    font-style: italic;
}

.timeline-image {
    width: 128px;
    height: 128px;
    object-fit: cover;
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 30px 20px;
        font-size: 10pt;
    }
    
    .name {
        font-size: 18pt;
    }
    
    .item-title {
        font-size: 10pt;
    }
    
    .contact-info {
        font-size: 9pt;
    }
    
    .section-title {
        font-size: 11pt;
    }
    
    .item-title-row {
        gap: 15px;
    }
}

