/* ============================================================
   default.css — Portfolio Stylesheet
   Structure: assets/css/default.css
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Root-vars */
:root {
    --bg: #111312;
    --card: #181a19;
    --border: #242624;

    --ink: #b9beba;
    --ink2: #94a597;

    --hi: #b6f0c0;
    --accent: #4dff85;

    --max: 620px;
    --pad: 32px;
    --radius: 16px;
    --radius-div: 2px;
}

/* ── Base ── */
html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-width: 350px;
    min-height: 100vh;
}

/* ── Container ── */
.container {
    position: relative;
    max-width: var(--max);
    margin: 0 auto;
    padding: 28px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Widgets */
.lang-switch {
    display: flex;
    align-items: center;
    align-self: flex-end;
    gap: 0;
}

.lang-btn {
    background: none;
    border: none;
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--ink2);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: color .2s;
    line-height: 1;
}

.lang-btn:hover {
    color: var(--hi);
}

.lang-btn.active {
    color: var(--accent);
}

.lang-divider {
    width: 1px;
    height: 12px;
    background: var(--border);
    display: block;
}

/* Cards/Divs */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-div);
    padding: var(--pad);
    width: 100%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
    opacity: 0;
    transform: translateY(18px);
    animation: rise .5s ease forwards;
}

.card:nth-child(1) {
    animation-delay: .05s;
}

.card:nth-child(2) {
    animation-delay: .17s;
}

.card:nth-child(3) {
    animation-delay: .29s;
}

@keyframes rise {
    to {
        opacity: 1;
        transform: none;
    }
}

/* Section 1: Header/Avatar/Bio/GitHub */
.header-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Avatar */
.avatar-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #1a2b1d;
    border: 1px solid #2a3d2d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    color: var(--hi);

    img {
        width: 100%;
        height: 100%;
        border-radius: inherit;
    }
}

/* Name */
.name-block h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 26px;
    line-height: 1.1;
    letter-spacing: -.3px;
    color: var(--hi);
}

.name-block h1 em {
    color: var(--accent);
    font-style: italic;
}

.role {
    font-size: 12px;
    color: var(--ink2);
    margin-top: 4px;
    letter-spacing: .4px;
}

/* Bio */
.bio {
    font-size: 13.5px;
    color: var(--ink);
    line-height: 1.75;
}

.bio strong {
    color: var(--hi);
    font-weight: 500;
}

/* Icon links */
.links {
    display: flex;
    gap: 8px;
}

.links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--ink2);
    text-decoration: none;
    transition: all .2s;
}

.links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: #141d15;
}

.links a svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.github-stats {
    height: fit-content;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    line-height: normal;
}

.stat-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 14px;
    flex-shrink: 0;
}

.stat-num {
    font-family: 'DM Serif Display', serif;
    font-size: 20px;
    color: var(--hi);
    display: block;
}

.stat-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--ink2);
    text-transform: uppercase;
    letter-spacing: .8px;
}

.contrib-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contrib-section h3 {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ink2);
}

.contrib-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.contrib-chart {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#contrib-grid {
    display: grid;
    grid-template-columns: repeat(30, 1fr);
    gap: 3px;
}

.contrib-cell {
    aspect-ratio: 1;
    border-radius: 2px;
    background: #1d201e;
    transition: transform .12s;
    cursor: default;
    position: relative;
}

.contrib-cell::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: #1e2b20;
    color: var(--hi);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.3px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 99;
}

.contrib-cell:hover::after {
    opacity: 1;
}

.contrib-cell:hover {
    transform: scale(1.5);
    z-index: 1;
    position: relative;
}

.contrib-cell[data-level="1"] {
    background: #1a3322;
}

.contrib-cell[data-level="2"] {
    background: #1f4d2c;
}

.contrib-cell[data-level="3"] {
    background: #2d7a3e;
}

.contrib-cell[data-level="4"] {
    background: var(--accent);
}

