/* ============ RESET & BASE ============ */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0e1017;
  --bg-2: #161a24;
  --bg-3: #1d222f;
  --bg-4: #252b3a;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #f3f5fb;
  --muted: #b2b8c9;
  --accent: #ff4d5a;
  --accent-2: #ff8a3d;
  --accent-3: #ffc247;
  --accent-soft: rgba(255, 77, 90, 0.12);
  --gradient: linear-gradient(135deg, #ff4d5a 0%, #ff8a3d 50%, #ffc247 100%);
  --gradient-soft: linear-gradient(135deg, rgba(255, 77, 90, 0.15), rgba(255, 138, 61, 0.1));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
strong { color: var(--text); font-weight: 600; }

/* Text selection + focus + anchor offset */
::selection { background: rgba(255, 77, 90, 0.4); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }
section[id], header[id] { scroll-margin-top: 84px; }

/* Slim themed scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff4d5a, #ff8a3d);
  border-radius: 8px;
  border: 2px solid var(--bg);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient);
  transform-origin: 0 0;
  transform: scaleX(0);
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(255, 138, 61, 0.5);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ============ 3D BACKGROUND ============ */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
}
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 54px 54px;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
/* Vignette keeps the centre dark so text over the 3D scene stays readable */
.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(14,16,23,0.38) 0%, rgba(14,16,23,0.1) 45%, rgba(14,16,23,0) 75%),
    linear-gradient(180deg, rgba(14,16,23,0.22) 0%, rgba(14,16,23,0) 14%, rgba(14,16,23,0) 86%, rgba(14,16,23,0.32) 100%);
}
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}
.bg-glow--1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -200px; left: -200px;
  animation: float1 20s ease-in-out infinite;
}
.bg-glow--2 {
  width: 500px; height: 500px;
  background: var(--accent-2);
  bottom: -100px; right: -150px;
  animation: float2 18s ease-in-out infinite;
}
@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(100px, 80px); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-80px, -60px); }
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 24, 0.45);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.is-scrolled {
  background: rgba(15, 17, 24, 0.8);
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.brand__mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  box-shadow: 0 8px 24px rgba(255, 77, 90, 0.35);
  transition: transform 0.25s ease;
}
.brand__mark svg { width: 40px; height: 40px; border-radius: 11px; display: block; }
.brand:hover .brand__mark { transform: rotate(-6deg) scale(1.05); }
.brand__text {
  font-size: 16px;
  font-family: 'Space Grotesk', sans-serif;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand__text small {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.nav__menu {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav__links {
  display: flex; gap: 30px;
  font-size: 14px;
}
/* Hamburger */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 12px;
  background: linear-gradient(135deg, rgba(255, 77, 90, 0.14), rgba(255, 138, 61, 0.08));
  border: 1px solid rgba(255, 77, 90, 0.3);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}
.nav__toggle:active { transform: scale(0.94); }
.nav__toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease, background 0.25s ease;
}
.nav.is-open .nav__toggle {
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(255, 77, 90, 0.4);
}
.nav.is-open .nav__toggle span { background: #07080d; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav__links a {
  color: var(--muted);
  transition: color 0.2s;
  font-weight: 500;
  position: relative;
}
.nav__links a:hover,
.nav__links a.is-active { color: var(--text); }
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
}
.nav__links a:hover::after,
.nav__links a.is-active::after { width: 100%; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.2s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn--small { padding: 10px 18px; font-size: 13px; }
.btn--large { padding: 16px 30px; font-size: 15px; }
.btn--primary {
  background-image: linear-gradient(135deg, #ff4d5a 0%, #ff8a3d 45%, #ffc247 75%, #ff4d5a 100%);
  background-size: 220% 100%;
  background-position: 0% 0;
  color: #07080d;
  box-shadow: 0 10px 28px rgba(255, 77, 90, 0.3);
  transition: transform 0.2s ease, box-shadow 0.25s ease, background-position 0.6s ease;
}
.btn--primary:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 16px 38px rgba(255, 77, 90, 0.5);
}
.btn--primary svg { stroke: #07080d; }
.btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--line-2);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--accent); transform: translateY(-2px); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: calc(100vh - 75px);
  padding: 70px 0 90px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-areas: "text photo" "stats stats";
  gap: 56px 64px;
  align-items: center;
  width: 100%;
}
.hero__text { grid-area: text; text-align: left; position: relative; }
.hero__text::before {
  content: '';
  position: absolute;
  inset: -50px -60px;
  background: radial-gradient(ellipse 80% 75% at 35% 45%, rgba(14,16,23,0.38) 0%, rgba(14,16,23,0.1) 50%, transparent 75%);
  z-index: -1;
  pointer-events: none;
}
.hero__photo { grid-area: photo; display: grid; place-items: center; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
}
.dot {
  width: 8px; height: 8px;
  background: var(--accent-3);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 194, 71, 0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 194, 71, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(255, 194, 71, 0.05); }
}

