/* ================= HERO ================= */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at 60% 40%, rgba(249, 94, 26, 0.07) 0%, transparent 65%),
                radial-gradient(ellipse at 20% 80%, rgba(249, 94, 26, 0.04) 0%, transparent 50%),
                var(--bg);
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(249, 94, 26, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(249, 94, 26, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
}

.hero-tag {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 6px 16px;
    border-radius: 2px;
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.2s forwards;
    min-width: 240px;
    text-align: center;
}

.typed-cursor {
    display: inline-block;
    color: var(--accent);
    margin-left: 1px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-name {
    font-size: clamp(52px, 10vw, 110px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.4s forwards;
}

.name-letter {
    display: inline-block;
}

/* ================= STATUS BADGE (fixed bottom-left) ================= */

.status-badge {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 900;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeUp 0.5s ease 2s forwards;
}

.status-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3fb950;
    flex-shrink: 0;
    animation: pulse-ring 2s ease infinite;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0   rgba(63, 185, 80, 0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
    100% { box-shadow: 0 0 0 0   rgba(63, 185, 80, 0); }
}

/* ================= DONATE BUTTON ================= */

.donate-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    opacity: 0;
    animation: fadeUp 0.5s ease 2.2s forwards;
}

.donate-btn:hover {
    color: #FF5E5B;
    border-color: #FF5E5B;
    transform: scale(1.12);
    box-shadow: 0 0 16px rgba(255, 94, 91, 0.3);
}

.donate-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.donate-tooltip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.donate-btn:hover .donate-tooltip {
    opacity: 1;
}

.hero-cta {
    display: inline-block;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 4px;
    transition: color 0.25s ease, border-color 0.25s ease;
    opacity: 0;
    animation: fadeUp 0.6s ease 0.8s forwards;
}

.hero-cta:hover {
    color: var(--accent);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= BIO SECTIONS ================= */

.bio-section {
    padding: 100px 20px;
    background: var(--bg);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.bio-section.alt {
    background: rgba(255, 255, 255, 0.018);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* ================= ABOUT ================= */

.about-intro {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 750px;
    margin-bottom: 60px;
}

.about-intro span {
    color: var(--text);
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.info-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

.info-card:hover {
    border-color: rgba(249, 94, 26, 0.4);
    box-shadow: 0 0 20px var(--accent-dim);
    transform: translateY(-4px);
}

.info-icon {
    width: 32px;
    height: 32px;
    color: var(--accent);
}

.info-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--accent);
}

.info-label {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-muted);
    font-weight: 600;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

/* ================= SKILLS ================= */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    cursor: default;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

.skill-card:hover {
    border-color: rgba(249, 94, 26, 0.5);
    box-shadow: 0 0 30px var(--accent-dim);
    transform: translateY(-4px);
}

.skill-icon {
    width: 50px;
    height: 50px;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.skill-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--text-muted);
    transition: fill 0.25s ease;
}

.skill-card:hover .skill-icon svg {
    fill: var(--accent);
}

.skill-card p {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-muted);
    transition: color 0.25s ease;
}

.skill-card:hover p {
    color: var(--text);
}

/* ================= SKILLS NOTE ================= */

.skills-note {
    margin-top: 32px;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    opacity: 0.7;
    font-style: italic;
}

/* ================= PROJECTS ================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 28px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.project-card:hover {
    border-color: rgba(249, 94, 26, 0.4);
    box-shadow: 0 0 40px var(--accent-dim);
}

.project-card .card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    will-change: opacity;
}

.card-logo {
    position: absolute;
    right: -30px;
    top: -30px;
    width: 300px;
    height: auto;
    opacity: 0.08;
    transform: rotate(15deg);
    pointer-events: none;
    user-select: none;
    border-radius: 12px;
    z-index: 0;
}

.project-card .card-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
    color: var(--text);
}

.project-card p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.project-tags span {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--accent);
    border: 1px solid rgba(249, 94, 26, 0.4);
    border-radius: 3px;
    padding: 3px 10px;
}

.project-link {
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

.project-link:hover {
    color: var(--accent);
}

/* ================= SECTION FADE-IN ================= */

.bio-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================= STAGGER CHILD FADE-IN ================= */

.skill-card,
.project-card,
.info-card,
.timeline-item,
.contact-item {
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.skill-card.stagger-in    { animation: fadeInUp 0.45s ease calc(var(--i, 0) * 70ms) both; }
.project-card.stagger-in  { animation: fadeInUp 0.5s  ease calc(var(--i, 0) * 100ms) both; }
.info-card.stagger-in     { animation: fadeInUp 0.45s ease calc(var(--i, 0) * 80ms) both; }
.timeline-item.stagger-in { animation: fadeInUp 0.45s ease calc(var(--i, 0) * 110ms) both; }
.contact-item.stagger-in  { animation: fadeInUp 0.45s ease calc(var(--i, 0) * 80ms) both; }

/* ================= EXPERIENCE / TIMELINE ================= */

.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

.timeline-item { position: relative; }

.timeline-dot {
    position: absolute;
    left: -33px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-meta { margin-bottom: 6px; }

.timeline-date {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}

.timeline-role {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
}

.timeline-company {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 14px;
    font-weight: 500;
}

.timeline-desc {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 15px;
    margin: 0 0 16px;
    max-width: 680px;
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.timeline-tags span {
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-muted);
}

/* ================= CONTACT ================= */

.contact-intro {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 36px;
    max-width: 500px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 560px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.25s ease, transform 0.25s ease;
    text-decoration: none;
    color: inherit;
    cursor: default;
}

a.contact-item { cursor: pointer; }

.contact-item:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.contact-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--text-muted);
    transition: fill 0.25s ease;
}

.contact-item:hover .contact-icon svg { fill: var(--accent); }

.contact-body { flex: 1; }

.contact-label {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-value {
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
}

.contact-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.25s ease, transform 0.25s ease;
}

.contact-item:hover .contact-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

.copy-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

.copy-btn svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.copy-btn .icon-check { display: none; }
.copy-btn.copied .icon-copy { display: none; }
.copy-btn.copied .icon-check { display: block; }
.copy-btn.copied { border-color: #22c55e; color: #22c55e; }

/* ================= CARD PREVIEW ================= */

.card-preview {
    position: absolute;
    right: 0;
    top: 0;
    width: 55%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    opacity: 0.04;
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.8), transparent 90%);
    mask-image: linear-gradient(to left, rgba(0,0,0,0.8), transparent 90%);
    transition: opacity 0.4s ease;
}

.project-card:hover .card-preview img { opacity: 0.14; }

/* ================= CARD GLARE OVERLAY ================= */

.card-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.10), transparent 65%);
    transition: opacity 0.3s ease;
    mix-blend-mode: overlay;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .hero-name {
        letter-spacing: -1px;
    }

    .bio-section {
        padding: 70px 20px;
    }

    .about-intro {
        font-size: 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ================= CONTRIBUTIONS GRAPH ================= */

.section-sub {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: -8px;
    margin-bottom: 32px;
}

.contrib-outer {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contrib-scroll {
    overflow-x: auto;
    padding-bottom: 6px;
}

.contrib-scroll::-webkit-scrollbar { height: 4px; }
.contrib-scroll::-webkit-scrollbar-track { background: transparent; }
.contrib-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.contrib-layout {
    display: flex;
    gap: 5px;
    width: fit-content;
    align-items: flex-end;
}

.contrib-day-labels {
    display: grid;
    grid-template-rows: repeat(7, 13px);
    gap: 3px;
    padding-top: 22px;
    font-size: 9px;
    color: var(--text-muted);
    text-align: right;
    flex-shrink: 0;
    line-height: 13px;
    user-select: none;
}

.contrib-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contrib-month-bar {
    height: 18px;
    position: relative;
    font-size: 10px;
    color: var(--text-muted);
    user-select: none;
}

.contrib-month-bar span {
    position: absolute;
    white-space: nowrap;
    line-height: 18px;
}

.contrib-grid {
    display: grid;
    grid-template-rows: repeat(7, 13px);
    grid-auto-flow: column;
    gap: 3px;
    width: fit-content;
}

.contrib-cell {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    transition: transform 0.1s ease;
    cursor: default;
}

.contrib-cell:hover { transform: scale(1.3); }
.contrib-cell.empty { background: transparent !important; }

.contrib-cell.cl-0,
.contrib-legend .cl-0 { background: rgba(255, 255, 255, 0.07); }
.contrib-cell.cl-1,
.contrib-legend .cl-1 { background: #4a1e0a; }
.contrib-cell.cl-2,
.contrib-legend .cl-2 { background: #8b3810; }
.contrib-cell.cl-3,
.contrib-legend .cl-3 { background: #d45a18; }
.contrib-cell.cl-4,
.contrib-legend .cl-4 { background: var(--accent); }

[data-theme="light"] .contrib-cell.cl-0,
[data-theme="light"] .contrib-legend .cl-0 { background: #ebedf0; }
[data-theme="light"] .contrib-cell.cl-1,
[data-theme="light"] .contrib-legend .cl-1 { background: #fdd5c0; }
[data-theme="light"] .contrib-cell.cl-2,
[data-theme="light"] .contrib-legend .cl-2 { background: #fba882; }
[data-theme="light"] .contrib-cell.cl-3,
[data-theme="light"] .contrib-legend .cl-3 { background: #f87040; }

.contrib-loading {
    font-size: 13px;
    color: var(--text-muted);
    padding: 20px 0;
}

.contrib-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.contrib-total {
    font-size: 12px;
    color: var(--text-muted);
}

.contrib-legend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
}

.contrib-legend-label {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-right: 2px;
}

.contrib-legend .cl {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ================= CONTRIBUTIONS — MOBILE ================= */

@media (max-width: 768px) {
    .contrib-day-labels {
        display: none;
    }

    .contrib-month-bar {
        display: none;
    }

    .contrib-grid {
        grid-template-rows: repeat(7, 8px);
        gap: 2px;
    }

    .contrib-cell {
        width: 8px;
        height: 8px;
        border-radius: 2px;
    }

    .contrib-cell.empty {
        width: 8px;
        height: 8px;
    }

    .contrib-scroll {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .contrib-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .contrib-legend .cl {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .contrib-grid {
        grid-template-rows: repeat(7, 6px);
        gap: 2px;
    }

    .contrib-cell,
    .contrib-cell.empty {
        width: 6px;
        height: 6px;
        border-radius: 1px;
    }

    .contrib-legend .cl {
        width: 6px;
        height: 6px;
    }
}
