/*-----------------------------------*\
  Umar Faaruk — Freelance Portfolio
  Editorial dark · condensed caps · vermilion
\*-----------------------------------*/

:root {
  --bg: #0A0A0A;
  --panel: #161616;
  --panel-2: #1E1E1E;
  --paper: #E4E2E3;
  --surface: #161616;
  --border: rgba(255, 255, 255, 0.10);
  --border-2: rgba(255, 255, 255, 0.18);
  --text: #EDEDED;
  --text-muted: #8C8C8C;
  --primary: #F44A22;
  --secondary: #F44A22;
  --gradient: linear-gradient(135deg, #F44A22 0%, #FF7A45 100%);
  --glow: 0 14px 40px rgba(244, 74, 34, 0.22);
  --radius: 4px;
  --font-head: "Oswald", "Bahnschrift", "Arial Narrow", sans-serif;
  --font-ui: "Oswald", "Bahnschrift", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --nav-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; border: none; background: none; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

::selection { background: rgba(244, 74, 34, 0.35); color: #fff; }

.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; }
.container { width: min(1240px, 92%); margin-inline: auto; }

/* ===== Background layers ===== */
#bg-canvas { position: fixed; inset: 0; z-index: -2; display: block; }

.grid-overlay {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 100%);
}

body::after {
  content: ""; position: fixed; inset: 0; z-index: 996; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Cursor FX ===== */
#cursor-glow {
  position: fixed; top: 0; left: 0; width: 440px; height: 440px; border-radius: 50%;
  pointer-events: none; z-index: 1;
  background: radial-gradient(circle, rgba(244, 74, 34, 0.10) 0%, rgba(244, 74, 34, 0.04) 38%, transparent 70%);
  opacity: 0; transition: opacity 0.4s ease;
}

#cursor-ring {
  position: fixed; top: 0; left: 0; width: 34px; height: 34px;
  border: 1.5px solid rgba(244, 74, 34, 0.75); border-radius: 50%;
  pointer-events: none; z-index: 997; opacity: 0; transition: opacity 0.3s ease;
}

body.cursor-active #cursor-glow,
body.cursor-active #cursor-ring { opacity: 1; }

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  #cursor-glow, #cursor-ring { display: none; }
}

/* ===== Type helpers ===== */
.gradient-text { color: var(--primary); }
.accent { color: var(--primary); }

.outline-text {
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(237, 237, 237, 0.55);
}

.section { padding: 110px 0; position: relative; }

.section-tag {
  font-family: var(--font-ui);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.02;
  text-transform: uppercase;
  margin-bottom: 42px;
}

.section[data-num]::before {
  content: attr(data-num);
  position: absolute; top: 30px; right: 3%;
  font-family: var(--font-head);
  font-size: clamp(8rem, 20vw, 15rem);
  font-weight: 700; line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.045);
  pointer-events: none; user-select: none; z-index: -1;
}

.section[data-num] { overflow: hidden; }

.section-title .tchar {
  display: inline-block; opacity: 0;
  transform: translateY(0.5em);
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 0.028s);
}