.hero__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(38px, 6.5vw, 76px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}
/* Keep "Hi, I'm Awais Ahmed" on a single line at every width */
.hero__hello {
  display: block;
  white-space: nowrap;
  font-size: clamp(26px, 4.4vw, 54px);
}
.grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradShift 6s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero__role {
  display: block;
  font-size: clamp(22px, 3.5vw, 38px);
  color: var(--muted);
  margin-top: 12px;
  font-weight: 500;
  height: 1.2em;
  overflow: hidden;
}
.rotator {
  display: inline-flex;
  flex-direction: column;
  animation: rotateText 12s steps(4) infinite;
}
.rotator span { display: block; height: 1.2em; line-height: 1.2em; }
@keyframes rotateText {
  0%, 22% { transform: translateY(0); }
  25%, 47% { transform: translateY(-1.2em); }
  50%, 72% { transform: translateY(-2.4em); }
  75%, 97% { transform: translateY(-3.6em); }
  100% { transform: translateY(0); }
}

.hero__sub {
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 18px);
  max-width: 560px;
  margin: 0 0 36px;
  line-height: 1.7;
}
.hero__cta { display: flex; gap: 14px; justify-content: flex-start; flex-wrap: wrap; }

.hero__stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: 40px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.stat { text-align: center; }
.stat strong {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.stat span { color: var(--muted); font-size: 13px; }

/* ---- Hero photo frame ---- */
.photo-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
}
.photo-frame__ring {
  position: absolute;
  inset: -14px;
  border-radius: 28px;
  background: conic-gradient(from 0deg, #ff4d5a, #ff8a3d, #ffc247, #a855f7, #ff4d5a);
  filter: blur(8px);
  opacity: 0.55;
  animation: ringSpin 8s linear infinite;
  z-index: 0;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
.photo-frame__img {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  z-index: 1;
  box-shadow: var(--shadow);
}
.photo-frame__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.photo-frame:hover .photo-frame__img img { transform: scale(1.045); }
.photo-frame__fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 80px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(160deg, rgba(124,92,255,0.25), rgba(0,212,255,0.12));
  color: rgba(255,255,255,0.85);
}
.photo-frame__img.is-empty { display: grid; place-items: center; }
.photo-frame__img.is-empty .photo-frame__fallback { display: grid; }
.photo-frame__badge {
  position: absolute;
  left: -16px; bottom: 26px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: rgba(24, 27, 38, 0.85);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  animation: floatBadge 4s ease-in-out infinite;
}
.photo-frame__tag {
  position: absolute;
  z-index: 2;
  padding: 8px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  background: rgba(24, 27, 38, 0.85);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.photo-frame__tag--1 { top: 30px; right: -22px; animation: floatBadge 5s ease-in-out infinite; }
.photo-frame__tag--2 { top: 50%; left: -30px; animation: floatBadge 6s ease-in-out infinite 0.5s; }
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero__scroll {
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 38px;
  border: 2px solid var(--line-2);
  border-radius: 12px;
  display: flex; justify-content: center;
  padding-top: 6px;
}
.hero__scroll span {
  display: block;
  width: 3px; height: 8px;
  background: var(--accent-2);
  border-radius: 2px;
  animation: scrollDot 2s ease infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* ============ ANIMATIONS ============ */
[data-anim] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-anim="fade-right"] { transform: translateX(-28px) translateY(0); }
[data-anim="fade-left"] { transform: translateX(28px) translateY(0); }
[data-anim].is-visible { opacity: 1; transform: translateY(0) translateX(0); }
/* Faster, snappier reveals on phones */
@media (max-width: 760px) {
  [data-anim] {
    transform: translateY(16px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  }
  [data-anim="fade-right"], [data-anim="fade-left"] { transform: translateY(16px); }
}

/* ============ SECTIONS ============ */
.section { padding: 110px 0; position: relative; }
.section--alt {
  background: rgba(22, 25, 36, 0.5);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}
.section__head { text-align: center; max-width: 780px; margin: 0 auto 70px; }
.eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
  padding: 6px 14px;
  background: rgba(255, 138, 61, 0.08);
  border: 1px solid rgba(255, 138, 61, 0.18);
  border-radius: 999px;
}
.section__head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  line-height: 1.15;
}
.section__sub { color: var(--muted); font-size: 16px; line-height: 1.7; }

/* ============ ABOUT ============ */
.about {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}
.about__text p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 18px;
  line-height: 1.75;
}
.about__meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 32px;
}
.meta-item {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
.meta-item__label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.meta-item__value { font-weight: 600; font-size: 14px; }

/* 3D Rotating Cube */
.about__card {
  display: grid;
  place-items: center;
  min-height: 380px;
  perspective: 1200px;
}
.cube {
  position: relative;
  width: 200px;
  height: 200px;
  transform-style: preserve-3d;
  animation: cubeSpin 18s linear infinite;
}
@keyframes cubeSpin {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}
.cube__face {
  position: absolute;
  width: 200px; height: 200px;
  background: linear-gradient(135deg, rgba(255, 77, 90, 0.18), rgba(255, 138, 61, 0.12));
  border: 1px solid rgba(255, 77, 90, 0.3);
  display: grid;
  place-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.05em;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 40px rgba(255, 77, 90, 0.15);
  border-radius: 12px;
}
.cube__face--front  { transform: translateZ(100px); }
.cube__face--back   { transform: rotateY(180deg) translateZ(100px); }
.cube__face--right  { transform: rotateY(90deg) translateZ(100px); }
.cube__face--left   { transform: rotateY(-90deg) translateZ(100px); }
.cube__face--top    { transform: rotateX(90deg) translateZ(100px); }
.cube__face--bottom { transform: rotateX(-90deg) translateZ(100px); }

/* Competencies */
.competencies { margin-top: 60px; text-align: center; }
.comp__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  margin-bottom: 24px;
  font-weight: 600;
}
.comp__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.chip {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.25s ease;
  cursor: default;
}
.chip:hover {
  border-color: rgba(255, 77, 90, 0.4);
  color: var(--text);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ============ SKILLS ============ */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.skill-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.3s;
  overflow: hidden;
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,92,255,0.6), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.skill-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 77, 90, 0.4);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}
.skill-card:hover::before { opacity: 1; }
.skill-card:hover .skill-card__icon { transform: scale(1.08) rotate(-4deg); }
.skill-card__icon { transition: transform 0.3s ease; }
.skill-card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--gradient-soft);
  border: 1px solid rgba(255, 77, 90, 0.25);
  border-radius: 14px;
  color: var(--accent);
  margin-bottom: 22px;
}
.skill-card__icon svg { width: 24px; height: 24px; }
.skill-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 18px;
}
.skill-card ul li {
  padding: 8px 0 8px 24px;
  color: var(--muted);
  font-size: 14px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.skill-card ul li:last-child { border-bottom: none; }
.skill-card ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 16px;
  width: 14px; height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

/* ============ TIMELINE ============ */
.timeline {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 18px; top: 12px; bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), transparent);
  opacity: 0.5;
}
.timeline__item {
  position: relative;
  padding-left: 56px;
  margin-bottom: 50px;
}
.timeline__dot {
  position: absolute;
  left: 11px; top: 4px;
  width: 16px; height: 16px;
  background: var(--gradient);
  border: 3px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 77, 90, 0.2);
}
.timeline__content {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.timeline__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.timeline__head h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
}
.timeline__date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  background: rgba(255, 138, 61, 0.1);
  border: 1px solid rgba(255, 138, 61, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
}
.timeline__org {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
  font-style: italic;
}
.timeline__list { margin-top: 14px; }
.timeline__list li {
  padding: 7px 0 7px 22px;
  color: var(--muted);
  font-size: 14.5px;
  position: relative;
  line-height: 1.65;
}
.timeline__list li::before {
  content: '▸';
  position: absolute;
  left: 0; top: 7px;
  color: var(--accent-2);
  font-size: 12px;
}
.highlights { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.hl {
  padding: 8px 14px;
  background: var(--gradient-soft);
  border: 1px solid rgba(255, 77, 90, 0.2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}

/* ============ PROJECTS ============ */
.proj-feature {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  background: linear-gradient(135deg, rgba(255, 77, 90, 0.06), rgba(255, 138, 61, 0.04));
  border: 1px solid rgba(255, 77, 90, 0.2);
  border-radius: 24px;
  padding: 50px;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}
.proj-feature__content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  margin: 14px 0 14px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.proj-feature__content p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 22px;
  line-height: 1.7;
}
.proj-feature__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}
.proj-feature__visual {
  position: relative;
  height: 320px;
  display: grid;
  place-items: center;
}
.orb {
  width: 100px; height: 100px;
  background: var(--gradient);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(255, 77, 90, 0.6);
  animation: orbPulse 4s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 80px rgba(255, 77, 90, 0.5); }
  50% { transform: scale(1.08); box-shadow: 0 0 120px rgba(255, 77, 90, 0.8); }
}
.ring {
  position: absolute;
  border: 1px solid rgba(255, 77, 90, 0.3);
  border-radius: 50%;
  animation: ringRotate 30s linear infinite;
}
.ring--1 { width: 180px; height: 180px; border-top-color: var(--accent); }
.ring--2 { width: 250px; height: 250px; border-right-color: var(--accent-2); animation-direction: reverse; animation-duration: 24s; }
.ring--3 { width: 320px; height: 320px; border-bottom-color: var(--accent-3); animation-duration: 36s; }
@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 75%);
  opacity: 0.5;
}

