:root {
  --bg: #0f1733;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #10213e;
  --muted: #385073;
  --line: #bfd4f8;
  --primary: #0b63f6;
  --primary-dark: #0a4dc0;
  --accent: #ff6b00;
  --accent-2: #0fbf9f;
  --accent-3: #ff3d81;
  --shadow: 0 14px 34px rgba(7, 16, 38, 0.26);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
}

.background-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(105, 130, 255, 0.25), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(86, 164, 255, 0.2), transparent 36%),
    radial-gradient(circle at 54% 76%, rgba(128, 112, 255, 0.16), transparent 42%),
    linear-gradient(to bottom, #0b122a 0%, #121e3f 46%, #1a2b53 100%);
}

.background-glow::before,
.background-glow::after {
  content: "";
  position: absolute;
  inset: 0;
}

.background-glow::before {
  background:
    radial-gradient(circle at 7% 11%, rgba(255, 255, 255, 0.78) 0 1px, transparent 1.8px),
    radial-gradient(circle at 13% 24%, rgba(195, 218, 255, 0.62) 0 1px, transparent 1.8px),
    radial-gradient(circle at 24% 8%, rgba(255, 255, 255, 0.75) 0 1.1px, transparent 1.9px),
    radial-gradient(circle at 31% 19%, rgba(182, 209, 255, 0.64) 0 1px, transparent 1.8px),
    radial-gradient(circle at 42% 13%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.8px),
    radial-gradient(circle at 50% 27%, rgba(199, 219, 255, 0.6) 0 1px, transparent 1.8px),
    radial-gradient(circle at 61% 10%, rgba(255, 255, 255, 0.76) 0 1px, transparent 1.8px),
    radial-gradient(circle at 69% 21%, rgba(196, 217, 255, 0.62) 0 1px, transparent 1.8px),
    radial-gradient(circle at 79% 8%, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.8px),
    radial-gradient(circle at 90% 19%, rgba(180, 206, 255, 0.6) 0 1px, transparent 1.8px),
    radial-gradient(circle at 15% 44%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.8px),
    radial-gradient(circle at 33% 38%, rgba(196, 216, 255, 0.6) 0 1px, transparent 1.8px),
    radial-gradient(circle at 49% 48%, rgba(255, 255, 255, 0.66) 0 1px, transparent 1.8px),
    radial-gradient(circle at 68% 42%, rgba(180, 206, 255, 0.58) 0 1px, transparent 1.8px),
    radial-gradient(circle at 87% 39%, rgba(255, 255, 255, 0.72) 0 1px, transparent 1.8px),
    radial-gradient(circle at 11% 72%, rgba(186, 212, 255, 0.58) 0 1px, transparent 1.8px),
    radial-gradient(circle at 29% 63%, rgba(255, 255, 255, 0.65) 0 1px, transparent 1.8px),
    radial-gradient(circle at 46% 79%, rgba(198, 219, 255, 0.56) 0 1px, transparent 1.8px),
    radial-gradient(circle at 63% 68%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1.8px),
    radial-gradient(circle at 77% 81%, rgba(188, 212, 255, 0.56) 0 1px, transparent 1.8px),
    radial-gradient(circle at 92% 74%, rgba(255, 255, 255, 0.68) 0 1px, transparent 1.8px);
  animation: twinkleSoft 9s ease-in-out infinite alternate;
}

.background-glow::after {
  background:
    radial-gradient(circle at 20% 32%, rgba(121, 151, 255, 0.18), transparent 36%),
    radial-gradient(circle at 74% 58%, rgba(120, 208, 255, 0.12), transparent 42%),
    radial-gradient(circle at 45% 80%, rgba(173, 160, 255, 0.09), transparent 40%);
  filter: blur(1px);
  animation: nebulaFloat 18s ease-in-out infinite alternate;
}

.spark-layer {
  position: fixed;
  inset: -8%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: screen;
  opacity: 0.64;
}

.spark-layer::before,
.spark-layer::after {
  content: "";
  position: absolute;
  inset: 0;
}

