/* ============================================================
   MONOLINE — Software Developer Portfolio Template
   Code-editor system: a refined deep-navy editor surface with a
   balanced multi-hue syntax palette (azure + mauve + teal + sand
   + green), an editor-window hero, git-log experience, repo
   cards, and mono-labeled sections.
   Stack: HTML5 + CSS3 + vanilla JS (no frameworks).
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Dark (default) — editor */
  --bg:       #0D1220;
  --bg-2:     #111829;
  --panel:    #151D30;
  --panel-2:  #1B2540;
  --ink:      #E7ECF6;
  --ink-soft: #8A94AC;
  --ink-faint:#5C6784;
  --azure:    #5B9DFF;   /* primary accent */
  --mauve:    #B18CFF;   /* secondary */
  --teal:     #59D6C4;
  --sand:     #F0B36B;
  --green:    #8CE68B;
  --coral:    #FF8A8A;
  --line:     rgba(139, 148, 172, .18);
  --line-soft:rgba(139, 148, 172, .1);
  --shadow:   0 30px 60px -34px rgba(0, 0, 0, .8);

  /* syntax roles */
  --sx-key:   var(--mauve);
  --sx-fn:    var(--azure);
  --sx-str:   var(--green);
  --sx-num:   var(--sand);
  --sx-attr:  var(--teal);
  --sx-punc:  var(--ink-soft);
  --sx-com:   var(--ink-faint);

  --f-display: "Schibsted Grotesk", system-ui, sans-serif;
  --f-mono:    "Fira Code", ui-monospace, monospace;

  --wrap: 1200px;
  --gutter: clamp(18px, 5vw, 56px);
  --sp: clamp(72px, 10vw, 138px);
  --r: 16px;
  --r-sm: 10px;
  --ease: cubic-bezier(.22,.7,.28,1);
  --nav-h: 74px;
}

html[data-theme="light"] {
  --bg:       #F5F7FC;
  --bg-2:     #ECEFF7;
  --panel:    #FFFFFF;
  --panel-2:  #F3F5FB;
  --ink:      #141A28;
  --ink-soft: #55607A;
  --ink-faint:#8A93AC;
  --azure:    #2F6BFF;
  --mauve:    #7C3AED;
  --teal:     #0E9384;
  --sand:     #B4610A;
  --green:    #1E7A3B;
  --coral:    #D14343;
  --line:     rgba(20, 26, 40, .12);
  --line-soft:rgba(20, 26, 40, .06);
  --shadow:   0 30px 55px -36px rgba(40, 60, 120, .4);
}

/* ---------- 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-display);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .5s var(--ease), color .5s 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: 2px solid var(--azure); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--azure) 40%, transparent); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
main { position: relative; z-index: 2; }

/* ---------- 3. AMBIENT ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; background:
  radial-gradient(50vw 40vw at 80% -6%, color-mix(in srgb, var(--azure) 22%, transparent), transparent 70%),
  radial-gradient(46vw 40vw at 8% 8%, color-mix(in srgb, var(--mauve) 18%, transparent), transparent 72%);
  opacity: .8; }

/* ---------- 4. TYPE HELPERS ---------- */
.eyebrow, .s-head__eyebrow { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .02em; color: var(--azure); display: inline-flex; align-items: center; gap: .6em; }
.s-head { margin-bottom: clamp(32px, 5vw, 54px); }
.s-head--split { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.s-head__eyebrow { margin-bottom: 14px; }
.s-head__eyebrow span[data-no] { color: var(--ink-faint); }
.s-head__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(2rem, 5.6vw, 3.7rem); line-height: 1.02; letter-spacing: -.03em; }

/* ---------- 5. BUTTONS ---------- */
.btn { display: inline-flex; align-items: center; gap: .55em; font-family: var(--f-mono); font-weight: 500; font-size: .82rem; padding: 13px 22px; border-radius: var(--r-sm); border: 1px solid transparent; transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease); }
.btn--solid { background: var(--azure); color: #06101F; box-shadow: 0 14px 28px -14px var(--azure); }
html[data-theme="light"] .btn--solid { color: #fff; }
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -14px var(--azure); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--azure); color: var(--azure); }
.btn--lg { padding: 16px 28px; font-size: .88rem; }

