/* style.css */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #050816;
  --card: #0f1220;
  --text: #ffffff;
  --muted: #bdbdbd;
  --accent: #ff7b00;
  --accent2: #7b2cff;
  --stroke: rgba(255, 255, 255, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background:
    radial-gradient(
      1200px 600px at 15% 0%,
      rgba(255, 123, 0, 0.1),
      transparent 55%
    ),
    radial-gradient(
      900px 450px at 85% 15%,
      rgba(123, 44, 255, 0.12),
      transparent 60%
    ),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Navbar */

.navbar {
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease;

  width: 100%;
  height: 80px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 8%;

  position: fixed;
  top: 0;

  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);

  z-index: 1000;
}

.logo {
  font-size: 28px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: white;
  transition: 0.3s;
}

.nav-links a:hover {
  color: #ff7b00;
}

.nav-links a.is-active {
  color: #ff7b00;
  text-shadow: 0 0 20px rgba(255, 123, 0, 0.35);
}

.nav-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 30px;

  background: linear-gradient(135deg, var(--accent), #ff4d00);
  color: white;

  cursor: pointer;
  font-weight: 700;

  transition: 0.25s;
  box-shadow: 0 12px 40px rgba(255, 123, 0, 0.2);
}

.nav-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 60px rgba(255, 123, 0, 0.28);
}

/* Hero */

.hero {
  width: 100%;
  overflow: hidden;

  min-height: 100vh;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 120px 8%;

  position: relative;
}

/* Text */

.hero-text {
  width: 50%;
  z-index: 2;
}

.badge {
  background: rgba(255, 123, 0, 0.15);
  color: #ff7b00;

  padding: 10px 18px;
  border-radius: 30px;

  font-size: 14px;
}

.hero-text h1 {
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.1;

  margin-top: 25px;
}

/* Make the static 'Modern' text stay visible even while typing lines hide/show */
.accent.modern-label {
  opacity: 1;
  clip-path: none !important;
  animation: none !important;
}

.hero-text p {
  margin-top: 20px;
  color: #bdbdbd;

  line-height: 1.8;
  width: 80%;
}

/* Buttons */

.buttons {
  margin-top: 35px;
  display: flex;
  gap: 20px;
}

/* Allow both <a> and <button> */
.primary-btn,
.secondary-btn {
  padding: 15px 28px;
  border-radius: 40px;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  text-decoration: none;
  user-select: none;
}

.primary-btn {
  background: #ff7b00;
  color: white;
}

.secondary-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-5px);
}

/* Scroll progress */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 2000;
  pointer-events: none;
  background: transparent;
}

.scroll-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 123, 0, 0.9),
    rgba(123, 44, 255, 0.85)
  );
  box-shadow: 0 0 18px rgba(255, 123, 0, 0.35);
}

/* Interactive background layers */

.bg-grid {
  position: absolute;
  inset: -40px -40px -40px -40px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(
    closest-side at 50% 40%,
    rgba(0, 0, 0, 1),
    rgba(0, 0, 0, 0)
  );
  opacity: 0.35;
  transform: translate3d(0, 0, 0);
  pointer-events: none;
}

.bg-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 123, 0, 0.1) 45%,
    rgba(123, 44, 255, 0.12) 60%,
    transparent 100%
  );
  opacity: 0;
  transform: translateY(-20%);
  pointer-events: none;
}

/* Right Side */

.hero-visual {
  width: 40%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* 3D Canvas (Three.js) */
#bb-3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Ensure existing visual layers render above the canvas where needed */
.hero-visual .circle,
.hero-visual .profile-wrap,
.hero-visual .cursor-orb {
  z-index: 2;
}

.profile-wrap {
  position: absolute;
  z-index: 3;
  width: clamp(200px, 22vw, 320px);
  height: clamp(200px, 22vw, 320px);

  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Glow needs correct layer isolation; avatar still stays circular */
  overflow: hidden;
  isolation: isolate;

  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 35px 110px rgba(0, 0, 0, 0.4),
    0 0 0 8px rgba(255, 123, 0, 0.05);

  --glow-size: calc(100% * var(--profile-glow-scale));
  --glow-blur: var(--profile-glow-blur);
}

.profile-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--glow-size);
  height: var(--glow-size);
  transform: translate(-50%, -50%) scale(1);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;

  background: radial-gradient(
    circle,
    rgba(255, 123, 0, 0.55) 0%,
    rgba(255, 123, 0, 0.2) 35%,
    rgba(255, 123, 0, 0) 66%
  );

  filter: blur(var(--glow-blur));
  will-change: transform, filter;
  contain: paint;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.05) contrast(1.03);
}

