/* ============================================================
   RISO — Graphic Designer Portfolio Template
   Neo-brutalist / high-contrast system: warm near-white canvas,
   ink-black, electric ultramarine primary + acid-lime highlight,
   thick borders, hard offset shadows, rotated sticker tags, a
   running marquee, and a chunky Syne + Space Grotesk pairing.
   Stack: HTML5 + CSS3 + vanilla JS (no frameworks).
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Light (default) */
  --paper:  #F3F1E8;   /* warm near-white canvas */
  --panel:  #FFFFFF;
  --ink:    #17140D;   /* near-black */
  --ink-soft:#4C4636;
  --blue:   #2E2BF5;   /* electric ultramarine — primary */
  --blue-ink:#FFFFFF;  /* text on blue */
  --lime:   #CDF23F;   /* acid highlight — secondary */
  --pink:   #FF5C8A;   /* tertiary pop (rare) */
  --border: #17140D;
  --shadow: #17140D;
  --sh: 6px;           /* hard shadow offset */

  --f-display: "Syne", system-ui, sans-serif;
  --f-body:    "Space Grotesk", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(18px, 5vw, 56px);
  --sp: clamp(70px, 10vw, 138px);
  --r: 4px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --nav-h: 74px;
}

html[data-theme="dark"] {
  --paper:  #14130D;
  --panel:  #1E1C13;
  --ink:    #F3F1E8;
  --ink-soft:#B4AE99;
  --blue:   #7C7AFF;
  --blue-ink:#14130D;
  --lime:   #CDF23F;
  --pink:   #FF7DA1;
  --border: #F3F1E8;
  --shadow: #000000;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--lime); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- 3. TYPE HELPERS ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: .55em; font-family: var(--f-body); font-weight: 700; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow__dot { width: 10px; height: 10px; background: var(--lime); border: 2px solid var(--border); border-radius: 50%; }
.s-head { margin-bottom: clamp(32px, 5vw, 58px); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.s-head--split { justify-content: space-between; align-items: flex-end; }
.s-head--split > div { display: flex; align-items: center; gap: 18px; }
.s-head__idx {
  font-family: var(--f-body); font-weight: 700; font-size: .8rem; letter-spacing: .04em;
  background: var(--blue); color: var(--blue-ink); border: 2.5px solid var(--border);
  padding: 6px 12px; border-radius: 40px; box-shadow: 3px 3px 0 var(--shadow); white-space: nowrap;
}
.s-head__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem, 6.4vw, 4.4rem); line-height: .96; letter-spacing: -.02em; }

