:root {
  --bg: #f6eeee;
  --bg-2: #f4f0f0;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-strong: rgba(255, 255, 255, 0.85);
  --accent: #80cc2e;
  --accent-dark: #69a928;
  --accent-glow: rgba(46, 204, 113, 0.22);
  --text: #131111;
  --muted: #5e5e5e;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 18px 50px rgba(35, 24, 16, 0.08);
  --max-width: 1180px;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(128, 204, 46, 0.18), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(128, 204, 46, 0.12), transparent 20%),
    linear-gradient(180deg, var(--bg) 0%, #fbf8f7 40%, var(--bg-2) 100%);
  overflow-x: clip;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bg-glow {
  position: fixed;
  inset: auto;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.95;
  z-index: -1;
  pointer-events: none;
}

.bg-glow-left {
  top: -6rem;
  left: -8rem;
  background: radial-gradient(circle, rgba(128, 204, 46, 0.24), rgba(128, 204, 46, 0.04) 60%, transparent 70%);
}

.bg-glow-right {
  right: -8rem;
  top: 18rem;
  background: radial-gradient(circle, rgba(128, 204, 46, 0.16), rgba(128, 204, 46, 0.04) 60%, transparent 70%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.9rem clamp(0.9rem, 3vw, 2rem) 0;
}

.navbar {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(128, 204, 46, 0.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.22rem;
}

.nav-toggle span {
  width: 1.1rem;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  transition: background-color 220ms ease, color 220ms ease, transform 220ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text);
  background: rgba(128, 204, 46, 0.12);
  transform: translateY(-1px);
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6.5rem) clamp(1rem, 3vw, 2rem);
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-dark);
}

.section-header {
  margin-bottom: 1.7rem;
}

.section-header h2 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 18ch;
}

.hero {
  min-height: calc(100vh - 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: 2.25rem;
  padding-top: clamp(2rem, 6vw, 4rem);
}

.hero-content h1 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.7rem, 6vw, 4.7rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  max-width: 12ch;
}

.lead {
  margin: 1.25rem 0 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.13rem);
}

.badge-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.badge-row {
  margin-top: 1.3rem;
}

.pill,
.tag-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.07);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.92rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 220ms ease, background-color 220ms ease, border-color 220ms ease, color 220ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #b5e75d);
  color: #122000;
  box-shadow: 0 14px 34px var(--accent-glow);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(0, 0, 0, 0.08);
}

.hero-image {
  position: relative;
  display: grid;
  place-items: center;
}

.portrait-wrap {
  position: relative;
  width: min(100%, 34rem);
  margin-left: auto;
}

.profile-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 8px rgba(128, 204, 46, 0.18), 0 24px 60px rgba(55, 41, 23, 0.16);
  filter: saturate(1.02) contrast(1.02);
}

.hero-float {
  position: absolute;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-float-top {
  top: 1rem;
  left: 0.5rem;
}

.hero-float-bottom {
  right: 0.5rem;
  bottom: 1.2rem;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.4rem;
  align-items: center;
}

.about-card,
.about-copy,
.skill-card,
.project-card,
.info-card,
.profile-card,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.about-card {
  padding: 1rem;
}

.about-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: calc(var(--radius-xl) - 8px);
}

.about-copy {
  padding: clamp(1.35rem, 3vw, 2rem);
}

.about-copy p {
  margin: 0 0 1rem;
  color: #2a2a2a;
}

.about-copy strong {
  color: var(--text);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.skill-card {
  padding: 1.4rem;
}

.skill-card i {
  font-size: 2.1rem;
  color: var(--accent-dark);
}

.skill-card h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 1.08rem;
}

