/* Chalakorn portfolio — shared design system (home + graphics) */

@font-face { font-family: 'LINE Seed Sans TH'; src: url('../font/LINESeedSansTH_W_Th.woff') format('woff'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'LINE Seed Sans TH'; src: url('../font/LINESeedSansTH_W_Rg.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'LINE Seed Sans TH'; src: url('../font/LINESeedSansTH_W_Bd.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'LINE Seed Sans TH'; src: url('../font/LINESeedSansTH_W_XBd.woff') format('woff'); font-weight: 800; font-display: swap; }

:root {
    --bg: #0a0a0a;
    --bg-2: #0f0f0f;
    --surface: #131313;
    --surface-2: #1a1a1a;
    --line: rgba(255, 255, 255, 0.08);
    --line-2: rgba(255, 255, 255, 0.14);
    --text: #ffffff;
    --text-2: #ffffff;
    --text-3: rgba(255, 255, 255, 0.8);
    --orange: #ff5200;
    --orange-hi: #ff5200;
    --orange-ink: #ffffff;
    --orange-deep: #ff5200;
    --orange-deep-hi: #ff5200;
    --orange-soft: rgba(255, 82, 0, 0.12);
    --radius: 12px;
    --radius-lg: 18px;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.7);
    --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 48px -16px rgba(0, 0, 0, 0.8);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --wrap: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --nav-h: 64px;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'LINE Seed Sans TH', system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--orange-deep); color: #fff; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: #2a2a2a var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    height: 44px; padding: 0 20px;
    border-radius: 10px; border: 1px solid transparent;
    font-size: 16px; font-weight: 700; line-height: 1;
    cursor: pointer; white-space: nowrap;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn i { font-size: 14px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange-deep); color: var(--orange-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 6px 16px -8px rgba(0, 0, 0, 0.8); }
.btn-primary:hover { background: var(--orange-deep-hi); filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, 0.03); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.24); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 15px; border-radius: 8px; }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 26px; padding: 0 10px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
    color: var(--text-2); font-size: 13.5px; font-weight: 700; white-space: nowrap;
}

