/* =====================================================================
   TRANG CHỦ — hero Three.js + các chương 01 → 05
   ===================================================================== */

.accent { color: var(--red-2); }

.display {
    margin: 0;
    font-size: clamp(38px, 5.4vw, 84px);
    font-weight: 300;
    line-height: 0.98;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

.mini-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

.mini-label i { color: var(--red-2); font-size: 11px; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--paper);
    border-bottom: 1px solid var(--line-2);
    transition: gap 0.4s var(--ease), border-color 0.4s, color 0.3s;
}

.text-link i { font-size: 11px; color: var(--red-2); }
.text-link:hover { gap: 20px; border-color: var(--red-2); }

/* ================= HERO ================= */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
    padding: calc(var(--nav-h) + 24px) 0 0;
}

.hero-sky {
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        radial-gradient(80vmax 60vmax at 78% 18%, rgba(120, 40, 34, 0.35), transparent 55%),
        radial-gradient(90vmax 70vmax at 20% 110%, rgba(40, 52, 82, 0.35), transparent 60%),
        linear-gradient(180deg, #06070a 0%, #0b0d13 55%, #07080b 100%);
}

/* Mặt trăng dự phòng khi máy không chạy được WebGL */
.hero-moon-fallback {
    position: absolute;
    top: 14%;
    right: 12%;
    width: clamp(160px, 22vw, 340px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 34%, #f0604c 0%, #c3301f 45%, #7e1b12 100%);
    box-shadow: 0 0 120px 30px rgba(216, 57, 44, 0.25);
    opacity: 0.85;
    transition: opacity 1.2s var(--ease);
}

.webgl-ready .hero-moon-fallback { opacity: 0; }

/* Chữ tên khổng lồ phía sau núi (giống chữ "KAGE" của mẫu tham khảo) */
.hero-word {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24vh;
    z-index: -2;
    display: flex;
    justify-content: center;
    gap: 0.12em;
    font-size: clamp(88px, 21vw, 360px);
    font-weight: 600;
    line-height: 0.8;
    letter-spacing: -0.05em;
    color: rgba(236, 232, 224, 0.07);
    -webkit-text-stroke: 1px rgba(236, 232, 224, 0.22);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    transform: translate3d(0, var(--word-y, 0px), 0);
    will-change: transform;
}

.hero-word span {
    display: inline-block;
    opacity: 0;
    transform: translateY(18%);
    transition: opacity 1.6s var(--ease), transform 1.6s var(--ease);
}

.hero-word span + span { transition-delay: 0.12s; }

.is-loaded .hero-word span { opacity: 1; transform: none; }

/* Có WebGL thì chữ khổng lồ được vẽ bên trong cảnh 3D, ẩn bản HTML dự phòng */
.webgl-ready .hero-word { display: none; }

.hero-canvas {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.4s var(--ease);
}

.webgl-ready .hero-canvas { opacity: 1; }

/* Không có WebGL: tự vẽ dải núi bằng CSS để chữ khổng lồ vẫn "chìm" sau núi */
.hero:not(.webgl-ready) .hero-scrim::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 36%;
    background: linear-gradient(180deg, rgba(7, 8, 11, 0) 0%, #07080b 60%);
}

.hero-scrim {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(7, 8, 11, 0.78) 0%, rgba(7, 8, 11, 0.35) 38%, rgba(7, 8, 11, 0) 62%),
        linear-gradient(180deg, rgba(7, 8, 11, 0) 70%, var(--ink) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding-bottom: clamp(110px, 17vh, 200px);
}

.hero-title {
    margin: 4px 0 0;
    font-size: clamp(44px, 7.4vw, 120px);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.hero-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--paper-2);
}

.hero-name strong { font-weight: 600; color: var(--paper); }

.hero-name-sep {
    width: 28px;
    height: 1px;
    background: var(--red-2);
}

.hero-sub {
    max-width: 480px;
    margin: 0;
    font-size: clamp(15px, 1.3vw, 17px);
    color: var(--paper-2);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.hero-cta .cv-download-wrap { margin-top: 0; }

/* Hero hiện dần sau khi trang tải xong */
.hero-reveal:not(.line) {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 1s var(--ease), transform 1s var(--ease);
    transition-delay: var(--d, 0s);
}

.is-loaded .hero-reveal:not(.line) { opacity: 1; transform: none; }
.is-loaded .hero .line > span { transform: none; }

.no-js .hero-reveal:not(.line),
.no-js .hero-word span { opacity: 1; transform: none; }
.no-js .hero .line > span { transform: none; }

.hero-vertical {
    position: absolute;
    top: calc(var(--nav-h) + 40px);
    right: var(--gutter);
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    writing-mode: vertical-rl;
    pointer-events: none;
}

.hero-vertical span {
    font-size: clamp(34px, 3.4vw, 54px);
    letter-spacing: 0.24em;
    color: rgba(236, 232, 224, 0.82);
}

.hero-vertical small {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--muted);
}

.hero-foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: clamp(40px, 6vw, 96px);
    padding-bottom: 28px;
    padding-right: 320px;
}

