:root {
  --bg: #f6f9ff;
  --bg-2: #e8f0ff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #12233f;
  --muted: #4d607f;
  --line: rgba(20, 52, 108, 0.14);
  --primary: #0f6ddf;
  --secondary: #0b8f7b;
  --accent: #ef6c3a;
  --shadow: 0 18px 45px rgba(20, 46, 94, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 18% 15%, #edf4ff 0%, transparent 42%),
    radial-gradient(circle at 86% 8%, #e7fffb 0%, transparent 32%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-2) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(18, 35, 63, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 35, 63, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 78%);
  z-index: -2;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: calc(var(--scroll-progress, 0) * 100%);
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  box-shadow: 0 0 24px rgba(15, 109, 223, 0.34);
  z-index: 20;
  pointer-events: none;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.35;
  mix-blend-mode: multiply;
  transform: translate3d(calc(var(--parallax-x, 0) * 1px), calc(var(--parallax-y, 0) * 1px), 0);
  animation: drift 16s ease-in-out infinite alternate;
}

.blob-one {
  width: 360px;
  height: 360px;
  left: -80px;
  top: 100px;
  background: #8dc2ff;
}

.blob-two {
  width: 280px;
  height: 280px;
  right: 4%;
  top: 50px;
  background: #a7f0db;
  animation-duration: 19s;
}

.blob-three {
  width: 260px;
  height: 260px;
  right: 18%;
  bottom: 40px;
  background: #ffd2c3;
  animation-duration: 22s;
}

.container {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 30px 0 20px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 255, 0.78));
  border: 1px solid var(--line);
  box-shadow: 0 22px 60px rgba(20, 46, 94, 0.16);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 34px);
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
  backdrop-filter: blur(14px);
  isolation: isolate;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(15, 109, 223, 0.42), rgba(11, 143, 123, 0.32), rgba(239, 108, 58, 0.3));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: -35%;
  background: radial-gradient(circle at var(--hero-glow-x, 32%) var(--hero-glow-y, 22%), rgba(15, 109, 223, 0.16), transparent 28%),
    linear-gradient(110deg, transparent 38%, rgba(255, 255, 255, 0.42) 48%, transparent 58%);
  transform: translateX(-24%);
  animation: hero-sheen 7s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

.profile-image {
  position: relative;
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 24px;
  border: 3px solid rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 44px rgba(9, 53, 123, 0.24), 0 0 0 8px rgba(15, 109, 223, 0.08);
  transform: translateZ(0);
  transition: transform 320ms ease, box-shadow 320ms ease;
}

.hero-card:hover .profile-image {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 22px 52px rgba(9, 53, 123, 0.28), 0 0 0 10px rgba(11, 143, 123, 0.1);
}

.hero-details h1 {
  font-family: "Sora", "Manrope", sans-serif;
  margin: 6px 0 10px;
  font-size: clamp(1.7rem, 2.7vw, 2.45rem);
  line-height: 1.18;
  color: transparent;
  background: linear-gradient(100deg, #12233f, var(--primary) 48%, var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
}

.eyebrow {
  margin: 0;
  width: max-content;
  max-width: 100%;
  color: #0d57b3;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  background: rgba(15, 109, 223, 0.08);
  border: 1px solid rgba(15, 109, 223, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
}

.headline {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 420px;
  margin-top: 18px;
}

.hero-proof div {
  position: relative;
  overflow: hidden;
  min-height: 74px;
  border: 1px solid rgba(20, 52, 108, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(240, 248, 255, 0.64));
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 10px 22px rgba(22, 55, 112, 0.07);
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.hero-proof div::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  right: -20px;
  top: -18px;
  border-radius: 999px;
  background: rgba(15, 109, 223, 0.1);
}

.hero-proof div:nth-child(2)::after {
  background: rgba(11, 143, 123, 0.12);
}

.hero-proof div:nth-child(3)::after {
  background: rgba(239, 108, 58, 0.12);
}

.hero-proof div:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 109, 223, 0.26);
  box-shadow: 0 14px 28px rgba(22, 55, 112, 0.11);
}

.hero-proof strong {
  display: block;
  color: #10294d;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.28rem;
  line-height: 1;
}

.hero-proof span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.92rem;
  font-weight: 800;
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

