:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --text: #1f2b3a;
    --muted: #5e6e83;
    --line: #dbe3ec;
    --accent: #0f6f66;
    --accent-soft: #e5f4f2;
    --max-width: 860px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(1200px 480px at 10% -20%, #dff4ef 0%, transparent 60%),
        radial-gradient(1000px 420px at 90% 0%, #e8eef8 0%, transparent 55%),
        var(--bg);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-nav-wrap {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(6px);
    background: rgba(245, 247, 250, 0.9);
    border-bottom: 1px solid var(--line);
}

.site-nav,
main,
.site-footer {
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
}

.site-nav {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-weight: 700;
}

.brand img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

main {
    padding: 1.4rem 0 1rem;
    display: grid;
    gap: 1rem;
}

.section-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: clamp(1rem, 2.4vw, 1.4rem);
    box-shadow: 0 4px 18px rgba(14, 33, 60, 0.05);
}

.ai-writing {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.ai-writing-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    pointer-events: none;
}

.ai-writing::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.58) 0%, rgba(255, 255, 255, 0.42) 55%, rgba(229, 244, 242, 0.52) 100%);
}

.ai-writing-content {
    position: relative;
    z-index: 2;
}

.writing-item + .writing-item {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

.see-more {
    margin-top: 0.4rem;
}

.see-more summary {
    display: inline-block;
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
}

.see-more summary:hover {
    text-decoration: underline;
}

.see-more[open] summary {
    margin-bottom: 0.2rem;
}

h1,
h2,
h3 {
    line-height: 1.25;
    margin: 0 0 0.6rem;
}

h1 {
    font-size: clamp(1.9rem, 4.8vw, 2.5rem);
}

h2 {
    font-size: clamp(1.3rem, 3.2vw, 1.7rem);
}

h3 {
    font-size: clamp(1.08rem, 2.4vw, 1.22rem);
}

p {
    margin: 0.6rem 0;
}

.subhead {
    color: var(--muted);
}

.tags {
    color: var(--muted);
    font-size: 0.95rem;
}

.hero .btn {
    margin-top: 0.6rem;
}

.project-inline {
    margin: 0.2rem 0 0;
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.project-inline a {
    font-weight: 600;
}

form {
    display: grid;
    gap: 0.7rem;
    margin: 0.6rem 0 0.8rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

input,
textarea,
button {
    font: inherit;
}

input,
textarea {
    width: 100%;
    padding: 0.62rem 0.72rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    background: #fbfcfe;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.54rem 0.95rem;
    border-radius: 9px;
    border: 1px solid transparent;
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.btn:hover,
button.btn:hover {
    background: #0a5e56;
    text-decoration: none;
}

.site-footer {
    padding: 0.35rem 0 1.6rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 720px) {
    .site-nav {
        padding: 0.5rem 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .field-row {
        grid-template-columns: 1fr;
    }
}
