/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica', 'Arial', sans-serif;
    background: #F7F5F2; /* Warm off-white */
    color: #2B2B2B; /* Soft charcoal */
    line-height: 1.6;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #D76262 0%, #F59E0B 100%); /* Coral to Saffron */
    padding: 60px 20px;
    text-align: center;
    border-bottom: 2px solid #D6D1CB; /* Subtle stone */
}

.title {
    font-family: 'Inter', sans-serif; /* Use Fields if available */
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

.button-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #D76262;
    font-weight: 400;
    text-decoration: none;
}
    
.button {
    text-align: left;
    border: 1px;
    border-radius: 8px;
    background-color: white;
    max-width: 10%;
    padding: 10px;

}

/* Main Content */
.main {
    padding: 40px 20px;
}

.section-title {
    font-family: 'Inter', sans-serif; /* Use Fields if available */
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #D76262; /* Signal coral */
}

/* Stats Summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border: 2px solid #D6D1CB; /* Subtle stone */
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #D76262; /* Signal coral */
    box-shadow: 0 4px 12px rgba(215, 98, 98, 0.15);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #D76262; /* Signal coral */
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #6B6763; /* Warm gray */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Contribution Graph */
.graph-container {
    background: white;
    border: 2px solid #D6D1CB; /* Subtle stone */
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
}

.graph-wrapper {
    overflow-x: auto;
    margin-bottom: 16px;
}

.graph-months {
    position: relative;
    height: 20px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #6B6763; /* Warm gray */
    padding-left: 50px;
    margin-left: 20px;
    min-width: 900px;
    width: 100%;
}

.graph-month {
    position: absolute;
    white-space: nowrap;
    min-width: 40px;
    font-weight: 500;
}

.graph-content {
    display: flex;
}

.graph-days-labels {
    display: grid;
    grid-template-rows: repeat(7, 13px);
    gap: 3px;
    width: 40px;
    font-size: 12px;
    color: #6B6763; /* Warm gray */
    padding-right: 8px;
    font-weight: 500;
}

.graph-days-labels span {
    display: flex;
    align-items: center;
}

.graph-days-labels span:nth-child(1) { grid-row: 1; } /* Mon */
.graph-days-labels span:nth-child(2) { grid-row: 3; } /* Wed */
.graph-days-labels span:nth-child(3) { grid-row: 5; } /* Fri */
.graph-days-labels span:nth-child(4) { grid-row: 7; } /* Sun */

.graph-grid {
    display: grid;
    grid-template-rows: repeat(7, 13px);
    grid-auto-flow: column;
    gap: 3px;
    width: fit-content;
}

.graph-day {
    width: 13px;
    height: 13px;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.graph-day[data-level="0"] {
    background: #E7E3DE; /* Light warm gray */
    border: 1px solid #D6D1CB; /* Subtle stone */
}

.graph-day[data-level="1"] {
    background: #F5C9C9; /* Light coral */
}

.graph-day[data-level="2"] {
    background: #ED9E9E; /* Medium coral */
}

.graph-day[data-level="3"] {
    background: #E07979; /* Darker coral */
}

.graph-day[data-level="4"] {
    background: #D76262; /* Signal coral */
}

.graph-day:hover {
    outline: 2px solid #F59E0B; /* Electric saffron */
    outline-offset: 1px;
}

.graph-legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 12px;
    color: #6B6763; /* Warm gray */
}

.legend-colors {
    display: flex;
    gap: 3px;
}

.legend-box {
    width: 13px;
    height: 13px;
    border-radius: 2px;
}

.legend-box[data-level="0"] {
    background: #E7E3DE;
    border: 1px solid #D6D1CB;
}

.legend-box[data-level="1"] {
    background: #F5C9C9;
}

.legend-box[data-level="2"] {
    background: #ED9E9E;
}

.legend-box[data-level="3"] {
    background: #E07979;
}

.legend-box[data-level="4"] {
    background: #D76262;
}

/* Tooltip */
.tooltip {
    position: fixed;
    background: white;
    border: 2px solid #D76262; /* Signal coral */
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.tooltip.visible {
    opacity: 1;
}

.tooltip-date {
    font-weight: 600;
    margin-bottom: 4px;
    color: #2B2B2B; /* Soft charcoal */
}

.tooltip-info {
    color: #6B6763; /* Warm gray */
}

/* Recent Projects */
.recent-projects {
    margin-bottom: 40px;
}

.projects-list {
    display: grid;
    gap: 16px;
}

.project-card {
    background: white;
    border: 2px solid #D6D1CB; /* Subtle stone */
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    border-color: #D76262; /* Signal coral */
    box-shadow: 0 4px 12px rgba(215, 98, 98, 0.15);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.project-title {
    font-size: 20px;
    font-weight: 600;
    color: #D76262; /* Signal coral */
}

.project-date {
    font-size: 14px;
    color: #6B6763; /* Warm gray */
    font-weight: 500;
}

.project-description {
    color: #2B2B2B; /* Soft charcoal */
    margin-bottom: 12px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tag-tool {
    background: rgba(215, 98, 98, 0.12); /* Coral tint */
    color: #D76262; /* Signal coral */
    border: 1px solid rgba(215, 98, 98, 0.25);
}

.tag-stack {
    background: rgba(245, 158, 11, 0.12); /* Saffron tint */
    color: #F59E0B; /* Electric saffron */
    border: 1px solid rgba(245, 158, 11, 0.25);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 43, 43, 0.75); /* Soft charcoal overlay */
}

.modal-content {
    position: relative;
    max-width: 800px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #F7F5F2; /* Warm off-white */
    border: 2px solid #D76262; /* Signal coral */
    border-radius: 8px;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    background: white;
    border: 2px solid #D6D1CB; /* Subtle stone */
    color: #2B2B2B; /* Soft charcoal */
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    margin: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    background: #D76262; /* Signal coral */
    border-color: #D76262;
    color: white;
}

.modal-body {
    padding: 32px;
    clear: both;
}

.modal-title {
    font-family: 'Inter', sans-serif; /* Use Fields if available */
    font-size: 32px;
    font-weight: 700;
    color: #D76262; /* Signal coral */
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid #D6D1CB; /* Subtle stone */
    color: #6B6763; /* Warm gray */
    font-size: 14px;
    font-weight: 500;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2B2B2B; /* Soft charcoal */
    margin-bottom: 12px;
}

.modal-learnings {
    list-style: none;
}

.modal-learnings li {
    padding-left: 24px;
    margin-bottom: 8px;
    position: relative;
    color: #2B2B2B; /* Soft charcoal */
}

.modal-learnings li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #F59E0B; /* Electric saffron */
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 32px;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }

    .graph-wrapper {
        overflow-x: scroll;
    }

    .modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #6B6763; /* Warm gray */
}

.loading:after {
    content: "...";
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}
