/* Innovation Page Styles */
.innovation-page {
    background-color: #ffffff;
    color: #000000;
    padding: 40px 0;
    line-height: 1.6;
    min-height: 100vh;
    display: block;
    width: 100%;
    opacity: 0; /* Start with 0 opacity for fade-in effect */
    transition: opacity 0.4s ease-in-out; /* Smooth transition for opacity changes */
}

.back-link {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
}

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

.back-link a:hover {
    text-decoration: underline;
}

main {
    max-width: 700px;
    width: 100%;
    padding: 0 20px;
    display: block;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 3rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 0.9rem;
    max-width: none;
    margin-bottom: 0.5rem;
    text-align: left;
    display: block;
    width: 100%;
}

.no-break {
    white-space: nowrap;
}

.contribution-graph {
    margin: 2.5rem 0;
    width: 100%;
    overflow: hidden;
    display: block;
    position: relative;
}

.calendar {
    background-color: var(--color-bg);
    color: var(--color-text);
    border-radius: 6px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    font-size: 12px;
}

/* Style fixes for the calendar in dark mode */
.calendar text {
    fill: var(--color-text);
}

.project-directory {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-align: left;
    width: 100%;
}

.months-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    color: #666;
    padding: 0 5px;
    width: 100%;
}

.github-grid-container {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
    padding: 10px 0;
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
}

.github-chart {
    width: 100%;
    height: auto;
    max-height: 110px;
    display: block;
}

body.dark-theme .github-chart {
    filter: invert(0.85) hue-rotate(180deg);
}

/* Legacy grid styles kept for reference */
.graph-container {
    width: 100%;
    height: 100px;
    position: relative;
    display: flex;
    justify-content: flex-start;
}

.graph-squares {
    display: grid;
    grid-template-columns: repeat(52, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 2px;
    height: 100px;
    width: 100%;
    background: repeating-linear-gradient(to right, var(--graph-0) 0px, var(--graph-0) 12px, transparent 12px, transparent 14px);
}

.contribution-count {
    font-size: 0.75rem;
    color: #666;
    margin-top: 1rem;
    text-align: left;
    width: 100%;
}

.contribution-count a {
    color: var(--color-text);
    text-decoration: none;
}

.contribution-count a:hover {
    text-decoration: underline;
}

.filter-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 3rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
    width: 100%;
    justify-content: flex-start;
}

.tab {
    background: none;
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 1.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--color-tab-text);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, font-weight 0.1s ease;
}

.tab.active {
    background-color: var(--color-tab-active);
    color: var(--color-tab-text-active);
    font-weight: 500;
}

.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem 2rem;
    width: 100%;
    padding-bottom: 60px;
}

.project-card {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
    width: 100%;
    transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1), opacity 0.3s ease-in-out;
    will-change: transform, opacity;
    cursor: pointer;
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-3px) scale(1.01);
}

.project-icon {
    margin-bottom: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.project-icon svg {
    width: 22px;
    height: 22px;
    color: #333;
}

.project-content h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.project-content p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    font-size: 0.8rem;
}

.project-tags span {
    color: #555;
}

.project-tags span:not(:last-child)::after {
    content: "•";
    margin-left: 0.5rem;
}

.read-more {
    color: #000;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    margin-top: auto;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: opacity 0.2s ease;
}

.read-more:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Project details - hidden in cards, shown in modal */
.project-details {
    display: none;
}

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

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

.detail-section h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.detail-section p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-project-text);
    margin-bottom: 0.75rem;
}

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

.detail-section ul {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0;
}

.detail-section ul li {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-project-text);
    margin-bottom: 0.75rem;
    padding-left: 1.2rem;
    position: relative;
}

.detail-section ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--color-text);
    font-weight: 500;
}

.detail-section ul li strong {
    color: var(--color-text);
    font-weight: 500;
}

/* Hidden project cards for filtering */
.project-card.hidden {
    display: none;
    opacity: 0;
}

/* Fade in animation for filtered projects */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-card.fade-in {
    animation: fadeIn 0.4s ease-in-out forwards;
}

/* Theme toggle styles */
:root {
    --color-bg: #ffffff;
    --color-text: #000000;
    --color-border: #eee;
    --color-tab-active: #f0f0f0;
    --color-tab-text: #333;
    --color-tab-text-active: #000;
    --color-tag: #555;
    --color-project-text: #333;
    
    /* GitHub calendar colors - light theme */
    --graph-0: #ebedf0;
    --graph-1: #9be9a8;
    --graph-2: #40c463;
    --graph-3: #30a14e;
    --graph-4: #216e39;
}

body.dark-theme {
    --color-bg: #121212;
    --color-text: #f5f5f5;
    --color-border: #333;
    --color-tab-active: #333;
    --color-tab-text: #bebebe;
    --color-tab-text-active: #ffffff;
    --color-tag: #aaa;
    --color-project-text: #ddd;
    
    /* GitHub calendar colors - dark theme */
    --graph-0: #2d333b;
    --graph-1: #0e4429;
    --graph-2: #006d32;
    --graph-3: #26a641;
    --graph-4: #39d353;
}

