/* ============================================================
   THẢO NGUYÊN (NGIN) — 2D Artist & Illustrator
   cream paper · coral · black-ink "sticker" theme
   ============================================================ */

:root {
    --paper: #f4ede1;
    --paper-2: #efe5d5;
    --card: #fbf7ee;
    --ink: #2a2521;
    --ink-soft: #6f655b;
    --line: #2a2521;
    --line-soft: rgba(42, 37, 33, .16);
    --coral: #f6655a;
    --coral-deep: #e2453a;
    --peach: #ffb9a3;
    --green: #4f9d5b;
    --green-deep: #3c7d47;
    --coral-soft: rgba(246, 101, 90, .14);
    --shadow: 5px 5px 0 var(--ink);
    --shadow-sm: 3px 3px 0 var(--ink);

    --display: 'Baloo 2', cursive;
    --sans: 'Be Vietnam Pro', sans-serif;
    --hand: 'Caveat', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
    background:
        radial-gradient(900px 600px at 88% -5%, rgba(246,101,90,.16), transparent 60%),
        radial-gradient(700px 500px at -5% 30%, rgba(255,185,163,.18), transparent 60%),
        var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--coral-deep); text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--coral); color: #fff; }

.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; fill: currentColor; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; gap: .5em;
    font-family: var(--display); font-weight: 700;
    font-size: .9rem; letter-spacing: .02em;
    padding: .7em 1.4em;
    border: 2px solid var(--ink);
    border-radius: 40px;
    cursor: pointer;
    background: var(--card); color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform .14s, box-shadow .14s, background .14s, color .14s;
    white-space: nowrap;
}
.btn:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(1px,1px); box-shadow: 2px 2px 0 var(--ink); }
.btn .ic { font-size: 1.05em; }
.btn-primary { background: var(--coral); color: #fff; }
.btn-primary:hover { background: var(--coral-deep); }
.btn-ghost { background: var(--card); }
.btn-big { font-size: 1.05rem; padding: .85em 2em; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============ HEADER ============ */
.site-header {
    position: fixed; inset: 0 0 auto 0; z-index: 100;
    display: flex; align-items: center; gap: 2rem;
    padding: 1rem 2.2rem;
    transition: background .3s, box-shadow .3s, padding .3s;
}
.site-header.scrolled {
    background: rgba(244, 237, 225, .9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 0 var(--line-soft);
    padding-top: .65rem; padding-bottom: .65rem;
}
.logo { display: flex; align-items: center; gap: .65rem; }
.logo-badge {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: var(--coral);
    border: 2px solid var(--ink);
    border-radius: 12px;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.logo-badge .ic { width: 26px; height: 26px; color: var(--green-deep); }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: .02em; }
.logo-text em { font-style: normal; font-size: .56rem; font-weight: 600; letter-spacing: .18em; color: var(--ink-soft); }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 1.7rem; }
.nav-link {
    font-family: var(--display); font-weight: 600;
    font-size: .92rem; color: var(--ink-soft);
    position: relative; padding-bottom: 3px;
    transition: color .2s;
}
.nav-link:hover, .nav-link.is-current { color: var(--ink); }
.nav-link.is-current::after {
    content: ""; position: absolute; left: 0; bottom: -1px;
    width: 100%; height: 3px; border-radius: 3px;
    background: var(--coral);
}
.btn-head { padding: .55em 1em; font-size: .8rem; }
.btn-head:hover { background: var(--coral); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span { width: 24px; height: 3px; background: var(--ink); border-radius: 3px; }

/* ============ HERO ============ */
.hero { position: relative; min-height: 100vh; display: flex; overflow: hidden; }
.doodle { position: absolute; color: var(--ink); opacity: .9; pointer-events: none; }
.doodle .ic { width: 100%; height: 100%; }
.d-fish1 { width: 58px; height: 58px; left: 5%; top: 26%; color: var(--green); transform: rotate(-10deg); }
.d-fish2 { width: 46px; height: 46px; right: 8%; bottom: 15%; color: var(--green-deep); transform: rotate(6deg); }
.d-spark1 { width: 34px; height: 34px; left: 46%; top: 16%; color: var(--coral); }
.d-spark2 { width: 26px; height: 26px; right: 30%; top: 30%; color: var(--ink); }

.hero-inner {
    position: relative; z-index: 2;
    width: 100%; max-width: 1240px; margin: 0 auto;
    padding: 9.5rem 3rem 5rem;
    display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 3rem;
}
.hero-inner > * { min-width: 0; }
.hero-left { max-width: 600px; }
.hero-greet {
    font-family: var(--hand); font-size: 1.9rem; font-weight: 700;
    color: var(--coral-deep); margin-bottom: .4rem;
    display: inline-flex; align-items: center; gap: .4rem;
}
.hero-greet .wave { color: var(--coral); animation: pop 1.8s ease-in-out infinite; }
@keyframes pop { 0%,100%{transform:scale(1) rotate(0)} 50%{transform:scale(1.25) rotate(18deg)} }
.hero-title {
    font-family: var(--display); font-weight: 800;
    font-size: clamp(3rem, 7.5vw, 5.4rem); line-height: 1; letter-spacing: .01em;
    margin-bottom: .7rem;
}
.ink-underline { position: relative; color: var(--coral); white-space: nowrap; }
.ink-underline::after {
    content: ""; position: absolute; left: -2%; right: -2%; bottom: .04em; height: .16em;
    background: var(--coral); border-radius: 40px; opacity: .35; z-index: -1;
}
.hero-alias { font-size: .42em; font-weight: 600; color: var(--ink-soft); vertical-align: .45em; }
.hero-role {
    font-family: var(--display); font-weight: 600;
    font-size: clamp(1.3rem, 3vw, 1.9rem); color: var(--ink-soft);
    margin-bottom: 1.3rem;
}
.hero-desc { font-size: 1.05rem; color: var(--ink); max-width: 30rem; margin-bottom: 1.6rem; }
.hero-desc strong { color: var(--coral-deep); }
.hero-desc em { font-family: var(--hand); font-style: normal; font-size: 1.25em; color: var(--coral-deep); }

.hero-chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.8rem; }
.hero-chips li {
    display: inline-flex; align-items: center; gap: .45em;
    font-family: var(--display); font-weight: 600; font-size: .82rem;
    padding: .45em 1em;
    background: var(--card); border: 2px solid var(--ink); border-radius: 40px;
    box-shadow: var(--shadow-sm);
}
.hero-chips .ic { color: var(--coral); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.1rem; }

.hero-stats {
    display: inline-flex; background: var(--card);
    border: 2px solid var(--ink); border-radius: 18px;
    box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1.8rem;
}
.hero-stats li { display: flex; flex-direction: column; align-items: center; padding: .9rem 1.5rem; min-width: 104px; }
.hero-stats li + li { border-left: 2px solid var(--ink); }
.hero-stats strong { font-family: var(--display); font-weight: 800; font-size: 1.7rem; color: var(--coral-deep); line-height: 1; }
.hero-stats em { font-style: normal; font-size: .62rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-soft); margin-top: .3rem; }

.hero-connect { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.connect-label { font-family: var(--display); font-weight: 700; font-size: .68rem; letter-spacing: .18em; color: var(--ink-soft); }
.connect-icons { display: flex; gap: .7rem; }
.connect-icons a {
    width: 42px; height: 42px; display: grid; place-items: center;
    background: var(--card); border: 2px solid var(--ink); border-radius: 12px;
    color: var(--ink); box-shadow: var(--shadow-sm); transition: all .14s;
}
.connect-icons a:hover { background: var(--coral); color: #fff; transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); }
.connect-icons .ic { width: 19px; height: 19px; }

/* hero photo */
.hero-photo { position: relative; justify-self: center; width: min(380px, 80vw); }
.photo-ring {
    border: 3px solid var(--ink); border-radius: 50%;
    overflow: hidden; background: var(--ink);
    box-shadow: 7px 7px 0 var(--coral);
    aspect-ratio: 1/1;
}
.photo-ring img { width: 100%; height: 100%; object-fit: cover; }
.photo-spark { position: absolute; color: var(--coral); }
.photo-spark.s1 { width: 40px; height: 40px; top: -14px; right: 10%; }
.photo-spark.s2 { width: 30px; height: 30px; bottom: 8%; left: -10px; color: var(--ink); }
.photo-spark .ic { width: 100%; height: 100%; }
.photo-tag {
    position: absolute; bottom: 6%; right: -6%;
    display: inline-flex; align-items: center; gap: .3em;
    font-family: var(--hand); font-weight: 700; font-size: 1.5rem;
    background: var(--card); color: var(--ink);
    border: 2px solid var(--ink); border-radius: 40px;
    padding: .1em .7em; box-shadow: var(--shadow-sm);
}
.photo-tag .ic { color: var(--green-deep); font-size: .85em; }

.scroll-hint {
    position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
    display: flex; align-items: center; gap: .6rem;
    font-family: var(--display); font-weight: 600; font-size: .72rem; letter-spacing: .1em; color: var(--ink-soft);
}
.scroll-hint:hover { color: var(--coral-deep); }
.mouse { width: 18px; height: 28px; border: 2px solid currentColor; border-radius: 10px; position: relative; }
.wheel { position: absolute; left: 50%; top: 5px; width: 3px; height: 6px; margin-left: -1.5px; background: currentColor; border-radius: 2px; animation: wheel 1.6s infinite; }
@keyframes wheel { 0%{transform:translateY(0);opacity:1} 70%{transform:translateY(9px);opacity:0} 100%{opacity:0} }

/* ============ SECTIONS ============ */
.section { max-width: 1180px; margin: 0 auto; padding: 5.5rem 2.2rem; }
.section-alt { max-width: none; background: var(--paper-2); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 2.8rem; }
.section-kicker {
    display: inline-flex; align-items: center; gap: .4em;
    font-family: var(--display); font-weight: 700; font-size: .78rem; letter-spacing: .14em;
    color: #fff; background: var(--coral);
    border: 2px solid var(--ink); border-radius: 40px;
    padding: .25em .9em; box-shadow: var(--shadow-sm);
}
.section-kicker .ic { font-size: 1.1em; }
.section-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.1; margin: .7rem 0 .7rem; }
.section-sub { color: var(--ink-soft); max-width: 40rem; font-size: 1.02rem; }

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

/* ============ WORKS — embedded PDF ============ */
.pdf-wrap {
    max-width: 1140px; margin: 0 auto;
    border: 2px solid var(--ink); border-radius: 18px; overflow: hidden;
    background: var(--card); box-shadow: var(--shadow);
}
.pdf-frame {
    display: block; width: 100%; height: 84vh; min-height: 460px;
    border: 0; background: var(--paper-2);
}
.pdf-open {
    display: flex; align-items: center; justify-content: center; gap: .5em;
    padding: .9rem 1rem;
    font-family: var(--display); font-weight: 700; font-size: .92rem; letter-spacing: .02em;
    color: var(--ink); border-top: 2px solid var(--ink); background: var(--card);
    transition: color .2s, background .2s;
}
.pdf-open:hover { color: #fff; background: var(--coral); }
.pdf-open .arrow { transition: transform .2s; }
.pdf-open:hover .arrow { transform: translate(2px,-2px); }

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 3.5rem; align-items: start; }
.about-photo { position: relative; }
.photo-frame { border: 3px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: var(--ink); }
.photo-frame img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.about-badge {
    position: absolute; top: -16px; right: -12px;
    display: inline-flex; align-items: center; gap: .25em;
    font-family: var(--hand); font-weight: 700; font-size: 1.4rem;
    background: var(--coral); color: #fff;
    border: 2px solid var(--ink); border-radius: 40px;
    padding: .05em .7em; box-shadow: var(--shadow-sm); transform: rotate(6deg);
}
.about-lead { font-size: 1.2rem; margin-bottom: 1rem; }
.about-lead strong { color: var(--coral-deep); }
.about-text > p { color: var(--ink-soft); margin-bottom: 1.5rem; }
.about-subhead { font-family: var(--display); font-weight: 700; font-size: .82rem; letter-spacing: .14em; color: var(--coral-deep); margin-bottom: .9rem; }
.expertise-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .55rem; margin-bottom: 1.9rem; }
.expertise-list li { font-size: .94rem; }
.expertise-list li::before { content: "🌱"; font-size: .8em; margin-right: .4em; }

/* ============ SKILLS ============ */
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }
.skill-card { background: var(--card); border: 2px solid var(--ink); border-radius: 18px; padding: 1.6rem 1.5rem; box-shadow: var(--shadow); }
.skill-card h4 { display: flex; align-items: center; gap: .5em; font-family: var(--display); font-weight: 700; font-size: .9rem; letter-spacing: .08em; margin-bottom: 1rem; }
.skill-card h4 .ic { color: var(--coral); }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li {
    font-family: var(--display); font-weight: 600; font-size: .82rem;
    padding: .4em 1em; background: var(--paper); border: 2px solid var(--ink); border-radius: 40px;
}
.chips .chip-hot { background: var(--coral-soft); }