/* Profile glow (moved to .profile-wrap::before) */
.profile-glow {
  display: none;
}

/* Glow configuration (used by the pseudo-element) */
.profile-wrap {
  --profile-glow-blur: clamp(16px, 3.2vw, 28px);
  --profile-glow-scale: clamp(1.35, 1.9vw, 1.75);
}

.cursor-orb {
  position: absolute;
  width: clamp(70px, 12vw, 160px);
  height: clamp(70px, 12vw, 160px);

  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 123, 0, 0.35),
    rgba(255, 123, 0, 0) 65%
  );
  filter: blur(10px);
  transform: translate3d(0, 0, 0);
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.9;
}

.circle {
  width: clamp(240px, 30vw, 400px);
  height: clamp(240px, 30vw, 400px);

  border-radius: 50%;
  background: radial-gradient(circle, #ff7b00 0%, #ff5100 30%, transparent 70%);
  filter: blur(5px);
  position: relative;
  transform: translate3d(0, 0, 0);
}

.circle-inner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #ff7b00 0%, #ff5100 30%, transparent 70%);
  filter: blur(5px);
}

.circle-ring {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    rgba(255, 123, 0, 0),
    rgba(255, 123, 0, 0.65),
    rgba(123, 44, 255, 0.55),
    rgba(255, 123, 0, 0)
  );
  opacity: 0.75;
  filter: blur(10px);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* Glow */

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.glow1 {
  width: 300px;
  height: 300px;

  background: #ff7b00;

  top: 20%;
  right: 10%;
}

.glow2 {
  width: 250px;
  height: 250px;

  background: #7b2cff;

  bottom: 10%;
  left: 5%;
}

/* Animation */

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Reduce layout issues on small screens */
img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

/* Typing animation */
.type-line {
  position: relative;
  white-space: nowrap;
}

/* Never hide the static label in the hero */
.modern-label {
  opacity: 1 !important;
  clip-path: none !important;
  display: inline !important;
}

.type-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: transparent;
}

/* We'll use clip-path for a smooth reveal */
.type-line {
  clip-path: inset(0 100% 0 0);
  animation: typeReveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Use animation-delay by data-type order to avoid nth-child conflicts */
.type-line[data-type="Building"] {
  animation-delay: 0s;
}

.type-line[data-type="Web Experiences"] {
  animation-delay: 0.35s;
}

.type-line[data-type="That Perform"] {
  animation-delay: 0.7s;
}

@keyframes typeReveal {
  from {
    clip-path: inset(0 100% 0 0);
  }

  to {
    clip-path: inset(0 0 0 0);
  }
}

/* Responsive */

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    width: 100%;
  }

  .hero-text p {
    width: 100%;
  }

  .hero-visual {
    width: 100%;
    margin-top: 50px;
  }

  .hero-text h1 {
    font-size: 48px;
  }

  /* sizes handled by clamp() */

  /* ensure hero background layers don't cause overflow */
  .hero-visual {
    overflow: hidden;
  }

  .nav-links {
    display: none;
  }

  .profile-wrap {
    position: relative;
    margin: 0 auto;
    width: 260px;
    height: 260px;
  }
}

section {
  padding: 100px 10%;
  min-height: 100vh;
  scroll-margin-top: 100px;
}

