:root {
    --bg-color: #07070A;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --text-main: #F6F6F8;
    --text-muted: #B5B5C3;
    --accent: #8B5CF6;
    --accent-soft: rgba(139, 92, 246, 0.2);
    --border: rgba(255, 255, 255, 0.10);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    position: relative;
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    background: radial-gradient(circle at top left, rgba(139, 92, 246, 0.12), transparent 28%), #07070A;
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.page-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: -2;
    opacity: 0.65;
}
.glow-one {
    width: 360px; height: 360px; background: rgba(139, 92, 246, 0.22); top: -90px; left: -120px;
}
.glow-two {
    width: 420px; height: 420px; background: rgba(139, 92, 246, 0.14); right: -160px; top: 220px;
}
.page-grid {
    position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(to bottom, rgba(0,0,0,0.35), transparent 80%);
}

.site-header {
    position: sticky;
    top: 18px;
    z-index: 100;
    width: min(1160px, calc(100% - 32px));
    margin: 20px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(7, 7, 10, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.2);
}
.brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0.16em;
    font-weight: 700;
    text-transform: uppercase;
}
.site-nav { display: flex; gap: 24px; align-items: center; }
.site-nav a {
    color: var(--text-muted);
    font-size: 0.94rem;
    transition: color 0.25s ease, transform 0.25s ease;
}
.site-nav a:hover { color: var(--text-main); transform: translateY(-1px); }
.nav-toggle { display: none; background: transparent; border: 0; padding: 0; cursor: pointer; }
.nav-toggle span {
    display: block; width: 24px; height: 2px; background: var(--text-main); margin: 4px 0; border-radius: 999px;
}

main { width: min(1160px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 80px; }
.section { padding: 90px 0; }
.hero {
    min-height: 84vh;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 36px;
}
.hero-portrait {
    order: 1;
    display: flex;
    justify-content: center;
}
.hero-copy {
    order: 2;
    min-width: 0;
}
.eyebrow {
    font-size: 0.82rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 16px;
    font-weight: 600;
}
.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.4rem, 5vw, 4.7rem);
    line-height: 0.95;
    margin: 0 0 18px;
    letter-spacing: -0.03em;
}
.hero-badges {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px;
}
.hero-badges span {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 0.88rem;
}
.hero-lead {
    font-size: 1.08rem;
    color: var(--text-muted);
    max-width: 620px;
    margin-bottom: 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--border); transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 0 0 1px rgba(139,92,246,0.28), 0 18px 40px rgba(139,92,246,0.16); }
.btn-primary { background: linear-gradient(135deg, rgba(139,92,246,0.95), rgba(99,102,241,0.85)); color: white; border-color: transparent; }
.btn-outline { background: rgba(255,255,255,0.03); color: var(--text-main); }

.hero-portrait { display: flex; justify-content: center; }
.portrait-frame {
    position: relative; width: min(220px, 72vw); aspect-ratio: 1 / 1; border-radius: 50%; padding: 8px; background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(139,92,246,0.16)); box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgba(255,255,255,0.12);
}
.portrait-frame::before {
    content: ''; position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 30%), rgba(0,0,0,0.16); filter: blur(18px); z-index: 0;
}
.portrait-frame img {
    position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; filter: grayscale(0.08) contrast(1.05);
}

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-heading h2 { font-family: 'Space Grotesk', sans-serif; font-size: 1.7rem; margin: 0; }
.about-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); gap: 24px; align-items: start;
}
.about-grid > * { min-width: 0; }
.about-copy h2 {
    font-size: clamp(1.4rem, 2.3vw, 2rem); margin-bottom: 14px; line-height: 1.25;
}
.about-copy > p:not(.eyebrow), .about-card p, .project-content p, .timeline-card p, .timeline-card span, .contact p { color: var(--text-muted); }
.about-card {
    padding: 22px; border-radius: 24px; border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)); box-shadow: var(--shadow);
}
.about-card p + p { margin-top: 14px; }
.about-details { display: grid; gap: 16px; margin: 28px 0 0; }
.about-details div { border-left: 2px solid var(--accent); padding-left: 14px; }
.about-details dt { color: var(--text-main); font-weight: 700; }
.about-details dd { color: var(--text-muted); margin: 4px 0 0; }
.about-grid > .github-activity-card { margin-top: 0; max-width: 520px; justify-self: end; }

