@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Noto+Serif+SC:wght@600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
    --bg-base: #f6f2e9;
    --bg-surface: #fffdf8;
    --bg-soft: #f0eadf;
    --ink-strong: #171a1b;
    --ink-main: #2a3135;
    --ink-soft: #5b646a;
    --accent: #0f766e;
    --accent-deep: #134e4a;
    --line: #d7d0c4;
    --line-strong: #c7bfaf;

    --shadow-soft: 0 10px 24px rgba(20, 29, 33, 0.08);
    --shadow-lift: 0 20px 36px rgba(20, 29, 33, 0.14);

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    --duration: 0.28s;
    --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    color: var(--ink-main);
    line-height: 1.7;
    background:
        radial-gradient(circle at 88% 10%, rgba(15, 118, 110, 0.08), transparent 34%),
        radial-gradient(circle at 8% 22%, rgba(19, 78, 74, 0.1), transparent 30%),
        linear-gradient(var(--bg-base), var(--bg-base));
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(23, 26, 27, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 26, 27, 0.02) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.45;
    z-index: -1;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    padding: var(--spacing-xl) var(--spacing-lg);
    background: rgba(249, 246, 239, 0.95);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.profile {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--spacing-md);
    border-radius: 50%;
    border: 2px solid var(--line-strong);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--accent), var(--accent-deep));
    color: #f5f2e8;
    font-size: 2.2rem;
    font-weight: 700;
}

.name {
    font-family: 'Noto Serif SC', 'Cormorant Garamond', serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--ink-strong);
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
}

.tagline {
    color: var(--ink-soft);
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-menu {
    list-style: none;
    display: grid;
    gap: 0.45rem;
}

.nav-link {
    display: block;
    position: relative;
    padding: 0.62rem 0.9rem;
    border-radius: 8px;
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--duration) var(--ease);
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    transform: translateY(-50%);
    border-radius: 3px;
    background: var(--accent);
    transition: height var(--duration) var(--ease);
}

.nav-link:hover,
.nav-link.active {
    color: var(--ink-strong);
    background: rgba(255, 255, 255, 0.75);
}

.nav-link.active::before {
    height: 64%;
}

.menu-toggle {
    display: none;
    position: fixed;
    top: var(--spacing-md);
    left: var(--spacing-md);
    width: 48px;
    height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    z-index: 1001;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--ink-strong);
    transition: all var(--duration) var(--ease);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.main-content {
    margin-left: 280px;
    min-height: 100vh;
}

.section {
    padding: var(--spacing-xl);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-head {
    margin-bottom: var(--spacing-lg);
}

.section-kicker {
    color: var(--ink-soft);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.section-title {
    font-family: 'Noto Serif SC', 'Cormorant Garamond', serif;
    color: var(--ink-strong);
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1.15;
}

.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 2;
    animation: riseIn 0.8s var(--ease);
}

.hero-eyebrow {
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--accent-deep);
    font-size: 0.82rem;
    margin-bottom: 0.8rem;
}

.hero-title {
    font-family: 'Noto Serif SC', 'Cormorant Garamond', serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    color: var(--ink-strong);
    line-height: 1.22;
    margin-bottom: var(--spacing-md);
    max-width: 820px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--ink-main);
    max-width: 760px;
    margin-bottom: var(--spacing-md);
}

.hero-metrics {
    list-style: none;
    display: grid;
    gap: 0.4rem;
    margin-bottom: var(--spacing-xl);
    color: var(--ink-soft);
}

.hero-metrics strong {
    color: var(--accent-deep);
    font-size: 1.08rem;
    margin-right: 0.3rem;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    padding: 0.72rem 1.35rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: all var(--duration) var(--ease);
}

.btn-primary {
    background: var(--accent);
    color: #f8f5ed;
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 22px rgba(15, 118, 110, 0.24);
}

.btn-secondary {
    border: 1px solid var(--line-strong);
    color: var(--ink-main);
    background: rgba(255, 255, 255, 0.7);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    color: var(--accent-deep);
}

.hero-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.grid-background {
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(24, 37, 35, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 37, 35, 0.08) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at 70% 22%, rgba(0, 0, 0, 0.95), transparent 70%);
    animation: floatGrid 24s linear infinite;
}

.timeline {
    position: relative;
    max-width: 960px;
    padding-left: 1.2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(var(--accent), transparent 96%);
}

.timeline-item {
    position: relative;
    padding-left: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 0.6rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 3px solid var(--accent);
}

.timeline-title {
    font-family: 'Noto Serif SC', serif;
    color: var(--ink-strong);
    font-size: 1.4rem;
    margin-bottom: var(--spacing-md);
}

.experience-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
}

.experience-card h4 {
    font-size: 1.18rem;
    color: var(--ink-strong);
    margin-bottom: 0.25rem;
}

