/* ============================================================
   Farah Mrad — Structural / BIM Portfolio
   Bespoke design system. No framework.
   Identity: structural drawing-set. Cyan = BIM, Orange = steel.
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800;900&family=Hanken+Grotesk:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---- Tokens ---- */
:root {
  /* Surfaces — deep structural blue-black, tuned to the hero asset */
  --bg:        #0a0e15;
  --bg-rgb:    10, 14, 21;
  --surface-1: #0e131c;
  --surface-2: #131a26;
  --surface-3: #18212f;

  /* Ink */
  --ink:       #f4f6f9;
  --muted:     #aab4c2;   /* ~6.3:1 on --bg */
  --faint:     #7e8a9b;   /* labels & placeholders — ≥4.5:1 on dark surfaces */

  /* Accents */
  --cyan:      #2ad4ec;
  --cyan-rgb:  42, 212, 236;
  --cyan-deep: #0c8ca6;
  --orange:    #ff7a1a;
  --orange-rgb: 255, 122, 26;

  /* Lines */
  --line:        rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --grid:        rgba(var(--cyan-rgb), 0.045);

  /* Type */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Rhythm */
  --container: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(5rem, 11vw, 9.5rem);

  /* Radius — restrained */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);          /* expo-out-ish */
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-scale */
  --z-base: 1;
  --z-rail: 20;
  --z-nav: 100;
  --z-menu: 110;
  --z-progress: 120;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
::selection { background: rgba(var(--cyan-rgb), 0.28); color: #fff; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--cyan-deep); }

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---- Layout helpers ---- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); position: relative; }

.blueprint {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* Section header */
.s-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.s-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}
.s-tag::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--cyan);
  opacity: 0.7;
}
.s-tag--orange { color: var(--orange); }
.s-tag--orange::before { background: var(--orange); }
.s-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.s-lead { color: var(--muted); font-size: 1.05rem; margin-top: 1.1rem; max-width: 56ch; }

/* ============================================================
   Scroll progress + nav
   ============================================================ */
.progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  z-index: var(--z-progress);
}

.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: var(--z-nav);
  display: flex; align-items: center;
  transition: background 0.4s var(--ease-soft), border-color 0.4s var(--ease-soft), height 0.4s var(--ease-soft);
  height: 84px;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  height: 64px;
  background: rgba(var(--bg-rgb), 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}

.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand__mark {
  font-family: var(--font-display); font-weight: 900;
  font-size: 1.15rem; letter-spacing: -0.04em; color: var(--ink);
  border: 1px solid var(--line-strong);
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: var(--r-sm);
  position: relative; overflow: hidden;
}
.brand__mark::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px;
  background: var(--cyan); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.4s var(--ease);
}
.brand:hover .brand__mark::after { transform: scaleX(1); }
.brand__txt {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint); line-height: 1.3;
}