/* Extra small screens */
@media (max-width: 600px) {
  /* keep the hero layout readable */

  section {
    padding: 80px 6%;
    scroll-margin-top: 90px;
  }

  .hero-text h1 {
    font-size: 40px;
  }

  .profile-wrap {
    width: clamp(200px, 58vw, 240px);
    height: clamp(200px, 58vw, 240px);
  }

  .circle {
    width: clamp(220px, 70vw, 280px);
    height: clamp(220px, 70vw, 280px);
  }

  .cursor-orb {
    width: clamp(70px, 20vw, 90px);
    height: clamp(70px, 20vw, 90px);
  }
}

@media (max-width: 768px) {
  /* extra responsive tweaks for mid-size screens */

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-visual {
    margin-top: 40px;
    width: 100%;
  }
}

@media (max-width: 420px) {
  section {
    padding: 70px 4%;
    scroll-margin-top: 90px;
  }
}

/* About background progressive reveal */

/* About background progressive reveal */
.about {
  position: relative;
}

.about-bg,
.about-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.about-bg {
  background-image: url("assets/logo1.jpg.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.05);
  transform: translateY(18px);
  opacity: 0;
  transition:
    opacity 0.9s ease,
    transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Make about background adapt better on small phones */
@media (max-width: 768px) {
  .about-bg {
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
  }

  .about-bg-overlay {
    background:
      radial-gradient(
        620px 300px at 15% 18%,
        rgba(255, 123, 0, 0.2),
        transparent 55%
      ),
      radial-gradient(
        520px 260px at 85% 20%,
        rgba(123, 44, 255, 0.2),
        transparent 60%
      ),
      linear-gradient(
        180deg,
        rgba(5, 8, 22, 0.65) 0%,
        rgba(5, 8, 22, 0.86) 55%,
        rgba(5, 8, 22, 0.98) 100%
      );
  }
}

.about-bg-overlay {
  background:
    radial-gradient(
      800px 380px at 15% 20%,
      rgba(255, 123, 0, 0.18),
      transparent 55%
    ),
    radial-gradient(
      650px 330px at 85% 25%,
      rgba(123, 44, 255, 0.18),
      transparent 60%
    ),
    linear-gradient(
      180deg,
      rgba(5, 8, 22, 0.65) 0%,
      rgba(5, 8, 22, 0.86) 55%,
      rgba(5, 8, 22, 0.98) 100%
    );
  opacity: 0;
  transition: opacity 0.9s ease;
}

.about .about-grid,
.about h2 {
  position: relative;
  z-index: 1;
}

/* When About enters viewport, reveal the background */
.about.is-about-visible .about-bg {
  opacity: 1;
  transform: translateY(0);
}

.about.is-about-visible .about-bg-overlay {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .about-bg,
  .about-bg-overlay {
    transition: none !important;
  }

  .about-bg {
    opacity: 1;
    transform: none;
  }

  .about-bg-overlay {
    opacity: 1;
  }
}

h2 {
  font-size: 40px;
  margin-bottom: 30px;
  color: var(--accent);
  letter-spacing: 0.2px;
}

/* Utility */
.accent {
  color: var(--accent);
}

/* Reveal animation */
.will-animate {
  opacity: 0;
  transform: translateY(12px);
  transition: 0.7s ease;
}

.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Projects */
.projects {
  max-width: 1100px;
}

.project-actions {
  margin: 14px 0 12px;
  display: flex;
  gap: 12px;
}

.live-demo-btn {
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 123, 0, 0.45);
  background: rgba(255, 123, 0, 0.12);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.live-demo-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 123, 0, 0.18);
  border-color: rgba(255, 123, 0, 0.7);
}

.live-demo-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 123, 0, 0.22);
}

/* Project Gallery (carousel for multiple images) */
.project-gallery {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
}

.gallery-viewport {
  width: 100%;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  width: 100%;
  transform: translateX(0);
  transition: transform 320ms ease;
}

.gallery-track .project-img {
  flex: 0 0 100%;
  width: 100%;
  height: 250px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.02);
}

.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: 0.2s ease;
}

.gallery-btn:hover {
  border-color: rgba(255, 123, 0, 0.45);
  background: rgba(0, 0, 0, 0.5);
}

.gallery-btn.prev {
  left: 10px;
}

