/* ============================================================
   Hisham AlKassar — Portfolio
   Dark, glassy, aurora-lit. No frameworks.
   ============================================================ */

:root {
  --bg: #04050c;
  --bg-2: #080a18;
  --ink: #eef0ff;
  --muted: #9aa0c3;
  --line: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-strong: rgba(255, 255, 255, 0.07);
  --c1: #6ee7ff;
  --c2: #8b7bff;
  --c3: #ff6ec7;
  --grad: linear-gradient(100deg, var(--c1), var(--c2) 50%, var(--c3));
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(139, 123, 255, 0.4); color: #fff; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Background layers ---------- */

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: radial-gradient(120% 90% at 70% 10%, #131234 0%, #070a18 45%, #04050c 100%);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 30;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain-shift 1.2s steps(4) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

/* ---------- Scroll progress ---------- */

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 60;
  background: transparent;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(139, 123, 255, 0.8);
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem clamp(1.2rem, 5vw, 4rem);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  background: rgba(6, 8, 20, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 1px solid rgba(140, 160, 255, 0.4);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.nav-cta:hover {
  border-color: var(--c2);
  background: rgba(139, 123, 255, 0.12);
  box-shadow: 0 0 24px rgba(139, 123, 255, 0.35);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-burger span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- Layout primitives ---------- */

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(4.5rem, 10vh, 8rem) clamp(1.2rem, 5vw, 3rem);
}

.section-slim {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 3rem) clamp(1.2rem, 5vw, 3rem);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.section-index {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  white-space: nowrap;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
  will-change: transform;
}

.btn span { position: relative; z-index: 1; }

.btn-primary {
  color: #060714;
  background: var(--grad);
  box-shadow: 0 8px 30px rgba(139, 123, 255, 0.35);
}

.btn-primary:hover { box-shadow: 0 12px 44px rgba(255, 110, 199, 0.45); }

.btn-ghost {
  border: 1px solid rgba(140, 160, 255, 0.4);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  border-color: var(--c1);
  box-shadow: 0 0 30px rgba(110, 231, 255, 0.25);
}

.btn-lg {
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  padding: 1.1rem 2.4rem;
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding-top: 7rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--glass);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  margin-bottom: 1.6rem;
}

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #43e97b;
  box-shadow: 0 0 0 0 rgba(67, 233, 123, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(67, 233, 123, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(67, 233, 123, 0); }
  100% { box-shadow: 0 0 0 0 rgba(67, 233, 123, 0); }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.4rem;
}

.hero-line { display: block; }

.hero-name .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotate(6deg);
  animation: char-in 0.7s var(--ease-out) forwards;
}

@keyframes char-in {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

/* gradient line reveals as a block (added by JS, so no-JS still shows text) */
.hero-line.line-in {
  opacity: 0;
  transform: translateY(0.45em);
  animation: line-in 0.9s var(--ease-out) 0.75s forwards;
}

@keyframes line-in {
  to { opacity: 1; transform: translateY(0); }
}

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  font-weight: 500;
  margin-bottom: 1.3rem;
  min-height: 1.6em;
}

.caret {
  color: var(--c2);
  animation: caret-blink 0.9s steps(1) infinite;
  font-weight: 400;
}

@keyframes caret-blink { 50% { opacity: 0; } }

.hero-sub {
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 2.2rem;
}

.hero-sub strong { color: var(--ink); font-weight: 700; }

.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- 3D tech sphere ---------- */

.hero-sphere {
  position: relative;
  width: min(42vw, 460px);
  aspect-ratio: 1;
  justify-self: center;
  perspective: 1000px;
}

.sphere { position: absolute; inset: 0; }

.sphere-word {
  position: absolute;
  top: 50%; left: 50%;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--ink);
  text-shadow: 0 0 18px rgba(110, 231, 255, 0.35);
  will-change: transform, opacity;
  pointer-events: none;
}

.sphere-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 32% 28%, rgba(139, 123, 255, 0.35), rgba(8, 10, 26, 0.9) 65%);
  border: 1px solid rgba(140, 160, 255, 0.35);
  box-shadow:
    0 0 60px rgba(139, 123, 255, 0.35),
    inset 0 0 40px rgba(110, 231, 255, 0.12);
  animation: core-float 5s ease-in-out infinite alternate;
}

@keyframes core-float {
  from { transform: translate(-50%, -52%); }
  to { transform: translate(-50%, -48%); }
}