/* ---------- Navigation ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    height: var(--nav-h);
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); background: rgba(10, 10, 10, 0.86); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: block; width: 104px; height: 44px; flex: none; }
.nav-logo img { width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
    position: relative; padding: 8px 12px; border-radius: 8px;
    font-size: 15px; color: var(--text-2); transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links a.is-active { color: var(--text); }
.nav-links a::after {
    content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
    border-radius: 2px; background: var(--orange);
    transform: scaleX(0); transition: transform .35s var(--ease);
}
.nav-links a.is-active::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
    display: none; width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); cursor: pointer;
    align-items: center; justify-content: center; font-size: 16px;
}
.nav-sheet {
    display: none; position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 49;
    background: rgba(12, 12, 12, 0.97); border-bottom: 1px solid var(--line);
    padding: 12px var(--gutter) 20px;
}
.nav-sheet.is-open { display: block; }
.nav-sheet a { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--text); }
.nav-sheet a i { color: var(--text-3); font-size: 14px; }
.nav-sheet a:last-child { border-bottom: 0; }

@media (max-width: 1080px) {
    .nav-links { display: none; }
    .nav-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
    .nav-actions .btn-label { display: none; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 136px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-title { font-size: clamp(32px, 4.4vw, 48px); font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; text-wrap: balance; }
.section-lead { margin-top: 14px; max-width: 60ch; color: var(--text-2); font-size: 18px; }
.section-meta { color: var(--text-3); font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.accent { color: var(--orange); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 0; overflow: hidden; }
.hero .wrap { min-height: calc(100svh - var(--nav-h)); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 56px); align-items: stretch; }
.hero-grid > :first-child { align-self: center; padding: clamp(40px, 6vw, 72px) 0; }
.hero-hello { font-size: clamp(20px, 2.2vw, 26px); font-weight: 400; color: var(--text-2); letter-spacing: -0.01em; display: block; margin-bottom: 6px; }
.hero h1 { font-size: clamp(44px, 5.4vw, 76px); font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.hero h1 .name { color: var(--text); }
.hero h1 .dot { color: var(--orange); }
.hero-role { margin-top: 22px; font-size: clamp(18px, 1.7vw, 21px); font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.hero-intro { margin-top: 12px; max-width: 54ch; color: var(--text-2); font-size: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 15px; }
.hero-facts span { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts i { color: var(--orange); font-size: 13px; }

.portrait { position: relative; align-self: stretch; min-height: 520px; }
.portrait img { position: absolute; left: 50%; bottom: 0; translate: -50% 0; height: calc(100% - 24px); width: auto; max-width: none; object-fit: contain; object-position: bottom; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-text { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.7; color: var(--text); }
.focus-list { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.focus-list li { display: flex; gap: 14px; align-items: flex-start; padding: 20px 16px 20px 0; border-bottom: 1px solid var(--line); }
.focus-list i { color: var(--orange); width: 18px; margin-top: 4px; }
.focus-list b { display: block; font-size: 16px; }
.focus-list span { color: var(--text-3); font-size: 15px; }

/* ---------- Education timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); position: relative; }
.timeline::before { content: ''; position: absolute; left: 0; right: 0; top: 27px; height: 1px; background: var(--line-2); }
.tl-item { position: relative; padding-right: 24px; }
.tl-logo { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); padding: 4px; }
.tl-logo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.tl-item.is-current .tl-logo { border-color: var(--orange); border-width: 2px; }
.tl-years { margin-top: 20px; font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; font-weight: 700; }
.tl-item.is-current .tl-years { color: var(--text); }
.tl-school { margin-top: 6px; font-size: 18px; font-weight: 700; line-height: 1.35; }
.tl-level { margin-top: 4px; color: var(--text-2); font-size: 16px; }
.tl-major { margin-top: 6px; color: var(--text-3); font-size: 15px; }

/* ---------- Skills ---------- */
.skills { border-top: 1px solid var(--line); }
.skill-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: center; }
.skill-cat { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; }
.skill-cat i { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--orange-soft); color: var(--orange); font-size: 15px; }
.skill-items { display: flex; flex-wrap: wrap; gap: 10px; }
.skill {
    display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px 0 8px;
    border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
    font-size: 16px; color: var(--text); transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.skill:hover { border-color: var(--line-2); background: var(--surface-2); }
.skill img { width: 28px; height: 28px; object-fit: contain; }

/* ---------- Projects ---------- */
.projects { display: grid; gap: clamp(56px, 8vw, 104px); }
.project { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(28px, 4.5vw, 64px); align-items: start; }
.project:nth-child(even) .project-media { order: 2; }
.project-media { position: sticky; top: calc(var(--nav-h) + 24px); }
.browser {
    display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface);
    border: 1px solid var(--line-2); box-shadow: var(--shadow-lift);
    transition: transform .5s var(--ease), border-color .3s var(--ease);
}
.browser:hover { transform: translateY(-4px); border-color: rgba(255, 82, 0, 0.5); }
.browser-bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; background: #161616; border-bottom: 1px solid var(--line); }
.browser-dots { display: flex; gap: 6px; }
.browser-dots i { width: 10px; height: 10px; border-radius: 50%; background: #2c2c2c; }
.browser-url { flex: 1; height: 22px; border-radius: 6px; background: #0e0e0e; border: 1px solid var(--line); color: var(--text-3); font-size: 13px; line-height: 20px; padding: 0 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.browser-shot { background: #0e0e0e; }
.browser-shot img { width: 100%; height: auto; }

.project-title { overflow-wrap: anywhere; font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.12; }
.project-summary { margin-top: 12px; color: var(--text-2); font-size: 18px; }
.project-award {
    margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
    background: var(--orange-soft); border: 1px solid rgba(255, 82, 0, 0.28); color: var(--text); font-size: 15px; font-weight: 700;
}
.project-award i { color: var(--orange); }
.project-award button { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 180, 143, 0.5); }
.project-award button:hover { color: var(--text); }
.project-award button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.dl { margin-top: 26px; display: grid; gap: 22px; }
.dl dt { font-size: 14px; font-weight: 700; color: var(--text-3); }
.dl dd { margin: 6px 0 0; color: var(--text); font-size: 16.5px; }
.features li { position: relative; padding: 7px 0 7px 26px; color: var(--text-2); font-size: 16.5px; border-bottom: 1px solid var(--line); }
.features li:last-child { border-bottom: 0; }
.features li::before { content: ''; position: absolute; left: 4px; top: 17px; width: 8px; height: 8px; border-radius: 2px; background: var(--orange); transform: rotate(45deg); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* ---------- Graphics teaser ---------- */
.graphics-band { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.graphics-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
.graphics-strip a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(26, 11, 3, 0.3); background: #0a0a0a; box-shadow: 0 18px 40px -18px rgba(26, 11, 3, 0.7); }
.graphics-strip a:nth-child(2) { transform: translateY(28px); }
.graphics-strip img { width: 100%; height: auto; transition: transform .8s var(--ease); }
.graphics-strip a:hover img { transform: scale(1.05); }

/* ---------- Experience ---------- */
.exp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.exp {
    display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0; text-align: left; width: 100%;
    border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line);
    cursor: pointer; padding: 0; transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .4s var(--ease);
}
.exp:last-child:nth-child(odd) { grid-column: 1 / -1; }
.exp:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }
.exp-media { position: relative; min-height: 100%; background: #0e0e0e; }
.exp-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.exp-count { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 8px; background: rgba(10, 10, 10, 0.8); font-size: 13px; color: var(--text); }
.exp-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; }
.exp-title { font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--text); }
.exp-desc { color: var(--text-2); font-size: 16px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.exp-more { margin-top: auto; padding-top: 6px; font-size: 14.5px; font-weight: 700; color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; }
.exp:hover .exp-more { color: var(--text); }
.exp-more i { color: var(--orange); }

/* ---------- Certificates ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); width: fit-content; }
.filter {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 9px;
    border: 0; background: transparent; color: var(--text-2); font-size: 15px; font-weight: 700; cursor: pointer;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 4px 12px -4px rgba(0, 0, 0, 0.6); }
.filter .n { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.filter[aria-pressed="true"] .n { color: var(--orange); }
.cert-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.cert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.cert {
    display: flex; flex-direction: column; text-align: left; width: 100%; padding: 0; cursor: pointer;
    border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden;
    transition: border-color .25s var(--ease), transform .4s var(--ease), background-color .25s var(--ease);
}
.cert:hover { border-color: rgba(255, 82, 0, 0.45); transform: translateY(-3px); background: var(--surface-2); }
.cert-thumb { position: relative; display: block; background: #0d0d0d; border-bottom: 1px solid var(--line); padding: 10px; }
.cert-thumb img { width: 100%; height: auto; border-radius: 4px; }
.cert-thumb .zoom { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: rgba(10, 10, 10, 0.8); border: 1px solid var(--line-2); color: var(--text); font-size: 13px; opacity: 0; transition: opacity .2s var(--ease); }
.cert:hover .zoom, .cert:focus-visible .zoom { opacity: 1; }
.cert-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.badge { position: absolute; left: 10px; top: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 8px; background: rgba(10, 10, 10, 0.82); border: 1px solid var(--line-2); font-size: 13px; font-weight: 700; color: var(--text-2); }
.badge.award { color: var(--text); border-color: rgba(255, 82, 0, 0.4); }
.badge i { font-size: 11px; }
.cert-title { font-size: 16.5px; font-weight: 700; line-height: 1.55; color: var(--text); }
.cert-type { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.cert-type i { font-size: 11px; color: var(--orange); }
.cert-type.award { color: var(--text); }
.cert-issuer { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-3); }
.cert-issuer time { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Contact ---------- */
.contact { text-align: center; padding: clamp(96px, 12vw, 160px) 0; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.contact > * { position: relative; }
.contact h2 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; text-wrap: balance; }
.contact p { margin: 18px auto 0; max-width: 52ch; color: var(--text-2); font-size: 18px; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.socials { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.social { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--text-2); font-size: 18px; transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease); }
.social:hover { color: var(--orange); border-color: rgba(255, 82, 0, 0.5); background: var(--orange-soft); }

.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--text-3); font-size: 15px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