.spark-layer::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1.2px, transparent 1.7px),
    radial-gradient(circle, rgba(132, 206, 255, 0.88) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(255, 145, 92, 0.8) 0 1px, transparent 1.8px);
  background-size: 175px 175px, 230px 230px, 280px 280px;
  background-position: 22px 36px, 120px 94px, 48px 154px;
  animation: sparkDrift 24s linear infinite, sparkPulse 5.4s ease-in-out infinite;
}

.spark-layer::after {
  background-image:
    linear-gradient(120deg, transparent 0 46%, rgba(255, 255, 255, 0.28) 50%, transparent 54%),
    linear-gradient(120deg, transparent 0 47%, rgba(120, 208, 255, 0.24) 51%, transparent 56%),
    linear-gradient(120deg, transparent 0 46%, rgba(255, 140, 84, 0.2) 50%, transparent 55%);
  background-size: 230px 230px, 300px 300px, 380px 380px;
  background-position: 12px 40px, 140px 180px, 80px 260px;
  opacity: 0.28;
  animation: sparkSweep 18s linear infinite;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  width: 100%;
  padding: 0.95rem 0;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #dbe7fb;
  z-index: 12;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: transform 180ms ease, color 180ms ease, text-shadow 180ms ease;
}

.brand span {
  color: var(--accent-3);
  transition: color 180ms ease;
}

.main-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0;
  text-decoration: none;
  color: #2a4f80;
  font-weight: 600;
  font-size: 0.92rem;
  position: relative;
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
  white-space: nowrap;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.2rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.main-nav a:hover {
  color: var(--primary-dark);
  opacity: 0.92;
  transform: translateY(-1px);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
  opacity: 1;
}

.main-nav a:focus-visible {
  outline: none;
  color: var(--primary-dark);
}

.hero {
  padding: 5rem 0 2.25rem;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: center;
  gap: clamp(1.1rem, 3vw, 2.4rem);
}

.hero-copy-block {
  max-width: 760px;
}

.hero-profile {
  margin: 0;
  width: min(100%, 320px);
  justify-self: end;
  border-radius: 50%;
  padding: 0.45rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(193, 218, 255, 0.9));
  box-shadow: 0 18px 36px rgba(9, 29, 69, 0.34);
  opacity: 0;
  transform: translateX(26px) scale(0.95);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.hero-profile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.75);
}

.hero.is-visible .hero-profile {
  animation: heroProfileFadeIn 900ms ease-out 170ms forwards;
}

.icon-title,
.card-title,
.stack-title,
.project-title {
  display: flex;
  align-items: center;
  gap: 0.56rem;
}

.title-icon,
.card-icon,
.stack-icon,
.project-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(146, 176, 230, 0.72);
  color: #0a4dc0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(228, 241, 255, 0.96));
  box-shadow: 0 7px 16px rgba(11, 99, 246, 0.16);
  transition: transform 230ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 230ms ease;
}

.title-icon svg,
.card-icon svg,
.stack-icon svg,
.project-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  margin-bottom: 0.7rem;
  color: #a3bbf2;
  font-family: "IBM Plex Mono", monospace;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.1;
  margin: 0 0 1.1rem;
  background: linear-gradient(110deg, var(--primary-dark), var(--accent-3), var(--accent), var(--accent-2));
  background-size: 230% 230%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleGradient 10s ease infinite;
}

.hero-tagline {
  margin: 0 0 0.7rem;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.35;
  color: #dbe7ff;
  font-weight: 500;
  max-width: 720px;
}

.hero-copy {
  max-width: 690px;
  margin: 0 0 1.6rem;
  color: #d5e0f8;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.hero-stats {
  list-style: none;
  margin: 1.15rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.62rem;
  max-width: 760px;
}

.hero-stats li {
  border: 1px solid rgba(164, 193, 246, 0.5);
  border-radius: 14px;
  padding: 0.62rem 0.66rem;
  background: linear-gradient(140deg, rgba(245, 251, 255, 0.2), rgba(210, 228, 255, 0.16));
  backdrop-filter: blur(2px);
}

.hero-stats strong {
  display: block;
  color: #f9fcff;
  font-size: 1.06rem;
  line-height: 1.1;
}

