html, body, #root { margin: 0; min-height: 100%; }

:root {
    --pink: #ec4899;
    --violet: #8b5cf6;
    --grad: linear-gradient(90deg, var(--pink), var(--violet));
    --bg: #ffffff;
    --ink: #16121f;
    --ink-2: #5b5566;
    --card: #ffffff;
    --hairline: #efe9f4;
    --wm: rgba(22, 18, 31, 0.045);
    --chip-bg: #fdf2f8;
    --chip-ink: #be185d;
}
body.theme-dark {
    --bg: #0e0a1a;
    --ink: #f2eefc;
    --ink-2: #a79fb8;
    --card: #171128;
    --hairline: #2a2140;
    --wm: rgba(255, 255, 255, 0.05);
    --chip-bg: #2a1530;
    --chip-ink: #f9a8d4;
}
body { background: var(--bg); color: var(--ink); font-family: 'Inter', system-ui, -apple-system, sans-serif; transition: background .3s, color .3s; }

.pf { position: relative; overflow: hidden; }

.bg-circle { position: fixed; border: 1px solid var(--hairline); border-radius: 50%; pointer-events: none; z-index: 0; }
.bg-circle.c1 { width: 340px; height: 340px; top: 60px; left: -120px; animation: floaty 9s ease-in-out infinite; }
.bg-circle.c2 { width: 300px; height: 300px; top: 90px; right: -110px; animation: floaty 11s ease-in-out infinite reverse; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(24px); } }

/* nav */
.nav { position: sticky; top: 14px; z-index: 50; margin: 14px auto 0; max-width: 880px; display: flex; align-items: center; gap: 18px;
    background: var(--card); border: 1px solid var(--hairline); border-radius: 999px; padding: 10px 18px;
    box-shadow: 0 8px 30px rgba(90, 40, 140, 0.10); }
.nav .brand { font-weight: 800; font-size: 18px; text-decoration: none; color: var(--ink); letter-spacing: -0.02em; }
.nav .brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav .brand .spark { font-style: normal; color: var(--pink); font-size: 12px; margin-left: 2px; }
.nav nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.nav nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav nav a:hover { color: var(--pink); }
.theme-btn { border: 1px solid var(--hairline); background: var(--bg); color: var(--ink); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 15px; }

/* hero */
.hero { text-align: center; padding: 84px 20px 60px; position: relative; z-index: 1; }
.hero-name { font-size: clamp(44px, 8vw, 84px); font-weight: 800; letter-spacing: -0.03em; margin: 0; animation: rise .7s ease both; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-typed { font-size: clamp(18px, 3vw, 26px); color: var(--ink-2); margin: 14px 0 4px; min-height: 1.4em; animation: rise .7s .15s ease both; }
.caret { color: var(--pink); animation: blink 0.9s steps(1) infinite; font-weight: 300; }
@keyframes blink { 50% { opacity: 0; } }
.hero-loc { color: var(--ink-2); font-size: 15px; animation: rise .7s .25s ease both; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-top: 26px; flex-wrap: wrap; animation: rise .7s .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .15s; }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 10px 24px rgba(236, 72, 153, 0.35); }
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(139, 92, 246, 0.4); }
.btn.ghost { border-color: var(--hairline); color: var(--ink); background: var(--card); }
.btn.ghost:hover { border-color: var(--pink); color: var(--pink); }
.btn.sm { padding: 10px 20px; font-size: 14px; }

/* sections */
.section { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; padding: 56px 20px 8px; }
.wm-wrap { position: relative; text-align: center; margin-bottom: 34px; }
.wm { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -58%); font-size: clamp(56px, 12vw, 128px); font-weight: 800; letter-spacing: 0.04em; color: var(--wm); white-space: nowrap; pointer-events: none; user-select: none; }
.wm-wrap h2 { position: relative; font-size: clamp(26px, 4vw, 36px); margin: 0; letter-spacing: -0.02em; }
.wm-dash { display: flex; justify-content: center; margin: 10px 0 6px; }
.wm-dash span { width: 46px; height: 3px; border-radius: 3px; background: var(--grad); position: relative; }
.wm-sub { position: relative; color: var(--ink-2); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; margin: 0; }

/* reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* about */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; }
.photo-ring { position: relative; width: 280px; height: 280px; margin: 0 auto; border-radius: 50%; padding: 6px; background: var(--grad); animation: floaty 7s ease-in-out infinite; }
.photo-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; border: 5px solid var(--bg); }
.photo-badge { position: absolute; top: 14px; right: -6px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px; box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4); }
.about-text h3 { font-size: 24px; margin: 0 0 8px; letter-spacing: -0.02em; }
.mini-dash { width: 40px; height: 3px; background: var(--grad); border-radius: 3px; margin-bottom: 14px; }
.about-text p { color: var(--ink-2); line-height: 1.75; font-size: 15.5px; }
.about-actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

/* stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--card); border: 1px solid var(--hairline); border-radius: 18px; padding: 26px 12px; text-align: center; transition: transform .2s, box-shadow .2s; }
.stat:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(139, 92, 246, 0.16); }
.stat-num { display: block; font-size: 34px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { color: var(--ink-2); font-size: 13.5px; margin-top: 6px; display: inline-block; }

/* skills */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 34px; }
.skill-head { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 600; margin-bottom: 8px; }
.skill-head span:last-child { color: var(--pink); }
.skill-bar { height: 8px; border-radius: 6px; background: var(--hairline); overflow: hidden; }
.skill-bar span { display: block; height: 100%; border-radius: 6px; background: var(--grad); animation: grow 1.4s ease both; }
@keyframes grow { from { width: 0; } }

/* timeline cards */
.timeline { display: grid; gap: 20px; }
.t-card { display: grid; grid-template-columns: 150px 1fr; gap: 18px; background: var(--card); border: 1px solid var(--hairline); border-radius: 18px; padding: 22px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.t-card:hover { transform: translateY(-3px); border-color: rgba(236, 72, 153, 0.4); box-shadow: 0 16px 34px rgba(139, 92, 246, 0.14); }
.t-side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.t-date { background: var(--chip-bg); color: var(--chip-ink); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.t-line { flex: 1; width: 2px; background: linear-gradient(var(--pink), transparent); border-radius: 2px; margin-left: 8px; }
.t-tag { color: var(--pink); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; }
.t-body h4 { margin: 6px 0 4px; font-size: 18px; letter-spacing: -0.01em; }
.t-place { color: var(--ink-2); font-size: 14px; margin: 0 0 10px; }
.t-body ul { margin: 0; padding-left: 0; list-style: none; }
.t-body li { position: relative; color: var(--ink-2); font-size: 14.5px; line-height: 1.65; padding-left: 18px; margin-bottom: 6px; }
.t-body li::before { content: ''; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { background: var(--chip-bg); color: var(--chip-ink); font-size: 12.5px; font-weight: 600; padding: 6px 13px; border-radius: 999px; }
.hash { color: var(--violet); font-size: 13px; margin-top: 8px; }

/* projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.p-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--hairline); border-radius: 18px; padding: 22px; text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.p-card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, 0.5); box-shadow: 0 16px 34px rgba(139, 92, 246, 0.16); }
.p-tag { align-self: flex-start; background: var(--chip-bg); color: var(--chip-ink); font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.p-card h4 { margin: 12px 0 6px; font-size: 17px; }
.p-card p { color: var(--ink-2); font-size: 14px; line-height: 1.6; flex: 1; margin: 0 0 12px; }
.p-link { color: var(--pink); font-size: 13.5px; font-weight: 700; }

/* contact */
.contact-card { background: var(--card); border: 1px solid var(--hairline); border-radius: 22px; padding: 36px 26px; text-align: center; }
.contact-card p { color: var(--ink-2); font-size: 16px; margin: 0; }

.foot { text-align: center; color: var(--ink-2); font-size: 13.5px; padding: 44px 20px 34px; position: relative; z-index: 1; }

@media (max-width: 760px) {
    .nav { gap: 10px; padding: 9px 14px; }
    .nav nav { display: none; }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-text .mini-dash { margin-left: auto; margin-right: auto; }
    .about-actions { justify-content: center; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .skills-grid { grid-template-columns: 1fr; }
    .t-card { grid-template-columns: 1fr; }
    .t-side { flex-direction: row; align-items: center; }
    .t-line { display: none; }
    .projects-grid { grid-template-columns: 1fr; }
}