.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.proj {
  position: relative;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 26px 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.proj::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 77, 90, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.proj:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 77, 90, 0.4);
  background: linear-gradient(180deg, rgba(255, 77, 90, 0.04), var(--bg-3));
}
.proj:hover::before { opacity: 1; }
.proj:hover .proj__go { color: var(--accent); transform: translateX(3px); }
.proj__cat {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.proj h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.proj p { color: var(--muted); font-size: 13.5px; flex: 1; margin-bottom: 14px; }
.proj__go {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.cta-row {
  text-align: center;
  margin-top: 50px;
}

/* ============ CONTACT ============ */
.contact {
  background: linear-gradient(180deg, rgba(255, 77, 90, 0.05), transparent);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 60px 40px;
}
.contact__head { text-align: center; max-width: 700px; margin: 0 auto 50px; }
.contact__head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.contact__head p { color: var(--muted); font-size: 16px; }

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.contact-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 77, 90, 0.4);
  background: linear-gradient(180deg, rgba(255, 77, 90, 0.05), var(--bg-3));
}
.contact-card--accent {
  background: linear-gradient(135deg, rgba(255, 77, 90, 0.1), rgba(255, 138, 61, 0.06));
  border-color: rgba(255, 77, 90, 0.3);
}
.contact-card__icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: var(--gradient-soft);
  border: 1px solid rgba(255, 77, 90, 0.25);
  border-radius: 12px;
  color: var(--accent);
  margin-bottom: 18px;
}
.contact-card__icon svg { width: 22px; height: 22px; }
.contact-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}
.contact-card p {
  color: var(--muted);
  font-size: 13.5px;
  margin-bottom: 18px;
  flex: 1;
}
.contact-card__cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  transition: transform 0.2s ease;
}
.contact-card:hover .contact-card__cta { transform: translateX(4px); }