/* ---------- Lightbox / viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(6, 6, 6, 0.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.viewer.is-open { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.viewer-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--gutter); }
.viewer-count { color: var(--text-3); font-size: 15px; font-variant-numeric: tabular-nums; }
.viewer-stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 0 clamp(16px, 7vw, 96px); min-height: 0; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9); }
.viewer-info { padding: 16px var(--gutter) 22px; text-align: center; }
.viewer-info h2 { font-size: 18px; font-weight: 700; max-width: 70ch; margin: 0 auto; }
.viewer-info p { margin-top: 4px; color: var(--text-3); font-size: 15px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); background: rgba(20, 20, 20, 0.9); color: var(--text); cursor: pointer; font-size: 16px; transition: background-color .2s var(--ease), border-color .2s var(--ease); }
.icon-btn:hover { background: var(--orange-deep); border-color: var(--orange-deep); color: var(--text); }
.viewer-prev, .viewer-next { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer-prev { left: clamp(8px, 2vw, 28px); }
.viewer-next { right: clamp(8px, 2vw, 28px); }
.viewer[data-single="true"] .viewer-prev, .viewer[data-single="true"] .viewer-next { display: none; }

/* ---------- Gallery page ---------- */
.page-hero { padding: clamp(56px, 8vw, 104px) 0 clamp(36px, 5vw, 56px); }
.page-hero .back { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 15px; margin-bottom: 28px; }
.page-hero .back:hover { color: var(--text); }
.page-hero h1 { font-size: clamp(44px, 7vw, 84px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.04; }
.page-hero p { margin-top: 16px; max-width: 56ch; color: var(--text-2); font-size: 18px; }
.masonry { column-count: 1; column-gap: 20px; }
@media (min-width: 640px) { .masonry { column-count: 2; } }
@media (min-width: 1024px) { .masonry { column-count: 3; } }
.work { break-inside: avoid; margin: 0 0 20px; display: block; width: 100%; padding: 0; text-align: left; cursor: pointer; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: border-color .25s var(--ease), transform .4s var(--ease); }
.work:hover { border-color: rgba(255, 82, 0, 0.45); transform: translateY(-3px); }
.work-img { overflow: hidden; background: #0e0e0e; }
.work-img img { width: 100%; height: auto; transition: transform .9s var(--ease); }
.work:hover .work-img img { transform: scale(1.03); }
.work-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.work-title { font-size: 16px; font-weight: 700; color: var(--text); }
.work-cat { font-size: 13.5px; font-weight: 700; color: var(--text); }
.empty { text-align: center; padding: 80px 0; color: var(--text-3); }
.empty i { font-size: 36px; color: rgba(255, 82, 0, 0.5); display: block; margin-bottom: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) { .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
    .hero-grid, .about-grid, .graphics-band { grid-template-columns: minmax(0, 1fr); }
    .hero .wrap { min-height: 0; }
    .hero-grid > :first-child { padding: 40px 0 8px; }
    .portrait { min-height: 0; height: min(78svh, 640px, 145vw); }
    .project { grid-template-columns: minmax(0, 1fr); }
    .project > * { min-width: 0; }
    .project:nth-child(even) .project-media { order: 0; }
    .project-media { position: static; }
    .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
    .timeline::before { display: none; }
    .exp-grid { grid-template-columns: 1fr; }
    .skill-row { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 600px) {
    body { font-size: 16.5px; }
    .section-head { grid-template-columns: 1fr; }
    .focus-list { grid-template-columns: 1fr; }
    .timeline { grid-template-columns: 1fr; row-gap: 28px; }
    .tl-item { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; padding-right: 0; }
    .tl-item .tl-years { margin-top: 0; grid-column: 2; }
    .tl-item .tl-logo { grid-row: span 4; }
    .exp { grid-template-columns: 1fr; }
    .exp-media { aspect-ratio: 16 / 9; }
    .cert-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .cert-body { padding: 12px 12px 14px; }
    .cert-title { font-size: 15px; }
    .cert-issuer { flex-direction: column; gap: 2px; }
    .filters { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
    .filters::-webkit-scrollbar { display: none; }
    .filter { padding: 0 10px; white-space: nowrap; flex: none; }
    .exp:last-child:nth-child(odd) { grid-template-columns: 1fr; }
    .graphics-strip a:nth-child(2) { transform: translateY(16px); }
    .hero-cta .btn { flex: 1; justify-content: center; }
}

/* ---------- Orange emphasis ---------- */
.section-title::after { content: '.'; color: var(--orange); }
.filter[aria-pressed="true"] { background: var(--orange-deep); color: var(--orange-ink); box-shadow: none; }
.filter[aria-pressed="true"] .n { color: var(--text); opacity: .85; }
.skill-cat i { background: var(--orange-deep); color: #fff; }
.skill:hover { border-color: rgba(255, 82, 0, 0.5); }
.chip { background: var(--orange-soft); border-color: rgba(255, 82, 0, 0.3); color: var(--text); }
.timeline::before { background: rgba(255, 82, 0, 0.45); }
.tl-logo { border-color: rgba(255, 82, 0, 0.5); }
.focus-list { border-top-color: rgba(255, 82, 0, 0.4); }
.focus-list i { width: 34px; height: 34px; border-radius: 9px; margin-top: 0; display: inline-flex; align-items: center; justify-content: center; flex: none; background: var(--orange-deep); color: #fff; font-size: 15px; }
.browser { border-color: rgba(255, 82, 0, 0.35); }
.browser-bar { background: var(--orange-deep); border-bottom-color: rgba(10, 10, 10, 0.2); }
.browser-dots i { background: rgba(10, 10, 10, 0.35); }
.browser-url { background: rgba(0, 0, 0, 0.22); border-color: transparent; color: var(--text); }
.exp:hover, .cert:hover, .work:hover { border-color: var(--orange); }
.exp-more { color: var(--text); }
.exp-more i { color: var(--orange); }
.nav { border-bottom-color: rgba(255, 82, 0, 0.35); }
.nav.is-scrolled { border-bottom-color: var(--orange); }
.footer { border-top: 2px solid var(--orange); }

/* Sections drenched in orange: white text on deep orange */
.on-orange { background: var(--orange-deep); color: #fff; border-top: 0; }
.on-orange ::selection { background: #0a0a0a; color: #fff; }
.on-orange .section-title, .on-orange h1, .on-orange h2, .on-orange p, .on-orange .section-lead { color: #fff; }
.on-orange .section-title::after { color: var(--orange); }
.on-orange .btn-primary { background: #0a0a0a; color: #fff; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.8); }
.on-orange .btn-primary:hover { background: #1f1f1f; }
.on-orange .btn-ghost { background: rgba(0, 0, 0, 0.14); border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.on-orange .btn-ghost:hover { background: rgba(0, 0, 0, 0.26); border-color: #fff; }
.on-orange :focus-visible { outline-color: #fff; }
.on-orange .accent { color: var(--orange); }
.hero.on-orange .hero-hello, .hero.on-orange h1 .name, .hero.on-orange .hero-role, .hero.on-orange .hero-intro { color: #fff; }
.hero.on-orange h1 .dot { color: var(--orange); }
.hero.on-orange .hero-facts { border-top-color: rgba(255, 255, 255, 0.3); color: #fff; }
.hero.on-orange .hero-facts i { color: #fff; }
.hero.on-orange + .section, .on-orange + .section, .page-hero.on-orange + .section { border-top: 0; }
.contact.on-orange .social { border-color: rgba(255, 255, 255, 0.5); background: rgba(0, 0, 0, 0.14); color: #fff; }
.contact.on-orange .social:hover { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.page-hero.on-orange .back { color: #fff; }

/* ---------- Motion (scroll animations come from AOS via js/motion.js) ---------- */
.section-title, .section-title-plain { display: inline-block; vertical-align: top; }
/* Hover feedback stays as quick state transitions */
.btn i { transition: transform .25s var(--ease); }
.btn:hover .fa-arrow-down { transform: translateY(3px); }
.btn:hover .fa-arrow-right { transform: translateX(3px); }
.btn:hover .fa-arrow-left { transform: translateX(-3px); }
.btn:hover .fa-arrow-up-right-from-square { transform: translate(2px, -2px); }
.btn.is-done { background: var(--orange); border-color: var(--orange); color: #fff; }
.exp-more i { transition: transform .3s var(--ease); }
.exp:hover .exp-more i { transform: translateX(4px); }
.exp-media img { transition: transform .9s var(--ease); }
.exp:hover .exp-media img { transform: scale(1.05); }
.cert .cert-thumb img { transition: transform .6s var(--ease); }
.cert:hover .cert-thumb img { transform: scale(1.02); }
.skill img { transition: transform .35s var(--ease); }
.skill:hover img { transform: translateY(-2px) rotate(-6deg); }
.social i { transition: transform .3s var(--ease); }
.social:hover i { transform: scale(1.15); }
.filter { transition: background-color .25s var(--ease), color .25s var(--ease); }
.btn, .social { transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.browser { transition: transform .5s var(--ease), border-color .3s var(--ease); }
.browser:hover { transform: translateY(-4px); }

/* Cursor spotlight on cards */
.exp, .cert, .work { position: relative; isolation: isolate; }
.exp::before, .cert::before, .work::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 82, 0, 0.16), transparent 70%);
    opacity: 0; transition: opacity .3s var(--ease);
}
.exp:hover::before, .cert:hover::before, .work:hover::before { opacity: 1; }

/* Ribbon: a tilted black band of skills crossing the hero's bottom edge */
.ribbon { position: relative; z-index: 3; margin: -34px -4vw 0; padding: 18px 0; background: #0a0a0a; transform: rotate(-2deg); overflow: hidden; border-block: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9); }
.ribbon-track { display: flex; align-items: center; gap: 28px; padding-right: 28px; width: max-content; animation: ribbonLoop 45s linear infinite; }
@keyframes ribbonLoop { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ribbon-track span { font-size: clamp(20px, 2.4vw, 32px); font-weight: 800; letter-spacing: -0.02em; color: #fff; white-space: nowrap; text-transform: uppercase; }
.ribbon-track i { width: 12px; height: 12px; background: var(--orange); transform: rotate(45deg); flex: none; }
.ribbon + .section { border-top: 0; padding-top: clamp(104px, 13vw, 160px); }

/* Giant type rows scrubbed across the screen between sections */
.giant { overflow: hidden; padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.giant + .section { border-top: 0; }
.giant-row { display: flex; align-items: center; gap: 0.35em; width: max-content; font-size: clamp(64px, 13vw, 200px); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; text-transform: uppercase; white-space: nowrap; }
.giant-row i { width: 0.22em; height: 0.22em; background: var(--orange); transform: rotate(45deg); flex: none; }
.giant-solid { color: #fff; }
.giant-outline { color: transparent; -webkit-text-stroke: 2px var(--orange); margin-left: -30vw; }
.giant-outline i { background: transparent; border: 2px solid var(--orange); }

/* Shape layers on the orange bands */
.hero > .wrap, .contact > .wrap { position: relative; z-index: 1; }
.mg-shapes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.mg-shapes * { vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; }
.mg-ring { fill: none; stroke: rgba(255, 255, 255, 0.45); stroke-width: 2; }
.mg-dash { fill: none; stroke: #0a0a0a; stroke-width: 3; stroke-dasharray: 6 12; }
.mg-square { fill: none; stroke: #fff; stroke-width: 3; }
.mg-dot { fill: #0a0a0a; }
.mg-zig { fill: none; stroke: #0a0a0a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.mg-plus line { stroke: #fff; stroke-width: 4; stroke-linecap: round; }
.mg-grid circle { fill: rgba(255, 255, 255, 0.55); }

/* Shape bursts beside section titles */
.mg-burst { position: relative; display: inline-block; width: 64px; height: 40px; margin-left: 14px; vertical-align: top; }
.mg-burst i { position: absolute; display: block; }
.mg-burst .b-ring { left: 0; top: 4px; width: 22px; height: 22px; border: 3px solid var(--orange); border-radius: 50%; }
.mg-burst .b-square { left: 30px; top: 0; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); }
.mg-burst .b-plus { left: 46px; top: 18px; width: 16px; height: 16px; background: linear-gradient(#fff, #fff) center / 100% 3px no-repeat, linear-gradient(#fff, #fff) center / 3px 100% no-repeat; }
.mg-burst .b-line { left: 26px; top: 32px; width: 30px; height: 3px; background: var(--orange); border-radius: 2px; transform-origin: left center; }
.on-orange .mg-burst .b-ring { border-color: #0a0a0a; }
.on-orange .mg-burst .b-line { background: #0a0a0a; }

@media (max-width: 600px) {
    .ribbon { margin-top: -22px; padding: 12px 0; }
    .ribbon-track { gap: 18px; padding-right: 18px; animation-duration: 30s; }
    .ribbon-track i { width: 9px; height: 9px; }
    .giant-outline { -webkit-text-stroke-width: 1.5px; }
    .mg-burst { width: 48px; height: 32px; margin-left: 8px; transform: scale(.8); transform-origin: left top; }
    .mg-hero .mg-ring { stroke-width: 1.5; }
}
@media (max-width: 960px) {
    .mg-hero .mg-grid, .mg-hero .mg-dot, .mg-hero .mg-zig, .mg-hero .mg-square { display: none; }
}

/* Small text on orange bands is near-black for contrast (6:1); large headings stay white */
.on-orange .section-lead, .on-orange p, .page-hero.on-orange p { color: #0a0a0a; }
.hero.on-orange .hero-intro { color: #0a0a0a; }
.hero.on-orange .hero-facts { color: #0a0a0a; border-top-color: rgba(10, 10, 10, 0.25); }
.hero.on-orange .hero-facts i { color: #0a0a0a; }
.on-orange .btn-ghost { color: #0a0a0a; border-color: rgba(10, 10, 10, 0.45); background: rgba(255, 255, 255, 0.12); }
.on-orange .btn-ghost:hover { border-color: #0a0a0a; background: rgba(255, 255, 255, 0.24); }
.page-hero.on-orange .back { color: #0a0a0a; }

/* Graphics band on the home page keeps all its text white */
#graphics.on-orange .section-lead { color: #fff; }
#graphics.on-orange .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.6); background: rgba(0, 0, 0, 0.14); }
#graphics.on-orange .btn-ghost:hover { border-color: #fff; background: rgba(0, 0, 0, 0.26); }

/* Hero intro card keeps all its text white */
.hero.on-orange p, .hero.on-orange .hero-intro, .hero.on-orange h1 .dot { color: #fff; }
.hero.on-orange .hero-facts { color: #fff; border-top-color: rgba(255, 255, 255, 0.3); }
.hero.on-orange .hero-facts i { color: #fff; }
.hero.on-orange .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.6); background: rgba(0, 0, 0, 0.14); }
.hero.on-orange .btn-ghost:hover { border-color: #fff; background: rgba(0, 0, 0, 0.26); }
