/* ============================================
   Muhammad Faisal Bakhtyar — Portfolio
   Dark · Teal accent · Image-forward hero
   ============================================ */

:root {
  /* Tuned to profile photo: steel blue shirt, charcoal blazer, warm lobby light */
  --bg: #0a0e14;
  --bg-elevated: #121820;
  --bg-soft: #171e28;
  --surface: rgba(22, 30, 42, 0.78);
  --border: rgba(160, 180, 200, 0.14);
  --border-strong: rgba(125, 168, 200, 0.42);
  --text: #eef2f6;
  --text-muted: #9aadb8;
  --text-dim: #6f8394;
  --accent: #6eb8c9;
  --accent-2: #c4a574;
  --accent-deep: #3d7a8a;
  --accent-glow: rgba(110, 184, 201, 0.28);
  --warm-glow: rgba(196, 165, 116, 0.22);
  --steel: #8fb4c9;
  --danger: #f87171;
  --success: #34d399;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --header-h: 72px;
  --container: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html.has-custom-cursor,
html.has-custom-cursor * {
  cursor: none !important;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* Atmosphere — mesh + warm/cool orbs matched to portrait lighting */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-stage__base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 60% at 70% 15%, rgba(140, 170, 190, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 50% at 15% 40%, rgba(196, 165, 116, 0.1), transparent 50%),
    linear-gradient(165deg, #0c1118 0%, #0a0e14 40%, #0e131b 100%);
}

.bg-stage__mesh {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 20% 30%, rgba(143, 180, 201, 0.18), transparent 28%),
    radial-gradient(circle at 78% 22%, rgba(196, 165, 116, 0.16), transparent 32%),
    radial-gradient(circle at 55% 75%, rgba(90, 140, 160, 0.14), transparent 35%),
    radial-gradient(circle at 30% 85%, rgba(110, 184, 201, 0.1), transparent 30%);
  filter: blur(40px);
  animation: meshDrift 22s ease-in-out infinite alternate;
  opacity: 0.9;
}

.bg-stage__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(160, 185, 205, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 185, 205, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 75%);
  opacity: 0.7;
}

.bg-stage__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.bg-stage__orb--warm {
  width: min(52vw, 520px);
  height: min(52vw, 520px);
  top: -8%;
  right: 5%;
  background: radial-gradient(circle, rgba(210, 175, 120, 0.38), transparent 68%);
  animation: orbFloat 16s ease-in-out infinite;
}

.bg-stage__orb--cool {
  width: min(48vw, 460px);
  height: min(48vw, 460px);
  bottom: 8%;
  left: -8%;
  background: radial-gradient(circle, rgba(110, 184, 201, 0.28), transparent 70%);
  animation: orbFloat 19s ease-in-out infinite reverse;
}

.bg-stage__orb--steel {
  width: min(36vw, 360px);
  height: min(36vw, 360px);
  top: 42%;
  left: 42%;
  background: radial-gradient(circle, rgba(143, 180, 201, 0.16), transparent 70%);
  animation: orbFloat 24s ease-in-out infinite;
  animation-delay: -6s;
}

.bg-stage__beam {
  position: absolute;
  top: -20%;
  right: 8%;
  width: 42%;
  height: 70%;
  background: linear-gradient(
    118deg,
    transparent 20%,
    rgba(196, 165, 116, 0.07) 45%,
    rgba(143, 180, 201, 0.08) 58%,
    transparent 78%
  );
  transform: rotate(-12deg);
  filter: blur(20px);
  opacity: 0.85;
}

.bg-stage__noise {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes meshDrift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-3%, 2%) scale(1.06);
  }
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -22px);
  }
}

