/* --- Design system --- */
:root {
    --bg: #08080c;
    --bg-mid: #0e0e14;
    --bg-card:
        #12121a;
    --bg-card-hover: #16161f;
    --border: #252530;
    --border-light: #2e2e3a;
    --text: #f0f0f4;
    --text-muted: #8888a0;
    --text-dim: #5c5c70;
    --accent: #f5a623;
    --accent-soft: rgba(245, 166, 35, 0.15);
    --accent-glow: rgba(245, 166, 35,
            0.25);
    --link: #f5a623;
    --link-hover: #ffb83d;
    --font-head: "Syne", system-ui,
        sans-serif;
    --font-body: "DM Sans", system-ui, sans-serif;
    --font-mono:
        "JetBrains Mono", monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --space: 1.5rem;
    --max-width: 680px;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out:
        cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
    box-sizing:
        border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        var(--font-body);
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Subtle gradient mesh background */
body::before {
    content: "";
    position:
        fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%,
            rgba(245, 166, 35, 0.08), transparent), radial-gradient(ellipse 60% 40% at 100% 50%, rgba(80, 60, 120, 0.06), transparent), radial-gradient(ellipse 50% 30% at 0% 80%, rgba(60, 80, 100, 0.05), transparent);
    pointer-events: none;
    z-index: 0;
}

.page-wrap {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

a:hover {
    color: var(--link-hover);
}

/*
--- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display:
        flex;
    align-items: center;
    justify-content: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    background: rgba(8, 8, 12, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom:
        1px solid transparent;
    border-image: linear-gradient(90deg, transparent,
            var(--border) 15%, var(--border) 85%, transparent) 1;
    transition: padding 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease), border-bottom 0.2s var(--ease), border-image 0.2s var(--ease);
}

.site-header--scrolled {
    padding: 0.7rem 1.5rem;
    background: rgba(6, 6, 10, 0.96);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid var(--border);
    border-image: none;
}

.logo {
    font-family:
        var(--font-head);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    color: var(--text);
}

.logo:hover {
    color: var(--accent);
}

.nav {
    display:
        flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.25rem;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transition:
        transform 0.25s var(--ease-out);
    border-radius: 1px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    border: 2px solid var(--accent);
    background: transparent;
    padding: 0.3rem;
    margin-right: auto;
    border-radius: 10px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px 0;
    border-radius: 999px;
    background: var(--text);
}


/* --- Main --- */
main {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    padding: 3rem 1.5rem 4rem;
}

/* --- Hero (profile: photo left, name + tagline + icons right)
--- */
.hero {
    padding: 4rem 0 5rem;
    scroll-margin-top: 4rem;
    border-bottom: 1px solid var(--border);
}

.hero-profile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2.5rem;
}

.hero-photo-wrap {
    position: relative;
    flex-shrink: 0;
}

.hero-photo-wrap::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: linear-gradient(135deg,
            var(--accent) 0%, transparent 50%);
    opacity: 0.2;
    filter: blur(12px);
    z-index:
        -1;
}

.hero-photo,
.hero-photo-fallback {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--border-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.hero-photo-fallback {
    display: none;
    align-items: center;
    justify-content:
        center;
    background: var(--bg-card);
    font-family: var(--font-head);
    font-size:
        2.5rem;
    font-weight: 700;
    color: var(--text-muted);
    border: 3px solid var(--border-light);
}

.hero-photo-fallback.show {
    display: flex;
}

.hero-info {
    flex: 1;
    min-width: 220px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color:
        var(--accent);
    margin: 0 0 0.5rem;
}

.hero-name {
    /* font-family:
var(--font-head); */
    font-size: clamp(1.85rem, 4.5vw, 2.5rem);
    font-weight: 800;
    /* letter-spacing: -0.03em; */
    margin: 0 0 0.4rem;
    color: var(--text);
    line-height: 1.1;
}

.hero-tagline {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-muted);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.hero-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hero-icon {
    display:
        inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height:
        44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    transition: background 0.2s var(--ease),
        border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease-out);
}

.hero-icon:hover {
    background: var(--accent);
    border-color:
        var(--accent);
    color: var(--bg);
    transform: translateY(-2px);
}

.hero-icon svg {
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .hero-profile {
        flex-direction:
            column;
        text-align: center;
    }

    .hero-photo-wrap::before {
        inset: -4px;
    }

    .hero-photo,
    .hero-photo-fallback {
        width: 160px;
        height: 160px;
    }

    .hero-icons {
        justify-content: center;
    }
}

/* --- Sections --- */
.section {
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 4rem;
}

.section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-family:
        var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
    display: flex;
    align-items:
        baseline;
    gap: 0.75rem;
}

.section-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
}

.section-intro {
    color: var(--text-muted);
    margin: -0.5rem 0 1.5rem;
    font-size: 1rem;
}

.subsection-title {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2.25rem 0 1rem;
    color: var(--text-muted);
}

/* ---
About content --- */
.about-content p {
    margin: 0 0 1.25rem;
    max-width: 56ch;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-content strong {
    color:
        var(--text);
    font-weight: 600;
}

/* --- What I'm doing --- */
.doing-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.doing-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.75rem 0.3rem;
    border-bottom: 1px solid var(--border);
}

