/* CSS Variables */
:root {
    --bg-primary: #262626;
    --bg-secondary: #3a3a3a;
    --bg-card: #cfcfcf;
    --bg-button: linear-gradient(180deg,rgba(207, 207, 207, 1) 0%, rgba(171, 171, 171, 1) 100%);
    --text-primary: #cfcfcf;
    --text-secondary: #a0a0a0;
    --text-muted: #808080;
    --accent: #cfcfcf;
    --border: #4a4a4a;
    --skill-tag-bg: linear-gradient(180deg,rgba(110, 110, 110, 1) 0%, rgba(79, 79, 79, 1) 100%);
    --delicious-cubic-bezier: cubic-bezier(.2,0,0,1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-origin: border-box !important;
}

body {
    font-family: 'Fira Code', monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    padding: 1.5rem 0 3rem;
    border-bottom: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 100%);
    position: relative;
    z-index: 100;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s var(--delicious-cubic-bezier);
    position: relative;
    cursor: pointer;
    font-weight: bold;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a.active {
    color: var(--text-primary);
    text-decoration: underline;
}

.nav-divider {
    width: 1px;
    height: 1.5rem;
    background-color: var(--border);
}

/* Hero Section */
.hero {
    padding: 4rem 0 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Skills Section */
.skills-section {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 1.25rem;
    border:  1px solid rgba(255, 255, 255, 0.1); box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5);
}

.skills-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.skills-category {
    margin-bottom: 1.5rem;
}

.skills-category:last-child {
    margin-bottom: 0;
}

.category-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

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

.skill-tag {
    position: relative;
    overflow: hidden;

    background: var(--skill-tag-bg);
    color: var(--text-primary);

    padding: 0.4rem 1rem;
    border-radius: 1000px;
    font-size: 0.85rem;

    border: 1px solid rgba(255,255,255,0.1);

    transition: transform 0.25s var(--delicious-cubic-bezier), box-shadow 0.25s var(--delicious-cubic-bezier);
}

.skill-tag::before {
    content: "";

    position: absolute;
    top: 0;
    left: -150%;

    width: 200%;
    height: 100%;

    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255,255,255,0.25) 50%,
        transparent 100%
    );

    transform: skewX(-20deg);
    transition: all 0.5s var(--delicious-cubic-bezier);
    opacity: 0;
}

.skill-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.skill-tag:hover::before {
    opacity: 1;
    left: 150%;
}

/* Contributions Section */
.contributions-section {
    padding: 0 0 3rem 0;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.contributions-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 3rem;
    align-items: start;
}

.project-list {
    list-style: none;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: var(--bg-secondary);
    border-radius: 0.75rem;
    border:  1px solid rgba(255, 255, 255, 0.1); box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5);
}

.project-icon {
    width: 2rem;
    height: 2rem;
    background-color: var(--bg-card);
    border-radius: .35rem;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
}

.project-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-name {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* GitHub Heatmap */
.github-heatmap {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 1.25rem;
    overflow: hidden;
    border:  1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5);
}

.heatmap-label {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

#heatmap {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 0.5rem;
    border:  1px solid rgba(255, 255, 255, 0.1);
}

#heatmap canvas {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
    /* Ensure canvas respects border-radius */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.heatmap-footer {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 1rem;
}

.heatmap-info {
    opacity: 0.7;
}

/* Legacy heatmap styles (kept for backwards compatibility) */
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(53, 1fr);
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.heatmap-wrapper {
    position: relative;
    width: 100%;
}

.heatmap-months {
    display: grid;
    gap: 3px;
    margin-bottom: 0.5rem;
    margin-left: 26px;
}

.heatmap-months span {
    color: var(--text-secondary);
    font-size: 0.65rem;
    text-align: left;
}

.heatmap-calendar {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 6px;
    align-items: start;
}

.heatmap-days {
    display: grid;
    grid-template-rows: repeat(7, 11px);
    gap: 3px;
    padding-top: 0;
}

.heatmap-days span {
    color: var(--text-secondary);
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    line-height: 11px;
}

.heatmap-weeks {
    display: grid;
    gap: 3px;
}

.heatmap-week {
    display: grid;
    grid-template-rows: repeat(7, 11px);
    gap: 3px;
}

.heatmap-cell {
    width: 11px;
    height: 11px;
    background-color: var(--bg-secondary);
    border-radius: 2px;
}

