:root {
  --layout-radius: 18px;
  --layout-shadow: 0 18px 50px rgba(32, 37, 31, 0.08);
}

#navbar {
  width: calc(100% - 32px);
  max-width: 1180px;
  top: 12px;
  left: 50%;
  right: auto;
  padding: 10px 14px 10px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transform: translateX(-50%);
  box-shadow: 0 10px 35px rgba(32, 37, 31, 0.08);
}

#navbar.scrolled {
  width: calc(100% - 32px);
  max-width: 1180px;
  padding: 10px 14px 10px 18px;
}

.nav-links {
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
}

.nav-links a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
}

.nav-links a.active {
  background: var(--bg-card);
  color: var(--text) !important;
  box-shadow: 0 2px 10px rgba(32, 37, 31, 0.06);
}

.nav-links a.active::after {
  display: none;
}

.nav-links a::before {
  margin-right: 4px;
  color: var(--subtle);
}

.btn-resume {
  border-radius: 999px !important;
}

.hamburger {
  border-radius: 999px;
}

#hero {
  min-height: 720px !important;
  padding: 128px 0 72px;
  align-content: center;
}

.hero-inner {
  position: relative;
  min-height: 520px;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  align-items: center;
  gap: 24px;
}

.hero-inner::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 18px;
  width: 420px;
  height: 420px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(59, 96, 75, 0.08), transparent 62%);
}

.hero-text {
  max-width: 680px;
}

.availability-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}

.availability-badge span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(86, 120, 93, 0.14);
}

.hero-tag {
  display: inline-flex !important;
  min-height: 32px;
  align-items: center;
  padding: 6px 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.65) !important;
}

.hero-name {
  max-width: 720px;
  margin-top: 18px;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: clamp(3.25rem, 5.7vw, 5rem) !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: -0.055em !important;
}

.hero-greeting-slot {
  display: inline-grid;
  line-height: 1;
  vertical-align: baseline;
}

.hero-greeting {
  grid-area: 1 / 1;
  display: inline-block;
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.hero-greeting-sizer {
  visibility: hidden;
}

.hero-greeting.is-changing {
  opacity: 0;
  transform: translateY(-0.2em);
}

.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;
}

.hero-role {
  margin-top: 22px;
  font-size: clamp(1.12rem, 2vw, 1.38rem) !important;
}

.hero-desc {
  max-width: 620px;
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-btns {
  margin-top: 32px;
}

.hero-btns a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 138px;
  min-height: 48px;
  border-radius: 999px !important;
}

.hero-visual {
  position: absolute;
  top: -128px;
  right: 0;
  display: block !important;
  width: min(36%, 390px);
  height: calc(100% + 128px);
  pointer-events: none;
}

.lanyard-rope {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.lanyard-rope path {
  fill: none;
  stroke: #b7bbb5;
  stroke-width: 5px;
  stroke-linecap: round;
  filter: drop-shadow(0 1px 1px rgba(32, 37, 31, 0.18));
}

.lanyard-clip {
  position: absolute;
  z-index: 4;
  top: -30px;
  left: 50%;
  display: grid;
  width: 28px;
  height: 40px;
  align-content: center;
  justify-items: center;
  gap: 3px;
  border: 2px solid #8b918a;
  border-radius: 7px;
  background: linear-gradient(90deg, #a5aaa3, #f8f8f4 45%, #9da29b);
  box-shadow: 0 2px 6px rgba(32, 37, 31, 0.2);
  transform: translateX(-50%);
  pointer-events: none;
}

.lanyard-clip span {
  width: 13px;
  height: 13px;
  border: 2px solid #858a83;
  border-radius: 50%;
  background: #f7f7f3;
}

.avatar-ring,
.avatar-inner,
.avatar-photo {
  border-radius: var(--layout-radius) !important;
}

.avatar-ring {
  position: absolute;
  top: 126px;
  left: 50%;
  z-index: 3;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--layout-shadow);
  transform: translate(calc(-50% + var(--drag-x, 0px)), var(--drag-y, 0px)) rotate(var(--card-rotation, 0deg));
  transform-origin: 50% -30px;
  animation: none !important;
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.avatar-ring.is-dragging {
  z-index: 5;
  cursor: grabbing;
  box-shadow: 0 24px 60px rgba(32, 37, 31, 0.2);
}

.avatar-inner {
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border: 0;
  box-shadow: none;
}

.avatar-photo {
  object-position: center 38%;
  pointer-events: none;
}

.sec {
  padding: 112px 0 !important;
}

.container {
  max-width: 1180px;
  padding-right: 36px;
  padding-left: 36px;
}

.sec-head {
  max-width: 760px;
  margin-bottom: 44px;
}

.sec-head.up .sec-num,
.sec-head .sec-num {
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card) !important;
  letter-spacing: 0.08em !important;
}

.sec-line {
  width: 72px;
  height: 2px;
  margin-top: 20px;
}

.about-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: start;
  gap: 72px;
}