.section-title.in-view .tchar { opacity: 1; transform: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: 2px;
  font-family: var(--font-ui); font-weight: 500; font-size: 0.92rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.btn-primary {
  background: var(--primary); color: #fff;
  border: 1px solid var(--primary);
}

.btn-primary:hover { transform: translateY(-2px); background: #ff5c33; box-shadow: var(--glow); }

.btn-outline {
  border: 1px solid var(--border-2); color: var(--text); background: transparent;
}

.btn-outline:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

.btn-sm { padding: 10px 20px; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; }

/* ===== Navbar ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.nav-inner {
  height: var(--nav-h); display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}

.logo {
  font-family: var(--font-head); font-size: 1.5rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}

.logo-bracket { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 4px; }

.nav-link {
  display: block; padding: 10px 15px;
  font-family: var(--font-ui); font-size: 0.85rem; font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted); cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--primary); }
.nav-cta-wrap { margin-left: 12px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; }

.nav-toggle span {
  width: 26px; height: 2px; background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  min-height: 100svh; display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 40px); padding-bottom: 70px;
}

.hero-inner { text-align: left; max-width: 100%; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border: 1px solid var(--border-2);
  font-family: var(--font-ui); font-size: 0.76rem; font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 30px;
}

.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--primary);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 74, 34, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(244, 74, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 74, 34, 0); }
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(3rem, 10.5vw, 8.4rem);
  font-weight: 700; line-height: 0.92;
  letter-spacing: -0.01em; text-transform: uppercase;
  margin-bottom: 26px;
}

.hero-role {
  font-family: var(--font-ui); font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--primary); min-height: 2em; margin-bottom: 20px;
}

#typed-text { color: var(--primary); }
.cursor { color: var(--primary); animation: blink 1s step-end infinite; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-sub {
  color: var(--text-muted); max-width: 56ch; margin: 0 0 38px; font-size: 1.05rem;
}

.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-start; margin-bottom: 36px; }
.hero-socials { display: flex; gap: 12px; justify-content: flex-start; margin-bottom: 60px; }

.social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border: 1px solid var(--border);
  color: var(--text-muted); background: transparent;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-btn:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-3px); }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; margin: 0; max-width: 900px;
  border-top: 1px solid var(--border);
}

.stat { padding: 24px 20px 8px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }

.stat-num {
  display: block; font-family: var(--font-head); font-size: 2.5rem;
  font-weight: 700; color: var(--primary); line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-muted); display: block; margin-top: 8px;
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
  color: var(--text-muted); animation: bob 2.2s ease-in-out infinite; padding: 8px;
}

.scroll-hint:hover { color: var(--primary); }

@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== Ticker / marquee ===== */
.ticker {
  overflow: hidden; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--panel); padding: 18px 0;
}

.ticker-track {
  display: flex; gap: 30px; width: max-content;
  animation: ticker-scroll 34s linear infinite;
}

.ticker-track span {
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text); white-space: nowrap;
}

.ticker-track span:nth-child(even) { color: var(--primary); }

@keyframes ticker-scroll { to { transform: translateX(-50%); } }

/* ===== Cards ===== */
.glass-card {
  position: relative; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.glass-card:hover { border-color: rgba(244, 74, 34, 0.45); background: var(--panel-2); }

.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 1px solid var(--border-2);
  color: var(--primary); margin-bottom: 18px; font-size: 1.2rem;
}

/* ===== About ===== */
.about-grid {
  display: grid; grid-template-columns: 340px 1fr; gap: 52px;
  align-items: center; margin-bottom: 62px;
}

.photo-frame {
  position: relative; overflow: hidden;
  border: 1px solid var(--border-2);
}

.photo-frame img { width: 100%; height: auto; filter: grayscale(1) contrast(1.08); transition: filter 0.5s ease; }
.photo-frame:hover img { filter: grayscale(0) contrast(1); }

.photo-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 10, 10, 0.75) 100%);
}

.about-text p { color: var(--text-muted); margin-bottom: 18px; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 26px; }

.about-facts li {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-ui); font-size: 0.82rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text);
}

.about-facts .icon { color: var(--primary); }

.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.expertise-grid h3 {
  font-family: var(--font-head); font-size: 1.25rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 10px;
}

.expertise-grid p { font-size: 0.9rem; color: var(--text-muted); }

/* ===== Timeline ===== */
.timeline { position: relative; max-width: 860px; padding-left: 34px; }

.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 1px; background: var(--primary); opacity: 0.5;
  transform: scaleY(0); transform-origin: top;
  transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline.drawn::before { transform: scaleY(1); }

.timeline-item { position: relative; margin-bottom: 26px; }

.timeline-dot {
  position: absolute; left: -34px; top: 32px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--primary);
}

.timeline-date {
  display: inline-block; font-family: var(--font-ui); font-size: 0.74rem;
  font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--primary); border: 1px solid rgba(244, 74, 34, 0.4);
  padding: 4px 12px; margin-bottom: 14px;
}

.timeline-item h3 {
  font-family: var(--font-head); font-size: 1.35rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 10px;
}

.timeline-item p { color: var(--text-muted); font-size: 0.95rem; }

.tl-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 9px; }

.tl-list li {
  position: relative; padding-left: 20px;
  color: var(--text-muted); font-size: 0.95rem; line-height: 1.62;
}

.tl-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; background: var(--primary); opacity: 0.85;
}