/* ============ EXPERIENCE ============ */
.timeline-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.timeline-head { display: flex; align-items: center; gap: .5em; font-family: var(--display); font-weight: 700; font-size: .92rem; letter-spacing: .08em; margin-bottom: 1.5rem; }
.timeline-head .ic { color: var(--coral); }
.tl-block { position: relative; padding: 0 0 1.7rem 1.7rem; border-left: 2px solid var(--ink); }
.tl-block:last-child { padding-bottom: 0; }
.tl-block::before { content: ""; position: absolute; left: -8px; top: 3px; width: 13px; height: 13px; background: var(--coral); border: 2px solid var(--ink); border-radius: 50%; }
.tl-block h5 { font-family: var(--display); font-weight: 700; font-size: 1.1rem; margin-bottom: .25rem; }
.tl-meta { font-family: var(--hand); font-weight: 700; font-size: 1.15rem; color: var(--coral-deep); }
.tl-time { display: block; font-family: var(--display); font-weight: 600; font-size: .72rem; letter-spacing: .03em; color: var(--coral-deep); margin-bottom: .5rem; }
.tl-block p { font-size: .92rem; color: var(--ink-soft); }

/* ============ CONTACT ============ */
.contact-wrap { text-align: center; max-width: 820px; margin: 0 auto; }
.contact-big { font-family: var(--display); font-weight: 600; font-size: 1.6rem; line-height: 1.45; margin-bottom: 2.2rem; }
.contact-big em { font-family: var(--hand); font-weight: 700; color: var(--coral-deep); }
.contact-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 2.4rem; }
.contact-card {
    background: var(--card); border: 2px solid var(--ink); border-radius: 16px;
    padding: 1rem 1.5rem; color: var(--ink); font-size: .92rem; box-shadow: var(--shadow-sm);
    transition: transform .14s, box-shadow .14s;
}
a.contact-card:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.contact-card > span { display: flex; align-items: center; gap: .4em; justify-content: center; font-family: var(--display); font-weight: 700; font-size: .66rem; letter-spacing: .1em; color: var(--coral-deep); margin-bottom: .35rem; }
.contact-static { cursor: default; }