.hero-stats span {
  display: block;
  margin-top: 0.18rem;
  color: #cadeff;
  font-size: 0.72rem;
  line-height: 1.3;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 148px;
  padding: 0.72rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease,
    background-position 320ms ease,
    color 220ms ease,
    border-color 220ms ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 25%, rgba(255, 255, 255, 0.35) 50%, transparent 75%);
  transform: translateX(-140%);
  transition: transform 560ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:hover::after,
.btn:focus-visible::after {
  transform: translateX(140%);
}

.btn:focus-visible {
  outline: 2px solid rgba(11, 99, 246, 0.48);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--accent-3));
  background-size: 170% 170%;
  background-position: 0% 50%;
  color: #fff;
  box-shadow: 0 10px 24px rgba(11, 99, 246, 0.32);
}

.btn-primary:hover {
  background: linear-gradient(120deg, var(--primary-dark), #d8296a);
  background-position: 100% 50%;
  box-shadow: 0 14px 30px rgba(9, 75, 191, 0.34);
}

.btn-secondary {
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, var(--accent), var(--accent-2), var(--primary)) border-box;
  border: 1px solid transparent;
  color: var(--primary-dark);
}

.btn-secondary:hover {
  color: #083b97;
  box-shadow: 0 10px 24px rgba(11, 99, 246, 0.14);
}

.about {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0 4rem;
}