.nav__links { display: flex; align-items: center; gap: 0.35rem; }
.nav__link {
  font-size: 0.92rem; font-weight: 500; color: var(--muted);
  padding: 0.5rem 0.85rem; border-radius: var(--r-sm);
  position: relative; transition: color 0.25s var(--ease-soft);
}
.nav__link::after {
  content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.3rem; height: 1.5px;
  background: var(--cyan); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link.active { color: var(--ink); }
.nav__link.active::after { transform: scaleX(1); }

.nav__right { display: flex; align-items: center; gap: 0.9rem; }

.lang { display: flex; gap: 0.15rem; font-family: var(--font-mono); font-size: 0.78rem; }
.lang a {
  padding: 0.3rem 0.5rem; color: var(--faint); border-radius: var(--r-sm);
  transition: color 0.2s, background 0.2s;
}
.lang a:hover { color: var(--ink); }
.lang a.on { color: var(--bg); background: var(--cyan); font-weight: 500; }

/* Buttons */
.btn {
  --bc: var(--cyan); --brgb: var(--cyan-rgb);
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 0.86rem; font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.4rem; border-radius: var(--r-sm);
  border: 1px solid rgba(var(--brgb), 0.5);
  color: var(--bc); background: rgba(var(--brgb), 0.06);
  position: relative; overflow: hidden;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.2s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--bc); transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform 0.4s var(--ease);
}
.btn:hover { color: var(--bg); border-color: var(--bc); }
.btn:hover::before { transform: scaleY(1); }
.btn:active { transform: translateY(1px); }
.btn svg, .btn i { font-size: 0.95em; }
.btn--orange { --bc: var(--orange); --brgb: var(--orange-rgb); }
.btn--solid { background: var(--cyan); color: var(--bg); border-color: var(--cyan); }
.btn--solid::before { background: #fff; }
.btn--sm { padding: 0.55rem 0.95rem; font-size: 0.8rem; }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost::before { background: var(--surface-3); }
.btn--ghost:hover { color: var(--ink); border-color: var(--line-strong); }

/* Mobile menu */
.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 3px auto; transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav.open .burger span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.nav.open .burger span:nth-child(2) { opacity: 0; }
.nav.open .burger span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: var(--z-menu);
  background: rgba(var(--bg-rgb), 0.97);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column; justify-content: center; gap: 0.5rem;
  padding: var(--gutter);
  opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.mobile-menu.show { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--font-display); font-weight: 700; font-size: 2rem;
  letter-spacing: -0.02em; color: var(--ink); padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu .mm-foot { margin-top: 2rem; display: flex; gap: 1rem; align-items: center; }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hero__media {
  position: absolute; inset: 0; z-index: 0;
}
.hero__media img {
  position: absolute; right: -4%; top: 50%; transform: translateY(-50%);
  height: 108%; width: auto; max-width: none; object-fit: contain;
  opacity: 0.9;
  -webkit-mask-image: radial-gradient(75% 75% at 70% 45%, #000 35%, transparent 78%);
          mask-image: radial-gradient(75% 75% at 70% 45%, #000 35%, transparent 78%);
}
.hero__veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, var(--bg) 14%, rgba(var(--bg-rgb), 0.55) 48%, transparent 72%),
    linear-gradient(0deg, var(--bg) 2%, transparent 28%);
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }
.hero__content { max-width: 760px; padding-block: 8rem 6rem; }

.status {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.02em;
  color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 0.4rem 0.9rem; margin-bottom: 1.8rem;
  background: rgba(255,255,255,0.02);
}
.status .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #44e08a;
  box-shadow: 0 0 0 0 rgba(68, 224, 138, 0.6);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(68,224,138,0.5); }
  70% { box-shadow: 0 0 0 7px rgba(68,224,138,0); }
  100% { box-shadow: 0 0 0 0 rgba(68,224,138,0); }
}

.hero__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3rem, 9.5vw, 5.75rem);
  line-height: 0.98; letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero__title .grad { color: var(--ink); }
.hero__role {
  margin-top: 1.4rem;
  font-family: var(--font-mono); font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--cyan); letter-spacing: 0.01em;
}
.hero__hook {
  margin-top: 1.5rem; color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem); max-width: 54ch;
  text-wrap: pretty;
}
.hero__cta { margin-top: 2.4rem; display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* hero technical overlays */
.hero__readout {
  position: absolute; left: var(--gutter); bottom: 1.6rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--faint);
  display: flex; align-items: center; gap: 0.5rem;
}
.hero__readout .k { color: var(--cyan); }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: 1.6rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--faint);
  display: flex; align-items: center; gap: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.hero__scroll .line { width: 1px; height: 34px; background: linear-gradient(var(--cyan), transparent); position: relative; overflow: hidden; }
.hero__scroll .line::after { content: ""; position: absolute; inset: 0; background: var(--cyan); animation: scrollLine 2s var(--ease) infinite; }
@keyframes scrollLine { 0% { transform: translateY(-100%); } 60%,100% { transform: translateY(100%); } }
.corner-label {
  position: absolute; z-index: 2; font-family: var(--font-mono);
  font-size: 0.68rem; color: rgba(var(--cyan-rgb), 0.35); letter-spacing: 0.05em;
  pointer-events: none; user-select: none;
}
.corner-label.tr { top: 6rem; right: var(--gutter); }

/* ============================================================
   Stats ledger
   ============================================================ */
.ledger { border-block: 1px solid var(--line); }
.ledger__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.ledger__cell {
  padding: clamp(1.8rem, 4vw, 2.8rem) clamp(1.1rem, 3vw, 2.2rem);
  border-left: 1px solid var(--line);
  position: relative;
}
.ledger__cell:first-child { border-left: none; }
.ledger__num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1;
  letter-spacing: -0.03em; color: var(--ink);
  display: flex; align-items: baseline;
}
.ledger__num .suf { color: var(--cyan); font-size: 0.55em; margin-left: 0.1em; }
.ledger__cell.orange .ledger__num .suf { color: var(--orange); }
.ledger__label {
  margin-top: 0.7rem; font-family: var(--font-mono);
  font-size: 0.76rem; letter-spacing: 0.03em; color: var(--faint);
  text-transform: uppercase;
}