.heatmap-cell.future {
    opacity: 0;
}

.heatmap-cell.active-1 {
    background-color: #454545;
}

.heatmap-cell.active-2 {
    background-color: #505050;
}

.heatmap-cell.active-3 {
    background-color: #6a6a6a;
}

.heatmap-cell.active-4 {
    background-color: #8a8a8a;
}

/* Projects Page */
.projects-header {
    padding: 3rem 0 2rem;
}

.page-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.page-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.divider {
    border: none;
    border-top: 2px solid var(--border);
    margin: 3rem 0 0 0;
    padding: 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    padding: 2rem 0 4rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    transition: all 0.3s var(--delicious-cubic-bezier), opacity 0.3s var(--delicious-cubic-bezier);
    scrollbar-width: none;
}

.project-card:hover {
    transform: scale(1.05);
}

.project-card:hover .project-card-image {
    box-shadow: 0 0 35px rgba(0,0,0,0.5);
}

.project-card-image {
    display: block;
    object-fit: cover;
    background-color: var(--bg-card);
    border-radius: 1rem;
    aspect-ratio: 3/4;
    margin-bottom: 1rem;
    transition: all 0.3s var(--delicious-cubic-bezier), opacity 0.3s var(--delicious-cubic-bezier);
    border:  1px solid rgba(255, 255, 255, 0.1); box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5);
}

.project-card-title {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-weight: normal;
}

.project-card-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s var(--delicious-cubic-bezier);
}

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

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

.modal-content {
    background-color: var(--bg-secondary);
    border-radius: 1.25rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s var(--delicious-cubic-bezier);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.project-modal.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s var(--delicious-cubic-bezier);
}

.modal-close:hover {
    opacity: 0.7;
}

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

.modal-project-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

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

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.modal-section h3 {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.modal-about-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-gallery {
    width: 100%;
}

/* Image Gallery */
.image-gallery-wrapper {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    width: 100%;
}

.gallery-container {
    position: relative;
    flex: 1;
    height: 300px;
    overflow: hidden;
    border-radius: 0.75rem;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5);
}

.gallery-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.6);
    transform: scale(1.1);
    z-index: 1;
}

.gallery-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.75rem;
    border:  1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 20;
}

.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 10;
}

.gallery-image.active {
    opacity: 1;
}

.gallery-arrow {
    position: absolute;
    top: 0;
    width: 30%;
    height: 100%;
    border: none;
    background: transparent;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-arrow-left {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
    justify-content: flex-start;
    padding-left: 1rem;
}

.gallery-arrow-right {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
    justify-content: flex-end;
    padding-right: 1rem;
}

.gallery-arrow:hover {
    opacity: 1;
}

.modal-features-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-features-list li {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.modal-features-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.modal-link-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--bg-button);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: opacity 0.3s var(--delicious-cubic-bezier);
    border:  1px solid rgba(255, 255, 255, 0.1); box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5);
}

.modal-link-button:hover {
    opacity: 0.8;
}

.no-links {
    color: var(--text-muted);
    font-style: italic;
}

/* Contact Dropdown */
.contact-dropdown {
    position: fixed;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s var(--delicious-cubic-bezier), transform 0.3s var(--delicious-cubic-bezier);
    z-index: 1000;
    max-width: 350px;
    width: 350px;
}

.contact-dropdown.active {
    display: block;
}

.contact-dropdown.show {
    opacity: 1;
    transform: translateY(0);
}

.contact-dropdown.hide {
    opacity: 0;
    transform: translateY(-10px);
}

.dropdown-content {
    background-color: var(--bg-card);
    border-radius: 1.25rem;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border:  1px solid rgba(255, 255, 255, 0.1); box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-button);
    border-radius: .75rem;
    text-decoration: none;
    transition: background-color 0.3s var(--delicious-cubic-bezier);
    border:  1px solid rgba(255, 255, 255, 0.1); box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.2);
}

.contact-item:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.contact-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--text-primary);
}

.contact-text {
    flex: 1;
}

.contact-service {
    color: var(--bg-primary);
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.contact-username {
    color: rgba(0, 0, 0, 0.6);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    padding: 1rem 0;
    text-align: center;
    margin-top: auto;
    background-color: #1c1c1c;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contributions-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

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

    .container {
        padding: 0 1rem;
    }
}