/* ---------- 4. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--f-body); font-weight: 700; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 13px 22px; border: 2.5px solid var(--border); border-radius: var(--r);
  box-shadow: var(--sh) var(--sh) 0 var(--shadow);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.btn:hover { transform: translate(var(--sh), var(--sh)); box-shadow: 0 0 0 var(--shadow); }
.btn--solid { background: var(--blue); color: var(--blue-ink); }
.btn--line { background: var(--panel); color: var(--ink); }
.btn--line:hover { background: var(--lime); color: var(--ink); }
.btn--lg { padding: 16px 28px; font-size: .9rem; }

/* ---------- 5. NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 100; background: var(--paper);
  border-bottom: 3px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 40px; height: 40px; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 1.05rem;
  background: var(--lime); color: var(--ink); border: 2.5px solid var(--border); border-radius: var(--r);
  box-shadow: 3px 3px 0 var(--shadow);
}
.brand__name { font-family: var(--f-display); font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; }

.nav__links { display: flex; gap: 26px; }
.nav__links a { font-family: var(--f-body); font-weight: 600; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); position: relative; padding: 4px 0; transition: color .25s var(--ease); }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 3px; width: 0; background: var(--blue); transition: width .3s var(--ease); }
.nav__links a:hover, .nav__links a.active { color: var(--ink); }
.nav__links a.active::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: 14px; }
.theme-toggle { width: 44px; height: 32px; border: 2.5px solid var(--border); border-radius: 40px; position: relative; display: grid; place-items: center; background: var(--panel); box-shadow: 2px 2px 0 var(--shadow); }
.theme-toggle span { position: absolute; font-size: .9rem; line-height: 1; transition: opacity .3s var(--ease), transform .3s var(--ease); }
[data-ic-sun] { opacity: 0; transform: scale(.6) rotate(-40deg); }
[data-ic-moon] { opacity: 1; }
html[data-theme="dark"] [data-ic-sun] { opacity: 1; transform: none; }
html[data-theme="dark"] [data-ic-moon] { opacity: 0; transform: scale(.6); }
.nav__cta { padding: 9px 18px; box-shadow: 3px 3px 0 var(--shadow); }
.nav__cta:hover { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--shadow); }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; border: 2.5px solid var(--border); border-radius: var(--r); background: var(--panel); box-shadow: 2px 2px 0 var(--shadow); }
.hamburger span { width: 22px; height: 2.5px; background: var(--ink); transition: transform .3s var(--ease), opacity .25s var(--ease); }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.nav__progress { position: absolute; left: 0; bottom: -3px; height: 3px; width: 0; background: var(--lime); }

/* ---------- 6. HERO ---------- */
.hero { padding: clamp(40px, 6vw, 76px) 0 0; }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 70px); align-items: center; padding-bottom: clamp(40px, 6vw, 76px); }
.eyebrow { margin-bottom: 22px; }
.hero__name { font-family: var(--f-display); font-weight: 800; font-size: clamp(3rem, 9vw, 6.4rem); line-height: .9; letter-spacing: -.03em; margin-bottom: 12px; }
.hero__role { font-family: var(--f-body); font-weight: 600; font-size: clamp(.9rem, 1.6vw, 1.1rem); letter-spacing: .02em; margin-bottom: 24px; color: var(--ink-soft); }
.hero__typed { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.2rem, 2.6vw, 1.9rem); line-height: 1.2; letter-spacing: -.01em; min-height: 1.3em; margin-bottom: 20px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hero__typed-lbl { font-family: var(--f-body); font-weight: 700; font-size: .62rem; letter-spacing: .14em; background: var(--ink); color: var(--paper); padding: 4px 8px; border-radius: 30px; align-self: center; }
.caret { display: inline-block; width: 12px; height: 1.05em; background: var(--blue); transform: translateY(3px); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__intro { max-width: 46ch; color: var(--ink-soft); margin-bottom: 30px; }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__figure { position: relative; }
.hero__frame { border: 3px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: 10px 10px 0 var(--blue); background: var(--panel); }
.hero__frame img { aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.sticker { position: absolute; font-family: var(--f-display); font-weight: 800; border: 2.5px solid var(--border); box-shadow: 4px 4px 0 var(--shadow); }
.sticker--avail { bottom: -18px; left: -18px; background: var(--lime); color: var(--ink); font-size: .74rem; line-height: 1.05; text-align: center; padding: 12px 14px; border-radius: 50%; width: 92px; height: 92px; display: grid; place-items: center; transform: rotate(-10deg); }
.sticker--star { top: -20px; right: -14px; width: 52px; height: 52px; background: var(--pink); color: var(--ink); border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; transform: rotate(8deg); animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(368deg); } }

/* marquee */
.marquee { border-block: 3px solid var(--border); background: var(--blue); color: var(--blue-ink); overflow: hidden; padding: 14px 0; }
.marquee__track { display: flex; gap: 0; white-space: nowrap; width: max-content; animation: marquee 26s linear infinite; }
.marquee__track span { font-family: var(--f-display); font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; text-transform: uppercase; padding: 0 26px; display: inline-flex; align-items: center; gap: 26px; }
.marquee__track span::after { content: "✺"; color: var(--lime); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 7. SECTION SHELL ---------- */
.section { padding: var(--sp) 0; position: relative; }
.section--panel { background: var(--panel); border-block: 3px solid var(--border); }

/* ---------- 8. ABOUT ---------- */
.about { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.about__lead { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.35rem, 2.8vw, 2rem); line-height: 1.25; letter-spacing: -.01em; margin-bottom: 26px; }
.about__lead mark, .about__lead .hl { background: var(--lime); padding: 0 .1em; }
.about__text p { color: var(--ink-soft); margin-bottom: 16px; max-width: 60ch; }
.about__facts { border: 3px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh) var(--sh) 0 var(--shadow); background: var(--panel); }
.about__facts li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 2px solid var(--border); }
.about__facts li:last-child { border-bottom: none; }
.about__facts li:nth-child(even) { background: var(--paper); }
.about__facts .k { font-family: var(--f-body); font-weight: 600; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.about__facts .v { font-family: var(--f-display); font-weight: 700; }

/* ---------- 9. SKILLS ---------- */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 46px) clamp(36px, 6vw, 72px); }
.skill__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.skill__name { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; }
.skill__pct { font-family: var(--f-body); font-weight: 700; font-size: .82rem; }
.skill__bar { height: 16px; background: var(--paper); border: 2.5px solid var(--border); border-radius: 30px; overflow: hidden; padding: 2px; }
html[data-theme="dark"] .skill__bar { background: var(--panel); }
.skill__fill { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 30px; transition: width 1.2s var(--ease); }
.skill:nth-child(3n+2) .skill__fill { background: var(--lime); }
.skill:nth-child(3n+3) .skill__fill { background: var(--pink); }