/* ============================================================
   Expertise — editorial index rows (not card grid)
   ============================================================ */
.exp__row {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(1.5rem, 5vw, 4rem);
  padding-block: clamp(2.2rem, 5vw, 3.4rem);
  border-top: 1px solid var(--line);
  position: relative;
  transition: background 0.4s var(--ease-soft);
}
.exp__rows .exp__row:last-child { border-bottom: 1px solid var(--line); }
.exp__row::before {
  content: ""; position: absolute; left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1);
  top: -1px; bottom: 0; background: linear-gradient(90deg, rgba(var(--cyan-rgb),0.05), transparent 60%);
  opacity: 0; transition: opacity 0.4s var(--ease-soft); pointer-events: none;
}
.exp__row:hover::before { opacity: 1; }
.exp__left { display: flex; gap: 1.1rem; align-items: flex-start; }
.exp__idx { font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); padding-top: 0.45rem; }
.exp__row.orange .exp__idx { color: var(--orange); }
.exp__icon {
  width: 52px; height: 52px; flex: none; border-radius: var(--r-sm);
  display: grid; place-items: center; font-size: 1.3rem;
  color: var(--cyan); border: 1px solid rgba(var(--cyan-rgb), 0.3);
  background: rgba(var(--cyan-rgb), 0.06);
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.exp__row.orange .exp__icon { color: var(--orange); border-color: rgba(var(--orange-rgb),0.3); background: rgba(var(--orange-rgb),0.06); }
.exp__row:hover .exp__icon { background: var(--cyan); color: var(--bg); }
.exp__row.orange:hover .exp__icon { background: var(--orange); color: var(--bg); }
.exp__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1.1; letter-spacing: -0.02em;
}
.exp__desc { color: var(--muted); margin-bottom: 1.3rem; max-width: 54ch; }
.exp__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.35rem 0.7rem; transition: border-color 0.25s, color 0.25s;
}
.exp__row:hover .tag { border-color: var(--line-strong); color: var(--ink); }

/* ============================================================
   Profile / About + specs
   ============================================================ */
.profile { background: var(--surface-1); }
.profile__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about__panel {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--surface-2);
  background-size: 30px 30px, 30px 30px, auto;
  position: relative;
}
.about__panel .corner-label { font-size: 0.66rem; }
.about__panel .cl-tl { position: absolute; top: 0.9rem; left: 1.1rem; }
.about__panel .cl-br { position: absolute; bottom: 0.9rem; right: 1.1rem; }
.about__h { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.25; margin-bottom: 1.1rem; letter-spacing: -0.01em; }
.about__p { color: var(--muted); margin-bottom: 1.1rem; }

.specs__head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.8rem; }
.specs__head h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.specs__head .ic { color: var(--cyan); }

.spec { margin-bottom: 1.3rem; }
.spec__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.55rem; }
.spec__name { font-size: 0.95rem; font-weight: 500; }
.spec__val { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.spec__track { display: flex; gap: 4px; height: 9px; }
.seg { flex: 1; background: var(--surface-3); border-radius: 2px; transform: scaleY(0.55); transform-origin: 50% 100%; transition: background 0.4s var(--ease), transform 0.4s var(--ease); }
.seg.on { background: var(--cyan); transform: scaleY(1); }
.spec.orange .seg.on { background: var(--orange); }

/* Tools marquee */
.tools { margin-top: clamp(3rem, 7vw, 5rem); }
.tools__cap { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--faint); text-transform: uppercase; text-align: center; margin-bottom: 1.6rem; }
.marquee { overflow: hidden; position: relative; padding: 1.6rem 0; border-block: 1px solid var(--line); }
.marquee::before, .marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 16%; z-index: 2; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--surface-1), transparent); }
.marquee::after { right: 0; background: linear-gradient(270deg, var(--surface-1), transparent); }
.marquee__track { display: flex; width: max-content; animation: scrollX 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.tool { width: 200px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 0.7rem; padding: 0 1rem; }
.tool svg { width: 44px; height: 44px; opacity: 0.7; transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), filter 0.3s var(--ease); }
.tool span { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; color: var(--faint); text-transform: uppercase; transition: color 0.3s; }
.tool:hover svg { opacity: 1; transform: translateY(-3px); filter: drop-shadow(0 0 10px rgba(var(--cyan-rgb), 0.5)); }
.tool:hover span { color: var(--cyan); }
@keyframes scrollX { to { transform: translateX(-50%); } }