/* ---------- 6. NAV ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.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-mono); font-weight: 600; font-size: .9rem; color: #06101F; background: var(--azure); border-radius: var(--r-sm); }
html[data-theme="light"] .brand__mark { color: #fff; }
.brand__name { font-family: var(--f-mono); font-weight: 500; font-size: 1rem; }
.brand__ext { color: var(--azure); }

.nav__links { display: flex; gap: 24px; }
.nav__links a { font-family: var(--f-mono); font-size: .78rem; color: var(--ink-soft); position: relative; padding: 4px 0; transition: color .3s var(--ease); }
.nav__links a::before { content: ""; color: var(--ink-faint); }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--azure); 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: 42px; height: 30px; border: 1px solid var(--line); border-radius: 30px; position: relative; display: grid; place-items: center; background: var(--panel); }
.theme-toggle span { position: absolute; font-size: .9rem; line-height: 1; transition: opacity .3s var(--ease), transform .3s var(--ease); }
[data-ic-sun] { opacity: 1; color: var(--sand); }
[data-ic-moon] { opacity: 0; transform: scale(.6); }
html[data-theme="light"] [data-ic-sun] { opacity: 0; transform: scale(.6); }
html[data-theme="light"] [data-ic-moon] { opacity: 1; color: var(--mauve); }
.nav__cta { padding: 9px 18px; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.hamburger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease), opacity .3s var(--ease); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: linear-gradient(90deg, var(--azure), var(--mauve)); }

/* ---------- 7. HERO ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); }
.hero__inner { display: grid; grid-template-columns: 1.02fr .98fr; gap: clamp(32px, 5vw, 60px); align-items: center; }
.eyebrow { margin-bottom: 22px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green); animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 70%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero__name { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.8rem, 8vw, 5.6rem); line-height: .98; letter-spacing: -.04em; margin-bottom: 12px; }
.hero__role { font-family: var(--f-mono); font-size: clamp(.9rem, 1.6vw, 1.1rem); color: var(--mauve); margin-bottom: 24px; }
.hero__typed { font-family: var(--f-mono); font-size: clamp(.86rem, 1.7vw, 1.05rem); min-height: 1.5em; margin-bottom: 22px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; color: var(--ink); }
.hero__prompt { color: var(--green); }
.caret { display: inline-block; width: 9px; height: 1.05em; background: var(--azure); transform: translateY(2px); 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: 14px; flex-wrap: wrap; }

/* editor window */
.editor { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.editor__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.editor__dots { display: flex; gap: 7px; }
.editor__dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.editor__dots i:nth-child(1) { background: #FF5F57; }
.editor__dots i:nth-child(2) { background: #FEBC2E; }
.editor__dots i:nth-child(3) { background: #28C840; }
.editor__tab { font-family: var(--f-mono); font-size: .76rem; color: var(--ink-soft); }
.editor__code { font-family: var(--f-mono); font-size: clamp(.72rem, 1.15vw, .84rem); line-height: 1.85; padding: 20px 22px 24px; overflow-x: auto; counter-reset: line; white-space: pre; tab-size: 2; }
.editor__code .ln { display: block; position: relative; padding-left: 34px; }
.editor__code .ln::before { counter-increment: line; content: counter(line); position: absolute; left: 0; width: 22px; text-align: right; color: var(--ink-faint); opacity: .6; }
.tk-key { color: var(--sx-key); }
.tk-fn  { color: var(--sx-fn); }
.tk-str { color: var(--sx-str); }
.tk-num { color: var(--sx-num); }
.tk-attr{ color: var(--sx-attr); }
.tk-punc{ color: var(--sx-punc); }
.tk-com { color: var(--sx-com); font-style: italic; }

/* ---------- 8. SECTION SHELL ---------- */
.section { padding: var(--sp) 0; position: relative; }

/* ---------- 9. ABOUT ---------- */
.about { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.about__lead { font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 600; line-height: 1.4; letter-spacing: -.01em; margin-bottom: 22px; }
.about__lead b { color: var(--azure); font-weight: 700; }
.about__text p { color: var(--ink-soft); margin-bottom: 14px; max-width: 60ch; }
.about__side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 22px; }
.about__facts li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-family: var(--f-mono); font-size: .82rem; }
.about__facts li:last-child { border-bottom: none; }
.about__facts .k { color: var(--ink-faint); }
.about__facts .v { color: var(--ink); }

/* ---------- 10. SKILLS ---------- */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(22px, 4vw, 42px) clamp(36px, 6vw, 68px); }
.skill__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-family: var(--f-mono); }
.skill__name { font-size: .92rem; }
.skill__pct { font-size: .8rem; color: var(--azure); }
.skill__bar { height: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.skill__fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--azure), var(--mauve)); border-radius: 20px; transition: width 1.3s var(--ease); }

