:root {
    --bg: #fffaf7;
    --bg-soft: #f7ece8;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-solid: #ffffff;
    --text: #342d2f;
    --muted: #75686c;
    --rose: #c9828b;
    --rose-deep: #9f5964;
    --sage: #7f9b8d;
    --cream: #fff3dd;
    --line: rgba(104, 82, 88, 0.16);
    --shadow: 0 14px 36px rgba(123, 82, 91, 0.12);
    --shadow-soft: 0 8px 22px rgba(123, 82, 91, 0.1);
    --radius: 8px;
}

body.dark-mode {
    --bg: #1f2024;
    --bg-soft: #2b282d;
    --surface: rgba(42, 39, 44, 0.78);
    --surface-solid: #29262c;
    --text: #fff7f2;
    --muted: #d7c8c4;
    --rose: #e4a6ad;
    --rose-deep: #f0bac1;
    --sage: #a8c5b7;
    --cream: #3a3431;
    --line: rgba(255, 247, 242, 0.16);
    --shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
    --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.18);
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(140deg, var(--bg) 0%, var(--bg-soft) 100%);
    color: var(--text);
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.65;
    transition: background 0.4s ease, color 0.4s ease;
}

body::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    height: 920px;
    background:
        radial-gradient(circle at 12% 8%, rgba(201, 130, 139, 0.2), transparent 28rem),
        radial-gradient(circle at 82% 0%, rgba(127, 155, 141, 0.17), transparent 30rem);
    mask-image: linear-gradient(to bottom, black, transparent 82%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 100;
    width: min(1120px, calc(100% - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px 12px 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    transform: translateX(-50%);
}

body.dark-mode .site-header {
    background: rgba(32, 31, 36, 0.96);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}

.brand span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose), var(--sage));
    color: #fff;
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    position: relative;
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(201, 130, 139, 0.13);
    color: var(--rose-deep);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle,
.menu-toggle {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-solid);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease;
}

.theme-toggle:hover,
.menu-toggle:hover {
    transform: translateY(-2px);
    background: var(--cream);
}

.menu-toggle {
    display: none;
}

.section-shell {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: clamp(34px, 6vw, 80px);
    padding-block: 132px 72px;
}

.hero::after,
.contact-section::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 210px;
    height: 210px;
    border-radius: 46% 54% 58% 42%;
    background: rgba(201, 130, 139, 0.18);
}

.hero::after {
    right: 5%;
    bottom: 7%;
}

.contact-section::before {
    left: 3%;
    top: 16%;
    background: rgba(127, 155, 141, 0.18);
}

.eyebrow,
.section-heading span,
.contact-copy span,
.period {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    color: var(--rose-deep);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    padding: 7px 12px;
}

body.dark-mode .eyebrow,
body.dark-mode .section-heading span,
body.dark-mode .contact-copy span,
body.dark-mode .period {
    background: rgba(255, 255, 255, 0.06);
}

.hero h1,
.section-heading h2,
.contact-copy h2 {
    font-family: "Playfair Display", Georgia, serif;
    color: var(--text);
    letter-spacing: 0;
    line-height: 1.05;
}

.hero h1 {
    margin-top: 18px;
    font-size: clamp(3.1rem, 7vw, 6.8rem);
    max-width: 9ch;
}

.lead {
    max-width: 640px;
    margin-top: 22px;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.18rem);
}

.hero-actions,
.quick-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.btn,
.contact-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn {
    padding: 12px 20px;
}

.btn.primary {
    background: linear-gradient(135deg, var(--rose), var(--rose-deep));
    color: #fff;
    box-shadow: 0 14px 32px rgba(159, 89, 100, 0.25);
}

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

.btn:hover,
.contact-actions a:hover {
    transform: translateY(-3px);
}

.quick-info span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.quick-info i {
    color: var(--sage);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.profile-frame {
    position: relative;
    width: min(420px, 82vw);
    aspect-ratio: 0.84;
    border: 1px solid var(--line);
    border-radius: 38% 38% 8px 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0)),
        var(--cream);
    box-shadow: var(--shadow);
    isolation: isolate;
    transform: translateZ(0);
}

.profile-frame::before {
    content: "";
    position: absolute;
    inset: 20px;
    z-index: -1;
    border: 1px solid rgba(201, 130, 139, 0.35);
    border-radius: inherit;
    transform: rotate(-5deg);
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.floating-note {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 800;
}

body.dark-mode .floating-note {
    background: rgba(38, 35, 40, 0.88);
}

.note-top {
    top: 16%;
    left: -24px;
}

.note-bottom {
    right: -24px;
    bottom: 14%;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: -32px;
    padding-bottom: 52px;
}

.stat-card,
.about-card,
.bio-card,
.education-card,
.timeline-content,
.skill-card,
.project-card,
.contact-section {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 24px;
}

.stat-card strong {
    display: block;
    color: var(--rose-deep);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 700;
}

.content-section {
    padding-block: clamp(66px, 9vw, 108px);
}

.content-section.tinted {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0)),
        rgba(255, 255, 255, 0.22);
}

body.dark-mode .content-section.tinted {
    background: rgba(255, 255, 255, 0.03);
}

.section-heading {
    width: min(740px, calc(100% - 32px));
    margin: 0 auto 34px;
    text-align: center;
}

.section-heading span {
    margin-inline: auto;
}