/* ============ TECH MARQUEE ============ */
.marquee {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(22, 25, 36, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
}
.marquee__track span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.25s ease;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee:hover .marquee__track span { color: var(--text); }
.marquee__track i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
}
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* ============ BACK TO TOP ============ */
.to-top {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 77, 90, 0.18), rgba(255, 138, 61, 0.1)), var(--bg-3);
  border: 1px solid rgba(255, 77, 90, 0.35);
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, border-color 0.25s ease, box-shadow 0.25s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.to-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover {
  border-color: var(--accent-2);
  box-shadow: 0 14px 36px rgba(255, 77, 90, 0.35);
}

/* ============ WHATSAPP FLOAT (pill, right side, above to-top) ============ */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 20px 11px 15px;
  background: linear-gradient(135deg, #2ee06f, #1fb85a);
  color: #fff;
  border-radius: 999px;
  z-index: 60;
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.wa-float::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #25d366;
  opacity: 0.4;
  animation: waPulse 2.6s ease-out infinite;
  z-index: -1;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.4; }
  70%, 100% { transform: scale(1.25, 1.6); opacity: 0; }
}
.wa-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(37, 211, 102, 0.55);
}
.wa-float svg { flex-shrink: 0; }
.wa-float__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.wa-float__text small {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.02em;
}