.gallery-btn.next {
  right: 10px;
}

.gallery-dots {
  display: none;
}

@media (max-width: 600px) {
  .gallery-track .project-img {
    height: 200px;
  }
}


/* Project tags (fix “inside each other / messy” layout) */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  align-items: flex-start;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;

  /* prevent long text from breaking the layout */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}


.projects .project-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );

  border: 1px solid var(--stroke);
  padding: 22px;
  border-radius: 16px;
  margin-bottom: 18px;
  transition: 0.25s ease;
}

.project-card {
  position: relative;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(
    135deg,
    rgba(255, 123, 0, 0.22),
    rgba(123, 44, 255, 0.18)
  );
  opacity: 0;
  z-index: -1;
  transition: 0.25s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 123, 0, 0.28);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.project-card p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.project-card a {
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--accent);
}

.project-card a:hover {
  text-decoration: underline;
}

/* About + Skills + Experience */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 18px;
  align-items: start;
}

.about-card,
.skills-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
}

.about-card p {
  color: var(--muted);
  line-height: 1.75;
}

.card-title {
  font-size: 18px;
  margin-bottom: 12px;
  color: #fff;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.meta-item {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  font-size: 13px;
  color: var(--muted);
}

.skills {
  display: grid;
  gap: 12px;
}

.skill {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 123, 0, 0.1);
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 10px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(255, 123, 0, 0.65),
    rgba(123, 44, 255, 0.45)
  );
  opacity: 0.45;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
}

.timeline-dot {
  margin-top: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 8px rgba(255, 123, 0, 0.08);
}

.timeline-dot::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin: 12px auto 0;
}

.timeline-content {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 18px;
  flex: 1;
}

.timeline-content h3 {
  margin-bottom: 6px;
  font-size: 18px;
}

.timeline-date {
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}

.timeline-content p {
  color: var(--muted);
  line-height: 1.75;
}

/* Certifications */
.certifications {
  padding-top: 90px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.cert-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  min-height: 190px;
  transition: 0.25s ease;
}

.cert-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 123, 0, 0.28);
}

