:root {
    /* Dark theme colors (default) */
    --background: black;
    --text: white;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-secondary: #d1d1d1;
    --modal-backdrop: rgba(0, 0, 0, 0.9);
    --modal-bg: rgba(255, 255, 255, 0.1);
    --accent: #4ADE80;
}

[data-theme="light"] {
    --background: white;
    --text: black;
    --card-bg: rgba(0, 0, 0, 0.05);
    --card-border: rgba(0, 0, 0, 0.1);
    --text-secondary: #333333;
    --modal-backdrop: rgba(255, 255, 255, 0.9);
    --modal-bg: rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
    cursor: default;
}

body {
    background-color: var(--background);
    color: var(--text);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Switch Styles */
.theme-switch-wrapper {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.slider:before {
    background-color: #4ADE80;
    bottom: 3px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
    z-index: 2;
}

.slider .fa-sun,
.slider .fa-moon {
    color: var(--text);
    font-size: 14px;
    z-index: 1;
}

/* Move toggle to right for light mode */
input:checked + .slider:before {
    transform: translateX(26px);
}

/* In dark mode (default/unchecked), show sun icon on right */
.slider .fa-moon {
    order: 1;
}
.slider .fa-sun {
    order: 2;
}

@keyframes pulsate {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px #4ADE80);
    }
    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 8px #4ADE80);
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px #4ADE80);
    }
}

.font-jersey {
    font-family: 'Jersey 15', sans-serif;
}

/* Main container styles */
.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 1rem 0;
    overflow-y: auto;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text {
    background: linear-gradient(90deg, var(--text), #4ADE80, var(--text));
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradient 8s linear infinite;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.typing-container {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typed-cursor {
    display: inline-block;
    vertical-align: middle;
}

.social-icon {
    transition: transform 0.3s ease, filter 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 0 15px currentColor);
}

.nav-box {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.nav-box:hover::before {
    left: 100%;
}

/* Calendar styles */
.calendar-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.calendar-wrapper {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
}

.github-chart {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media screen and (max-width: 768px) {
    .calendar-container {
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .calendar-wrapper {
        padding: 0.75rem;
    }
}

.calendar {
    font-family: 'Jersey 15', Helvetica, arial;
    text-align: center;
    margin: 0 auto;
    background-color: black;
    color: #fff;
    padding: 1rem;
}

.calendar-graph text.wday,
.calendar-graph text.month {
    font-size: 12px;
    fill: #fff;
}

text.ContributionCalendar-label {
    fill: #fff;
    font-size: 12px;
}

.ContributionCalendar-day {
    shape-rendering: geometricPrecision;
    outline: 1px solid rgba(255, 255, 255, 0.05);
    outline-offset: -1px;
}

@media screen and (max-width: 768px) {
    .calendar-container {
        max-width: 100%;
        padding: 0;
        overflow-x: hidden;
    }

    .calendar {
        padding: 0.5rem;
    }

    table.ContributionCalendar-grid td {
        padding: 2px;
    }

    .calendar-graph text.wday,
    .calendar-graph text.month {
        font-size: 8px;
    }

    text.ContributionCalendar-label {
        font-size: 8px;
    }

    .ContributionCalendar {
        max-width: 100vw;
        overflow-x: auto;
    }

    .js-calendar-graph {
        padding: 10px 0;
    }

    .contrib-column {
        padding: 8px 0;
        font-size: 10px;
    }

    .contrib-number {
        font-size: 16px;
    }
}

/* Projects Section Styles */
.projects-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project-container {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    height: 100%;
    cursor: pointer;
}

.project-container:hover {
    transform: translateY(-5px);
    border-color: #4ADE80;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%234ADE80"><path d="M15 3l2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3z"/><path d="M3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3z"/><path d="M9 21l-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6z"/><path d="M21 15l-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6z"/></svg>') 12 12, auto;
}

.project-image-container {
    width: 100%;
    position: relative;
    padding-top: 75%;
}

.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.project-title {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: bold;
}

.project-link {
    color: var(--text);
    font-size: 1.25rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.project-link:hover {
    color: #4ADE80;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

@media screen and (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .project-container {
        margin: 0 1rem;
    }

    .project-image-container {
        display: none;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.5625rem;
    }

    .project-description {
        font-size: 1.125rem;
        line-height: 1.6;
    }

    .project-list li {
        font-size: 1.125rem;
        line-height: 1.6;
        margin-bottom: 0.75rem;
    }

    .project-link {
        font-size: 1.5625rem;
    }
}

.project-container:hover .project-link i {
    animation: pulsate 1s ease-in-out infinite;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-backdrop);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background: var(--modal-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close-button {
    position: absolute;
    top: 0.3rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
}

.close-button:hover {
    color: #4ADE80;
    background: rgba(255, 255, 255, 0.1);
}

.modal-image-container {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.modal-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

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

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4ADE80;
}

.modal-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.modal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(74, 222, 128, 0.2);
    border: 1px solid #4ADE80;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.modal-link:hover {
    background: rgba(74, 222, 128, 0.3);
    transform: translateY(-2px);
}

@media screen and (max-width: 768px) {
    .modal-content {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
}

.social-link {
    color: var(--text);
    transition: color 0.3s ease;
}

.social-link:hover i.fa-linkedin {
    color: #0077b5;
}

.social-link:hover i.fa-github {
    color: #6e5494;
}

.social-link:hover i.fa-envelope {
    color: #ff9800;
}

.back-button {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateX(-5px);
    border-color: #4ADE80;
}

.project-list {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    text-align: left;
}

.project-list li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-container {
    min-height: 400px;
}