.innovation-page {
    background-color: var(--color-bg);
    color: var(--color-text);
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.project-card {
    border-top: 1px solid var(--color-border);
}

.project-content p {
    color: var(--color-project-text);
}

.project-tags span {
    color: var(--color-tag);
}

.back-link a {
    color: var(--color-text);
}

.read-more {
    color: var(--color-text);
}

/* Tab active state defined above */

.theme-toggle-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    transform: scale(0.85);
}

.theme-toggle {
    position: relative;
    display: inline-block;
}

.theme-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    width: 50px;
    height: 25px;
    background-color: #FF5500;
    border-radius: 25px;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

body.dark-theme .toggle-track {
    background-color: #111;
}

.toggle-indicator {
    height: 21px;
    width: 21px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    right: 2px;
    transform: translateX(0);
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle-checkbox:checked + .toggle-track .toggle-indicator {
    transform: translateX(-25px);
}

.toggle-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.toggle-icon svg {
    stroke-width: 2px;
    width: 14px;
    height: 14px;
}

.toggle-icon-dark svg {
    stroke: #333;
    stroke-width: 2.5px;
}

.toggle-icon-light {
    opacity: 1;
}

.toggle-icon-dark {
    opacity: 0;
}

#theme-toggle-checkbox:checked + .toggle-track .toggle-icon-light {
    opacity: 0;
}

#theme-toggle-checkbox:checked + .toggle-track .toggle-icon-dark {
    opacity: 1;
}

/* Work Experience Section */
.experience-section {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    width: 100%;
    margin-bottom: 3rem;
}

.experience-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.experience-card {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--color-border);
    padding-left: 1.5rem;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1);
}

.experience-card:hover {
    transform: translateX(5px);
}

.experience-card::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-bg);
    border: 2px solid var(--color-text);
    left: -7px;
    top: 8px;
}

.experience-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.experience-header h3 {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--color-text);
}

.company {
    font-size: 0.95rem;
    color: var(--color-project-text);
}

.duration {
    font-size: 0.85rem;
    color: var(--color-tag);
    margin-top: 0.3rem;
}

.experience-content {
    margin-bottom: 1.2rem;
}

.experience-content p {
    font-size: 0.9rem;
    color: var(--color-project-text);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.experience-bullets {
    padding-left: 1.2rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.experience-bullets li {
    font-size: 0.85rem;
    color: var(--color-project-text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.experience-tags span {
    font-size: 0.75rem;
    color: var(--color-tag);
    background-color: var(--color-tab-active);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    transition: background-color 0.2s ease;
}

/* Glassmorphism Modal Styles */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content-wrapper {
    position: relative;
    z-index: 10000;
    width: 85%;
    max-width: 650px;
    max-height: 75vh;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-modal.active .modal-content-wrapper {
    transform: scale(1) translateY(0);
}

.modal-glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 2rem;
    padding-right: 1.5rem;
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

body.dark-theme .modal-glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    z-index: 10;
}

.modal-close:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    transform: rotate(90deg) scale(1.05);
}

body.dark-theme .modal-close {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    border: 1px solid rgba(255, 255, 255, 0.18);
}

body.dark-theme .modal-close:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
}

.modal-close svg {
    color: var(--color-text);
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-icon {
    margin-bottom: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

.modal-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-text);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.modal-summary {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-project-text);
    margin-bottom: 1.5rem;
}

.modal-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.modal-tags span {
    font-size: 0.85rem;
    color: var(--color-text);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.4rem 0.9rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.2s ease;
}

.modal-tags span:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    transform: translateY(-1px);
}

body.dark-theme .modal-tags span {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    border: 1px solid rgba(255, 255, 255, 0.18);
}

body.dark-theme .modal-tags span:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
}

.modal-body {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 2rem;
}

body.dark-theme .modal-body {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.modal-details .detail-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

body.dark-theme .modal-details .detail-section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.modal-details .detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.modal-details .detail-section h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.modal-details .detail-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-project-text);
    margin-bottom: 0.9rem;
}

.modal-details .detail-section ul {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.modal-details .detail-section ul li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-project-text);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.modal-details .detail-section ul li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--color-text);
    font-weight: 500;
}

.modal-details .detail-section ul li strong {
    color: var(--color-text);
    font-weight: 500;
}

/* Smooth scrollbar for modal */
.modal-glass-card::-webkit-scrollbar {
    width: 6px;
}

.modal-glass-card::-webkit-scrollbar-track {
    background: transparent;
    margin: 12px 0;
}

.modal-glass-card::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
    border-radius: 10px;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-clip: padding-box;
}

.modal-glass-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
    background-clip: padding-box;
}

body.dark-theme .modal-glass-card::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.18);
    background-clip: padding-box;
}

body.dark-theme .modal-glass-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
    background-clip: padding-box;
}

/* RL Visualization Styles */
#cool-stuff-trigger {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

#cool-stuff-trigger:hover {
    color: var(--color-accent);
}

.rl-visualization {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.rl-back-btn {
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.rl-back-btn:hover {
    color: var(--color-accent);
    transform: translateX(-4px);
}

#rl-canvas {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .innovation-page {
        padding: 20px;
    }
    
    main {
        max-width: 600px;
    }
    
    .projects {
        grid-template-columns: 1fr;
    }
    
    .experience-card {
        padding-left: 1.2rem;
    }
    
    .experience-header {
        flex-direction: column;
    }
    
    .modal-glass-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    #rl-canvas {
        max-width: 100%;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
    }
}