.cert-thumb {
  width: 140px;
  flex: 0 0 140px;
  background: rgba(0, 0, 0, 0.18);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-thumb img {
  width: 110px;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

/* Add fallback background colors for certificate images */
.cert-thumb img[alt*="English"] {
  background-color: #3a5a78; /* A shade of blue */
}
.cert-thumb img[alt*="ASP.NET"] {
  background-color: #6f42c1; /* A shade of purple */
}
.cert-thumb img[alt*="Graduation"] {
  background-color: #b08d57; /* A shade of gold/brown */
}

.cert-body {
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.cert-title {
  font-size: 18px;
  color: #fff;
  margin: 0;
}

.cert-meta {
  color: var(--muted);
  font-weight: 700;
  margin: 0;
  font-size: 13px;
}

.cert-desc {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  font-size: 14px;
}

.cert-actions {
  margin-top: auto;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  background: rgba(255, 123, 0, 0.12);
  border: 1px solid rgba(255, 123, 0, 0.35);
  color: #fff;
  transition: 0.2s ease;
}

.cert-link:hover {
  transform: translateY(-2px);
  background: rgba(255, 123, 0, 0.18);
}

@media (max-width: 900px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .cert-card {
    min-height: unset;
  }

  .cert-thumb {
    width: 120px;
    flex-basis: 120px;
  }

  .cert-thumb img {
    width: 96px;
    height: 120px;
  }
}

/* Fix: Center profile container on small screens */
@media (max-width: 768px) {
  .hero-visual {
    width: 100%;
    margin-top: 40px;
    justify-content: center;
    align-items: center;
    position: relative;
    display: flex;
  }

  /* Center avatar on mobile without hardcoded pixel sizes */
  .profile-wrap {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    z-index: 2;

    width: clamp(220px, 60vw, 280px);
    height: clamp(220px, 60vw, 280px);
    margin: 0 auto;

    border-radius: 50% !important;
  }

  .circle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
  }

  .cursor-orb {
    display: none;
  }
}

@media (max-width: 420px) {
  .buttons {
    flex-direction: column;
  }

  .profile-wrap {
    width: clamp(190px, 56vw, 220px);
    height: clamp(190px, 56vw, 220px);

    border-radius: 50% !important;
  }

  .circle {
    width: clamp(220px, 70vw, 240px);
    height: clamp(220px, 70vw, 240px);
  }

  .hero-text p {
    width: 100%;
    font-size: 14px;
  }
}

/* Proficiency (Progress Bars) */

.proficiency {
  padding-top: 90px;
}

.proficiency-card {
  max-width: 980px;
  margin: 0 auto;

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid var(--stroke);
  border-radius: 18px;

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  box-shadow:
    0 0 0 1px rgba(255, 123, 0, 0.1),
    0 18px 70px rgba(0, 0, 0, 0.35),
    0 0 60px rgba(255, 123, 0, 0.12),
    0 0 60px rgba(123, 44, 255, 0.1);

  padding: 22px;
  position: relative;
  overflow: hidden;
}

.proficiency-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(
      900px 260px at 15% 10%,
      rgba(255, 123, 0, 0.22),
      transparent 55%
    ),
    radial-gradient(
      680px 220px at 85% 25%,
      rgba(123, 44, 255, 0.18),
      transparent 60%
    );
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.proficiency-card > * {
  position: relative;
  z-index: 1;
}

.progress-row {
  padding: 14px 0;
}

.progress-row + .progress-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.progress-label {
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.1px;
  font-size: 15px;
}

.progress-percent {
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(255, 123, 0, 0.35);
}

.progress-track {
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  position: relative;
}

.progress-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 123, 0, 0.18),
    rgba(123, 44, 255, 0.12)
  );
  opacity: 0.2;
  pointer-events: none;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 123, 0, 1),
    rgba(123, 44, 255, 1)
  );
  box-shadow:
    0 0 18px rgba(255, 123, 0, 0.35),
    0 0 38px rgba(123, 44, 255, 0.22);
  position: relative;
  overflow: hidden;
  transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0)
  );
  opacity: 0.35;
  /* Keep shimmer bounded by the fill width */
  transform: translateX(-40%);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* When proficiency becomes visible, animate to the target.
   Fix mobile issue by avoiding `attr()` inside `calc()` (inconsistent across browsers).
*/
#proficiency.is-proficiency-visible
  .progress-row[data-progress="80"]
  .progress-fill {
  width: 80%;
}

#proficiency.is-proficiency-visible
  .progress-row[data-progress="80"]
  .progress-fill::after {
  opacity: 0.35;
}

#proficiency.is-proficiency-visible
  .progress-row[data-progress="99"]
  .progress-fill {
  width: 99%;
}

/* Activate fills once (JS adds `is-activated`) */
.progress-row.is-activated[data-progress="80"] .progress-fill {
  width: 80%;
}

.progress-row.is-activated[data-progress="99"] .progress-fill {
  width: 99%;
}

@media (max-width: 600px) {
  .proficiency-card {
    padding: 16px;
    border-radius: 16px;
  }

  .progress-label {
    font-size: 14px;
  }

  .progress-track {
    height: 12px;
  }
}

@media (max-width: 420px) {
  .proficiency {
    padding-top: 70px;
  }

  .progress-row {
    padding: 12px 0;
  }

  .progress-percent {
    font-size: 13px;
  }
}

/* Contact Box */
.contact {
  position: relative;
}

.contact-box {
  max-width: 920px;
  margin: 0 auto;

  padding: 26px;
  border-radius: 18px;

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid var(--stroke);

  /* Blur + Glow */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  box-shadow:
    0 0 0 1px rgba(255, 123, 0, 0.1),
    0 18px 70px rgba(0, 0, 0, 0.35),
    0 0 60px rgba(255, 123, 0, 0.12),
    0 0 60px rgba(123, 44, 255, 0.1);

  position: relative;
  overflow: hidden;
}