/* ============ FOOTER ============ */
.site-footer {
    border-top: 2px solid var(--ink); padding: 2rem 2.2rem;
    display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
    font-family: var(--display); font-weight: 600; font-size: .8rem; color: var(--ink-soft);
}
.site-footer .ic { color: var(--green-deep); }
.back-top { color: var(--ink-soft); }
.back-top:hover { color: var(--coral-deep); }

/* ============ LIGHTBOX ============ */
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; overflow: auto; padding: 4vh 3vw; overscroll-behavior: contain; }
.lightbox[hidden] { display: none; }
.lb-backdrop { position: fixed; inset: 0; background: rgba(42, 37, 33, .9); }
#lb-img {
    position: relative; margin: auto;
    width: min(940px, 94vw); height: auto; max-height: none;
    border: 3px solid var(--paper); border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5); background: var(--card);
}
.lb-close {
    position: fixed; top: 16px; right: 16px; z-index: 2;
    width: 46px; height: 46px; background: var(--coral); color: #fff;
    border: 2px solid var(--paper); border-radius: 12px; font-size: 1.15rem; cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,.4);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
    .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-photo { order: -1; width: min(280px, 70vw); }
    .hero-left { max-width: 100%; }
}
@media (max-width: 900px) {
    .main-nav { position: fixed; top: 64px; right: 1rem; background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: 1.1rem 1.6rem; display: none; box-shadow: var(--shadow); }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 1rem; }
    .nav-toggle { display: flex; margin-left: auto; }
    .main-nav { margin-left: 0; }
    .btn-head { order: 1; }
    .site-header { gap: 1rem; padding: .7rem 1.1rem; }
    .timeline-grid, .about-grid { grid-template-columns: 1fr; }
    .about-photo { max-width: 320px; }
}
@media (max-width: 600px) {
    .gallery { grid-template-columns: 1fr; }
    .hero-inner { padding: 7.5rem 1.3rem 5rem; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { justify-content: center; }
    .hero-stats { display: grid; grid-template-columns: repeat(3,1fr); width: 100%; }
    .hero-stats li { min-width: 0; padding: .9rem .4rem; }
    .section { padding: 4rem 1.3rem; }
    .scroll-hint { display: none; }
    .btn-head { display: none; }
    .doodle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}