.tl-list li strong { color: var(--text); font-weight: 600; }

/* ===== Chips ===== */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.chip {
  font-family: var(--font-ui); font-size: 0.74rem; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 13px; border: 1px solid var(--border-2);
  color: var(--text-muted); background: transparent;
}

.chip-lg { font-size: 0.8rem; padding: 8px 16px; }

/* ===== Services ===== */
.projects-intro { color: var(--text-muted); max-width: 62ch; margin: -26px 0 36px; font-size: 1.02rem; }
.projects-intro strong { color: var(--primary); font-weight: 600; }

.svc-wrap {
  position: relative; padding-left: 58px; display: flex;
  flex-direction: column; gap: 18px; max-width: 940px;
}

.svc-line {
  position: absolute; left: 18px; top: 8px; bottom: 8px; width: 2px;
  background: var(--border); overflow: hidden;
}

.svc-line-fill {
  display: block; width: 100%; height: 0%;
  background: var(--primary); transition: height 0.15s linear;
}

.svc-card { display: flex; gap: 26px; align-items: flex-start; }

.svc-num {
  font-family: var(--font-head); font-size: 2.6rem; font-weight: 700;
  line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
  transition: all 0.4s ease; flex-shrink: 0;
}

.svc-card h3 {
  font-family: var(--font-head); font-size: 1.4rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 10px;
}

.svc-card p { color: var(--text-muted); font-size: 0.95rem; }

.svc-card.svc-active {
  border-color: rgba(244, 74, 34, 0.5); background: var(--panel-2);
  transform: translateX(6px);
}

.svc-card.svc-active .svc-num { -webkit-text-stroke: 0; color: var(--primary); }

.process-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
  margin-top: 46px; padding: 22px 28px;
  border: 1px solid var(--border); max-width: 940px;
}

.process-step {
  font-family: var(--font-head); font-size: 0.95rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text);
}

.process-step b { color: var(--primary); margin-right: 8px; }
.process-arrow { color: var(--text-muted); }

/* ===== Client work — case rows ===== */
.case-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--border); }

.case-row {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px;
  align-items: center; padding: 44px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
  position: relative;
}

.case-row:hover { background: rgba(255, 255, 255, 0.018); }
.case-row:nth-child(even) .case-media { order: 2; }
.case-row:nth-child(even) .case-body { order: 1; }

.case-media { overflow: hidden; border: 1px solid var(--border); }
.case-media img { width: 100%; height: auto; display: block; transition: transform 0.5s ease; }
.case-row:hover .case-media img { transform: scale(1.04); }

.case-index {
  font-family: var(--font-head); font-size: 3.4rem; font-weight: 700;
  line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(244, 74, 34, 0.55);
  display: block; margin-bottom: 12px;
}

.case-cat {
  font-family: var(--font-ui); font-size: 0.74rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 10px;
}

.case-body h3 {
  font-family: var(--font-head); font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 700; text-transform: uppercase; line-height: 1.02;
  letter-spacing: -0.005em; margin-bottom: 14px;
}

.case-desc { color: var(--text-muted); font-size: 0.98rem; }
.case-desc strong { color: var(--text); font-weight: 600; }
.case-links { margin-top: 24px; }

.case-note {
  margin-top: 20px; font-family: var(--font-ui); font-size: 0.76rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted);
  border-left: 2px solid var(--primary); padding-left: 12px;
}

.work-inprogress {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 30px; padding: 16px 20px;
  border: 1px dashed var(--border-2); border-radius: var(--radius);
  color: var(--text-muted); font-size: 0.95rem;
}

.work-inprogress strong { color: var(--text); font-weight: 600; }

/* ===== Research grid ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 38px; }

.filter-btn {
  padding: 10px 22px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 400;
  letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-btn:hover { color: var(--text); border-color: var(--border-2); }
.filter-btn.active { color: #fff; background: var(--primary); border-color: var(--primary); }

.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.project-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.project-card:hover { border-color: rgba(244, 74, 34, 0.45); transform: translateY(-4px); }
.project-card.hidden { display: none; }

.project-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.project-card:hover .project-img img { transform: scale(1.05); }

.project-badge {
  position: absolute; top: 14px; right: 14px; padding: 6px 14px;
  background: var(--primary); color: #fff;
  font-family: var(--font-ui); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
}

.project-body { padding: 26px; display: flex; flex-direction: column; flex: 1; }

.project-cat {
  font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 10px;
}

.project-body h3 {
  font-family: var(--font-head); font-size: 1.45rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 12px;
}

.project-body > p { color: var(--text-muted); font-size: 0.93rem; flex: 1; }
.project-body strong { color: var(--text); font-weight: 600; }
.project-links { margin-top: 20px; }
.projects-more { text-align: left; margin-top: 46px; }

/* ===== Skills / certs ===== */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px; }