.edu-card {
  margin-top: 28px;
  border-radius: var(--layout-radius) !important;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.skill-group {
  min-height: 154px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--layout-radius);
  background: var(--bg-card);
}

.projects-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.proj-card-3d,
.proj-card-inner {
  height: 470px !important;
  border-radius: var(--layout-radius) !important;
}

.proj-card-front,
.proj-card-back {
  border-radius: var(--layout-radius) !important;
}

.proj-img-wrap {
  height: 218px;
  border-radius: calc(var(--layout-radius) - 2px) calc(var(--layout-radius) - 2px) 0 0;
  overflow: hidden;
}

.proj-body {
  display: flex;
  min-height: 252px;
  flex-direction: column;
  align-items: flex-start;
  padding: 24px;
}

.proj-desc {
  max-width: 440px;
}

.project-flip-button {
  margin-top: auto;
  border-radius: 999px;
}

.stats-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
}

.gh-card,
.platform-card {
  border-radius: var(--layout-radius) !important;
}

.stats-header {
  border-radius: var(--layout-radius) var(--layout-radius) 0 0;
}

.certificate-book {
  border-radius: var(--layout-radius);
  overflow: hidden;
}

.credly-card {
  min-width: 0;
  margin-top: 24px;
  overflow: hidden;
  border-radius: var(--layout-radius) !important;
}

.credly-badges {
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  min-width: 0;
  max-width: 100%;
  gap: 12px;
  overflow-x: auto;
  padding: 18px;
}

.credly-badge {
  min-width: 110px;
  border-radius: 14px;
}

.contact-inner {
  max-width: 980px;
  margin-inline: auto;
  padding: 64px;
  border: 1px solid var(--border);
  border-radius: calc(var(--layout-radius) * 2);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: var(--layout-shadow);
}

.contact-sub {
  max-width: 620px;
  margin-inline: auto;
}

.contact-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.contact-card {
  border-radius: var(--layout-radius) !important;
}

footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
}

@media (max-width: 980px) {
  #navbar {
    width: calc(100% - 24px);
  }

  .nav-links {
    display: none;
  }

  #hero {
    min-height: 0 !important;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .hero-inner::before {
    width: 340px;
    height: 340px;
  }

  .hero-name {
    font-size: clamp(3.2rem, 9vw, 5rem) !important;
  }

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

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

  .contact-inner {
    padding: 48px 28px;
  }
}

@media (max-width: 720px) {
  #navbar,
  #navbar.scrolled {
    width: calc(100% - 20px);
    top: 10px;
  }

  .nav-logo {
    font-size: 1rem;
  }

  #hero {
    padding: 112px 0 56px;
  }

  .hero-inner {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .hero-text {
    padding-right: 0;
  }

  .hero-visual {
    position: relative;
    top: auto;
    right: auto;
    width: min(70vw, 240px);
    height: 400px;
    margin: 20px auto 0;
  }

  .avatar-ring {
    top: 96px;
    width: 100%;
  }

  .lanyard-rope path {
    stroke-width: 4px;
  }

  .hero-name {
    max-width: none;
    font-size: clamp(2.4rem, 10vw, 3.8rem) !important;
    letter-spacing: -0.06em !important;
  }

  .hero-inner::before {
    top: 30px;
    right: -12px;
    bottom: auto;
    width: 280px;
    height: 280px;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .container {
    padding-right: 20px;
    padding-left: 20px;
  }

  .sec {
    padding: 82px 0 !important;
  }

  .projects-grid,
  .contact-cards,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    gap: 16px;
  }

  .proj-card-3d,
  .proj-card-inner {
    height: 450px !important;
  }

  .contact-inner {
    padding: 40px 16px;
  }

  .credly-badges {
    grid-template-columns: repeat(7, 120px);
  }
}