.date {
    color: var(--accent-deep);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.position {
    color: var(--ink-main);
    margin-bottom: 0.65rem;
    font-weight: 600;
}

.highlights {
    list-style: none;
    display: grid;
    gap: 0.35rem;
}

.highlights li {
    padding-left: 1rem;
    position: relative;
    color: var(--ink-soft);
}

.highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72rem;
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 50%;
    background: var(--accent);
}

.skills-flow {
    max-width: 960px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
}

.skills-lead {
    color: var(--ink-main);
    margin-bottom: var(--spacing-sm);
    font-size: 1.05rem;
}

.skill-row {
    padding: var(--spacing-md) 0;
}

.skill-row + .skill-row {
    border-top: 1px dashed var(--line-strong);
}

.skill-row-title {
    font-size: 1.15rem;
    color: var(--ink-strong);
    margin-bottom: 0.35rem;
}

.skill-row-proof {
    color: var(--ink-soft);
    margin-bottom: 0.75rem;
}

.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
}

.skill-badge {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.32rem 0.72rem;
    border-radius: 999px;
    border: 1px solid #b7ccc8;
    background: #e8f3f1;
    color: #0d4a46;
}

.projects-grid {
    display: grid;
    grid-template-columns: minmax(320px, 860px);
    gap: var(--spacing-lg);
}

.project-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all var(--duration) var(--ease);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lift);
    border-color: #aac3bf;
}

.project-image {
    height: 220px;
    background: var(--bg-soft);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s var(--ease);
}

.project-card:hover .project-image img {
    transform: scale(1.06);
}

.project-image-placeholder {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
}

.project-content {
    padding: var(--spacing-lg);
}

.project-title {
    color: var(--ink-strong);
    font-size: 1.32rem;
    margin-bottom: 0.5rem;
}

.project-description {
    color: var(--ink-main);
    margin-bottom: var(--spacing-sm);
}

.project-story {
    list-style: none;
    display: grid;
    gap: 0.4rem;
    margin-bottom: var(--spacing-md);
}

.project-story li {
    color: var(--ink-soft);
    padding-left: 0.9rem;
    position: relative;
}

.project-story li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.78rem;
    width: 0.3rem;
    height: 0.3rem;
    border-radius: 50%;
    background: var(--accent);
}

.project-story span {
    display: inline-block;
    min-width: 2.5rem;
    margin-right: 0.35rem;
    color: var(--ink-strong);
    font-weight: 700;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: var(--spacing-md);
}

.tag {
    font-size: 0.8rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    background: #faf7f1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    text-decoration: none;
    color: var(--accent-deep);
    font-weight: 700;
}

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

.notes-grid {
    display: grid;
    grid-template-columns: minmax(320px, 860px);
    gap: var(--spacing-lg);
    max-width: 860px;
}

.note-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
    transition: all var(--duration) var(--ease);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
    border-color: #aac3bf;
}

.note-header {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.note-title {
    font-size: 1.12rem;
    color: var(--ink-strong);
}

.note-date {
    white-space: nowrap;
    color: var(--accent-deep);
    font-weight: 700;
}

.note-summary,
.note-points li {
    color: var(--ink-soft);
}

.note-points {
    list-style: none;
    display: grid;
    gap: 0.3rem;
}

.blog-links {
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

.blog-links li {
    padding-left: 0.9rem;
    position: relative;
}

.blog-links li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.78rem;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    background: var(--accent);
}

.note-points li {
    padding-left: 0.9rem;
    position: relative;
}

.note-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.78rem;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    background: var(--accent);
}

.note-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.note-tag {
    font-size: 0.78rem;
    padding: 0.25rem 0.58rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    background: #faf7f1;
}

.note-link {
    width: fit-content;
    color: var(--accent-deep);
    text-decoration: none;
    font-weight: 700;
}

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

.contact-content {
    max-width: 980px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: var(--spacing-lg);
}

.contact-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    color: inherit;
    transition: all var(--duration) var(--ease);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
    border-color: #aac3bf;
}

.contact-icon {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7f2ef;
    color: var(--accent-deep);
    margin-bottom: 0.8rem;
}

.contact-card h3 {
    color: var(--ink-strong);
    margin-bottom: 0.18rem;
}

.contact-card p {
    color: var(--ink-soft);
    word-break: break-all;
}

.footer {
    padding: var(--spacing-xl);
    color: var(--ink-soft);
    text-align: center;
    border-top: 1px solid var(--line);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #ebe5d9;
}

::-webkit-scrollbar-thumb {
    background: #97b5b1;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #769e99;
}

@keyframes riseIn {
    from {
        transform: translateY(12px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes floatGrid {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(56px, 56px);
    }
}
