* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    color: #e6e1f3;
    overflow-x: hidden;
    position: relative;
    background: #0a0a12;
    border: 1px solid #9ff336;
    box-shadow: inset 0 0 30px rgba(159, 243, 54, 0.06);
    min-height: 100vh;
}

#grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, 40px);
    grid-template-rows: repeat(auto-fill, 40px);
    background: #0a0a12;
}

.square {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(139, 92, 246, 0.14);
    transition: background-color 0.5s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 80px 20px 60px;
    margin-bottom: 60px;
}

.profile-section {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.avatar {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 3px solid #a78bfa;
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.45), 0 0 70px rgba(124, 58, 237, 0.2);
    background: linear-gradient(135deg, #4c1d95, #6d28d9, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.profile-info {
    flex: 1;
}

.username {
    font-size: 3em;
    font-weight: 600;
    color: #f3f0fb;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.handle {
    color: #8b839f;
    font-size: 1em;
    margin-bottom: 14px;
}

.handle strong {
    color: #c4b5fd;
}

.bio {
    font-size: 1.3em;
    color: #a5a0c0;
    margin-bottom: 20px;
    line-height: 1.6;
}

.bio .dot {
    color: #8b5cf6;
}

.type-target {
    color: #c4b5fd;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85em;
}

.cursor {
    color: #a78bfa;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85em;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.profile-stats {
    display: flex;
    gap: 30px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.profile-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #a5a0c0;
}

.profile-stat strong {
    color: #f3f0fb;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9ff336;
    box-shadow: 0 0 8px rgba(159, 243, 54, 0.8);
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #322a4d;
    color: #e6e1f3;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.social-btn:hover {
    background: #322a4d;
    border-color: #a78bfa;
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.25);
}

.social-btn--alt {
    border-color: #3d3155;
    color: #b8b0d8;
}

/* Extended bio card */

.bio-extra {
    background: #12101c;
    border: 1px solid #322a4d;
    border-radius: 10px;
    padding: 28px 30px;
    margin-bottom: 40px;
}

.bio-extra-text {
    color: #b8b0d8;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 22px;
}

.bio-extra-heading {
    color: #f3f0fb;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 14px;
}

.focus-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.focus-list > li {
    color: #a5a0c0;
    font-size: 14px;
    line-height: 1.6;
}

.focus-list strong {
    color: #c4b5fd;
}

.focus-sublist {
    list-style: none;
    margin-top: 6px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.focus-sublist li {
    position: relative;
    padding-left: 14px;
}

.focus-sublist li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: #8b5cf6;
}

.bio-quote {
    border-left: 3px solid #8b5cf6;
    padding: 4px 0 4px 16px;
    color: #c4b5fd;
    font-style: italic;
    font-size: 14px;
    margin-bottom: 22px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.badge-row img {
    height: 26px;
    display: block;
}

.tabs {
    border-bottom: 1px solid #221c33;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
}

.tab {
    padding: 15px 10px;
    color: #a5a0c0;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-size: 14px;
}

.tab:hover {
    color: #e6e1f3;
}

.tab.active {
    color: #e6e1f3;
    border-bottom-color: #a78bfa;
}

.section-title {
    font-size: 1.5em;
    color: #f3f0fb;
    margin-bottom: 20px;
    font-weight: 600;
}

section {
    scroll-margin-top: 30px;
    margin-bottom: 50px;
}

/* Feature card (flagship project) */

.feature-card {
    position: relative;
    background: #12101c;
    border: 1px solid #322a4d;
    border-radius: 10px;
    padding: 2px;
    overflow: hidden;
    margin-bottom: 40px;
}

.feature-glow {
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 0deg, transparent, rgba(139, 92, 246, 0.25), rgba(159, 243, 54, 0.18), transparent 40%);
    animation: rotate 8s linear infinite;
    z-index: 0;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

.feature-body {
    position: relative;
    z-index: 1;
    background: #12101c;
    border-radius: 9px;
    padding: 28px;
}

.feature-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.feature-icon {
    font-size: 28px;
}

.feature-name {
    display: block;
    color: #c4b5fd;
    font-size: 1.4em;
    font-weight: 700;
    text-decoration: none;
}

.feature-name:hover {
    text-decoration: underline;
}

.feature-sub {
    display: block;
    color: #8b839f;
    font-size: 0.8em;
    margin-top: 2px;
}

.status-badge {
    margin-left: auto;
    padding: 5px 12px;
    background: rgba(159, 243, 54, 0.12);
    border: 1px solid rgba(159, 243, 54, 0.4);
    color: #9ff336;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.feature-description {
    color: #b8b0d8;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.feature-description a {
    color: #a78bfa;
}

.feature-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tag {
    padding: 4px 12px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: #c4b5fd;
    border-radius: 20px;
    font-size: 12px;
}

.feature-footer {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #8b839f;
    border-top: 1px solid #221c33;
    padding-top: 16px;
}

/* Gallery carousel */

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #322a4d;
    background: #12101c;
}

.carousel-track {
    display: flex;
    transition: transform 0.45s ease;
}

.carousel-slide {
    position: relative;
    min-width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a12;
}

.carousel-slide img,
.carousel-slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.carousel-caption {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    padding: 10px 16px;
    background: linear-gradient(to bottom, rgba(10, 10, 18, 0.9), transparent);
    color: #e6e1f3;
    font-size: 0.85em;
    font-weight: 600;
    text-align: left;
    pointer-events: none;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(18, 16, 28, 0.85);
    border: 1px solid #322a4d;
    color: #e6e1f3;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
    font-size: 15px;
}