/* ---------- 10. EXPERIENCE ---------- */
.xp { display: grid; gap: 18px; }
.xp-item { border: 3px solid var(--border); border-radius: var(--r); background: var(--panel); padding: clamp(20px, 3vw, 30px); box-shadow: var(--sh) var(--sh) 0 var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start; transition: transform .16s var(--ease), box-shadow .16s var(--ease); }
.xp-item:hover { transform: translate(var(--sh), var(--sh)); box-shadow: 0 0 0 var(--shadow); }
.xp-item__date { font-family: var(--f-body); font-weight: 700; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; background: var(--lime); color: var(--ink); border: 2px solid var(--border); border-radius: 30px; padding: 6px 12px; white-space: nowrap; }
.xp-item__role { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.1; }
.xp-item__org { font-family: var(--f-body); font-weight: 600; font-size: .86rem; color: var(--blue); margin: 5px 0 10px; }
html[data-theme="dark"] .xp-item__org { color: var(--blue); }
.xp-item__desc { color: var(--ink-soft); max-width: 62ch; }

/* ---------- 11. EDUCATION ---------- */
.edu { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.edu-card { border: 3px solid var(--border); border-radius: var(--r); padding: 26px; background: var(--paper); box-shadow: var(--sh) var(--sh) 0 var(--shadow); transition: transform .16s var(--ease), box-shadow .16s var(--ease); }
html[data-theme="dark"] .edu-card { background: var(--panel); }
.edu-card:hover { transform: translate(var(--sh), var(--sh)); box-shadow: 0 0 0 var(--shadow); }
.edu-card__year { font-family: var(--f-body); font-weight: 700; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; display: inline-block; background: var(--blue); color: var(--blue-ink); padding: 4px 10px; border-radius: 30px; border: 2px solid var(--border); }
.edu-card__deg { font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; margin: 14px 0 5px; }
.edu-card__school { font-weight: 600; color: var(--ink-soft); }
.edu-card__note { color: var(--ink-soft); font-size: .9rem; margin-top: 12px; }

/* ---------- 12. WORK (projects) ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn { font-family: var(--f-body); font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: 8px 15px; border: 2.5px solid var(--border); border-radius: 30px; background: var(--panel); box-shadow: 2px 2px 0 var(--shadow); transition: transform .14s var(--ease), box-shadow .14s var(--ease), background .25s var(--ease); }
.filter-btn:hover { transform: translate(2px,2px); box-shadow: 0 0 0 var(--shadow); }
.filter-btn.active { background: var(--blue); color: var(--blue-ink); }

.work { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: clamp(22px, 3vw, 34px); }
.card { border: 3px solid var(--border); border-radius: var(--r); overflow: hidden; background: var(--panel); box-shadow: var(--sh) var(--sh) 0 var(--shadow); display: flex; flex-direction: column; transition: transform .16s var(--ease), box-shadow .16s var(--ease); }
.card:hover { transform: translate(var(--sh), var(--sh)); box-shadow: 0 0 0 var(--shadow); }
.card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; border-bottom: 3px solid var(--border); background: var(--paper); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__idx { position: absolute; top: 12px; left: 12px; font-family: var(--f-display); font-weight: 800; font-size: .72rem; background: var(--lime); color: var(--ink); border: 2px solid var(--border); border-radius: 30px; padding: 5px 10px; }
.card__tag { position: absolute; top: 12px; right: 12px; font-family: var(--f-body); font-weight: 700; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--paper); border-radius: 30px; padding: 5px 10px; }
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__name { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; }
.card__meta { font-family: var(--f-body); font-weight: 600; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); margin-top: -4px; }
html[data-theme="dark"] .card__meta { color: var(--blue); }
.card__desc { color: var(--ink-soft); font-size: .92rem; }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.card__tags span { font-family: var(--f-body); font-weight: 600; font-size: .66rem; letter-spacing: .04em; padding: 4px 9px; border: 2px solid var(--border); border-radius: 30px; }
.card__links { display: flex; gap: 10px; padding: 0 20px 20px; }
.card__links a { flex: 1; justify-content: center; padding: 11px; font-size: .72rem; box-shadow: 3px 3px 0 var(--shadow); }
.card__links a:hover { transform: translate(3px,3px); box-shadow: 0 0 0 var(--shadow); }

/* ---------- 13. STATS ---------- */
.stats { background: var(--lime); border-block: 3px solid var(--border); }
html[data-theme="dark"] .stats { background: var(--panel); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { text-align: center; padding: 8px 16px; position: relative; }
.stat:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 14%; height: 72%; width: 3px; background: var(--border); }
.stat__num { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.6rem, 6.5vw, 4.4rem); line-height: 1; color: var(--ink); letter-spacing: -.02em; }
.stat__label { font-family: var(--f-body); font-weight: 700; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; margin-top: 12px; color: var(--ink); }