.header,
main,
.footer {
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  background: rgba(7, 11, 18, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  z-index: 100;
}

.header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: calc(var(--scroll-progress, 0) * 100%);
  background: linear-gradient(90deg, #8fb4c9, #c4a574);
  opacity: 0.85;
  pointer-events: none;
}

.header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav {
  margin-left: auto;
  margin-right: 0.5rem;
  display: flex;
  gap: 1.6rem;
}

.lang-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.lang-toggle__btn {
  min-width: 40px;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.lang-toggle__btn.is-active {
  background: linear-gradient(135deg, #8fb4c9, #6eb8c9);
  color: #0a0e14;
}

.header__cta {
  margin-left: 0;
}

.header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(7, 11, 18, 0.9);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #8fb4c9, #c4a574);
  color: #0a0e14;
  font-size: 0.85rem;
  font-weight: 800;
}

.logo__text {
  font-size: 1rem;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 1.6rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.25s var(--ease);
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
}

.header__cta {
  margin-left: 0.5rem;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(135deg, #8fb4c9, #6eb8c9);
  color: #0a0e14;
  box-shadow: 0 10px 30px var(--accent-glow);
}

.btn--primary:hover {
  box-shadow: 0 14px 36px rgba(143, 180, 201, 0.4);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--border-strong);
  background: rgba(143, 180, 201, 0.08);
}

.btn--sm {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.btn--full {
  width: 100%;
}

/* Sections */
.section {
  padding: clamp(4.5rem, 10vw, 7rem) clamp(1.25rem, 4vw, 2.5rem);
  max-width: calc(var(--container) + 5rem);
  margin: 0 auto;
}

.section--alt {
  background: linear-gradient(180deg, transparent, rgba(17, 26, 40, 0.55), transparent);
  border-block: 1px solid var(--border);
  max-width: none;
  padding-inline: max(clamp(1.25rem, 4vw, 2.5rem), calc((100% - var(--container)) / 2));
}

.section__head {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section__head h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  margin-top: 0.4rem;
}

.section__sub {
  margin-top: 0.85rem;
  color: var(--text-muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: calc(var(--header-h) + 2.5rem) clamp(1.25rem, 4vw, 2.5rem) 3rem;
  max-width: calc(var(--container) + 5rem);
  margin: 0 auto;
}

.hero__ambiance {
  position: absolute;
  inset: -5% -8% auto auto;
  width: min(58%, 560px);
  height: min(88%, 720px);
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 40% 28% 36% 42%;
  opacity: 0.42;
  mask-image: radial-gradient(ellipse 70% 75% at 55% 40%, black 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 55% 40%, black 10%, transparent 72%);
}

.hero__ambiance-img {
  width: 140%;
  height: 140%;
  max-width: none;
  object-fit: cover;
  object-position: center 20%;
  filter: blur(48px) saturate(1.15) brightness(0.85);
  transform: scale(1.15);
}

.hero__content,
.hero__visual {
  position: relative;
  z-index: 1;
}

.hero__name {
  display: block;
  font-size: clamp(2.4rem, 5.5vw, 3.85rem);
  font-weight: 800;
  background: linear-gradient(105deg, #ffffff 0%, #e8eef4 35%, #a8c8d8 70%, #c4a574 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.55rem;
}

.hero__role {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.7rem;
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  min-height: 1.55em;
}

.hero__prefix {
  color: var(--text);
  font-weight: 600;
}

.hero__divider {
  color: var(--accent);
  font-weight: 400;
  opacity: 0.85;
}

.typed {
  display: inline-flex;
  align-items: center;
  min-width: 12ch;
  color: var(--accent);
  font-weight: 600;
}

.typed__caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: caretBlink 0.85s steps(1) infinite;
  vertical-align: text-bottom;
}

@keyframes caretBlink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.hero__lead {
  margin-top: 1.35rem;
  max-width: 34rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.meta-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.meta-item span {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 520px;
}

.portrait {
  position: relative;
  z-index: 2;
  width: min(100%, clamp(240px, 34vw, 400px));
}

.portrait::before {
  content: "";
  position: absolute;
  inset: -18% -12% -8%;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(196, 165, 116, 0.28), transparent 55%),
    radial-gradient(ellipse at 70% 70%, rgba(110, 184, 201, 0.2), transparent 50%);
  filter: blur(28px);
  opacity: 0.95;
  pointer-events: none;
}

.portrait__ring {
  position: absolute;
  inset: -12px;
  border-radius: 34px;
  background: conic-gradient(
    from 200deg,
    #c4a574,
    transparent 28%,
    #8fb4c9,
    transparent 58%,
    #6eb8c9,
    transparent 82%,
    #c4a574
  );
  animation: spin 14s linear infinite;
  opacity: 0.55;
}

.portrait__ring::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 32px;
  background: var(--bg);
}

.portrait__frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(160deg, #2a3340, #151b24);
  border: 1px solid rgba(196, 175, 140, 0.22);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(143, 180, 201, 0.12),
    inset 0 0 40px rgba(196, 165, 116, 0.06);
}

.portrait__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 55%, rgba(10, 14, 20, 0.45) 100%),
    linear-gradient(90deg, rgba(10, 14, 20, 0.15), transparent 20%, transparent 80%, rgba(10, 14, 20, 0.12));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.portrait__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transition: transform 0.6s var(--ease);
  filter: saturate(1.05) contrast(1.02);
}

.portrait__img.has-photo {
  object-fit: cover;
  background: #1a222c;
}

.portrait:hover .portrait__img {
  transform: scale(1.04);
}

.portrait__badge {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(18, 24, 32, 0.92);
  border: 1px solid rgba(196, 165, 116, 0.28);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: pulse 2s infinite;
}

.tech-orbit {
  position: absolute;
  inset: -24px -42px;
  z-index: 1;
  pointer-events: none;
}

.tech-orbit span {
  --float-x: 0;
  position: absolute;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
  transform: translateX(var(--float-x));
  animation: float 3.8s ease-in-out infinite;
}

.tech-orbit span:nth-child(1) {
  top: 10%;
  left: 0;
  animation-delay: 0s;
}
.tech-orbit span:nth-child(2) {
  top: 7%;
  right: 2%;
  animation-delay: 0.45s;
}
.tech-orbit span:nth-child(3) {
  top: 44%;
  left: -2%;
  animation-delay: 0.9s;
}
.tech-orbit span:nth-child(4) {
  top: 42%;
  right: -1%;
  animation-delay: 0.25s;
}
.tech-orbit span:nth-child(5) {
  bottom: 16%;
  left: 4%;
  animation-delay: 0.7s;
}
.tech-orbit span:nth-child(6) {
  bottom: 19%;
  right: 5%;
  animation-delay: 1.15s;
}
.tech-orbit span:nth-child(7) {
  bottom: -5%;
  left: 50%;
  --float-x: -50%;
  animation-delay: 0.55s;
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}

.about__copy p {
  color: var(--text-muted);
}

.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.about__tags span,
.skill-pills span,
.chip-row span {
  display: inline-flex;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(110, 184, 201, 0.05);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.about__card {
  padding: 1.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.about__card h3 {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.focus-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.focus-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.focus-list strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 0.2rem;
}

.focus-list span {
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.skill-card {
  padding: 1.4rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.skill-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 1rem;
  color: var(--accent);
  background: rgba(110, 184, 201, 0.1);
  border: 1px solid rgba(110, 184, 201, 0.2);
}

.skill-card__icon svg {
  width: 22px;
  height: 22px;
}

.skill-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.9rem;
}

.skill-card li {
  position: relative;
  padding-left: 0.9rem;
  margin-bottom: 0.45rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.skill-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 2rem;
}

/* Timeline */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.35;
}

.timeline__item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1.25rem;
}

.timeline__marker {
  width: 14px;
  height: 14px;
  margin-top: 8px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(110, 184, 201, 0.12);
}

.timeline__body {
  padding: 1.35rem 1.45rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.timeline__body:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
}

.timeline__top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.timeline__top h3 {
  font-size: 1.2rem;
}

.timeline__org {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0.35rem 0 0.75rem;
}

.timeline__body > p:not(.timeline__org) {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.badge {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--live {
  color: #0a0e14;
  background: linear-gradient(135deg, #8fb4c9, #c4a574);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Projects */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.75rem;
}

.filter {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.filter:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.filter.is-active {
  color: #0a0e14;
  background: linear-gradient(135deg, #8fb4c9, #6eb8c9);
  border-color: transparent;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transform: translateY(0) scale(1);
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
  will-change: transform;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.4s var(--ease);
}

.project-card:hover {
  transform: translateY(-10px) scale(1.035);
  border-color: var(--border-strong);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(110, 184, 201, 0.18),
    0 0 40px rgba(110, 184, 201, 0.12);
  z-index: 2;
}

.project-card:hover::after {
  box-shadow: inset 0 0 0 1px rgba(110, 184, 201, 0.25);
}

.project-card.is-hidden {
  display: none;
}

.project-card__media {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.project-card__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  transition: transform 0.55s var(--ease), filter 0.55s var(--ease);
}

.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 11, 18, 0.55));
  opacity: 0.65;
  transition: opacity 0.4s var(--ease);
}

.project-card:hover .project-card__media::before {
  transform: scale(1.12);
  filter: brightness(1.12) saturate(1.1);
}

.project-card:hover .project-card__media::after {
  opacity: 0.35;
}

.project-card__media--1 {
  background: linear-gradient(135deg, #0f766e, #164e63 55%, #1e293b);
}
.project-card__media--2 {
  background: linear-gradient(135deg, #1d4ed8, #0f766e 60%, #0b1220);
}
.project-card__media--3 {
  background: linear-gradient(135deg, #0369a1, #115e59 50%, #111827);
}
.project-card__media--4 {
  background: linear-gradient(135deg, #0e7490, #312e81 65%, #0b1220);
}
.project-card__media--5 {
  background: linear-gradient(135deg, #134e4a, #1e3a5f 55%, #0b1220);
}
.project-card__media--6 {
  background: linear-gradient(135deg, #155e75, #0f766e 45%, #1e293b);
}

.project-card__label {
  position: absolute;
  z-index: 1;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(7, 11, 18, 0.7);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.project-card__body {
  padding: 1.35rem;
}

.project-card__body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
  transition: color 0.3s var(--ease);
}

.project-card:hover .project-card__body h3 {
  color: var(--accent);
}

.project-card__body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

/* Contact */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(circle at top right, rgba(110, 184, 201, 0.12), transparent 40%),
    var(--bg-elevated);
  border: 1px solid var(--border);
}

.contact__copy h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin: 0.4rem 0 1rem;
}

.contact__copy > p {
  color: var(--text-muted);
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-weight: 600;
  transition: all 0.25s var(--ease);
}

.contact-link:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(110, 184, 201, 0.06);
  transform: translateX(4px);
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(7, 11, 18, 0.65);
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field input.is-invalid,
.field textarea.is-invalid {
  border-color: var(--danger);
}

.form-note {
  min-height: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.form-note.is-success {
  color: var(--success);
}

.form-note.is-error {
  color: var(--danger);
}

/* Footer */
.footer {
  padding: 2rem clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
  border-top: 1px solid var(--border);
}

.footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer__social {
  display: flex;
  gap: 0.75rem;
}

.footer__social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.25s var(--ease);
}

.footer__social a:hover {
  color: var(--accent);
  border-color: var(--border-strong);
}

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(13, 20, 32, 0.9);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.3s var(--ease);
  z-index: 90;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top:hover {
  border-color: var(--border-strong);
  color: var(--accent);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframes */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(52, 211, 153, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateX(var(--float-x)) translateY(0);
  }
  50% {
    transform: translateX(var(--float-x)) translateY(-10px);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .skills-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--header-h) + 2rem);
  }

  .hero__visual {
    order: -1;
    margin-bottom: 1rem;
    min-height: 380px;
  }

  .hero__ambiance {
    inset: 0 auto auto 50%;
    width: min(90%, 420px);
    height: 55%;
    transform: translateX(-50%);
    opacity: 0.32;
  }

  .portrait {
    width: min(100%, 300px);
  }

  .tech-orbit {
    display: none;
  }
}

@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
  }

  .header__cta {
    display: none;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    margin: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.75rem;
    background: rgba(7, 11, 18, 0.96);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.9rem 1rem;
    border-radius: 10px;
  }

  .nav a:hover {
    background: rgba(110, 184, 201, 0.06);
  }

  .about,
  .contact {
    grid-template-columns: 1fr;
  }

  .logo__text {
    display: none;
  }
}

@media (max-width: 560px) {
  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero__meta {
    gap: 1.1rem;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .portrait__ring,
  .tech-orbit span,
  .pulse,
  .typed__caret,
  .bg-stage__mesh,
  .bg-stage__orb {
    animation: none;
  }

  .project-card:hover {
    transform: translateY(-4px) scale(1);
  }
}

/* Custom cursor */
.cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cursor.is-visible {
  opacity: 1;
}

.cursor__dot,
.cursor__ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
}

.cursor__dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(143, 180, 201, 0.85);
  z-index: 2;
}

.cursor__ring {
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(143, 180, 201, 0.65);
  background: rgba(110, 184, 201, 0.08);
  box-shadow: 0 0 24px rgba(196, 165, 116, 0.18);
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.cursor.is-hover .cursor__ring {
  width: 56px;
  height: 56px;
  background: rgba(110, 184, 201, 0.14);
  border-color: var(--accent);
}

.cursor.is-down .cursor__ring {
  width: 28px;
  height: 28px;
  background: rgba(110, 184, 201, 0.22);
}

.cursor.is-down .cursor__dot {
  transform: translate(-50%, -50%) scale(0.7);
}

/* Toast alerts */
.toast-host {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(13, 20, 32, 0.95);
  border: 1px solid var(--border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.toast.is-in {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-out {
  opacity: 0;
  transform: translateY(8px);
}

.toast__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.toast--success {
  border-color: rgba(52, 211, 153, 0.35);
}

.toast--success .toast__icon {
  background: rgba(52, 211, 153, 0.18);
  color: var(--success);
}

.toast--error {
  border-color: rgba(248, 113, 113, 0.35);
}

.toast--error .toast__icon {
  background: rgba(248, 113, 113, 0.18);
  color: var(--danger);
}

@media (max-width: 800px) {
  .project-card:hover {
    transform: translateY(-6px) scale(1.02);
  }

  .hero__role {
    font-size: 1.05rem;
  }
}

/* WhatsApp Floating Action Button (FAB) */
.whatsapp-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  padding: 0.55rem;
  background: linear-gradient(135deg, #25D366 0%, #1DB954 100%);
  color: #0a0e14;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.18), 0 6px 18px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  transform: translateZ(0);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), opacity 0.18s var(--ease);
  backdrop-filter: blur(6px);
}

.whatsapp-fab svg {
  display: block;
  width: 28px;
  height: 28px;
  color: #fff;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}

.whatsapp-fab:focus,
.whatsapp-fab:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(37, 211, 102, 0.18), 0 8px 26px rgba(0,0,0,0.5);
  outline: none;
}

/* pulse indicator (decorative) */
.whatsapp-fab__pulse {
  position: absolute;
  inset: -8px;
  border-radius: 18px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(37,211,102,0.16), transparent 40%);
  animation: waPulse 1.9s infinite;
  opacity: 0.95;
  filter: blur(8px);
}

@keyframes waPulse {
  0% { transform: scale(0.88); opacity: 0.95; }
  60% { transform: scale(1.25); opacity: 0.18; }
  100% { transform: scale(1); opacity: 0.0; }
}

/* reduce distraction on very small screens */
@media (max-width: 560px) {
  .whatsapp-fab {
    width: 48px;
    height: 48px;
    right: 0.9rem;
    bottom: 0.9rem;
    border-radius: 12px;
  }
  .whatsapp-fab__pulse {
    display: none;
  }
}

/* prefers-reduced-motion: avoid infinite motion */
@media (prefers-reduced-motion: reduce) {
  .bg-stage::before,
  .whatsapp-fab__pulse {
    animation: none;
  }

  .portrait__img {
    transition: none;
  }
}

/* For readability this file preserves your existing structure below unchanged. */