.about-card {
  background: linear-gradient(160deg, #ffffff, #f6fbff);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.15rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.about-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(12, 51, 120, 0.18);
  border-color: #9ec1f8;
}

.about-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.about-card:nth-child(1) .card-icon {
  color: #0d63d8;
  border-color: #a5c2f7;
  background: linear-gradient(140deg, #ffffff, #eaf3ff);
}

.about-card:nth-child(2) .card-icon {
  color: #d95e03;
  border-color: #ffc5a0;
  background: linear-gradient(140deg, #ffffff, #fff1e5);
}

.about-card:nth-child(3) .card-icon {
  color: #008f73;
  border-color: #97dfd2;
  background: linear-gradient(140deg, #ffffff, #e7faf5);
}

.about-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.about-points {
  margin: 0.68rem 0 0;
  padding-left: 1.04rem;
  color: #38567c;
  font-size: 0.84rem;
}

.about-points li + li {
  margin-top: 0.22rem;
}

.experience-section,
.stack-section,
.services-section,
.projects-section,
.credentials-section {
  margin-bottom: 4.2rem;
}

.section-header .eyebrow {
  color: #a8c4ff;
}

.section-header h2 {
  font-size: clamp(1.45rem, 3.5vw, 2.2rem);
  margin: 0 0 1.4rem;
  color: #edf3ff;
}

.section-header .title-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #0f57d0;
  border-color: #9ec0f6;
  background: linear-gradient(140deg, #ffffff, #e7f2ff);
}

.timeline {
  position: relative;
  display: grid;
  gap: 0.95rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: linear-gradient(to bottom, #92b8fa, #91e3d4);
  opacity: 0.7;
}

.timeline-item {
  background: linear-gradient(160deg, #ffffff, #f5faff);
  border: 1px solid #bad4fa;
  border-radius: 18px;
  padding: 1rem 1rem 1rem 2.35rem;
  position: relative;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 1.04rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(140deg, #0d63d8, #0fbf9f);
  border: 2px solid #e8f2ff;
  box-shadow: 0 0 0 3px rgba(141, 186, 248, 0.35);
}

.timeline-item h3 {
  margin: 0 0 0.32rem;
  font-size: 1.05rem;
  color: #163a67;
}

.timeline-meta {
  margin: 0 0 0.52rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5c7ca9;
}

.timeline-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.timeline-points {
  margin: 0.58rem 0 0;
  padding-left: 1rem;
  color: #3a587f;
  font-size: 0.84rem;
}

.timeline-points li + li {
  margin-top: 0.24rem;
}

.timeline-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(12, 51, 120, 0.18);
  border-color: #99c1fa;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.stack-card {
  background:
    linear-gradient(150deg, rgba(11, 99, 246, 0.07), rgba(255, 107, 0, 0.06), rgba(15, 191, 159, 0.06)),
    var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.stack-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 35px rgba(12, 51, 120, 0.19);
  border-color: #9ec0f6;
}

.stack-card h3 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  font-size: 1.03rem;
}

.stack-title span:last-child {
  line-height: 1.2;
}

.stack-card:nth-child(3n + 1) .stack-icon {
  color: #0a57cb;
  border-color: #a3c1f3;
  background: linear-gradient(150deg, #ffffff, #e8f2ff);
}

.stack-card:nth-child(3n + 2) .stack-icon {
  color: #d06300;
  border-color: #ffc8a3;
  background: linear-gradient(150deg, #ffffff, #fff2e8);
}

.stack-card:nth-child(3n) .stack-icon {
  color: #018f73;
  border-color: #97dfd2;
  background: linear-gradient(150deg, #ffffff, #e8fbf5);
}

.chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-list li {
  border: 1px solid #acd0ff;
  background: linear-gradient(150deg, #ffffff, #eef6ff);
  padding: 0.35rem 0.58rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: #173865;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.05;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.tech-chip-icon {
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 180ms ease;
}

.tech-chip-icon i {
  font-size: 0.92rem;
  line-height: 1;
}

.tech-chip-glyph {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.57rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #174075;
  background: rgba(9, 84, 198, 0.12);
  border: 1px solid rgba(8, 72, 172, 0.2);
  transition: background 180ms ease, border-color 180ms ease;
}

.tech-chip-label {
  line-height: 1.1;
}

.stack-card:nth-child(3n + 1) .chip-list li {
  border-color: #b3cdf9;
  background: linear-gradient(150deg, #ffffff, #edf4ff);
}

.stack-card:nth-child(3n + 2) .chip-list li {
  border-color: #ffccab;
  background: linear-gradient(150deg, #ffffff, #fff2e8);
}

.stack-card:nth-child(3n) .chip-list li {
  border-color: #9de7d9;
  background: linear-gradient(150deg, #ffffff, #e9fbf6);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  background: linear-gradient(150deg, #ffffff, #f7fbff);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1rem;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.service-title {
  margin: 0 0 0.58rem;
  display: flex;
  align-items: center;
  gap: 0.56rem;
  font-size: 1.03rem;
}

.service-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(146, 176, 230, 0.72);
  color: #0a4dc0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(228, 241, 255, 0.96));
  box-shadow: 0 7px 16px rgba(11, 99, 246, 0.16);
  transition: transform 230ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 230ms ease;
}

.service-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.service-list {
  margin: 0.68rem 0 0;
  padding-left: 1rem;
  color: #38567c;
  font-size: 0.84rem;
}

.service-list li + li {
  margin-top: 0.22rem;
}

.service-card:nth-child(1) .service-icon {
  color: #0a57cb;
  border-color: #a3c1f3;
  background: linear-gradient(150deg, #ffffff, #e8f2ff);
}

.service-card:nth-child(2) .service-icon {
  color: #d06300;
  border-color: #ffc8a3;
  background: linear-gradient(150deg, #ffffff, #fff2e8);
}

.service-card:nth-child(3) .service-icon {
  color: #018f73;
  border-color: #97dfd2;
  background: linear-gradient(150deg, #ffffff, #e8fbf5);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 19px 34px rgba(12, 51, 120, 0.18);
  border-color: #9ec0f6;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  background: linear-gradient(145deg, #ffffff, #f5f8ff, #eefcff);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.2rem 1.1rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px rgba(12, 51, 120, 0.18);
  border-color: #9ec0f6;
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.project-cover {
  margin: 0 0 0.9rem;
  border: 1px solid #c9dbfb;
  border-radius: 13px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, #edf4ff, #f8fbff);
  transition: border-color 220ms ease, box-shadow 220ms ease;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 260ms ease, filter 260ms ease;
}

.project-card:hover .project-cover img {
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.03);
}

.project-title span:last-child {
  line-height: 1.2;
}

.project-card:nth-child(1) .project-icon {
  color: #0c59cb;
  border-color: #a5c2f3;
}

.project-card:nth-child(1) .project-cover {
  border-color: #adc8f6;
}

.project-card:nth-child(1) .project-cover img {
  object-position: center 42%;
}

.project-card:nth-child(2) .project-icon {
  color: #ca5a00;
  border-color: #ffc5a0;
  background: linear-gradient(140deg, #ffffff, #fff0e4);
}

.project-card:nth-child(2) .project-cover {
  border-color: #ffc9ab;
}

.project-card:nth-child(2) .project-cover img {
  object-position: center 48%;
}

.project-card:nth-child(3) .project-icon {
  color: #008f72;
  border-color: #97dfd2;
  background: linear-gradient(140deg, #ffffff, #e7faf4);
}

.project-card:nth-child(3) .project-cover {
  border-color: #9de4d8;
}

.project-card:nth-child(3) .project-cover img {
  object-position: center 46%;
}

.project-card p {
  margin: 0;
  color: var(--muted);
}

.project-meta {
  margin: 0.66rem 0 0.52rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #5575a5;
  text-transform: uppercase;
}

.project-points {
  margin: 0 0 0.68rem;
  padding-left: 1rem;
  color: #39587f;
  font-size: 0.84rem;
}

.project-points li + li {
  margin-top: 0.22rem;
}

.project-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.project-tags li {
  border: 1px solid #b2cdf9;
  background: linear-gradient(150deg, #ffffff, #eef6ff);
  border-radius: 999px;
  padding: 0.28rem 0.56rem;
  font-size: 0.74rem;
  color: #1a446f;
  font-family: "IBM Plex Mono", monospace;
}

.project-card:nth-child(2) .project-tags li {
  border-color: #ffc9ab;
  background: linear-gradient(150deg, #ffffff, #fff2e8);
}

.project-card:nth-child(3) .project-tags li {
  border-color: #9de4d8;
  background: linear-gradient(150deg, #ffffff, #e9fbf6);
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.credential-card {
  background: linear-gradient(150deg, #ffffff, #f6fbff);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem 1rem;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.credential-card h3 {
  margin: 0 0 0.56rem;
  color: #163a67;
  font-size: 1.03rem;
}

.credential-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.credential-list {
  margin: 0.68rem 0 0;
  padding-left: 1rem;
  color: #39587f;
  font-size: 0.84rem;
}

.credential-list li + li {
  margin-top: 0.22rem;
}

.credential-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 19px 34px rgba(12, 51, 120, 0.18);
  border-color: #9ec0f6;
}

.site-footer {
  border-top: 1px solid rgba(149, 176, 232, 0.36);
  padding: 2.8rem 0 3.2rem;
  background: linear-gradient(160deg, rgba(14, 23, 48, 0.75), rgba(18, 30, 58, 0.8));
}

.footer-content h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.footer-title {
  width: fit-content;
  padding: 0.36rem 0.64rem 0.36rem 0.36rem;
  border-radius: 14px;
  background: linear-gradient(112deg, rgba(172, 205, 255, 0.18), rgba(255, 185, 219, 0.12), rgba(255, 226, 175, 0.14));
  border: 1px solid rgba(188, 213, 255, 0.4);
  box-shadow: 0 10px 26px rgba(6, 18, 45, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.footer-title span:last-child {
  color: #f9fcff;
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.12;
  text-shadow: 0 2px 14px rgba(136, 174, 255, 0.45);
}

.footer-title .title-icon {
  color: #d33f84;
  border-color: #f8b7d2;
  background: linear-gradient(140deg, #ffffff, #ffeef5);
}

.footer-content p {
  margin: 0.35rem 0;
  color: #c3d3f5;
}

.footer-links {
  display: flex;
  gap: 1rem;
  margin: 0.75rem 0 0.9rem;
  flex-wrap: wrap;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 198, 255, 0.24);
  background: rgba(91, 126, 196, 0.12);
  color: #a8c6ff;
  font-weight: 600;
  text-decoration: none;
  transition:
    color 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.footer-links a:hover {
  color: #e5edff;
  text-decoration: none;
  transform: translateY(-2px);
  border-color: rgba(212, 226, 255, 0.42);
  background: rgba(134, 169, 235, 0.24);
  box-shadow: 0 8px 18px rgba(6, 16, 43, 0.24);
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover {
    transform: translateY(-1px);
    text-shadow: 0 6px 14px rgba(11, 99, 246, 0.2);
  }

  .brand:hover span {
    color: #ff2377;
  }

  .hero-profile:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 22px 42px rgba(8, 30, 70, 0.36);
  }

  .about-card:hover .card-icon,
  .stack-card:hover .stack-icon,
  .project-card:hover .project-icon,
  .service-card:hover .service-icon {
    transform: translateY(-1px) scale(1.08) rotate(-7deg);
    box-shadow: 0 11px 18px rgba(11, 99, 246, 0.23);
  }

  .chip-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 16px rgba(12, 51, 120, 0.12);
  }

  .chip-list li:hover .tech-chip-icon {
    transform: scale(1.14);
  }

  .chip-list li:hover .tech-chip-glyph {
    background: rgba(9, 84, 198, 0.2);
    border-color: rgba(8, 72, 172, 0.34);
  }

  .project-card:hover .project-cover {
    box-shadow: 0 12px 24px rgba(8, 36, 83, 0.14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand,
  .brand span,
  .main-nav a,
  .main-nav a::after,
  .btn,
  .btn::after,
  .hero-profile,
  .hero-profile img,
  .title-icon,
  .card-icon,
  .stack-icon,
  .project-icon,
  .about-card,
  .timeline-item,
  .stack-card,
  .service-card,
  .service-icon,
  .project-card,
  .credential-card,
  .chip-list li,
  .tech-chip-icon,
  .tech-chip-glyph,
  .project-cover,
  .project-cover img,
  .footer-links a {
    transition: none !important;
  }

  .hero.is-visible .hero-profile {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  .spark-layer::before,
  .spark-layer::after {
    animation: none !important;
  }

  .spark-layer {
    opacity: 0.22;
  }
}

.copyright {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  color: #b9c9eb;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 650ms ease;
  transition-delay: var(--delay, 0s);
}

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

@keyframes titleGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes heroProfileFadeIn {
  0% {
    opacity: 0;
    transform: translateX(26px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes twinkleSoft {
  0% {
    opacity: 0.42;
  }
  50% {
    opacity: 0.78;
  }
  100% {
    opacity: 0.5;
  }
}

@keyframes nebulaFloat {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translateY(-10px) scale(1.04);
    opacity: 0.95;
  }
}

@keyframes sparkDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-3%, -4%, 0) scale(1.03);
  }
  100% {
    transform: translate3d(-7%, -8%, 0) scale(1.06);
  }
}

@keyframes sparkPulse {
  0%,
  100% {
    opacity: 0.42;
    filter: brightness(0.92);
  }
  50% {
    opacity: 0.9;
    filter: brightness(1.15);
  }
}

@keyframes sparkSweep {
  0% {
    transform: translate3d(0, 12%, 0);
    opacity: 0.14;
  }
  50% {
    opacity: 0.34;
  }
  100% {
    transform: translate3d(-8%, -16%, 0);
    opacity: 0.14;
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 1.05rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-profile {
    justify-self: start;
    width: min(58vw, 250px);
  }

  .about {
    grid-template-columns: 1fr;
  }

  .timeline {
    gap: 0.82rem;
  }

  .stack-grid {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .credentials-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    padding: 0.75rem 0;
  }

  .nav-shell {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0;
  }

  .brand {
    justify-content: flex-start;
  }

  .main-nav {
    display: flex;
    gap: 0.85rem;
    width: 100%;
  }

  .main-nav a {
    width: auto;
  }

  .hero {
    padding-top: 3.2rem;
    gap: 0.95rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-profile {
    justify-self: center;
    width: min(70vw, 220px);
  }

  .timeline::before {
    left: 11px;
  }

  .timeline-item {
    padding-left: 2.15rem;
  }

  .project-meta {
    font-size: 0.68rem;
    line-height: 1.4;
  }
}