/* ============================================================
   Certifications
   ============================================================ */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
  gap: clamp(1rem, 2.4vw, 1.5rem);
}
.cert-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface-1); overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.cert-card:hover {
  border-color: rgba(var(--cyan-rgb), 0.4);
  transform: translateY(-4px);
  box-shadow: 0 14px 34px -18px rgba(var(--cyan-rgb), 0.45);
}
.cert-thumb {
  position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center;
  border-bottom: 1px solid var(--line); overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--surface-2);
  background-size: 26px 26px, 26px 26px, auto;
}
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.cert-card:hover .cert-thumb img { transform: scale(1.04); }
.cert-doc { font-size: 2.6rem; color: var(--cyan); opacity: 0.85; }
.cert-flag {
  position: absolute; top: 0.7rem; left: 0.7rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em;
  color: var(--cyan); border: 1px solid rgba(var(--cyan-rgb), 0.4);
  padding: 0.15rem 0.4rem; border-radius: 4px; background: rgba(var(--bg-rgb), 0.6);
}
.cert-idx {
  position: absolute; top: 0.7rem; right: 0.8rem; z-index: 2;
  font-size: 0.72rem; color: var(--faint);
}
.cert-view {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.84rem; color: var(--ink);
  background: rgba(var(--bg-rgb), 0.72);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.cert-thumb:hover .cert-view, .cert-thumb:focus-visible .cert-view { opacity: 1; }
.cert-view i { color: var(--cyan); }
.cert-body { display: flex; flex-direction: column; gap: 0.9rem; padding: 1.1rem 1.1rem 1.2rem; flex: 1; }
.cert-name { font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.3; letter-spacing: -0.01em; }
.cert-actions { margin-top: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cert-actions .btn { flex: 1; justify-content: center; min-width: 0; }
.cert-empty {
  border: 1px dashed var(--line-strong); border-radius: var(--r);
  padding: clamp(2.2rem, 6vw, 3.5rem); text-align: center; color: var(--muted);
  display: flex; flex-direction: column; align-items: center;
}

/* ============================================================
   Projects page
   ============================================================ */
.page-head { padding-top: calc(84px + clamp(2rem, 6vw, 4rem)); padding-bottom: clamp(2rem, 5vw, 3.5rem); }

.projects { display: flex; flex-direction: column; }
.project { padding-block: clamp(2.6rem, 6vw, 4.6rem); border-top: 1px solid var(--line); }
.projects .project:first-child { border-top: none; padding-top: clamp(0.5rem, 2vw, 1.5rem); }

.project__head { display: flex; gap: 1.1rem; align-items: flex-start; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.project__idx { color: var(--cyan); padding-top: 0.55rem; font-size: 0.85rem; flex: none; }
.project__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3.6vw, 2.7rem); line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
.project__meta { display: flex; flex-wrap: wrap; gap: 1.3rem; margin-top: 0.8rem; }
.meta-item { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); }
.meta-item i { color: var(--cyan); }

.project__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.project__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.3rem; }
.project__desc { color: var(--muted); max-width: 60ch; margin-bottom: 1.6rem; text-wrap: pretty; }
.project__plan { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.plan-frame { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.plan-frame iframe { width: 100%; height: min(72vh, 720px); border: 0; display: block; background: #fff; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 0.6rem; }
.gallery__item {
  padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm);
  overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2);
  cursor: zoom-in; position: relative;
  transition: border-color 0.3s var(--ease);
}
.gallery__item:hover { border-color: rgba(var(--cyan-rgb), 0.45); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s var(--ease); }
.gallery__item:hover img { transform: scale(1.06); }

/* Lightbox (modal tier) */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5, 8, 12, 0.93);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 88vw; max-height: 84vh; border-radius: var(--r);
  border: 1px solid var(--line-strong); box-shadow: 0 30px 90px -20px #000;
  transform: scale(0.97); transition: transform 0.35s var(--ease);
}
.lightbox.open .lightbox__img { transform: scale(1); }
.lightbox__close, .lightbox__nav {
  position: absolute; display: grid; place-items: center;
  width: 50px; height: 50px; border-radius: 50%;
  color: var(--ink); background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line); font-size: 1.1rem;
  transition: background 0.25s var(--ease), border-color 0.25s, color 0.25s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: var(--cyan); color: var(--bg); border-color: var(--cyan); }