.skills-group-title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; color: var(--text);
}

.skills-group-title .icon { color: var(--primary); }

.pub-card {
  display: flex; align-items: flex-start; gap: 24px; margin-bottom: 52px;
  border-left: 2px solid var(--primary);
}

.pub-card .card-icon { margin-bottom: 0; }

.pub-card h3 {
  font-family: var(--font-head); font-size: 1.35rem; font-weight: 600;
  text-transform: uppercase; margin-bottom: 10px;
}

.pub-detail { color: var(--text-muted); font-size: 0.93rem; }
.pub-detail em { color: var(--text); font-style: normal; font-weight: 600; }

.certs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cert-card { padding: 24px; }

.cert-year {
  font-family: var(--font-head); font-size: 0.78rem; font-weight: 500;
  color: var(--primary); letter-spacing: 0.18em;
}

.cert-card h4 {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 600;
  text-transform: uppercase; margin: 10px 0 6px; line-height: 1.2;
}

.cert-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ===== Terminal ===== */
.term { padding: 0; overflow: hidden; max-width: 900px; }

.term-bar {
  display: flex; align-items: center; gap: 8px; padding: 13px 18px;
  background: var(--panel-2); border-bottom: 1px solid var(--border);
}

.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot-r { background: #F44A22; }
.term-dot-y { background: #E8B04B; }
.term-dot-g { background: #4BAF6A; }

.term-title {
  margin-left: 12px; font-family: "Consolas", "SF Mono", monospace;
  font-size: 0.78rem; color: var(--text-muted);
}

.term-body {
  padding: 20px 22px 22px; min-height: 300px; max-height: 430px; overflow-y: auto;
  font-family: "Consolas", "SF Mono", monospace; font-size: 0.88rem;
  line-height: 1.75; cursor: text; background: #0D0D0D;
}

.term-body::-webkit-scrollbar { width: 8px; }
.term-body::-webkit-scrollbar-thumb { background: rgba(244, 74, 34, 0.35); }

#term-out div { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-muted); }
#term-out .t-cmd { color: var(--text); }
#term-out .t-cmd::before { content: "visitor@umar:~$ "; color: var(--primary); }
#term-out .t-accent { color: var(--primary); }
#term-out .t-ok { color: #4BAF6A; }
#term-out .t-err { color: #FF6B6B; }
#term-out a { color: var(--primary); text-decoration: underline; }

.term-input-line { display: flex; align-items: center; gap: 10px; }
.term-prompt { color: var(--primary); white-space: nowrap; }

#term-input {
  flex: 1; background: none; border: none; outline: none; color: var(--text);
  font: inherit; caret-color: var(--primary); min-width: 0;
}

#term-input::placeholder { color: rgba(140, 140, 140, 0.5); }

/* ===== CTA banner ===== */
.cta-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap; padding: 46px 44px; margin-bottom: 52px;
  background: var(--primary); color: #fff;
}

.cta-banner h3 {
  font-family: var(--font-head); font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 700; text-transform: uppercase; line-height: 1.02; margin-bottom: 8px;
}

.cta-banner p { color: rgba(255, 255, 255, 0.85); }

.cta-banner .btn-primary {
  background: #0A0A0A; border-color: #0A0A0A; color: #fff;
}

.cta-banner .btn-primary:hover { background: #fff; color: #0A0A0A; border-color: #fff; box-shadow: none; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 46px; align-items: start; }
.contact-lead { color: var(--text-muted); margin-bottom: 30px; font-size: 1.02rem; }
.contact-list { display: flex; flex-direction: column; gap: 12px; }

.contact-item {
  display: flex; align-items: center; gap: 18px; padding: 16px 20px;
  border: 1px solid var(--border); background: var(--panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

a.contact-item:hover { border-color: var(--primary); transform: translateX(5px); }
.contact-item .card-icon { margin-bottom: 0; width: 42px; height: 42px; }

.contact-item strong {
  display: block; font-family: var(--font-ui); font-size: 0.72rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted);
}

.contact-item span:last-child { font-size: 0.95rem; overflow-wrap: anywhere; }

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }

.form-field label {
  font-family: var(--font-ui); font-size: 0.74rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted);
}

.form-field input, .form-field textarea {
  font: inherit; font-size: 0.95rem; color: var(--text);
  background: var(--panel); border: 1px solid var(--border);
  padding: 14px 16px; resize: vertical;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(140, 140, 140, 0.55); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); background: var(--panel-2); }