/* ---------- 11. EXPERIENCE (git log) ---------- */
.gitlog { position: relative; padding-left: clamp(22px, 4vw, 34px); }
.gitlog::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.gl-item { position: relative; padding: 0 0 clamp(26px, 4vw, 40px); }
.gl-item:last-child { padding-bottom: 0; }
.gl-item::before { content: ""; position: absolute; left: calc(-1 * clamp(22px, 4vw, 34px) + -1px); top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--azure); box-shadow: 0 0 10px color-mix(in srgb, var(--azure) 60%, transparent); }
.gl-item__hash { font-family: var(--f-mono); font-size: .72rem; color: var(--sand); }
.gl-item__date { font-family: var(--f-mono); font-size: .72rem; color: var(--ink-faint); margin-left: 10px; }
.gl-item__role { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.15rem, 2.2vw, 1.45rem); letter-spacing: -.01em; margin-top: 8px; }
.gl-item__org { font-family: var(--f-mono); font-size: .82rem; color: var(--mauve); margin: 3px 0 10px; }
.gl-item__desc { color: var(--ink-soft); max-width: 62ch; }

/* ---------- 12. EDUCATION ---------- */
.edu { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.edu-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; transition: transform .4s var(--ease), border-color .4s var(--ease); }
.edu-card:hover { transform: translateY(-5px); border-color: var(--azure); }
.edu-card__year { font-family: var(--f-mono); font-size: .74rem; color: var(--teal); }
.edu-card__deg { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; margin: 12px 0 5px; letter-spacing: -.01em; }
.edu-card__school { color: var(--mauve); font-family: var(--f-mono); font-size: .85rem; }
.edu-card__note { color: var(--ink-soft); font-size: .9rem; margin-top: 12px; }

/* ---------- 13. WORK (repos) ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn { font-family: var(--f-mono); font-size: .74rem; padding: 8px 15px; border: 1px solid var(--line); border-radius: 30px; color: var(--ink-soft); background: var(--panel); transition: all .3s var(--ease); }
.filter-btn:hover { color: var(--ink); border-color: var(--azure); }
.filter-btn.active { background: var(--azure); color: #06101F; border-color: transparent; }
html[data-theme="light"] .filter-btn.active { color: #fff; }

.work { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: transform .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease); }
.card:hover { transform: translateY(-6px); border-color: var(--azure); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 16/9; overflow: hidden; border-bottom: 1px solid var(--line); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__lang { position: absolute; top: 12px; left: 12px; display: inline-flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: .66rem; padding: 5px 10px; border-radius: 20px; background: rgba(6,12,25,.62); color: #E7ECF6; border: 1px solid var(--line); backdrop-filter: blur(6px); }
.card__lang i { width: 8px; height: 8px; border-radius: 50%; }
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__name { font-family: var(--f-mono); font-weight: 600; font-size: 1.08rem; display: flex; align-items: center; gap: 8px; }
.card__name::before { content: "📁"; font-size: .9em; filter: grayscale(.2); }
.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-mono); font-size: .66rem; padding: 4px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-soft); }
.card__links { display: flex; gap: 10px; padding: 0 20px 20px; }
.card__links a { flex: 1; justify-content: center; padding: 11px; font-size: .74rem; }
.card__links svg { width: 15px; height: 15px; }

/* ---------- 14. STATS ---------- */
.stats { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(28px, 4vw, 44px); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after { content: ""; position: absolute; right: -12px; top: 12%; height: 76%; width: 1px; background: var(--line); }
.stat__num { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -.03em; background: linear-gradient(120deg, var(--azure), var(--mauve)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { font-family: var(--f-mono); font-size: .72rem; color: var(--ink-soft); margin-top: 12px; }

/* ---------- 15. SERVICES ---------- */
.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.service { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 30px 26px; transition: transform .4s var(--ease), border-color .4s var(--ease); }
.service:hover { transform: translateY(-5px); border-color: var(--azure); }
.service__ic { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--azure) 15%, transparent); color: var(--azure); margin-bottom: 18px; }
.service__ic svg { width: 22px; height: 22px; }
.service:nth-child(3n+2) .service__ic { background: color-mix(in srgb, var(--mauve) 16%, transparent); color: var(--mauve); }
.service:nth-child(3n+3) .service__ic { background: color-mix(in srgb, var(--teal) 16%, transparent); color: var(--teal); }
.service__title { font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 10px; letter-spacing: -.01em; }
.service__desc { color: var(--ink-soft); font-size: .92rem; }

/* ---------- 16. STACK ---------- */
.stackpills { display: flex; flex-wrap: wrap; gap: 12px; }
.stackpills li { display: flex; align-items: center; gap: 9px; font-family: var(--f-mono); font-size: .82rem; padding: 11px 18px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s var(--ease); }
.stackpills li:hover { transform: translateY(-3px); border-color: var(--azure); }
.stackpills li::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--azure); }
.stackpills li:nth-child(3n+2)::before { background: var(--mauve); }
.stackpills li:nth-child(3n+3)::before { background: var(--teal); }