.scroll-cue {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
}

.scroll-cue i {
    position: relative;
    width: 56px;
    height: 1px;
    background: var(--line-2);
    overflow: hidden;
}

.scroll-cue i::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--red-2);
    transform: translateX(-100%);
    animation: scrollCue 2.4s var(--ease-in-out) infinite;
}

@keyframes scrollCue {
    0% { transform: translateX(-100%); }
    60%, 100% { transform: translateX(100%); }
}

.hero-index {
    display: flex;
    gap: clamp(16px, 3vw, 44px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-index a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--muted);
    transition: color 0.3s;
}

.hero-index b {
    font-size: clamp(22px, 2.6vw, 40px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--paper);
    transition: color 0.3s;
}

.hero-index span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero-index a:hover,
.hero-index a:hover b { color: var(--red-2); }

/* ================= THƯỚC CHƯƠNG BÊN PHẢI ================= */
.chapter-rail {
    position: fixed;
    right: 22px;
    top: 50%;
    z-index: 400;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.6s var(--ease);
}

.chapter-rail.is-visible { opacity: 1; }

.chapter-rail a {
    position: relative;
    display: block;
    width: 22px;
    height: 10px;
}

.chapter-rail a::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 12px;
    height: 1px;
    background: var(--line-2);
    transition: width 0.45s var(--ease), background 0.45s;
}

.chapter-rail a span {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--paper);
    opacity: 0;
    transition: opacity 0.3s;
}

.chapter-rail a.is-active::before { width: 22px; background: var(--red-2); }
.chapter-rail a.is-active span,
.chapter-rail a:hover span { opacity: 1; }

@media (max-width: 1080px) {
    .chapter-rail { display: none; }
}

/* ================= DẢI SỐ LIỆU ================= */
.stats {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(28px, 4vw, 48px) clamp(12px, 2vw, 28px);
    border-left: 1px solid var(--line);
}

.stat:first-child { border-left: 0; padding-left: 0; }

.stat-num {
    font-size: clamp(34px, 4.4vw, 64px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    max-width: 220px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.2em;
    line-height: 1.6;
    text-transform: uppercase;
    color: var(--muted);
}

/* ================= KHUNG CHƯƠNG CHUNG ================= */
.chapter {
    position: relative;
    z-index: 2;
    padding: clamp(96px, 14vw, 180px) 0;
    border-bottom: 1px solid var(--line);
}

.chapter-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: clamp(40px, 6vw, 72px);
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.chapter-num { color: var(--red-2); }

.chapter-num::after {
    content: '—';
    margin-left: 14px;
    color: var(--dim);
}

.chapter-label { color: var(--paper-2); }

.chapter-cjk {
    margin-left: auto;
    font-size: 14px;
    letter-spacing: 0.4em;
    color: var(--dim);
}

/* ================= 01 GIỚI THIỆU ================= */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-areas:
        "title portrait"
        "body portrait";
    gap: clamp(40px, 6vw, 96px) clamp(40px, 7vw, 120px);
    align-items: start;
}

.about-title { grid-area: title; }

.about-portrait {
    grid-area: portrait;
    position: relative;
    margin: 0;
    justify-self: end;
    width: min(100%, 420px);
}

