:root {
    --primary-color: #2563eb;
    --secondary-color: #3b82f6;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --background: #ffffff;
    --light-bg: #f3f4f6;
    --border-color: #e5e7eb;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    margin-top: 4rem;
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-info a,
.contact-info span {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

main {
    padding: 5rem 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    main {
        padding: 4rem 1rem 1rem;
    }
}

/* Skills Section */
.skills-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.skills-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-size: 2rem;
}

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

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.skill-category h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* Experience Section */
.experience-section {
    padding: 4rem 0;
}

.experience-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-size: 2rem;
}

/* Timeline Styles */
.timeline-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    justify-content: center;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    width: 80%;
    max-width: 800px;
    position: relative;
}

.timeline-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--text-color);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.timeline-content .period {
    color: var(--light-text);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.project {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.project h5 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.project ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.project li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--light-text);
}

.project li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

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

.timeline-date {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.timeline-date .year {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
}

.timeline-date .dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary-color);
    margin: 1rem 0;
}

.timeline-content {
    position: relative;
    width: calc(50% - 4rem);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
    padding-left: 4rem;
}

.timeline-item:nth-child(even) .timeline-content {
    padding-right: 4rem;
}

.timeline-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.timeline-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.timeline-icon i {
    color: var(--white);
    font-size: 1.5rem;
}

.timeline-card h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.timeline-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.timeline-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-card ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
    line-height: 1.5;
}

.timeline-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 2.5rem;
    }

    .timeline-date {
        left: 2.5rem;
        transform: translateX(-50%);
    }

    .timeline-content {
        width: calc(100% - 6rem);
        margin-left: 6rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .timeline-card {
        padding: 1.5rem;
    }

    .timeline-icon {
        width: 40px;
        height: 40px;
    }

    .timeline-icon i {
        font-size: 1.25rem;
    }

    .timeline-card h3 {
        font-size: 1.25rem;
    }

    .timeline-item {
        margin-bottom: 6rem;
    }

    .timeline-date .year {
        font-size: 1rem;
        padding: 0.5rem 1.5rem;
    }

    .timeline-date .dot {
        width: 12px;
        height: 12px;
        margin: 0.75rem 0;
    }
}

/* Request Section Styles */
.request-section {
    padding: 2rem 0;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.request-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.request-section input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--nav-border);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.request-section input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

.request-section button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.request-section button:hover {
    transform: translateY(-1px);
}

.request-section .status-message {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Print Panel Styles */
.print-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--white);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
}

.print-panel.active {
    right: 0;
}

.print-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--nav-border);
}

.print-panel-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-color);
}

.close-panel {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.close-panel:hover {
    color: var(--primary-color);
}

.print-panel-content {
    padding: 1.5rem;
}

.print-option {
    margin-bottom: 1.5rem;
}

.print-option label {
    display: flex;
    align-items: center;
    color: var(--text-color);
    cursor: pointer;
}

.print-option input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
}

.print-actions {
    margin-top: 2rem;
    text-align: center;
}

.print-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.print-action-button i {
    margin-right: 0.5rem;
}

.print-action-button:hover {
    transform: translateY(-1px);
}

.print-action-button:active {
    transform: translateY(1px);
}

/* Print Panel Styles */
.print-panel {
    position: fixed;
    top: 4rem; /* Consistent with hero section margin-top */
    right: 0;
    transform: translateX(100%);
    background: var(--background);
    border-radius: 8px 0 0 8px;
    box-shadow: var(--card-shadow);
    z-index: 1000;
    width: 320px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0.3s;
    visibility: hidden;
}

@media (max-width: 768px) {
    .print-panel {
        top: 3rem;
    }
}

.print-panel.active {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0s;
}

.print-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.print-panel-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.close-panel {
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.close-panel:hover {
    color: var(--text-color);
}

.print-panel-content {
    padding: 1rem;
}

.print-option {
    margin-bottom: 1rem;
}

.request-section .container,
.pdf-section .container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.request-section input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.pdf-section {
    margin-bottom: 1rem;
}

.request-section button,
.pdf-section button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.request-section button:hover,
.pdf-section button:hover {
    background-color: var(--secondary-color);
}

.status-message {
    color: var(--light-text);
    margin: 0.5rem 0;
    font-size: 0.9rem;
    text-align: center;
}

#pdfLinkContainer {
    text-align: center;
}

#pdfLink {
    display: inline-block;
    padding: 0.75rem 1rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

#pdfLink:hover {
    background-color: var(--primary-color);
}

/* Mobile Responsiveness */


.print-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-left: auto;
    color: var(--text-color);
    background: var(--white);
    border: 1px solid var(--nav-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .print-button {
        margin-left: 0;
    }
}

.print-button i {
    margin-right: 0.5rem;
}

.print-button:hover {
    background: var(--light-bg);
    transform: translateY(-1px);
    box-shadow: var(--card-shadow);
}

/* Print Styles */
@media print {
    header,
    footer,
    .print-button,
    .print-panel {
        display: none !important;
    }

    /* Timeline visibility based on option */
    .hide-timeline .timeline::before,
    .hide-timeline .timeline-dot {
        display: none !important;
    }

    /* Color printing styles */
    .print-color .timeline::before {
        background: linear-gradient(to bottom, var(--gradient-start), var(--gradient-end));
    }

    .print-color .timeline-dot {
        border-color: var(--primary-color);
    }

    .print-color .timeline-date {
        background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    }

    /* Default black and white styles */
    :not(.print-color) .timeline::before {
        background: #000;
        width: 1px;
    }

    :not(.print-color) .timeline-dot {
        border: 2px solid #000;
        background: #fff;
    }

    :not(.print-color) .timeline-date {
        background: #000;
    }

    body {
        padding: 0;
        margin: 0;
    }

    .timeline-section {
        padding: 2rem 0;
    }

    .timeline::before {
        display: none;
    }

    .timeline-dot {
        display: none;
    }

    .timeline-date {
        position: relative;
        left: 0 !important;
        right: auto !important;
        display: inline-block;
        margin-bottom: 1rem;
    }

    .timeline-content {
        width: 100% !important;
        margin: 0 0 2rem 0 !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .timeline-item {
        margin-bottom: 2rem;
    }
}

/* Mobile Responsive Styles */
/* Education Section */
.education-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

.education-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.education-section h2 i {
    color: var(--primary-color);
}

.education-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.education-card h3 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.education-card .degree {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.education-card .year {
    color: var(--light-text);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .education-card {
        margin: 0 1rem;
        padding: 2rem;
    }

    .education-card h3 {
        font-size: 1.5rem;
    }

    .education-card .degree {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content h2 {
        font-size: 1.25rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-content {
        width: calc(100% - 2rem);
        margin-left: 2rem !important;
    }

    .timeline-content::before {
        left: -2.5rem !important;
    }
}

    .timeline-dot {
        left: 2rem;
    }

    .timeline-date {
        left: 4rem;
        transform: none;
        top: -1rem;
    }

    .timeline-content {
        width: calc(100% - 5rem);
        margin-left: 5rem !important;
    }

    .timeline-item:nth-child(even) .timeline-date {
        left: 4rem;
        transform: none;
    }

    .timeline-item {
        padding-top: 4rem;
    }
}