.sphere-initials {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.sphere-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px dashed rgba(140, 160, 255, 0.25);
  transform: translate(-50%, -50%) rotateX(72deg);
  transform-style: preserve-3d;
}

.ring-1 {
  width: 78%; aspect-ratio: 1;
  animation: ring-spin 22s linear infinite;
}

.ring-2 {
  width: 100%; aspect-ratio: 1;
  border-color: rgba(255, 110, 199, 0.18);
  animation: ring-spin 34s linear infinite reverse;
}

@keyframes ring-spin {
  from { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(0); }
  to { transform: translate(-50%, -50%) rotateX(72deg) rotateZ(360deg); }
}

/* ---------- Scroll hint ---------- */

.scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.scroll-hint-track {
  width: 24px; height: 40px;
  border: 1.5px solid rgba(140, 160, 255, 0.4);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-hint-dot {
  width: 4px; height: 8px;
  border-radius: 4px;
  background: var(--c1);
  animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

.scroll-hint-label {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* ---------- Stats ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.stat {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.8rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3rem;
  align-items: start;
}

.about-text p { color: var(--muted); margin-bottom: 1.3rem; }
.about-text strong { color: var(--ink); }

.about-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.8rem;
}

.chip {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
}

.about-personal {
  font-style: italic;
  border-left: 3px solid;
  border-image: var(--grad) 1;
  padding-left: 1.1rem;
}

/* ---------- Glass cards & tilt ---------- */

.glass-card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.7rem 1.5rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: border-color 0.35s, background 0.35s;
}

.glass-card:hover {
  border-color: rgba(139, 123, 255, 0.45);
  background: var(--glass-strong);
}

.glass-card::before {
  /* mouse-tracking glow, driven by --mx / --my from JS */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 123, 255, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.glass-card:hover::before { opacity: 1; }

.tilt {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.18s ease-out;
}

.glass-card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.glass-card p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Timeline ---------- */

.timeline { position: relative; }

.timeline-line {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(139, 123, 255, 0.5) 8%, rgba(255, 110, 199, 0.5) 92%, transparent);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 3rem 3.5rem 0;
}

.timeline-item:nth-child(odd) { left: 0; text-align: left; }

.timeline-item:nth-child(even) {
  left: 50%;
  padding: 0 0 3.5rem 3rem;
}

.timeline-dot {
  position: absolute;
  top: 2rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--c2);
  box-shadow: 0 0 18px rgba(139, 123, 255, 0.8);
  z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot { right: -7px; }
.timeline-item:nth-child(even) .timeline-dot { left: -7px; }

.timeline-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.8rem 1.7rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.35s, box-shadow 0.35s;
}

.timeline-card:hover {
  border-color: rgba(139, 123, 255, 0.45);
  box-shadow: 0 18px 50px rgba(5, 8, 30, 0.6);
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.timeline-date {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.timeline-loc {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
}

.timeline-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
}

.timeline-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c1);
  margin: 0.15rem 0 1rem;
}

.timeline-card ul { margin-bottom: 1.2rem; }

.timeline-card li {
  position: relative;
  color: var(--muted);
  font-size: 0.9rem;
  padding-left: 1.2rem;
  margin-bottom: 0.55rem;
}

.timeline-card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--c2);
}

/* ---------- Company badges ---------- */

.timeline-co {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  margin-bottom: 1rem;
}

.timeline-co h4 { margin: 0.1rem 0 0; }

.co-badge {
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  border: 1px solid;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}