/* ---------- 14. SERVICES ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.service { border: 3px solid var(--border); border-radius: var(--r); background: var(--paper); padding: 30px 26px; box-shadow: var(--sh) var(--sh) 0 var(--shadow); transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .25s var(--ease); }
html[data-theme="dark"] .service { background: var(--panel); }
.service:hover { transform: translate(var(--sh), var(--sh)); box-shadow: 0 0 0 var(--shadow); background: var(--blue); color: var(--blue-ink); }
.service:hover .service__no, .service:hover .service__desc { color: var(--blue-ink); }
.service__no { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; color: var(--blue); }
.service__title { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; margin: 12px 0 10px; }
.service__desc { color: var(--ink-soft); font-size: .92rem; }

/* ---------- 15. TOOLS ---------- */
.tools { display: flex; flex-wrap: wrap; gap: 12px; }
.tools li { font-family: var(--f-body); font-weight: 700; font-size: .84rem; padding: 11px 18px; border: 2.5px solid var(--border); border-radius: 40px; background: var(--panel); box-shadow: 3px 3px 0 var(--shadow); transition: transform .14s var(--ease), box-shadow .14s var(--ease), background .25s var(--ease); }
.tools li:hover { transform: translate(3px,3px); box-shadow: 0 0 0 var(--shadow); background: var(--lime); color: var(--ink); }

/* ---------- 16. AWARDS + CERTS ---------- */
.cred { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); }
.cred__label { font-family: var(--f-body); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; display: inline-block; background: var(--ink); color: var(--paper); padding: 6px 12px; border-radius: 30px; margin-bottom: 22px; }
.awards li { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 16px 0; border-bottom: 2px solid var(--border); align-items: baseline; }
.awards li:first-child { border-top: 2px solid var(--border); }
.awards__year { font-family: var(--f-body); font-weight: 700; font-size: .82rem; color: var(--blue); }
html[data-theme="dark"] .awards__year { color: var(--blue); }
.awards__title { font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; }
.awards__by { color: var(--ink-soft); font-size: .88rem; }
.certs li { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 2px solid var(--border); }
.certs li::before { content: "✔"; font-weight: 700; color: var(--blue); }
html[data-theme="dark"] .certs li::before { color: var(--blue); }
.certs__name { font-family: var(--f-display); font-weight: 700; }
.certs__meta { display: block; font-family: var(--f-body); font-weight: 500; font-size: .74rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- 17. TESTIMONIALS ---------- */
.quotes { position: relative; min-height: 220px; }
.quote { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease); display: flex; flex-direction: column; gap: 26px; }
.quote.active { opacity: 1; visibility: visible; position: relative; }
.quote__text { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.4rem, 3.2vw, 2.3rem); line-height: 1.28; letter-spacing: -.01em; max-width: 24ch; }
.quote__text::before { content: "“"; color: var(--blue); }
.quote__by { display: flex; align-items: center; gap: 14px; }
.quote__avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2.5px solid var(--border); box-shadow: 3px 3px 0 var(--shadow); }
.quote__name { font-family: var(--f-display); font-weight: 700; }
.quote__role { font-family: var(--f-body); font-weight: 500; font-size: .78rem; color: var(--ink-soft); }
.quotes__dots { display: flex; gap: 10px; margin-top: 36px; }
.quotes__dots button { width: 34px; height: 8px; background: var(--panel); border: 2.5px solid var(--border); border-radius: 30px; transition: background .25s var(--ease); }
.quotes__dots button.active { background: var(--blue); }