.portrait-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 200px 200px 18px 18px;
    background: var(--ink-3);
}

.portrait-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px var(--line-2);
    background: linear-gradient(180deg, transparent 55%, rgba(7, 8, 11, 0.55));
    pointer-events: none;
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
    transform: scale(1.04);
    transition: filter 1s var(--ease), transform 1.4s var(--ease);
}

.about-portrait:hover img { filter: grayscale(0); transform: scale(1); }

.portrait-seal {
    position: absolute;
    left: -18px;
    bottom: 64px;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--red);
    color: #fff;
    font-size: 34px;
    box-shadow: 0 16px 40px rgba(216, 57, 44, 0.4);
    transform: rotate(-6deg);
}

.about-portrait figcaption {
    margin-top: 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

.about-body {
    grid-area: body;
    max-width: 620px;
}

.about-body p {
    margin: 0 0 18px;
    color: var(--paper-2);
}

.about-body .lead {
    font-size: clamp(18px, 1.6vw, 22px);
    font-weight: 300;
    line-height: 1.6;
    color: var(--paper);
}

.about-quote {
    margin: 36px 0;
    padding: 4px 0 4px 22px;
    border-left: 1px solid var(--red-2);
}

.about-quote p {
    margin: 0 0 8px !important;
    font-family: var(--font-cjk);
    font-size: clamp(17px, 1.5vw, 20px);
    font-style: italic;
    line-height: 1.55;
    color: var(--paper) !important;
}

.about-quote cite {
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.about-hobbies .mini-label { margin-bottom: 14px; }

/* ================= 02 KINH NGHIỆM ================= */
.exp-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: clamp(28px, 6vw, 96px);
    align-items: end;
    margin-bottom: clamp(56px, 8vw, 110px);
}

.exp-intro p {
    margin: 0;
    color: var(--paper-2);
}

.timeline-list {
    margin: 0 0 48px;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(180px, 0.9fr) minmax(0, 3fr);
    gap: clamp(24px, 5vw, 80px);
    padding: clamp(36px, 5vw, 64px) 0;
    border-bottom: 1px solid var(--line);
}

.tl-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    width: 0;
    height: 1px;
    background: var(--red-2);
    transition: width 1.2s var(--ease);
}

.tl-item.is-in::before { width: 120px; }

.tl-when {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tl-years {
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.tl-kind {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--red-2);
}

.tl-main h3 {
    margin: 0;
    font-size: clamp(22px, 2.4vw, 34px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.tl-role {
    margin: 10px 0 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.tl-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 56px);
    margin-top: 36px;
}

.tl-col ul {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.tl-col li {
    position: relative;
    padding: 12px 0 12px 22px;
    border-top: 1px solid var(--line);
    font-size: 14.5px;
    color: var(--paper-2);
    transition: color 0.3s, padding-left 0.4s var(--ease);
}

.tl-col li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 24px;
    width: 8px;
    height: 1px;
    background: var(--red-2);
    transition: width 0.4s var(--ease);
}

.tl-col li:hover { color: var(--paper); padding-left: 30px; }
.tl-col li:hover::before { width: 16px; }

/* ================= 03 KỸ NĂNG ================= */
.skills-title { margin-bottom: clamp(48px, 7vw, 96px); }

.skill-groups { border-top: 1px solid var(--line); }

.skill-group {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(0, 2.6fr);
    gap: 20px clamp(24px, 5vw, 80px);
    padding: clamp(26px, 3.4vw, 40px) 0;
    border-bottom: 1px solid var(--line);
    transition: opacity 0.5s var(--ease);
}

/* Rê chuột vào một nhóm thì các nhóm khác mờ đi — tập trung đọc */
@media (hover: hover) {
    .skill-groups:hover .skill-group { opacity: 0.38; }
    .skill-groups:hover .skill-group:hover { opacity: 1; }
}

.skill-group-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.skill-idx {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--red-2);
}

.skill-group-head h3 {
    margin: 0;
    font-size: clamp(18px, 1.8vw, 24px);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 400;
    color: var(--paper-2);
    cursor: default;
    transition: background 0.35s var(--ease), color 0.35s, border-color 0.35s, transform 0.35s var(--ease);
}

.skill-tag.is-strong {
    border-color: rgba(255, 90, 69, 0.45);
    color: var(--paper);
}

.skill-tag:hover {
    background: var(--paper);
    border-color: var(--paper);
    color: var(--ink);
    transform: translateY(-3px);
}

.skill-tag.is-strong:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ================= 04 DỰ ÁN ================= */
.project-list {
    display: flex;
    flex-direction: column;
    gap: clamp(72px, 10vw, 140px);
    margin-top: clamp(56px, 8vw, 110px);
}

.project {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 80px);
    align-items: center;
}