.co-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.co-awr {
  color: #e0655f;
  border-color: rgba(255, 255, 255, 0.14);
  background: #181917;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}

.co-kuality {
  color: #e8607f;
  border-color: rgba(224, 85, 120, 0.45);
  background: linear-gradient(135deg, #2e0a18, #12040a);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 18px rgba(224, 85, 120, 0.14);
}

.co-medicus {
  color: #6ec9ff;
  border-color: rgba(110, 201, 255, 0.4);
  background: linear-gradient(135deg, #0a2338, #050b16);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 18px rgba(110, 201, 255, 0.12);
}

.co-cloudappers {
  color: #52c5ef;
  border-color: rgba(82, 197, 239, 0.4);
  background: linear-gradient(135deg, #0a2c3d, #050f16);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 18px rgba(82, 197, 239, 0.12);
}

/* ---------- Tags ---------- */

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tags span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c1);
  background: rgba(110, 231, 255, 0.07);
  border: 1px solid rgba(110, 231, 255, 0.2);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  transition: background 0.3s, transform 0.3s;
}

.tags span:hover {
  background: rgba(110, 231, 255, 0.16);
  transform: translateY(-2px);
}

.tags-lg span { font-size: 0.8rem; text-transform: none; letter-spacing: 0.02em; }

/* ---------- Case studies ---------- */

.case-studies {
  display: grid;
  gap: 1.4rem;
  margin-bottom: 2.6rem;
}

.case-study { padding: 2rem 1.9rem; }

.case-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.case-head h3 {
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  margin: 0;
}

.case-head .proj-cat { margin-bottom: 0.3rem; }

.case-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.case-cell h4 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.case-cell p { color: var(--muted); font-size: 0.9rem; }
.case-cell strong { color: var(--ink); }

.case-cell a {
  color: var(--c1);
  font-weight: 600;
  transition: color 0.3s;
}

.case-cell a:hover { color: var(--c3); }

/* ---------- Projects ---------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.3rem;
}

.proj-link {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c1);
  transition: color 0.3s, transform 0.3s;
}

.proj-link:hover { color: var(--c3); transform: translateX(3px); }

.project { display: flex; flex-direction: column; }

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  min-height: 2rem;
}

.project-icon {
  font-size: 1.5rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.award-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffd98e;
  background: rgba(255, 200, 80, 0.09);
  border: 1px solid rgba(255, 200, 80, 0.3);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
}

.proj-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.project h3 { font-size: 1.2rem; margin-bottom: 0.55rem; }

.project > p:not(.proj-cat) { flex: 1; margin-bottom: 1.1rem; }

.clients {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2.4rem;
  justify-content: center;
}

.clients-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.4rem;
}

.chip-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.chip-logo img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
  display: block;
}

/* ---------- Principles (How I lead) ---------- */

.principles {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.8rem 1.6rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  gap: 1.1rem;
  position: sticky;
  top: 6rem;
}

.principles-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.principle {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
}

.principle > span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-top: 0.15rem;
}

.principle p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.principle strong { color: var(--ink); }

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.skill-group h3 {
  font-size: 1.15rem;
  margin-bottom: 1.1rem;
}

/* ---------- AI-assisted engineering ---------- */

.ai-card { padding: 2rem 1.9rem; }

.ai-lead {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 1.7rem;
}

.ai-lead strong { color: var(--ink); }

.ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ---------- Awards ---------- */

.awards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.award { text-align: left; }

.award-icon {
  font-size: 2rem;
  margin-bottom: 0.9rem;
  filter: drop-shadow(0 0 14px rgba(255, 200, 80, 0.35));
}

.award h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.award p { font-size: 0.85rem; }
.award p strong { color: var(--ink); }

/* ---------- Contact ---------- */

.contact { text-align: center; }

.contact-inner {
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(139, 123, 255, 0.14), transparent 70%),
    var(--glass);
  padding: clamp(3rem, 8vh, 5.5rem) clamp(1.5rem, 5vw, 4rem);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2.4rem;
}

.contact-actions { margin-bottom: 2.2rem; }

.contact-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-links a { transition: color 0.3s; }
.contact-links a:hover { color: var(--c1); }

.dot-sep { color: var(--c2); font-size: 0.7rem; }

/* ---------- Footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem clamp(1.2rem, 5vw, 3rem) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .grain { display: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  /* copy first on small screens; the sphere becomes a footnote, not the headline */
  .hero-sphere { width: min(52vw, 300px); margin-top: 0.5rem; }
  .about-grid { grid-template-columns: 1fr; }
  .principles { position: static; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .awards-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .ai-grid { grid-template-columns: 1fr; }
  .timeline-line { left: 10px; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding: 0 0 2.5rem 2.4rem;
    text-align: left;
  }
  .timeline-item:nth-child(odd) .timeline-dot,
  .timeline-item:nth-child(even) .timeline-dot { left: 3px; right: auto; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    background: rgba(4, 5, 14, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
  }
  .nav-links.open { opacity: 1; visibility: visible; z-index: 49; }
  .nav-links a { font-size: 1.2rem; }
  .nav-cta { display: none; }
  .nav-burger { display: flex; margin-left: auto; }
  .nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger.open span:nth-child(2) { opacity: 0; }
  .nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .awards-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; gap: 0.8rem; }
}

@media (max-width: 600px) {
  .hero-sphere { display: none; }
  .scroll-hint { display: none; }
}
