:root {
    --bg: #f7f8fc;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #667085;
    --accent: #4f46e5;
    --accent-hover: #3730a3;
    --border: #e5e7eb;
    --code-bg: #f3f4f6;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

.wrap {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
}

.brand {
    color: var(--text);
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

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

.nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

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

.content {
    padding: 48px 0 72px;
}

.hero {
    background: linear-gradient(135deg, #eef2ff 0%, #ffffff 100%);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 42px;
    margin-bottom: 36px;
    box-shadow: var(--shadow);
}

.hero h1 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
}

.hero p {
    max-width: 860px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 18px;
}

.section-card,
.project-card,
.info-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    margin: 24px 0;
    box-shadow: var(--shadow);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin: 28px 0 38px;
}

.project-card {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 22px;
}

.project-card p {
    color: var(--muted);
    flex-grow: 1;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    padding: 10px 18px;
    margin-top: 12px;
    border-radius: 12px;
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.button-link:hover {
    background: var(--accent-hover);
    color: #ffffff;
}

h1,
h2,
h3,
h4 {
    color: var(--text);
    line-height: 1.25;
}

h1 {
    margin-top: 0;
    font-size: clamp(30px, 4vw, 42px);
}

h2 {
    margin-top: 42px;
    margin-bottom: 18px;
    font-size: 30px;
}

h3 {
    margin-top: 30px;
    margin-bottom: 14px;
    font-size: 23px;
}

h4 {
    margin-top: 24px;
    font-size: 19px;
}

p {
    margin-top: 0;
    margin-bottom: 16px;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

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

ul,
ol {
    padding-left: 26px;
    margin-top: 12px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 28px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    text-align: left;
}

th {
    background: #eef2ff;
    font-weight: 700;
}

tr:last-child td {
    border-bottom: none;
}

code,
pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

code {
    padding: 2px 6px;
    background: var(--code-bg);
    border-radius: 6px;
    font-size: 0.95em;
}

pre {
    padding: 18px;
    background: #111827;
    color: #f9fafb;
    border-radius: 16px;
    overflow-x: auto;
    margin: 18px 0 28px;
}

pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: #ffffff;
}

blockquote {
    margin: 22px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--accent);
    background: #eef2ff;
    color: var(--text);
    border-radius: 0 14px 14px 0;
}

.breadcrumbs {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.page-intro {
    color: var(--muted);
    font-size: 18px;
    max-width: 900px;
}

.artifact-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding-left: 0;
    list-style: none;
}

.artifact-list li {
    margin: 0;
}

.artifact-list a {
    display: block;
    padding: 16px 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.artifact-list a:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0 42px;
    color: var(--muted);
    background: #ffffff;
    font-size: 14px;
}

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

    .artifact-list {
        grid-template-columns: 1fr;
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 0;
    }

    .nav {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 32px 0 56px;
    }

    .hero {
        padding: 26px;
        border-radius: 20px;
    }

    .section-card,
    .project-card,
    .info-card {
        padding: 20px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}