.section-heading h2,
.contact-copy h2 {
    margin-top: 14px;
    font-size: clamp(2.1rem, 4.7vw, 4rem);
}

.section-heading p,
.contact-copy p {
    margin-top: 12px;
    color: var(--muted);
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 18px;
}

.about-card,
.bio-card,
.education-card,
.timeline-content,
.skill-card,
.project-content,
.contact-section {
    padding: clamp(22px, 4vw, 34px);
}

.about-card h3,
.education-card h3,
.timeline-content h3,
.skill-card h3,
.project-card h3 {
    color: var(--text);
    font-size: 1.22rem;
    line-height: 1.25;
}

.about-card p,
.education-card p,
.timeline-content p,
.project-card p {
    margin-top: 12px;
    color: var(--muted);
}

.bio-card {
    display: grid;
    gap: 16px;
}

.bio-card div {
    display: grid;
    gap: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.bio-card div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.bio-card span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.bio-card strong {
    font-size: 1rem;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.education-card h3 {
    margin-top: 16px;
}

.education-card h4,
.timeline-content h4 {
    margin-top: 4px;
    color: var(--rose-deep);
    font-size: 0.94rem;
}

.timeline {
    position: relative;
    display: grid;
    gap: 26px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 29px;
    top: 18px;
    bottom: 18px;
    width: 2px;
    background: linear-gradient(var(--rose), var(--sage));
}

.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.timeline-icon {
    position: relative;
    z-index: 1;
    display: grid;
    width: 60px;
    height: 60px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose), var(--sage));
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.timeline-content {
    padding: 28px 30px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.timeline-content .period {
    margin-bottom: 16px;
}

.timeline-content h3 {
    margin-bottom: 6px;
}

.timeline-content h4 {
    margin-bottom: 12px;
}

.timeline-content p {
    max-width: 860px;
    line-height: 1.75;
}

.timeline-content:hover {
    transform: translateX(8px);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.skill-card {
    min-height: 164px;
}

.skill-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.skill-top i {
    display: grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    background: rgba(201, 130, 139, 0.14);
    color: var(--rose-deep);
}

.skill-top span {
    display: block;
    margin-top: 4px;
    color: var(--sage);
    font-weight: 900;
}

.progress {
    width: 100%;
    height: 9px;
    margin-top: 24px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(116, 96, 101, 0.13);
}

.progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--rose), var(--sage));
    transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.skill-card.in-view .bar-95 {
    width: 95%;
}

.skill-card.in-view .bar-92 {
    width: 92%;
}

.skill-card.in-view .bar-90 {
    width: 90%;
}

.skill-card.in-view .bar-88 {
    width: 88%;
}

.skill-card.in-view .bar-86 {
    width: 86%;
}

.skill-card.in-view .bar-84 {
    width: 84%;
}

.skill-card.in-view .bar-78 {
    width: 78%;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    overflow: hidden;
    padding: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(123, 82, 91, 0.16);
}

.project-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.project-content span {
    display: inline-flex;
    margin-bottom: 10px;
    color: var(--rose-deep);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.contact-section {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    gap: 28px;
    margin-block: 38px 74px;
    overflow: hidden;
}

.contact-actions {
    display: grid;
    align-content: center;
    gap: 12px;
}

.contact-actions a {
    justify-content: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.54);
    color: var(--text);
}

body.dark-mode .contact-actions a {
    background: rgba(255, 255, 255, 0.06);
}

.contact-actions i {
    color: var(--rose-deep);
}

.site-footer {
    padding: 24px 16px 34px;
    color: var(--muted);
    text-align: center;
}

.reveal {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 1040px) {
    .nav-links {
        position: fixed;
        top: 74px;
        right: 16px;
        display: grid;
        width: min(280px, calc(100vw - 32px));
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface-solid);
        box-shadow: var(--shadow-soft);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

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

    .nav-links a {
        border-radius: var(--radius);
    }

    .menu-toggle {
        display: inline-grid;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero h1 {
        max-width: 12ch;
    }

    .hero-visual {
        order: -1;
        margin-top: 20px;
    }

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

@media (max-width: 760px) {
    .site-header {
        top: 10px;
        width: calc(100% - 20px);
        border-radius: 22px;
    }

    .brand {
        max-width: 190px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero {
        padding-block: 118px 48px;
    }

    .profile-frame {
        width: min(340px, 82vw);
    }

    .floating-note {
        font-size: 0.78rem;
        padding: 10px 12px;
    }

    .note-top {
        left: -8px;
    }

    .note-bottom {
        right: -8px;
    }

    .stats-strip,
    .about-grid,
    .education-grid,
    .contact-section {
        grid-template-columns: 1fr;
    }

    .stats-strip {
        margin-top: 0;
    }

    .timeline::before {
        left: 22px;
        top: 14px;
        bottom: 14px;
    }

    .timeline-item {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 14px;
    }

    .timeline-icon {
        width: 46px;
        height: 46px;
        font-size: 0.9rem;
    }

    .timeline-content {
        padding: 22px 20px;
    }

    .timeline-content .period {
        margin-bottom: 14px;
    }

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

    .project-card img {
        height: 230px;
    }
}

@media (max-width: 420px) {
    .theme-toggle,
    .menu-toggle {
        width: 36px;
        height: 36px;
    }

    .hero-actions .btn,
    .contact-actions a {
        width: 100%;
    }

    .quick-info span {
        width: 100%;
        overflow-wrap: anywhere;
    }
}