.project--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.project--flip .project-visual { order: 2; }

.project-visual {
    display: block;
    border-radius: 22px;
    overflow: hidden;
    transform: translateZ(0);
}

.pv-inner {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--line);
    background:
        linear-gradient(rgba(236, 232, 224, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(236, 232, 224, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
        radial-gradient(120% 90% at 70% 20%, #1a1216 0%, #0c0e13 60%);
    transition: transform 1.2s var(--ease), border-color 0.5s;
}

.pv-2 {
    background:
        linear-gradient(rgba(236, 232, 224, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(236, 232, 224, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
        radial-gradient(120% 90% at 30% 20%, #121827 0%, #0c0e13 60%);
}

.project-visual:hover .pv-inner { transform: scale(0.985); border-color: var(--line-2); }

.pv-moon {
    position: absolute;
    top: 12%;
    right: 12%;
    width: 30%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 34%, #ff6a52 0%, #c93322 50%, #6f170f 100%);
    box-shadow: 0 0 80px 10px rgba(216, 57, 44, 0.3);
    transition: transform 1.4s var(--ease);
}

.pv-2 .pv-moon { right: auto; left: 12%; }
.pv-3 .pv-moon { top: auto; bottom: -8%; right: 30%; width: 38%; }

.project-visual:hover .pv-moon { transform: translate(-12%, 10%); }

.pv-glyph {
    position: absolute;
    left: 8%;
    bottom: -4%;
    font-size: clamp(140px, 22vw, 300px);
    line-height: 1;
    color: rgba(236, 232, 224, 0.9);
    transition: transform 1.4s var(--ease);
}

.pv-2 .pv-glyph { left: auto; right: 8%; }
.pv-3 .pv-glyph { left: 10%; bottom: 2%; }

.project-visual:hover .pv-glyph { transform: translateY(-4%); }

.pv-pinyin {
    position: absolute;
    left: 8%;
    top: 10%;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--muted);
}

.pv-meta {
    position: absolute;
    right: 5%;
    bottom: 6%;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.24em;
    color: var(--muted);
}

.pv-2 .pv-meta { right: auto; left: 5%; }

.pv-langs {
    position: absolute;
    left: 8%;
    top: 54%;
    display: flex;
    gap: 8px;
}

.pv-langs b {
    display: grid;
    place-items: center;
    min-width: 46px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--paper-2);
    background: rgba(7, 8, 11, 0.4);
}

.pv-langs b:first-child { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.pv-play {
    position: absolute;
    right: 12%;
    top: 16%;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    background: rgba(7, 8, 11, 0.4);
    color: var(--paper);
    font-size: 16px;
    transition: background 0.4s, transform 0.6s var(--ease);
}

.project-visual:hover .pv-play { background: var(--red); transform: scale(1.08); }

.project-no {
    display: block;
    margin-bottom: 18px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.24em;
    color: var(--red-2);
}

.project-info h3 {
    margin: 0 0 16px;
    font-size: clamp(24px, 2.5vw, 38px);
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}

.project-info p {
    margin: 0 0 22px;
    color: var(--paper-2);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.project-tech li {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ================= 05 LIÊN HỆ ================= */
.contact {
    overflow: hidden;
    border-bottom: 0;
}

.contact-glow {
    position: absolute;
    right: -20vw;
    top: -10vw;
    width: 70vw;
    height: 70vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(216, 57, 44, 0.22) 0%, rgba(216, 57, 44, 0) 60%);
    pointer-events: none;
    z-index: -1;
}

.contact-title {
    margin: 0 0 clamp(48px, 7vw, 96px);
    font-size: clamp(46px, 10vw, 168px);
    font-weight: 300;
    line-height: 0.92;
    letter-spacing: -0.045em;
    text-transform: uppercase;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: clamp(40px, 7vw, 120px);
    align-items: start;
}

.contact-cta p {
    max-width: 420px;
    margin: 0 0 36px;
    color: var(--paper-2);
}

.contact-orb {
    position: relative;
    width: clamp(150px, 15vw, 190px);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    box-shadow: 0 30px 80px -20px rgba(216, 57, 44, 0.6);
    transition: background 0.4s, transform 0.5s var(--ease);
}

.contact-orb i { font-size: 16px; transition: transform 0.5s var(--ease); }
.contact-orb:hover { background: var(--red-2); }
.contact-orb:hover i { transform: rotate(-45deg); }

.contact-rows {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--line);
}

.contact-rows li { border-bottom: 1px solid var(--line); }

.contact-rows a,
.contact-rows .cr-static > div {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 22px 0;
    transition: padding 0.5s var(--ease);
}

.contact-rows .cr-static > div { grid-template-columns: 140px minmax(0, 1fr); }

.cr-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

.cr-value {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: clamp(16px, 1.8vw, 24px);
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--paper);
    transition: color 0.3s;
}

.cr-arrow {
    font-size: 13px;
    color: var(--dim);
    transition: transform 0.5s var(--ease), color 0.3s;
}

.contact-rows a:hover { padding-left: 12px; }
.contact-rows a:hover .cr-value { color: var(--red-2); }
.contact-rows a:hover .cr-arrow { color: var(--red-2); transform: rotate(-45deg); }

/* ================= RESPONSIVE ================= */
@media (max-width: 1080px) {
    .about-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "title" "portrait" "body";
    }

    .about-portrait { justify-self: start; width: min(100%, 360px); }

    .exp-intro { grid-template-columns: 1fr; align-items: start; }

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

    .project--flip .project-visual { order: 0; }

    .contact-grid { grid-template-columns: 1fr; }

    .hero-index { display: none; }
}

@media (max-width: 860px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat:nth-child(3) { border-left: 0; padding-left: 0; }
    .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }

    .tl-item { grid-template-columns: 1fr; gap: 20px; }
    .tl-columns { grid-template-columns: 1fr; gap: 28px; }

    .skill-group { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .hero { justify-content: flex-start; padding-top: calc(var(--nav-h) + 36px); }
    .hero-inner { gap: 18px; padding-bottom: 0; }
    .hero-word { bottom: 70px; font-size: 25vw; }
    .hero-vertical { display: none; }
    .hero-scrim {
        background:
            linear-gradient(180deg, rgba(7, 8, 11, 0.72) 0%, rgba(7, 8, 11, 0.25) 55%, rgba(7, 8, 11, 0) 70%),
            linear-gradient(180deg, rgba(7, 8, 11, 0) 80%, var(--ink) 100%);
    }
    .hero-cta { width: 100%; }
    .hero-cta .btn { padding: 0 20px 0 22px; }
    .hero-foot { padding-bottom: 20px; padding-right: var(--gutter); }
    .scroll-cue { display: none; }

    .stat-label { font-size: 9.5px; letter-spacing: 0.16em; }

    .chapter-head { flex-wrap: wrap; }

    .portrait-seal { left: auto; right: -8px; width: 54px; height: 54px; font-size: 28px; }

    .pv-glyph { font-size: 46vw; }
    .pv-langs b { min-width: 38px; height: 28px; font-size: 11px; }

    .contact-rows a,
    .contact-rows .cr-static > div {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 12px;
        padding: 18px 0;
    }

    .contact-rows .cr-static > div { grid-template-columns: 1fr; }

    .cr-label { grid-column: 1 / -1; }
}

@media (max-height: 720px) and (min-width: 601px) {
    .hero-inner { padding-bottom: 150px; gap: 16px; }
    .hero-title { font-size: clamp(40px, 6vw, 88px); }
}