.skill-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.skill-bar {
  width: 100%;
  height: 0.72rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.skill-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  transition: width 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-grid,
.contact-grid,
.profiles-grid {
  display: grid;
  gap: 1rem;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card,
.info-card {
  padding: 1.5rem;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.card-icon {
  margin-top: 0.15rem;
  color: var(--accent-dark);
  font-size: 1.35rem;
  flex: 0 0 auto;
}

.cert-head {
  align-items: center;
}

.cert-logo {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.project-head h3,
.card-head h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.meta {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.project-card p,
.info-card li,
.contact-note,
.profile-card span {
  color: #363636;
}

.project-card p {
  margin: 0.95rem 0 1.1rem;
}

.card-links {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.card-links a {
  font-weight: 700;
  color: var(--accent-dark);
  border-bottom: 1px solid rgba(128, 204, 46, 0.32);
  padding-bottom: 0.1rem;
}

.card-links a:hover,
.card-links a:focus-visible {
  color: #4d7f1b;
}

.info-card ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.info-card li {
  margin-bottom: 0.55rem;
}

.Certify-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.Certify-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.cert-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profiles-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.profile-card {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  padding: 1.3rem 0.9rem;
  text-align: center;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.profile-icon {
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.profile-logo {
  width: 2.7rem;
  height: 2.7rem;
  object-fit: contain;
}

.profile-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

.leetcode-icon {
  border-color: rgba(246, 168, 20, 0.45);
}

.codechef-icon {
  border-color: rgba(87, 75, 68, 0.35);
}

.hackerrank-icon {
  border-color: rgba(31, 166, 78, 0.35);
}

.geeksforgeeks-icon {
  border-color: rgba(0, 160, 75, 0.35);
}

.codeforces-icon {
  border-color: rgba(32, 70, 137, 0.35);
}

.profile-card:hover,
.profile-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(128, 204, 46, 0.35);
  box-shadow: 0 18px 34px rgba(128, 204, 46, 0.12);
}

.contact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-card {
  display: grid;
  gap: 0.35rem;
  padding: 1.35rem;
  transition: transform 220ms ease, border-color 220ms ease;
}

.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(128, 204, 46, 0.36);
}

.contact-card i {
  color: var(--accent-dark);
  font-size: 1.2rem;
}

.contact-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-card strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.02rem;
  word-break: break-word;
}

.contact-note {
  margin-top: 1.25rem;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem 2.75rem;
  text-align: center;
  color: var(--muted);
}

.social-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}

.social-links a {
  font-size: 1.35rem;
  color: #444;
  transition: transform 220ms ease, color 220ms ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--accent-dark);
  transform: translateY(-3px);
}

.reveal {
  opacity: 0;
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.reveal-up {
  transform: translate3d(0, 28px, 0);
}

.reveal-left {
  transform: translate3d(-28px, 0, 0);
}

.reveal-right {
  transform: translate3d(28px, 0, 0);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.skill-card.is-visible .skill-bar span {
  width: var(--fill, 0%);
}

#element {
  color: var(--accent-dark);
  font-weight: 700;
}

@media (max-width: 1080px) {
  .hero,
  .about-grid,
  .project-grid,
  .profiles-grid,
  .contact-grid,
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profiles-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .portrait-wrap {
    margin: 0 auto;
    max-width: 28rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-inline: 0.75rem;
  }

  .navbar {
    border-radius: 24px;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-links {
    display: grid;
    gap: 0.3rem;
    width: 100%;
    padding-top: 0.75rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 220ms ease, opacity 220ms ease;
  }

  .nav-links.is-open {
    max-height: 24rem;
    opacity: 1;
  }

  .nav-links a {
    justify-content: center;
    width: 100%;
    background: rgba(128, 204, 46, 0.08);
  }

  .hero-content h1 {
    max-width: 100%;
    font-size: clamp(2.3rem, 12vw, 3.6rem);
  }

  .hero,
  .about-grid,
  .project-grid,
  .profiles-grid,
  .contact-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .card-links,
  .hero-actions,
  .badge-row,
  .tag-row,
  .social-links {
    justify-content: center;
  }

  .hero,
  .section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-float {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
  }

  .hero-float-top {
    left: 0;
  }

  .hero-float-bottom {
    right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 3px;
}