.contact-box::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(
      800px 260px at 20% 10%,
      rgba(255, 123, 0, 0.22),
      transparent 55%
    ),
    radial-gradient(
      620px 220px at 85% 25%,
      rgba(123, 44, 255, 0.18),
      transparent 60%
    );
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.contact-box > * {
  position: relative;
  z-index: 1;
}

.contact-title {
  margin-bottom: 10px;
}

.contact-desc {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 18px;
  max-width: 62ch;
}

/* Social icons */
.contact-social {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.contact-social-link {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;

  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  transition: 0.22s ease;
  box-shadow: 0 0 0 0 rgba(255, 123, 0, 0);

  outline: none;
}

/* ripple */
.contact-social-link::after {
  content: "";
  position: absolute;
  inset: -30px;
  background: radial-gradient(
    circle,
    rgba(255, 123, 0, 0.28),
    rgba(123, 44, 255, 0.18) 40%,
    transparent 65%
  );
  opacity: 0;
  transform: scale(0.7);
  transition: 0.35s ease;
}

.contact-social-link:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 123, 0, 0.45);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.35),
    0 0 50px rgba(255, 123, 0, 0.22),
    0 0 40px rgba(123, 44, 255, 0.14);
  background: rgba(255, 123, 0, 0.08);
}

.contact-social-link:hover::after {
  opacity: 1;
  transform: scale(1);
}

.contact-social-link:focus-visible {
  box-shadow:
    0 0 0 4px rgba(255, 123, 0, 0.22),
    0 18px 50px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 123, 0, 0.7);
}

.social-icon {
  font-weight: 900;
  font-size: 18px;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

/* Tooltip */
.contact-social-link[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%) translateY(6px);
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 0.22s ease;
  backdrop-filter: blur(10px);
  z-index: 3;
}

.contact-social-link:hover::before,
.contact-social-link:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Contact details */
.contact-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-detail {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 14px 14px;
  position: relative;
  overflow: hidden;
}

.contact-detail::after {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(
      420px 160px at 15% 20%,
      rgba(255, 123, 0, 0.18),
      transparent 60%
    ),
    radial-gradient(
      420px 160px at 85% 30%,
      rgba(123, 44, 255, 0.14),
      transparent 55%
    );
  opacity: 0.7;
  pointer-events: none;
}

.contact-detail > * {
  position: relative;
  z-index: 1;
}

.contact-detail-label {
  display: block;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 8px;
}

.contact-detail-value {
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  word-break: break-word;
  display: inline-block;
}

.contact-detail-value:hover {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(255, 123, 0, 0.35);
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .contact-box {
    padding: 18px;
  }

  .contact-details {
    grid-template-columns: 1fr;
  }
}

/* Contact Form */
.contact-form {
  margin-top: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.field-label {
  font-weight: 900;
  color: #fff;
  font-size: 13px;
}

.field-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: #fff;
  padding: 12px 14px;
  outline: none;
  transition: 0.2s ease;
}

.field-input::placeholder {
  color: rgba(189, 189, 189, 0.75);
}

.field-input:focus {
  border-color: rgba(255, 123, 0, 0.65);
  box-shadow: 0 0 0 4px rgba(255, 123, 0, 0.16);
}

.field-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-send {
  position: relative;
  padding: 14px 24px;
  min-width: 210px;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.95);
  margin-left: 10px;
  vertical-align: middle;
  opacity: 0;
  transform: scale(0.8);
}

.contact-send.is-loading {
  cursor: progress;
  opacity: 0.92;
}

.contact-send.is-loading .btn-text {
  opacity: 0;
}

.contact-send.is-loading .btn-spinner {
  opacity: 1;
  transform: scale(1);
  animation: bbSpin 0.8s linear infinite;
}

@keyframes bbSpin {
  to {
    transform: rotate(360deg);
  }
}

.contact-status {
  flex: 1;
  min-width: 200px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(6px);
  transition: 0.25s ease;
}

.contact-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-status.is-success {
  border-color: rgba(46, 204, 113, 0.35);
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

.contact-status.is-error {
  border-color: rgba(231, 76, 60, 0.35);
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.form-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-send {
    min-width: unset;
    width: 100%;
  }

  .form-actions {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
