/* ===== CSS Variables for Theming ===== */
:root {
    /* Light Theme Colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-inverse: #ffffff;

    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);

    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-tertiary: #f5576c;

    /* Animations */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.8);
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);

    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --accent-tertiary: #f472b6;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-slow), color var(--transition-slow);
    overflow: hidden;
    /* Hide standard scrollbars */
    margin: 0;
    padding: 0;
    height: 100vh;
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.section::-webkit-scrollbar,
.section .container::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
html,
body,
.section,
.section .container {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* ===== Controls Container ===== */
.controls-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 1000;
    animation: slideInRight 0.6s ease;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.control-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
    background: var(--bg-gradient);
    color: var(--text-inverse);
}

.control-btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Theme Toggle Icons */
.sun-icon,
.moon-icon {
    transition: all var(--transition-normal);
}

body:not([data-theme="dark"]) .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Header ===== */
.header {
    background: var(--bg-gradient);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s ease;
    height: 100vh;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

.header-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.profile-photo {
    position: relative;
    width: 200px;
    height: 200px;
    animation: scaleIn 0.8s ease 0.2s both;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-normal);
}

.profile-photo:hover img {
    transform: scale(1.05);
}

.photo-border {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
}

.header-info {
    color: var(--text-inverse);
}

.name {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    animation: slideInLeft 0.8s ease 0.3s both;
}

.title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: slideInLeft 0.8s ease 0.4s both;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    animation: slideInLeft 0.8s ease 0.5s both;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-inverse);
    text-decoration: none;
    transition: all var(--transition-fast);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.contact-item svg {
    flex-shrink: 0;
}

/* ===== Sections ===== */
.section {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow-y: auto;
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

.section .container {
    width: 100%;
    max-height: 100%;
    overflow-y: auto;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--bg-gradient);
    border-radius: 2px;
}

/* ===== About Section ===== */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.about-text:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== Timeline (Experience) ===== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--bg-gradient);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 1.5rem;
    animation: slideInRight 0.8s ease;
}

.timeline-marker {
    position: absolute;
    left: -8px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 4px var(--accent-primary);
    animation: pulse 2s ease infinite;
}

/* Current position marker styling */
.timeline-marker.current {
    background: #10b981;
    box-shadow: 0 0 0 4px #10b981;
    animation: currentPulse 2s ease infinite;
}

@keyframes currentPulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px #10b981;
    }

    50% {
        box-shadow: 0 0 0 8px #10b981;
    }
}

.timeline-content {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.timeline-date {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.timeline-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-company {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.timeline-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-responsibilities {
    list-style: none;
    margin-top: 1rem;
}

.timeline-responsibilities li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-responsibilities li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

/* ===== Education Grid ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.education-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    text-align: center;
    animation: scaleIn 0.6s ease;
}

.education-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.education-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease infinite;
}

.education-period {
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.education-degree {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.education-school {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.education-gpa {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Skills Grid ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    animation: fadeIn 0.8s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: var(--bg-gradient);
    color: var(--text-inverse);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: default;
    box-shadow: var(--shadow-sm);
}

.skill-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ===== Certifications Grid ===== */
.certifications-grid {
    display: grid;
    gap: 3rem;
}

.cert-category {
    animation: fadeIn 0.8s ease;
}

.cert-category-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.cert-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.cert-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    background: var(--bg-gradient);
}

.cert-item:hover .cert-name {
    color: var(--text-inverse);
}

.cert-item:hover .cert-icon {
    transform: scale(1.2) rotate(5deg);
}

.cert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: transform var(--transition-normal);
}

.cert-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-normal);
}

/* ===== PDF Preview ===== */
.pdf-preview {
    position: fixed;
    display: none;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.pdf-preview.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.pdf-preview-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
    overflow: hidden;
    width: 350px;
    height: 450px;
}

.pdf-preview-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    50% {
        transform: translateY(-20px) translateX(20px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px var(--accent-primary);
    }

    50% {
        box-shadow: 0 0 0 8px var(--accent-primary);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ===== Scroll Animations ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .controls-container {
        top: 1rem;
        right: 1rem;
        gap: 0.5rem;
    }

    .control-btn {
        width: 45px;
        height: 45px;
    }

    .header {
        padding: 3rem 0 2rem;
    }

    .header-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }

    .name {
        font-size: 2.5rem;
    }

    .title {
        font-size: 1.2rem;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .education-grid,
    .skills-grid,
    .cert-items {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 2.5rem;
    }

    .timeline-marker {
        left: 1px;
    }

    .pdf-preview-content {
        width: 300px;
        height: 400px;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2rem;
    }

    .title {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .about-text {
        font-size: 1rem;
        padding: 1.5rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .controls-container {
        display: none;
    }

    .section {
        page-break-inside: avoid;
    }
}