:root {
    --bg: #f5f5f4;
    --surface: #ffffff;
    --surface-soft: #f0efed;
    --text: #1f242a;
    --muted: #5b6470;
    --line: #d4d7dc;
    --accent: #2f3a4a;
    --accent-soft: #43566f;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow: 0 14px 35px rgba(20, 26, 34, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 85% 12%, #e6e9ed 0%, #f5f5f4 40%, #f2f1ef 100%);
    line-height: 1.55;
}

h1,
h2,
h3,
p {
    margin: 0;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #1f3f75;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -3rem;
    z-index: 100;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    background: #ffffff;
    color: var(--accent);
    border: 1px solid var(--line);
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus-visible {
    top: 0.75rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px);
    background: rgba(245, 245, 244, 0.88);
    border-bottom: 1px solid rgba(47, 58, 74, 0.1);
}

.navbar {
    width: min(1120px, 92%);
    margin: 0 auto;
    padding: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    font-family: "Fraunces", serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 1vw + 1rem, 1.55rem);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--accent);
}

.mobile-menu-btn {
    display: none;
    border: 0;
    background: transparent;
    padding: 0.35rem;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
}

.section {
    width: min(1120px, 92%);
    margin: 0 auto;
    padding: 4.7rem 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-soft);
    margin: 0 0 1rem;
}

.hero {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.hero h1 {
    font-family: "Fraunces", serif;
    font-size: clamp(2rem, 4.2vw, 3.2rem);
    line-height: 1.15;
    max-width: 14ch;
}

.hero-text {
    margin-top: 1.15rem;
    color: var(--muted);
    max-width: 56ch;
}

.hero-cta {
    display: flex;
    gap: 0.9rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.78rem 1.1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #f6f8fb;
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--accent);
}

.hero-card,
.project-card,
.contact-panel,
.contact-form,
.assistant-prompts,
.assistant-chat,
.skills-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.hero-card {
    border-radius: var(--radius-lg);
    padding: 1.45rem;
}

.hero-card > p {
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.hero-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hero-card li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.9rem 0;
    border-top: 1px solid var(--line);
}

.hero-card li:first-child {
    border-top: 0;
    padding-top: 0.2rem;
}

.hero-card span {
    color: var(--muted);
    font-size: 0.86rem;
}

.section-title-wrap {
    margin-bottom: 1.35rem;
}

.section-title-wrap h2 {
    font-family: "Fraunces", serif;
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

.resume-actions {
    margin-bottom: 1rem;
}

.resume-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.resume-stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 0.9rem;
}

.resume-stat span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
}

.resume-stat strong {
    font-size: 1rem;
}

.resume-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.resume-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 1rem;
}

.resume-block h3 {
    margin-bottom: 0.8rem;
}

.resume-item {
    border-top: 1px solid var(--line);
    padding: 0.75rem 0;
}

.resume-item:first-child {
    border-top: 0;
    padding-top: 0;
}

.resume-item h4 {
    margin: 0 0 0.2rem;
    font-size: 1rem;
}

.resume-meta {
    color: var(--muted);
    font-size: 0.86rem;
    margin-bottom: 0.35rem;
}

.resume-item ul {
    margin: 0;
    padding-left: 1rem;
    color: var(--muted);
}

.project-grid,
.skills-grid {
    display: grid;
    gap: 1rem;
}
.project-card p,
.skills-card p {
    color: var(--muted);
}

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

.project-card {
    background: linear-gradient(180deg, #ffffff 0%, #f4f5f6 100%);
    padding: 1.25rem;
}

.project-tag {
    display: inline-block;
    background: var(--surface-soft);
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--accent-soft);
    margin-bottom: 0.7rem;
}

.project-card h3 {
    margin-bottom: 0.6rem;
    font-size: 1.14rem;
}

.project-card ul,
.skills-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.project-card li,
.skills-list li {
    padding: 0.2rem 0.56rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--muted);
}

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

.skills-card {
    padding: 1.1rem;
}

.skills-card h3 {
    margin-bottom: 0.6rem;
}

.assistant-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1rem;
}

.assistant-prompts,
.assistant-chat {
    padding: 1.1rem;
}

.assistant-prompts > p {
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.prompt-button {
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.5rem;
    font: inherit;
    cursor: pointer;
}

.chat-log {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfcfc;
    min-height: 210px;
    max-height: 340px;
    overflow: auto;
    padding: 0.85rem;
    display: grid;
    gap: 0.6rem;
}

.chat-user,
.chat-bot {
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    max-width: 90%;
}

.chat-user {
    background: #e7ecf4;
    justify-self: end;
}

.chat-bot {
    background: #f1f2f4;
}

.chat-form {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.7rem;
}

.chat-form label {
    font-weight: 600;
}

.chat-form textarea,
.chat-form button {
    width: 100%;
    border-radius: 10px;
    font: inherit;
}

.chat-form textarea {
    border: 1px solid var(--line);
    padding: 0.62rem 0.7rem;
    color: var(--text);
    background: #fcfcfc;
    resize: vertical;
}

.chat-form button {
    border: 0;
    background: var(--accent);
    color: #f7f8fa;
    padding: 0.66rem 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 1rem;
}

.contact-status {
    margin-bottom: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    border: 1px solid #b9d9be;
    background: #edf8ef;
    color: #1d5c28;
    font-weight: 600;
    display: none;
}

.contact-panel,
.contact-form {
    padding: 1.15rem;
}

.contact-panel p {
    margin-bottom: 0.8rem;
}

.contact-panel p:last-child {
    margin-bottom: 0;
}

.contact-panel a {
    color: var(--accent);
    text-underline-offset: 2px;
}

.contact-form {
    display: grid;
    gap: 0.55rem;
}

.contact-form label {
    font-weight: 600;
    font-size: 0.92rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.62rem 0.7rem;
    font: inherit;
    color: var(--text);
    background: #fcfcfc;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input[type="submit"] {
    margin-top: 0.3rem;
    background: var(--accent);
    color: #f7f8fa;
    border: 0;
    font-weight: 700;
    cursor: pointer;
}

.site-footer {
    width: min(1120px, 92%);
    margin: 0 auto;
    padding: 1.2rem 0 2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 980px) {
    .hero,
    .resume-overview,
    .resume-main,
    .project-grid,
    .skills-grid,
    .assistant-layout,
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .navbar {
        padding: 0.85rem 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(245, 245, 244, 0.98);
        border-bottom: 1px solid var(--line);
        padding: 0.9rem 4%;
        display: grid;
        gap: 0.8rem;
        transform: translateY(-130%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .section {
        padding: 3.5rem 0;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