.form-field input.invalid, .form-field textarea.invalid { border-color: #FF6B6B; }

.form-note { font-size: 0.88rem; color: var(--primary); min-height: 1.2em; }
.form-note.error { color: #FF6B6B; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--border); padding: 34px 0; }

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}

.footer-inner p {
  color: var(--text-muted); font-size: 0.8rem;
  font-family: var(--font-ui); letter-spacing: 0.12em; text-transform: uppercase;
}

.footer-socials { display: flex; gap: 10px; }
.footer-socials .social-btn { width: 40px; height: 40px; }

/* ===== Chrome bits ===== */
#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 120;
  background: var(--primary); pointer-events: none;
}

.dot-nav {
  position: fixed; right: 24px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 95;
}

.dot {
  width: 8px; height: 8px; border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent; cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.dot:hover { border-color: var(--primary); transform: scale(1.3); }
.dot.active { background: var(--primary); border-color: var(--primary); transform: scale(1.3); }

@media (max-width: 1100px) { .dot-nav { display: none; } }

#greet { display: inline-block; transition: opacity 0.3s ease, transform 0.3s ease; }
#greet.greet-out { opacity: 0; transform: translateY(10px); }

#matrix-canvas {
  position: fixed; inset: 0; z-index: 998; pointer-events: none;
  opacity: 0; transition: opacity 0.6s ease;
}

#matrix-canvas.on { opacity: 1; }

.back-to-top {
  position: fixed; right: 24px; bottom: 24px; width: 48px; height: 48px;
  background: var(--primary); color: #fff; display: flex;
  align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s; z-index: 90;
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

/* ===== Preloader ===== */
#preloader {
  position: fixed; inset: 0; z-index: 999; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.55s ease, visibility 0.55s;
  animation: pre-exit 0.6s ease 4s forwards;
}

#preloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
#preloader.skip { display: none; animation: none; }

@keyframes pre-exit { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.pre-inner { width: min(430px, 86%); text-align: left; }

.pre-logo {
  font-family: var(--font-head); font-size: 3rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 26px;
}

.pre-lines {
  font-family: "Consolas", monospace; font-size: 0.8rem;
  color: var(--text-muted); min-height: 60px; margin-bottom: 20px;
}

.pre-lines .ok { color: var(--primary); }
.pre-bar { height: 2px; background: var(--border); overflow: hidden; }
.pre-fill { display: block; height: 100%; width: 0; background: var(--primary); animation: pre-fill 2s ease forwards; }

@keyframes pre-fill { to { width: 100%; } }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.tilt-card { transform-style: preserve-3d; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid, .certs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 20px 5%;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-16px); opacity: 0; visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  }

  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-link { padding: 14px 16px; font-size: 1rem; }
  .nav-cta-wrap { margin: 12px 0 0; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
  .project-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--border); }

  .case-row { grid-template-columns: 1fr; gap: 24px; }
  .case-row:nth-child(even) .case-media { order: 0; }
  .case-row:nth-child(even) .case-body { order: 1; }

  .svc-wrap { padding-left: 44px; }
  .svc-line { left: 12px; }
  .svc-card { flex-direction: column; gap: 12px; }
  .cta-banner { padding: 32px 26px; }
}

@media (max-width: 560px) {
  .section { padding: 76px 0; }
  .expertise-grid, .skills-grid, .certs-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .pub-card { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .section-title .tchar { opacity: 1; transform: none; }
  .timeline::before { transform: scaleY(1); }
}