.carousel-arrow:hover {
    border-color: #a78bfa;
    background: rgba(139, 92, 246, 0.18);
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.3);
}

.carousel-arrow--prev {
    left: 14px;
}

.carousel-arrow--next {
    right: 14px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 16px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #322a4d;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot:hover {
    background: #a78bfa;
}

.carousel-dot.active {
    background: #a78bfa;
    width: 22px;
    border-radius: 4px;
}

/* Shared violet-to-lime accent bar on cards */

.repo-card,
.exp-card,
.platform-card,
.skill-group,
.bio-extra {
    position: relative;
    overflow: hidden;
}

.repo-card::before,
.exp-card::before,
.platform-card::before,
.skill-group::before,
.bio-extra::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #9ff336);
    opacity: 0.7;
}

/* Repo-style grid */

.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.repo-card {
    background: #12101c;
    border: 1px solid #322a4d;
    border-radius: 6px;
    padding: 20px;
    transition: all 0.2s;
}

.repo-card:hover {
    border-color: #a78bfa;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2), 0 0 14px rgba(159, 243, 54, 0.1);
    transform: translateY(-2px);
}

.repo-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.repo-icon {
    color: #8b839f;
    font-size: 16px;
}

.repo-name {
    color: #c4b5fd;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.repo-name:hover {
    text-decoration: underline;
}

.repo-description {
    color: #a5a0c0;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.repo-footer {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #8b839f;
    align-items: center;
    flex-wrap: wrap;
}

.repo-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.language-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.pinned-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #1e1830;
    border: 1px solid #322a4d;
    border-radius: 20px;
    font-size: 12px;
    color: #8b839f;
    margin-left: auto;
}

.pinned-badge--live {
    background: rgba(159, 243, 54, 0.12);
    border-color: rgba(159, 243, 54, 0.4);
    color: #9ff336;
}

.pinned-badge--alpha {
    background: rgba(251, 191, 36, 0.14);
    border-color: rgba(251, 191, 36, 0.5);
    color: #fbbf24;
    font-weight: 700;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 18px;
    background: #9ff336;
    color: #0a0a12;
    font-weight: 700;
    font-size: 13px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    width: fit-content;
}

.download-btn:hover {
    box-shadow: 0 0 16px rgba(159, 243, 54, 0.5);
    transform: translateY(-1px);
}

.download-btn--disabled {
    background: transparent;
    border: 1px dashed #322a4d;
    color: #8b839f;
    cursor: not-allowed;
    pointer-events: none;
}

/* Background / experience */

.subsection-title {
    font-size: 1.1em;
    color: #c4b5fd;
    margin: 30px 0 16px;
    font-weight: 600;
}

.exp-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.exp-card {
    background: #12101c;
    border: 1px solid #322a4d;
    border-radius: 6px;
    padding: 20px 24px;
    transition: border-color 0.2s;
}

.exp-card:hover {
    border-color: #a78bfa;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.15), 0 0 10px rgba(159, 243, 54, 0.08);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.exp-role {
    display: block;
    color: #f3f0fb;
    font-size: 1.05em;
    font-weight: 600;
}

.exp-org {
    display: block;
    color: #8b839f;
    font-size: 0.85em;
    margin-top: 2px;
}

.exp-dates {
    color: #8b839f;
    font-size: 0.85em;
    white-space: nowrap;
}

.exp-desc {
    color: #a5a0c0;
    font-size: 14px;
    line-height: 1.6;
}

.exp-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.skill-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.skill-group {
    background: #12101c;
    border: 1px solid #322a4d;
    border-radius: 6px;
    padding: 18px 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.skill-group:hover {
    border-color: #a78bfa;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.15), 0 0 10px rgba(159, 243, 54, 0.08);
}

.skill-group-title {
    color: #8b839f;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Stack / stats cards */

.ctf-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.platform-card {
    background: #12101c;
    border: 1px solid #322a4d;
    border-radius: 6px;
    padding: 25px;
    text-align: center;
    transition: border-color 0.2s;
}

.platform-card:hover {
    border-color: #a78bfa;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.15), 0 0 10px rgba(159, 243, 54, 0.08);
}

.platform-name {
    font-size: 1.3em;
    color: #c4b5fd;
    margin-bottom: 6px;
    font-weight: 600;
}

.platform-sub {
    color: #8b839f;
    font-size: 0.85em;
    margin-bottom: 10px;
}

.platform-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.platform-stat {
    text-align: center;
}

.stat-value {
    font-size: 2em;
    color: #a78bfa;
    font-weight: 700;
}

.stat-link {
    font-size: 1.15em;
    color: #a78bfa;
    font-weight: 700;
    text-decoration: none;
}

.stat-link:hover {
    text-decoration: underline;
}

.stat-label {
    font-size: 0.85em;
    color: #8b839f;
    margin-top: 5px;
}

/* Footer */

footer {
    margin-top: 60px;
    padding: 0 20px 40px;
}

footer .bio-extra {
    text-align: left;
    margin-bottom: 0;
}

.footer-copy {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #221c33;
    text-align: center;
    color: #8b839f;
    font-size: 13px;
}

.footer-copy a {
    color: #a78bfa;
    text-decoration: none;
}

.footer-copy a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
    }

    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .avatar {
        width: 200px;
        height: 200px;
        font-size: 80px;
    }

    .username {
        font-size: 2em;
    }

    .repo-grid {
        grid-template-columns: 1fr;
    }

    .profile-stats {
        justify-content: center;
    }

    .status-badge {
        margin-left: 0;
    }

    .feature-header {
        flex-wrap: wrap;
    }

    .carousel-arrow {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}