/* ---------- 17. AWARDS + CERTS ---------- */
.cred { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 60px); }
.cred__label { font-family: var(--f-mono); font-size: .82rem; color: var(--ink-faint); margin-bottom: 20px; }
.awards li { display: grid; grid-template-columns: auto 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.awards li:first-child { border-top: 1px solid var(--line); }
.awards__year { font-family: var(--f-mono); font-size: .8rem; color: var(--sand); }
.awards__title { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; }
.awards__by { color: var(--ink-soft); font-size: .86rem; }
.certs li { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.certs li::before { content: "✓"; color: var(--green); font-family: var(--f-mono); }
.certs__name { font-weight: 600; }
.certs__meta { display: block; font-family: var(--f-mono); font-size: .72rem; color: var(--ink-faint); margin-top: 2px; }

/* ---------- 18. TESTIMONIALS ---------- */
.quotes { position: relative; min-height: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(28px, 4vw, 44px); }
.quote { position: absolute; inset: 0; padding: inherit; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease); display: flex; flex-direction: column; gap: 22px; justify-content: center; }
.quote.active { opacity: 1; visibility: visible; position: relative; }
.quote__text { font-size: clamp(1.2rem, 2.6vw, 1.7rem); font-weight: 500; line-height: 1.45; letter-spacing: -.01em; }
.quote__text::before { content: "// "; color: var(--green); font-family: var(--f-mono); }
.quote__by { display: flex; align-items: center; gap: 14px; }
.quote__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.quote__name { font-weight: 700; }
.quote__role { font-family: var(--f-mono); font-size: .74rem; color: var(--ink-soft); }
.quotes__dots { display: flex; gap: 10px; margin-top: 26px; justify-content: center; }
.quotes__dots button { width: 28px; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s var(--ease); }
.quotes__dots button.active { background: var(--azure); }

/* ---------- 19. RESUME BANNER ---------- */
.resume { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(30px, 5vw, 52px); display: flex; justify-content: space-between; align-items: center; gap: 36px; flex-wrap: wrap; position: relative; overflow: hidden; }
.resume::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, var(--azure), var(--mauve)); opacity: .08; }
.resume > * { position: relative; }
.resume__title { font-family: var(--f-display); font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 12px 0 10px; letter-spacing: -.02em; }
.resume__text { color: var(--ink-soft); max-width: 46ch; }

/* ---------- 20. FAQ ---------- */
.faq { max-width: 860px; display: grid; gap: 12px; }
.faq-item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; padding: 2px 24px; transition: border-color .3s var(--ease); }
.faq-item.open { border-color: var(--azure); }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(1rem, 2vw, 1.2rem); }
.faq-q__icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-q__icon::before, .faq-q__icon::after { content: ""; position: absolute; background: var(--azure); transition: transform .35s var(--ease); }
.faq-q__icon::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-q__icon::after { left: 7px; top: 0; width: 2px; height: 16px; }
.faq-item.open .faq-q__icon::after { transform: scaleY(0); }
.faq-a { overflow: hidden; max-height: 0; transition: max-height .4s var(--ease); }
.faq-a p { color: var(--ink-soft); padding: 0 0 22px; max-width: 68ch; }