.lightbox__close { top: 1.4rem; right: 1.4rem; }
.lightbox__prev { left: clamp(1rem, 3vw, 2.5rem); }
.lightbox__next { right: clamp(1rem, 3vw, 2.5rem); }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 0.82rem; }

@media (max-width: 980px) {
  .project__grid { grid-template-columns: 1fr; }
  .lightbox__nav { width: 44px; height: 44px; }
}
@media (max-width: 620px) {
  .gallery { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .lightbox__close { top: 0.8rem; right: 0.8rem; }
}

/* ============================================================
   Contact
   ============================================================ */
.contact__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 6vw, 4.5rem); align-items: start; }
.cinfo { display: flex; flex-direction: column; gap: 1.6rem; }
.cinfo__item { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.cinfo__k { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.4rem; }
.cinfo__v { font-size: 1.02rem; color: var(--ink); }
.cinfo__v a:hover { color: var(--cyan); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 0.98rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 0.85rem 1rem; transition: border-color 0.25s var(--ease), background 0.25s;
  width: 100%; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); background: var(--surface-3); }
.form .submit { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-top: 0.4rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status {
  grid-column: 1 / -1; border-radius: var(--r-sm); padding: 0.85rem 1rem;
  font-size: 0.92rem; border: 1px solid var(--line); display: flex; align-items: center; gap: 0.6rem;
}
.form-status.ok  { color: #7ef0b0; background: rgba(68, 224, 138, 0.08); border-color: rgba(68, 224, 138, 0.4); }
.form-status.err { color: #ffb59a; background: rgba(255, 122, 26, 0.08); border-color: rgba(255, 122, 26, 0.4); }
.btn.is-loading { opacity: 0.7; pointer-events: none; }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--line); background: var(--surface-1); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.footer__brand h5 { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em; }
.footer__brand p { color: var(--muted); font-size: 0.92rem; margin-top: 0.6rem; max-width: 38ch; }
.footer__col h6 { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); margin-bottom: 1rem; }
.footer__col a { display: block; color: var(--muted); padding: 0.3rem 0; transition: color 0.2s; font-size: 0.95rem; }
.footer__col a:hover { color: var(--cyan); }
.socials { display: flex; gap: 0.6rem; }
.socials a {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--muted);
  transition: color 0.25s var(--ease), border-color 0.25s, background 0.25s, transform 0.25s;
}
.socials a:hover { color: var(--bg); background: var(--cyan); border-color: var(--cyan); transform: translateY(-2px); }
.footer__base {
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem; text-align: center;
  margin-top: clamp(2.5rem, 6vw, 4rem); padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.footer__copy { font-size: 0.9rem; color: var(--muted); letter-spacing: 0.01em; }
.footer__copy strong { color: var(--ink); font-weight: 700; }
.footer__dev { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.onority-credit { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--ink); font-weight: 600; transition: color 0.25s var(--ease); }
.onority-credit:hover { color: var(--cyan); }
.onority-logo { height: 20px; width: auto; display: inline-block; vertical-align: middle; }

/* ============================================================
   Reveal (enhances already-visible default)
   ============================================================ */
.reveal { will-change: transform, opacity; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .nav__links { display: none; }
  .burger { display: block; }
  .nav__right .btn { display: none; }
  .hero__media img { right: -25%; opacity: 0.45; }
  .hero__veil { background: linear-gradient(0deg, var(--bg) 8%, rgba(var(--bg-rgb),0.6) 55%, rgba(var(--bg-rgb),0.4)); }
  .profile__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .exp__row { grid-template-columns: 1fr; gap: 1.2rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .ledger__grid { grid-template-columns: 1fr 1fr; }
  .ledger__cell:nth-child(3) { border-left: none; }
  .ledger__cell:nth-child(odd) { border-left: none; }
  .ledger__cell:nth-child(even) { border-left: 1px solid var(--line); }
  .ledger__cell:nth-child(3), .ledger__cell:nth-child(4) { border-top: 1px solid var(--line); }
  .form { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
  .corner-label.tr { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Reduced motion — content visible, motion removed
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee__track { animation: none; }
  .seg { transform: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