.contrib-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.contrib-legend span {
    font-size: 10px;
    color: var(--ink2);
    font-family: 'DM Mono', monospace;
}

.legend-cell {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: #1d201e;
}

.legend-cell.l1 {
    background: #1a3322;
}

.legend-cell.l2 {
    background: #1f4d2c;
}

.legend-cell.l3 {
    background: #2d7a3e;
}

.legend-cell.l4 {
    background: var(--accent);
}


/* Section 2: Education */
.section-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--ink2);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.experience-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.t-item {
    display: flex;
    gap: 14px;
}

.t-line {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.t-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ink2);
    flex-shrink: 0;
    margin-top: 5px;
}

.t-dot.active {
    background: var(--accent);
}

.t-bar {
    flex: 1;
    width: 1px;
    background: var(--border);
    margin: 4px 0;
}

.t-item:last-child .t-bar {
    display: none;
}

.t-org {
    font-weight: 500;
    font-size: 13.5px;
    color: var(--hi);
}

.t-role {
    font-size: 12.5px;
    margin-top: 1px;

    a {
        display: block;
        color: var(--ink);
        text-decoration: none;
        transition: color .2s, transform .3s ease-in-out;
    }

    a:hover {
        color: var(--hi);
        transform: translateY(-2px);
    }
}

.t-date {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--ink2);
    margin-top: 3px;
}

/* Experiences spinner */
.ticker-wrap {
    overflow: hidden;
    position: relative;
}

.ticker-wrap::before,
.ticker-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 36px;
    z-index: 2;
    pointer-events: none;
}

.ticker-wrap::before {
    left: 0;
    background: linear-gradient(to right, var(--card), transparent);
}

.ticker-wrap::after {
    right: 0;
    background: linear-gradient(to left, var(--card), transparent);
}

.ticker-track {
    display: flex;
    gap: 8px;
    animation: ticker 26s linear infinite;
    width: max-content;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 40px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 12px;
    color: var(--ink);
    white-space: nowrap;
    cursor: default;
    transition: all .2s;
}

.tech-chip:hover {
    border-color: var(--accent);
    color: var(--hi);
}

.tech-icon {
    font-size: 14px;
}

/* Section 3: Projects */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg);
    transition: transform .22s, box-shadow .22s;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}

.project-img-placeholder {
    width: 100%;
    aspect-ratio: 16 / 7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: #141714;
    border-bottom: 1px solid var(--border);
}

.project-body {
    padding: 14px 16px 16px;
}

.project-title {
    font-family: 'DM Serif Display', serif;
    font-size: 16px;
    color: var(--hi);
    margin-bottom: 5px;
}

.project-desc {
    font-size: 12.5px;
    color: var(--ink);
    line-height: 1.6;
    margin-bottom: 10px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    background: #1a2b1d;
    color: var(--ink);
    border: 1px solid #243028;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
}

.page-btn {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    color: var(--ink2);
}

.page-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.page-btn.active {
    background: var(--accent);
    color: #0d1a0f;
    border-color: var(--accent);
    font-weight: 600;
}

/* Minor styles */
.div-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--ink2);
    margin-bottom: 8px;
}

.email-link.inactive {
    color: var(--ink2);
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
    text-decoration: none;
}

/* Responsive: Smaller devices */
@media (max-width: 750px) {
    .lang-switch {
        align-self: stretch;
        justify-content: flex-end;
        position: sticky;
        top: 0;
        z-index: 100;
        padding: 10px 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        margin-bottom: -4px;
    }

    /* Standard: centrera */
    .contrib-cell::after {
        display: none;
    }

    .contrib-cell:hover {
        transform: none;
    }
}

@media (max-width: 550px) {
    :root {
        --pad: 20px;
    }

    .github-stats {
        flex-direction: column;
    }

    .contrib-section {
        width: 100%;
        gap: 10px;
    }
}