.primary-action {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  background-size: 180% 180%;
  border: 1px solid rgba(15, 109, 223, 0.1);
  box-shadow: 0 12px 24px rgba(15, 109, 223, 0.2);
  animation: gradient-flow 5s ease infinite;
}

.secondary-action {
  color: #0d57b3;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(13, 86, 177, 0.28);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-3px);
}

.primary-action:hover {
  box-shadow: 0 16px 28px rgba(15, 109, 223, 0.26);
}

.secondary-action:hover {
  background: #f8fbff;
  border-color: rgba(13, 86, 177, 0.48);
}

.contact-row,
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.contact-row a,
.social-row a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.93rem;
  transition: transform 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

.contact-row a:hover,
.social-row a:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 109, 223, 0.35);
  background: #f8fbff;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: #ffffff;
  background: #12335f;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.resume-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.05fr);
  gap: 22px;
  padding-bottom: 32px;
}

.content-column,
.meta-column {
  display: grid;
  gap: 18px;
}

.section-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 30px rgba(22, 55, 112, 0.08);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.section-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 36%),
    radial-gradient(circle at 88% 12%, rgba(239, 108, 58, 0.08), transparent 30%);
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}

.section-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(22, 55, 112, 0.14);
  border-color: rgba(14, 97, 196, 0.3);
}

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

.section-card h2 {
  position: relative;
  margin: 0 0 12px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}

.section-card h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.section-card p,
.section-card li {
  color: var(--muted);
  line-height: 1.56;
}

.section-card > p {
  margin: 0;
}

.section-card > p + p {
  margin-top: 8px;
}

.summary-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.summary-highlights div {
  position: relative;
  border: 1px solid rgba(20, 73, 149, 0.13);
  background: rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 10px 22px rgba(22, 55, 112, 0.06);
  transition: transform 240ms ease, border-color 240ms ease, background-color 240ms ease;
}

.summary-highlights div:hover {
  transform: translateY(-3px);
  border-color: rgba(11, 143, 123, 0.24);
  background: rgba(255, 255, 255, 0.84);
}

.summary-highlights span {
  display: block;
  color: #174177;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.summary-highlights p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.36;
}

.section-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.projects-section {
  padding: clamp(16px, 2.2vw, 22px);
}

.projects-section .section-title-row {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(20, 52, 108, 0.11);
}

.chip {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary);
  border: 1px solid rgba(11, 143, 123, 0.25);
  background: rgba(167, 240, 219, 0.36);
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: 0 8px 18px rgba(11, 143, 123, 0.1);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.project-card {
  border: none;
  background: transparent;
  border-radius: 14px;
  padding: 0;
  min-height: 212px;
  position: relative;
  perspective: 1100px;
  cursor: pointer;
}

.project-card:focus-visible {
  outline: 2px solid rgba(15, 109, 223, 0.6);
  outline-offset: 4px;
}

.project-card-inner {
  position: relative;
  min-height: 212px;
  height: 100%;
  width: 100%;
  border: 1px solid rgba(18, 61, 128, 0.15);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.9));
  border-radius: 14px;
  transition: transform 360ms ease, box-shadow 240ms ease, border-color 240ms ease;
  overflow: hidden;
  transform-style: preserve-3d;
}

.project-card-inner::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0.82;
  pointer-events: none;
  z-index: 5;
}

.project-card-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), rgba(15, 109, 223, 0.18), transparent 48%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 4;
}

.featured-project {
  grid-column: 1 / -1;
  min-height: 232px;
}

.featured-project .project-card-inner {
  min-height: 232px;
  border-color: rgba(15, 109, 223, 0.36);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(231, 246, 255, 0.92) 42%, rgba(239, 255, 250, 0.9), rgba(255, 240, 234, 0.72));
  background-size: 150% 150%;
  box-shadow: 0 16px 34px rgba(15, 109, 223, 0.13);
  animation: flagship-glow 7s ease-in-out infinite;
}

.featured-project .project-card-inner::before {
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  opacity: 1;
  z-index: 5;
}

.project-card:hover .project-card-inner::after {
  opacity: 1;
}

.project-card:hover .project-card-inner,
.project-card:focus-visible .project-card-inner {
  transform: translateY(-6px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  border-color: rgba(15, 109, 223, 0.38);
  box-shadow: 0 18px 34px rgba(16, 57, 124, 0.18);
}

.project-face {
  position: absolute;
  inset: 0;
  padding: 18px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1), opacity 260ms ease;
  transform-style: preserve-3d;
}

