:root {
    --bg: #f6f5f4;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: #ffffff;
    --border: rgba(0, 0, 0, 0.08);
    --text: #1f1f1f;
    --muted: #666;
    --accent: #3584e4;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(53, 132, 228, 0.12), transparent 25%),
        radial-gradient(circle at top right, rgba(255, 120, 120, 0.08), transparent 22%),
        var(--bg);
}

.page-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 48px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 20px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #62a0ea, #3584e4);
    box-shadow: 0 0 0 4px rgba(53, 132, 228, 0.15);
}

.topnav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.topnav a {
    color: var(--text);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 14px;
    transition: 0.2s ease;
}

.topnav a:hover {
    background: rgba(53, 132, 228, 0.1);
}

.layout,
.section-stack {
    display: grid;
    gap: 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr);
    gap: 20px;
    align-items: stretch;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.hero,
.working-card {
    padding: 28px;
}

.hero-main {
    display: grid;
    grid-template-columns: 144px 1fr;
    gap: 24px;
    align-items: center;
}

.avatar-wrap {
    width: 144px;
    height: 144px;
    padding: 10px;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.72));
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 16px 30px rgba(0,0,0,0.08);
}

.avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
}

.pill,
.small-tag,
.meta-chip,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.pill {
    margin-bottom: 10px;
    color: var(--accent);
    background: rgba(53, 132, 228, 0.12);
    border: 1px solid rgba(53, 132, 228, 0.14);
}

.hero h1,
.section-heading h2,
.project-card h3,
.working-card h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1;
    margin-bottom: 12px;
}

.lead,
.section-heading p,
.project-card p,
.body-text,
.working-card p {
    color: var(--muted);
}

.lead {
    max-width: 60ch;
    font-size: 1.06rem;
    line-height: 1.6;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.meta-chip,
.small-tag {
    background: rgba(0, 0, 0, 0.045);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.status-badge {
    color: #1c6b2f;
    background: rgba(46, 194, 126, 0.12);
    border: 1px solid rgba(46, 194, 126, 0.18);
}

.working-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
}

.working-card-header,
.working-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.working-card-body h2 {
    font-size: clamp(1.4rem, 2vw, 2rem);
    margin-bottom: 12px;
}

.working-card-body p {
    margin: 0;
    line-height: 1.7;
}

.stack-block {
    display: grid;
    gap: 4px;
}

.stack-label {
    color: var(--muted);
    font-size: 0.88rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 150px;
    padding: 14px 16px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text);
    background: var(--surface-strong);
    border: 1px solid var(--border);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project-link:hover,
.contact-link:hover {
    transform: translateY(-2px);
    border-color: rgba(53, 132, 228, 0.22);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.section-card {
    padding: 24px 26px;
}

.section-heading {
    margin-bottom: 14px;
}

.section-heading-wide {
    padding: 4px 4px 0;
}

.section-heading h2 {
    font-size: clamp(1.5rem, 2vw, 2.1rem);
    margin-bottom: 8px;
}

.body-text {
    margin: 0;
    max-width: 72ch;
    line-height: 1.8;
}

.project-grid,
.links-grid {
    display: grid;
    gap: 16px;
}

.project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
    padding: 20px;
    border-radius: var(--radius-lg);
}

.project-card h3 {
    margin-top: 14px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.project-card p {
    margin: 0;
    line-height: 1.7;
}

.links-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text);
    background: var(--surface-strong);
    border: 1px solid var(--border);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.arrow {
    color: var(--accent);
    font-size: 1.1rem;
}

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .page-shell {
        width: min(100% - 20px, 1120px);
    }

    .topbar,
    .hero-main {
        grid-template-columns: 1fr;
    }

    .topbar,
    .hero-main,
    .topnav {
        justify-items: start;
    }

    .hero-main {
        gap: 18px;
    }

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

@media (max-width: 560px) {
    .hero,
	.working-card,
    .section-card,
    .project-card {
        padding: 18px;
    }

    .topbar {
        padding: 12px;
    }

    .avatar-wrap {
        width: 112px;
        height: 112px;
    }

	.project-link {
		width: 100%;
	}
}