/* ---------- 18. RESUME BANNER ---------- */
.resume__box { border: 3px solid var(--border); border-radius: var(--r); background: var(--lime); color: var(--ink); box-shadow: var(--sh) var(--sh) 0 var(--shadow); padding: clamp(30px, 5vw, 52px); display: flex; justify-content: space-between; align-items: center; gap: 36px; flex-wrap: wrap; }
.resume__box .s-head__idx { background: var(--ink); color: var(--paper); }
.resume__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.7rem); margin: 14px 0 10px; letter-spacing: -.02em; }
.resume__text { max-width: 46ch; }
.resume__box .btn--solid { background: var(--ink); color: var(--paper); }

/* ---------- 19. FAQ ---------- */
.faq { max-width: 860px; display: grid; gap: 14px; }
.faq-item { border: 3px solid var(--border); border-radius: var(--r); background: var(--paper); box-shadow: var(--sh) var(--sh) 0 var(--shadow); overflow: hidden; }
html[data-theme="dark"] .faq-item { background: var(--panel); }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; font-family: var(--f-display); font-weight: 700; font-size: clamp(1.02rem, 2.1vw, 1.3rem); }
.faq-q__icon { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.faq-q__icon::before, .faq-q__icon::after { content: ""; position: absolute; background: var(--blue); transition: transform .3s var(--ease); }
.faq-q__icon::before { top: 8px; left: 0; width: 18px; height: 3px; }
.faq-q__icon::after { left: 8px; top: 0; width: 3px; height: 18px; }
.faq-item.open .faq-q__icon::after { transform: scaleY(0); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .35s var(--ease); }
.faq-a p { color: var(--ink-soft); padding: 0 24px 22px; max-width: 68ch; }

/* ---------- 20. CONTACT ---------- */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact__blurb { font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; line-height: 1.3; margin-bottom: 28px; }
.contact__list { margin-bottom: 28px; }
.contact__list li { padding: 14px 0; border-bottom: 2px solid var(--border); }
.contact__list .lbl { font-family: var(--f-body); font-weight: 700; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); display: block; margin-bottom: 3px; }
.contact__list .val { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; transition: color .25s var(--ease); }
.contact__list a:hover .val { color: var(--blue); }

.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 46px; height: 46px; display: grid; place-items: center; border: 2.5px solid var(--border); border-radius: var(--r); background: var(--panel); box-shadow: 3px 3px 0 var(--shadow); transition: transform .14s var(--ease), box-shadow .14s var(--ease), background .25s var(--ease); }
.socials a:hover { transform: translate(3px,3px); box-shadow: 0 0 0 var(--shadow); background: var(--blue); color: var(--blue-ink); }
.socials svg { width: 19px; height: 19px; }