.project-front {
  z-index: 2;
  transform: rotateY(0deg);
  opacity: 1;
}

.project-back {
  z-index: 3;
  transform: rotateY(90deg);
  opacity: 0;
  background: linear-gradient(165deg, rgba(239, 247, 255, 0.98), rgba(231, 247, 243, 0.94));
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}

.project-card.is-flipped .project-front {
  opacity: 0;
  transform: rotateY(-90deg);
  pointer-events: none;
}

.project-card.is-flipped .project-back {
  opacity: 1;
  transform: rotateY(0deg);
  pointer-events: auto;
}

.project-card.is-flipped .project-card-inner {
  transform: translateY(-2px);
}

.project-card.is-flipped .project-card-inner::after {
  opacity: 0 !important;
}

.project-card h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  line-height: 1.28;
  color: #122a4f;
  transform: translateZ(18px);
}

.project-badge {
  align-self: flex-start;
  display: inline-flex;
  width: max-content;
  margin-bottom: 8px;
  color: #0b6d5f;
  border: 1px solid rgba(11, 143, 123, 0.28);
  background: rgba(167, 240, 219, 0.42);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card p {
  margin: 0;
  color: #51627e;
  font-size: 0.88rem;
  line-height: 1.5;
  transform: translateZ(12px);
}

.project-front p:not(.project-tech) {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.featured-project .project-front p:not(.project-tech) {
  max-width: 78ch;
  -webkit-line-clamp: 3;
}

.project-tech {
  color: #174177 !important;
  font-size: 0.82rem !important;
  font-weight: 800;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(15, 109, 223, 0.14);
  background: rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  padding: 7px 10px;
}

.repo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  text-decoration: none;
  border: 1px solid rgba(13, 86, 177, 0.4);
  color: #0d57b3;
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  transition: transform 220ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, color 220ms ease;
  position: relative;
  z-index: 6;
}

.repo-link:hover {
  transform: translateY(-2px);
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: rgba(13, 86, 177, 0.2);
  box-shadow: 0 10px 18px rgba(13, 86, 177, 0.18);
}

.skill-group + .skill-group {
  margin-top: 14px;
}

.skill-group h3 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: #174177;
  letter-spacing: 0.01em;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(20, 73, 149, 0.18);
  background: linear-gradient(180deg, #ffffff, #f0f6ff);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 0.85rem;
  color: #1f4678;
  box-shadow: 0 7px 16px rgba(20, 73, 149, 0.055);
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.pill-row span:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 109, 223, 0.34);
  background: #f8fbff;
  box-shadow: 0 10px 20px rgba(20, 73, 149, 0.1);
}

.site-footer {
  text-align: center;
  color: #5f7394;
  padding: 8px 0 28px;
}

.site-footer .container {
  padding-top: 6px;
  border-top: 1px solid rgba(17, 57, 118, 0.12);
}

.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.985);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

@keyframes drift {
  0% {
    translate: 0 0;
    scale: 1;
  }
  100% {
    translate: 20px -20px;
    scale: 1.07;
  }
}

@keyframes hero-sheen {
  0%,
  62%,
  100% {
    transform: translateX(-24%);
    opacity: 0.58;
  }
  42% {
    transform: translateX(24%);
    opacity: 0.92;
  }
}

@keyframes gradient-flow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes flagship-glow {
  0%,
  100% {
    background-position: 0% 50%;
    box-shadow: 0 16px 34px rgba(15, 109, 223, 0.13);
  }
  50% {
    background-position: 100% 50%;
    box-shadow: 0 20px 42px rgba(11, 143, 123, 0.16);
  }
}

@media (max-width: 980px) {
  .hero-card {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .profile-image {
    width: 128px;
    height: 128px;
    border-radius: 20px;
  }

  .resume-layout {
    grid-template-columns: 1fr;
  }

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

  .featured-project {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .hero-proof,
  .summary-highlights {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blob,
  .section-card,
  .section-card::before,
  .hero-proof div,
  .summary-highlights div,
  .project-card,
  .project-card-inner,
  .pill-row span,
  .repo-link,
  .primary-action,
  .secondary-action,
  .contact-row a,
  .social-row a,
  .reveal,
  .hero-card::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