/* ============ FOOTER ============ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  background: rgba(15, 17, 24, 0.6);
  backdrop-filter: blur(10px);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand div { display: flex; flex-direction: column; line-height: 1.4; }
.footer__brand strong { font-family: 'Space Grotesk', sans-serif; font-size: 15px; }
.footer__brand span { color: var(--muted); font-size: 12.5px; }
.footer p { color: var(--muted); font-size: 13px; }
.footer__social { display: flex; gap: 10px; flex-wrap: wrap; }
.footer__social a {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.footer__social a:hover {
  color: var(--text);
  border-color: rgba(255, 77, 90, 0.45);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 920px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute;
    top: calc(100% + 1px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 20px 20px;
    background: rgba(15, 17, 24, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
  }
  .nav.is-open .nav__menu { opacity: 1; transform: translateY(0); visibility: visible; }
  .nav__links { flex-direction: column; gap: 0; width: 100%; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: 14px 6px; font-size: 15px; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav__links a::after { display: none; }
  .nav__cta { margin-top: 14px; width: 100%; }
  .brand__text small { display: none; }
  /* header: clean full-width glass bar with balanced padding */
  .nav {
    background: rgba(15, 17, 24, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(150%) blur(16px);
    -webkit-backdrop-filter: saturate(150%) blur(16px);
  }
  .nav__inner { padding: 13px 18px; max-width: 100%; }
  .brand__mark, .brand__mark svg { width: 40px; height: 40px; }
  .brand__text { font-size: 17px; }
  .hero { min-height: auto; padding: 70px 0 70px; }
  /* more breathing room between hero text blocks on mobile */
  .hero__badge { margin-bottom: 26px; }
  .hero__title { margin-bottom: 30px; }
  .hero__role { margin-top: 16px; }
  .hero__sub { margin-top: 4px; margin-bottom: 34px; line-height: 1.75; }
  .hero__inner {
    grid-template-columns: 1fr;
    grid-template-areas: "photo" "text" "stats";
    gap: 38px;
  }
  .hero__text { text-align: center; }
  .hero__text::before { display: none; }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__cta { justify-content: center; }
  .hero__role { justify-content: center; text-align: center; }
  .hero__photo { width: 100%; }
  .photo-frame { width: 280px; max-width: 86vw; margin: 0 auto; }
  /* push chips to the corners so the face/subject stays clear, with even gaps */
  .photo-frame__tag { font-size: 11px; padding: 7px 11px; }
  .photo-frame__tag--1 { top: 12px; right: 10px; bottom: auto; }
  .photo-frame__tag--2 { top: 12px; left: 10px; bottom: auto; }
  .photo-frame__badge { left: 10px; bottom: 12px; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about__card { min-height: 320px; }
  .proj-feature { grid-template-columns: 1fr; padding: 40px 30px; gap: 40px; }
  .proj-feature__visual { height: 280px; }
  /* stats become a clean full-width dashboard of cards */
  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 100%;
    padding-top: 0;
    margin-top: 6px;
    border-top: none;
  }
  .stat {
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px 14px;
  }
  .stat strong { font-size: 30px; margin-bottom: 4px; }
  .stat span { font-size: 12.5px; }
  .timeline::before { left: 14px; }
  .timeline__item { padding-left: 44px; }
  .timeline__dot { left: 7px; }
}
@media (max-width: 600px) {
  .section { padding: 76px 0; }
  .section__head { margin-bottom: 46px; }
  .hero { padding: 54px 0 64px; min-height: auto; }
  .hero__inner { gap: 44px; }
  .hero__title { font-size: clamp(32px, 9vw, 44px); margin-bottom: 26px; }
  .hero__hello { font-size: clamp(22px, 7.4vw, 34px); }
  .hero__role { font-size: clamp(19px, 5.5vw, 26px); margin-top: 14px; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { padding: 13px 20px; font-size: 13.5px; flex: 1; min-width: 140px; }
  .photo-frame { width: 240px; max-width: 78vw; }
  .about__meta { grid-template-columns: 1fr; }
  .cube, .cube__face { width: 150px; height: 150px; }
  .cube__face { font-size: 22px; }
  .cube__face--front  { transform: translateZ(75px); }
  .cube__face--back   { transform: rotateY(180deg) translateZ(75px); }
  .cube__face--right  { transform: rotateY(90deg) translateZ(75px); }
  .cube__face--left   { transform: rotateY(-90deg) translateZ(75px); }
  .cube__face--top    { transform: rotateX(90deg) translateZ(75px); }
  .cube__face--bottom { transform: rotateX(-90deg) translateZ(75px); }
  .contact { padding: 40px 24px; }
  .ring--3 { width: 240px; height: 240px; }
  .ring--2 { width: 190px; height: 190px; }
  .ring--1 { width: 140px; height: 140px; }
  .nav__inner { padding: 15px 18px; }
  .container { padding: 0 18px; }
  .brand__text { font-size: 15px; }
  .btn--small { padding: 9px 13px; font-size: 12px; }
}
@media (max-width: 380px) {
  .hero__stats { gap: 14px; }
  .stat strong { font-size: 24px; }
  .brand__text { font-size: 14px; }
  .btn--small { padding: 8px 11px; font-size: 11.5px; }
}

/* Footer + extras on small screens */
@media (max-width: 760px) {
  .footer__inner { flex-direction: column; text-align: center; gap: 18px; }
  .footer__brand { flex-direction: column; gap: 10px; }
  .footer__social { justify-content: center; }
  .marquee { padding: 14px 0; }
  .marquee__track { gap: 26px; }
  .to-top { left: 16px; bottom: 16px; width: 44px; height: 44px; }
  .wa-float { right: 16px; bottom: 16px; padding: 10px 17px 10px 13px; gap: 9px; }
  .wa-float__text { font-size: 13px; }
  .wa-float__text small { font-size: 9.5px; }
}