.cform { border: 3px solid var(--border); border-radius: var(--r); padding: clamp(24px, 4vw, 40px); background: var(--panel); box-shadow: var(--sh) var(--sh) 0 var(--shadow); }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; display: flex; flex-direction: column; }
.field label { font-family: var(--f-body); font-weight: 700; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.field input, .field textarea { font-family: var(--f-body); font-size: .98rem; color: var(--ink); background: var(--paper); border: 2.5px solid var(--border); border-radius: var(--r); padding: 13px 15px; transition: box-shadow .2s var(--ease); resize: vertical; }
html[data-theme="dark"] .field input, html[data-theme="dark"] .field textarea { background: var(--paper); }
.field input:focus, .field textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--blue); }
.field__err { font-family: var(--f-body); font-weight: 600; font-size: .72rem; color: var(--pink); margin-top: 6px; min-height: 1em; }
html[data-theme="dark"] .field__err { color: var(--pink); }
.cform__submit { width: 100%; justify-content: center; margin-top: 4px; }
.cform__note { font-family: var(--f-body); font-weight: 600; font-size: .82rem; margin-top: 16px; text-align: center; min-height: 1.2em; }
.cform__note.ok { color: var(--blue); }
.cform__note.bad { color: var(--pink); }

/* ---------- 21. FOOTER ---------- */
.footer { border-top: 3px solid var(--border); padding: clamp(44px, 7vw, 80px) 0 36px; background: var(--panel); }
.footer__inner { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 40px; align-items: start; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__name { font-family: var(--f-display); font-weight: 800; font-size: 1.2rem; }
.footer__title { font-family: var(--f-body); font-weight: 600; font-size: .76rem; color: var(--ink-soft); }
.footer__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; }
.footer__nav a { font-family: var(--f-body); font-weight: 600; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); transition: color .25s var(--ease); }
.footer__nav a:hover { color: var(--blue); }
.socials--footer { justify-content: flex-end; }
.footer__legal { grid-column: 1 / -1; margin-top: 40px; padding-top: 26px; border-top: 2px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--f-body); font-weight: 500; font-size: .74rem; color: var(--ink-soft); }
.footer__made strong { font-family: var(--f-display); font-weight: 800; color: var(--blue); }

/* ---------- 22. BACK TO TOP ---------- */
.to-top { position: fixed; bottom: 24px; right: 24px; z-index: 90; width: 50px; height: 50px; display: grid; place-items: center; background: var(--blue); color: var(--blue-ink); border: 2.5px solid var(--border); border-radius: var(--r); box-shadow: 4px 4px 0 var(--shadow); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s var(--ease), visibility .3s, transform .16s var(--ease); }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translate(4px,4px); box-shadow: 0 0 0 var(--shadow); }

/* ---------- 23. PRELOADER ---------- */
.preloader { position: fixed; inset: 0; z-index: 999; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; transition: opacity .5s var(--ease), visibility .5s; }
.preloader.done { opacity: 0; visibility: hidden; }
.preloader__mark { font-family: var(--f-display); font-weight: 800; font-size: 2rem; width: 76px; height: 76px; display: grid; place-items: center; background: var(--lime); color: var(--ink); border: 3px solid var(--border); border-radius: var(--r); box-shadow: 6px 6px 0 var(--blue); }
.preloader__bar { width: 160px; height: 12px; border: 2.5px solid var(--border); border-radius: 30px; overflow: hidden; padding: 2px; }
.preloader__bar span { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 30px; animation: load 1s var(--ease) forwards; }
@keyframes load { to { width: 100%; } }

/* ---------- 24. SCROLL REVEAL ---------- */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- 25. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .about, .contact, .cred { grid-template-columns: 1fr; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__figure { max-width: 400px; margin-top: 10px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 40px 0; }
  .stat:nth-child(2)::after { display: none; }
}
@media (max-width: 860px) {
  .nav__links { position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 3px solid var(--border); padding: 10px var(--gutter) 24px; transform: translateY(-130%); transition: transform .4s var(--ease); }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { padding: 15px 0; border-bottom: 2px solid var(--border); font-size: .86rem; }
  .nav__links a:last-child { border-bottom: none; }
  .hamburger { display: flex; }
  .nav__cta { display: none; }
  .skills { grid-template-columns: 1fr; }
  .xp-item { grid-template-columns: 1fr; gap: 12px; }
  .footer__inner { grid-template-columns: 1fr; }
  .socials--footer { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat::after { display: none !important; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }
  .cform__row { grid-template-columns: 1fr; }
  .resume__box { flex-direction: column; align-items: flex-start; }
}

/* ---------- 26. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
  .caret { animation: none; }
}