.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.project-card {
    border-radius: 24px; overflow: hidden; border: 1px solid var(--border); background: rgba(17, 17, 20, 0.9); box-shadow: var(--shadow); transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.project-card:hover { transform: translateY(-6px) scale(1.01); border-color: rgba(139,92,246,0.44); box-shadow: 0 24px 60px rgba(139,92,246,0.18); }
.project-media { height: 170px; background-size: cover; background-position: center; }
.media-one { background: linear-gradient(135deg, rgba(139,92,246,0.6), rgba(16,185,129,0.25)), radial-gradient(circle at top right, rgba(255,255,255,0.25), transparent 60%); }
.media-two { background: linear-gradient(135deg, rgba(99,102,241,0.5), rgba(20,184,166,0.25)), radial-gradient(circle at center left, rgba(255,255,255,0.23), transparent 60%); }
.media-three { background: linear-gradient(135deg, rgba(59,130,246,0.45), rgba(139,92,246,0.25)), radial-gradient(circle at bottom right, rgba(255,255,255,0.2), transparent 60%); }
.media-four { background: linear-gradient(135deg, rgba(168,85,247,0.45), rgba(14,165,233,0.25)), radial-gradient(circle at center, rgba(255,255,255,0.18), transparent 60%); }
.media-five { background-image: url("./image/maribus-preview.png"); background-position: center; }
.project-content { padding: 20px; }
.project-topline { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
.badge.unreleased { background: rgba(139,92,246,0.16); color: #d8b4fe; }
.badge.released { background: rgba(16,185,129,0.16); color: #a7f3d0; }
.project-content h3 { margin: 0 0 10px; font-size: 1.16rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.tag-row span, .skill-pills span { padding: 7px 10px; border-radius: 999px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); color: var(--text-muted); font-size: 0.8rem; }
.card-actions { display: flex; gap: 12px; }
.text-link { color: var(--text-main); font-size: 0.92rem; }
.text-link i { margin-right: 6px; color: var(--accent); }

.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.skill-group { padding: 22px; border-radius: 22px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); box-shadow: var(--shadow); transition: border-color 0.25s ease, transform 0.25s ease; }
.skill-group:hover { border-color: rgba(139,92,246,0.4); transform: translateY(-3px); }
.skill-group h3 { margin-top: 0; margin-bottom: 14px; font-size: 1.06rem; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.timeline { position: relative; padding-left: 24px; border-left: 1px solid rgba(139,92,246,0.28); }
.timeline-item { position: relative; margin-bottom: 20px; padding-left: 18px; }
.timeline-item::before { content: ''; position: absolute; left: -29px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(139,92,246,0.16); }
.timeline-year { font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.timeline-card { padding: 18px 20px; border-radius: 20px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); box-shadow: var(--shadow); }
.timeline-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.timeline-card p { margin: 0 0 6px; }

.contact { text-align: center; padding-bottom: 40px; }
.contact h2 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.8rem, 3.3vw, 2.6rem); margin: 0 0 24px; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
footer { text-align: center; color: var(--text-muted); padding: 20px 12px 40px; font-size: 0.92rem; }

@media (max-width: 1100px) {
    .hero, .projects-grid, .skills-grid { grid-template-columns: 1fr; }
    .hero { gap: 28px; padding-top: 20px; }
    .hero-portrait { order: 1; margin-bottom: 8px; }
    .hero-copy { order: 2; }
}

@media (max-width: 760px) {
    .site-header { border-radius: 24px; padding: 14px 16px; }
    .nav-toggle { display: block; }
    .site-nav {
        position: absolute; top: calc(100% + 10px); right: 0; left: 0; flex-direction: column; padding: 14px; border-radius: 18px; border: 1px solid var(--border); background: rgba(7,7,10,0.96); display: none;
    }
    .site-nav.open { display: flex; }
    .section { padding: 70px 0; }
    .contact-actions, .hero-actions { justify-content: center; }
    .hero h1 { font-size: clamp(2.1rem, 9vw, 3rem); }
}

/* Keep the About content inside narrow mobile viewports. */
@media (max-width: 820px) {
    main {
        width: calc(100% - 32px);
        max-width: 100%;
    }

    .about-grid {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        min-width: 0;
    }

    .about-copy,
    .github-activity-card {
        min-width: 0;
        max-width: 100%;
    }

    .about-grid > .github-activity-card {
        justify-self: stretch;
    }

    .about-copy h2,
    .about-copy p,
    .about-details dd,
    .activity-header,
    .commit-message {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 56px 0;
    }

    .about-copy h2 {
        font-size: 1.45rem;
    }

    .github-activity-card {
        padding: 18px;
    }

    .activity-header {
        font-size: 1rem;
    }
}