/* ---------- 21. CONTACT ---------- */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.contact__blurb { font-size: 1.3rem; font-weight: 600; line-height: 1.45; letter-spacing: -.01em; margin-bottom: 28px; }
.contact__list { margin-bottom: 28px; }
.contact__list li { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.contact__list .lbl { font-family: var(--f-mono); font-size: .68rem; color: var(--ink-faint); display: block; margin-bottom: 3px; }
.contact__list .val { font-family: var(--f-mono); font-size: .95rem; transition: color .3s var(--ease); }
.contact__list a:hover .val { color: var(--azure); }

.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: all .3s var(--ease); }
.socials a:hover { transform: translateY(-3px); border-color: var(--azure); color: var(--azure); }
.socials svg { width: 18px; height: 18px; }

.cform { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(26px, 4vw, 40px); }
.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-mono); font-size: .74rem; color: var(--mauve); margin-bottom: 8px; }
.field input, .field textarea { font-family: var(--f-mono); font-size: .92rem; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 15px; transition: border-color .3s var(--ease); resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-faint); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--azure); }
.field__err { font-family: var(--f-mono); font-size: .7rem; color: var(--coral); margin-top: 6px; min-height: 1em; }
.cform__submit { width: 100%; justify-content: center; margin-top: 4px; }
.cform__note { font-family: var(--f-mono); font-size: .8rem; margin-top: 16px; text-align: center; min-height: 1.2em; }
.cform__note.ok { color: var(--green); }
.cform__note.bad { color: var(--coral); }

/* ---------- 22. FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(44px, 7vw, 80px) 0 40px; background: var(--bg-2); }
.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-mono); font-weight: 500; font-size: 1.1rem; }
.footer__title { font-family: var(--f-mono); font-size: .74rem; color: var(--ink-soft); margin-top: 2px; }
.footer__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; }
.footer__nav a { font-family: var(--f-mono); font-size: .76rem; color: var(--ink-soft); transition: color .3s var(--ease); }
.footer__nav a:hover { color: var(--azure); }
.socials--footer { justify-content: flex-end; }
.footer__legal { grid-column: 1 / -1; margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--f-mono); font-size: .72rem; color: var(--ink-faint); }
.footer__made strong { color: var(--azure); font-weight: 500; }

/* ---------- 23. BACK TO TOP ---------- */
.to-top { position: fixed; bottom: 24px; right: 24px; z-index: 90; width: 48px; height: 48px; display: grid; place-items: center; background: var(--azure); color: #06101F; border-radius: 12px; box-shadow: 0 12px 30px -10px var(--azure); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .4s var(--ease), visibility .4s, transform .4s var(--ease); }
html[data-theme="light"] .to-top { color: #fff; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { transform: translateY(-3px); }

/* ---------- 24. PRELOADER ---------- */
.preloader { position: fixed; inset: 0; z-index: 999; background: var(--bg); display: flex; align-items: center; justify-content: center; transition: opacity .5s var(--ease), visibility .5s; }
.preloader.done { opacity: 0; visibility: hidden; }
.preloader__line { font-family: var(--f-mono); font-size: 1rem; color: var(--ink); }
.preloader__prompt { color: var(--green); margin-right: 8px; }
.preloader__cursor { display: inline-block; width: 9px; height: 1.05em; background: var(--azure); margin-left: 4px; transform: translateY(2px); animation: blink 1s steps(1) infinite; }

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

/* ---------- 26. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .about, .contact, .cred { grid-template-columns: 1fr; }
  .hero__inner { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 34px 24px; }
  .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(--bg); border-bottom: 1px solid var(--line); padding: 12px 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: 1px solid var(--line-soft); font-size: .84rem; }
  .nav__links a:last-child { border-bottom: none; }
  .hamburger { display: flex; }
  .nav__cta { display: none; }
  .skills { grid-template-columns: 1fr; }
  .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 { flex-direction: column; align-items: flex-start; }
}

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