.doing-item:last-child {
    border-bottom: none;
}

.doing-icon {
    font-size: 1.4rem;
    line-height: 1;
    margin-top: 0.1rem;
}

.doing-text h4 {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.2rem;
    color: var(--text);
}

.doing-text p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.doing-text p + p {
    margin-top: 0.15rem;
}

/* ---
Timeline (Education) --- */
.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid var(--border);
    margin-left: 0.25rem;
}

.timeline-item {
    position: relative;
    padding: 1.25rem 0;
    padding-left: 0;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top:
        1.75rem;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius:
        50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 4px var(--bg);
}

.timeline-period {
    font-family: var(--font-mono);
    font-size:
        0.8rem;
    color: var(--accent);
    margin-bottom: 0.25rem;
    display: block;
}

.timeline-content h4 {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
    color: var(--text);
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 520px) {
    .timeline {
        padding-left: 1.25rem;
        margin-left: 0;
    }

    .timeline-item::before {
        left: -1.25rem;
    }
}

/* --- Projects --- */
.project-list,
.blog-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.project-card,
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom:
        1rem;
    transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
    position: relative;
    overflow: hidden;
}

.project-card::before,
.blog-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom:
        0;
    width: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.25s var(--ease);
}

.project-card:hover,
.blog-card:hover {
    transform:
        translateY(-2px);
    border-color: var(--border-light);
    background:
        var(--bg-card-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.project-card:hover::before,
.blog-card:hover::before {
    opacity: 1;
}

.project-card:last-child,
.blog-card:last-child {
    margin-bottom: 0;
}

.project-card h4,
.blog-card h4 {
    font-family: var(--font-head);
    font-size:
        1.05rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
}

.project-card h4 a,
.blog-card h4 a {
    color: var(--text);
}

.project-card h4 a:hover,
.blog-card h4 a:hover {
    color: var(--link);
}

.project-card p,
.blog-card p {
    font-size: 0.95rem;
    color:
        var(--text-muted);
    margin: 0 0 0.75rem;
    line-height: 1.55;
}

.project-link {
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items:
        center;
    gap: 0.35rem;
}

.projects-cta {
    margin-top: 1.5rem;
}

.projects-cta-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding:
        0.7rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background:
        transparent;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease-out);
}

.projects-cta-link:hover {
    background: var(--bg-card);
    border-color:
        var(--border-light);
    color: var(--text);
    transform: translateY(-1px);
}

.simple-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.simple-list li {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.simple-list li:last-child {
    margin-bottom: 0;
}

.tag-year {
    display:
        inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.1rem;
    padding: 0.1rem 0.4rem;
    margin-right: 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(245, 166, 35, 0.08);
}

.achievement-text {
    flex: 1;
}

/* --- Mobile / responsive polish --- */
@media (max-width: 640px) {
    body {
        font-size: 1rem;
    }

    .site-header,
    main {
        max-width: 100%;
    }

    /* Hide header/nav entirely on small screens */
    .site-header {
        display: none;
    }

    main {
        padding: 2.1rem 1.25rem 3rem;
    }

    .hero {
        padding: 2.75rem 0 3.25rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    .hero-icons {
        gap: 0.5rem;
    }

    .hero-icon {
        width: 40px;
        height: 40px;
    }

    .section {
        padding: 2.6rem 0;
        scroll-margin-top: 3.75rem;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .project-card,
    .blog-card {
        padding: 1.2rem 1.1rem;
    }
}

@media (max-width: 420px) {
    .hero-photo,
    .hero-photo-fallback {
        width: 140px;
        height: 140px;
    }

    .hero-name {
        font-size: 1.75rem;
    }
}

/* ---
Achievements (photos) --- */
.achievement-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill,
            minmax(280px, 1fr));
    gap: 1.5rem;
}

.achievement-card {
    background:
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s var(--ease-out), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.achievement-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-light);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.achievement-image-wrap {
    aspect-ratio: 4 / 3;
    background: var(--bg-mid);
    overflow: hidden;
}

.achievement-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition:
        transform 0.3s var(--ease);
}

.achievement-card:hover .achievement-image-wrap img {
    transform: scale(1.03);
}

.achievement-card h4 {
    font-family:
        var(--font-head);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    padding: 1rem 1.25rem 0.25rem;
    color: var(--text);
}

.achievement-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    padding: 0 1.25rem 1.25rem;
    line-height:
        1.5;
}

.blog-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color:
        var(--accent);
    display: block;
    margin-bottom: 0.35rem;
}

/* --- Contact --- */
.contact-block {
    max-width: 420px;
}

.contact-block p {
    color:
        var(--text-muted);
    margin: 0 0 0.5rem;
}

.contact-email {
    font-size: 1.15rem;
    font-weight: 600;
    display: inline-block;
    margin: 0.5rem 0;
    color: var(--accent);
}

.contact-email:hover {
    color: var(--link-hover);
}

.contact-location {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-dim);
}

.site-footer p {
    margin: 0;
}