/* ============================================================
   Punit Sharma — Portfolio (preview redesign)
   Design tokens, layout, components. Mobile-first.
   ============================================================ */

/* ----------------------- Tokens ----------------------- */
:root {
  /* brand */
  --accent: #0078ff;
  --accent-2: #00c6ff;
  --accent-3: #7c5cff;
  --gradient: linear-gradient(120deg, var(--accent), var(--accent-2));
  --gradient-soft: linear-gradient(120deg, rgba(0, 120, 255, 0.18), rgba(0, 198, 255, 0.12));

  /* type */
  --font-display: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;

  /* rhythm */
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --section-x: clamp(1.25rem, 6vw, 7rem);
  --section-y: 4.5rem; /* constant rhythm between all sections */
  --nav-h: 72px;

  --shadow-1: 0 10px 30px rgba(2, 6, 23, 0.35);
  --shadow-accent: 0 12px 40px rgba(0, 120, 255, 0.25);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* dark (default) */
:root,
[data-theme="dark"] {
  --bg: #070b18;
  --bg-soft: #0c1226;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-accent: rgba(0, 120, 255, 0.45);
  --text: #eaf0ff;
  --muted: #96a2bd;
  --nav-bg: rgba(7, 11, 24, 0.72);
  --card-img-bg: rgba(255, 255, 255, 0.03);
  --glow-opacity: 0.55;
}

[data-theme="light"] {
  --bg: #f6f8fd;
  --bg-soft: #eef2fb;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-strong: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-accent: rgba(0, 120, 255, 0.5);
  --text: #0e1526;
  --muted: #55617a;
  --nav-bg: rgba(246, 248, 253, 0.8);
  --card-img-bg: rgba(15, 23, 42, 0.03);
  --glow-opacity: 0.35;
  --shadow-1: 0 10px 30px rgba(15, 23, 42, 0.08);
}

/* ----------------------- Base ----------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: #fff;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
}

/* decorative glows */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: var(--glow-opacity);
  pointer-events: none;
  z-index: -1;
}

.bg-glow-1 {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(0, 120, 255, 0.35), transparent 65%);
}

.bg-glow-2 {
  width: 620px;
  height: 620px;
  bottom: -260px;
  left: -180px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.28), transparent 65%);
}

/* ----------------------- Buttons ----------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn i {
  font-size: 1.15em;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(0, 120, 255, 0.38);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.icon-btn:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ----------------------- Navbar ----------------------- */
#nav-menu {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#nav-menu.shadow {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.25);
}

.nav-inner {
  height: var(--nav-h);
  padding: 0 var(--section-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.btn-resume {
  padding: 0.5rem 1.15rem;
  font-size: 0.9rem;
  margin-left: 8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#menu-icon {
  display: none;
}

/* dimmed backdrop behind the mobile menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.nav-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* no page scroll while the mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* ----------------------- Sections ----------------------- */
.section {
  padding: var(--section-y) var(--section-x);
}

.section-tight {
  padding-top: 0;
}

.heading {
  text-align: center;
  margin-bottom: 1.75rem; /* constant gap to the section content */
}

.heading span {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--gradient-soft);
  border: 1px solid var(--border-accent);
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
}

/* ----------------------- Home ----------------------- */
#home {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 2rem) var(--section-x) 4rem;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.home-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 10px;
}

.eyebrow-line {
  width: 46px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
}

.home-text h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.gradient-text {
  background: linear-gradient(120deg, var(--text) 20%, var(--accent) 60%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-role {
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2rem;
  min-height: 1.4em;
}

.home-role::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 6px;
  vertical-align: -0.15em;
  background: var(--accent-2);
  animation: caret-blink 1s steps(2) infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

.home-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.home-socials {
  display: flex;
  gap: 10px;
}

.home-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.home-socials a:hover {
  color: var(--accent);
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

.home-visual {
  display: flex;
  justify-content: center;
}

.home-img-ring {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 1;
  border-radius: 32% 68% 62% 38% / 44% 38% 62% 56%;
  padding: 6px;
  background: var(--gradient);
  animation: blob-morph 9s ease-in-out infinite alternate;
  box-shadow: var(--shadow-accent);
}

.home-img-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

@keyframes blob-morph {
  0% {
    border-radius: 32% 68% 62% 38% / 44% 38% 62% 56%;
  }

  50% {
    border-radius: 58% 42% 38% 62% / 42% 60% 40% 58%;
  }

  100% {
    border-radius: 40% 60% 55% 45% / 60% 40% 60% 40%;
  }
}

.scroll-down {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: opacity 0.4s var(--ease);
}

/* fades away once the visitor starts scrolling */
.scroll-down.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-down i {
  font-size: 22px;
  animation: float-y 1.8s ease-in-out infinite;
}

@keyframes float-y {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

/* ----------------------- About ----------------------- */
.about-container {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

/* keep the portrait a modest, fixed size — the raw column is far too wide */
.homeImage {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
}

/* portrait: circular avatar with gradient ring, soft glow, centered badge */
.about-frame {
  position: relative;
  width: min(100%, 330px);
  margin-inline: auto;
}

.about-frame::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 120, 255, 0.4), transparent 70%);
  filter: blur(42px);
}

.about-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto; /* beat the height="" attribute hint so aspect-ratio applies */
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 18px 50px rgba(0, 120, 255, 0.25);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.about-frame:hover img {
  transform: scale(1.02);
  box-shadow: 0 24px 64px rgba(0, 120, 255, 0.4);
}

.about-badge {
  position: absolute;
  z-index: 2;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-accent);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-1);
  white-space: nowrap;
}

.about-badge i {
  color: var(--accent);
  font-size: 18px;
}

/* floating gradient balls in the space around the portrait */
.about-frame .orb {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 18px rgba(0, 150, 255, 0.65);
  animation: orb-float 4.5s ease-in-out infinite;
}

.orb-1 {
  width: 18px;
  height: 18px;
  top: 4%;
  left: 0;
}

.orb-2 {
  width: 11px;
  height: 11px;
  top: 16%;
  right: -3%;
  background: linear-gradient(120deg, var(--accent-3), var(--accent-2));
  box-shadow: 0 0 16px rgba(124, 92, 255, 0.65);
  animation-delay: 0.9s;
  animation-duration: 5.5s;
}

.orb-3 {
  width: 8px;
  height: 8px;
  bottom: 20%;
  left: -5%;
  animation-delay: 1.6s;
  animation-duration: 4s;
}

.orb-4 {
  width: 14px;
  height: 14px;
  bottom: 6%;
  right: 2%;
  background: linear-gradient(120deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 0 16px rgba(0, 198, 255, 0.65);
  animation-delay: 2.3s;
  animation-duration: 6s;
}

@keyframes orb-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

/* intro sits centered directly under the About Me heading */
.about-text {
  font-size: 1.06rem;
  color: var(--muted);
  text-align: center;
  max-width: 860px;
  margin: 0 auto 2.75rem;
}

/* words flow in one by one when the intro scrolls into view */
.intro-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.wordfx.typed .intro-word {
  opacity: 1;
  transform: none;
}

/* words hide instantly on reset so the replay starts clean */
.wordfx:not(.typed) .intro-word {
  transition-duration: 0s;
  transition-delay: 0s !important;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 2.2rem;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.stat-chip:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
}

.stat-chip i {
  flex-shrink: 0;
  font-size: 22px;
  color: var(--accent);
  background: var(--gradient-soft);
  border-radius: 10px;
  padding: 8px;
}

.stat-chip h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
}

/* Resume button centered under the stat grid */
#resume-button-2 {
  display: flex;
  width: max-content;
  margin-inline: auto;
}

/* ----------------------- Skills / Tools ----------------------- */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}

.tools-container {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  max-width: 900px;
  margin: 0 auto;
}

.skills-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 16px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.skills-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
}

.skills-card-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  transition: transform 0.3s var(--ease);
}

.skills-card:hover .skills-card-img {
  transform: scale(1.12);
}

.skills-card-name {
  font-weight: 600;
  font-size: 0.98rem;
}

/* ----------------------- Projects ----------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-accent);
}

.project-details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  flex: 1;
  padding: 0 8px 8px;
}

.project-details > div:first-child {
  flex: 1;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.project-description {
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: 8px;
}

.stack-heading {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-tech-stack img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  padding: 7px;
  border-radius: 10px;
  background: var(--card-img-bg);
  border: 1px solid var(--border);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

.project-tech-stack img:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
}

.project-btn-div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.project-btn-div .btn {
  font-size: 0.88rem;
  padding: 0.6rem 1.2rem;
}

/* ----------------------- Slider (project carousels) ----------------------- */
.slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-img-bg);
  border: 1px solid var(--border);
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s var(--ease);
}

.slide {
  flex: 0 0 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(7, 11, 24, 0.55);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  backdrop-filter: blur(6px);
  transition: opacity 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.slider:hover .slider-btn,
.slider:focus-within .slider-btn {
  opacity: 1;
}

.slider-btn:hover {
  background: var(--accent);
}

.slider-prev {
  left: 10px;
}

.slider-next {
  right: 10px;
}

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.slider-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.slider-dots button.active {
  width: 26px;
  background: var(--accent-2);
}

/* touch devices: always show arrows */
@media (hover: none) {
  .slider-btn {
    opacity: 1;
  }
}

/* ----------------------- GitHub stats ----------------------- */
#allGit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
  max-width: 960px;
  margin-inline: auto;
}

/* static Top Languages card: centered row below stats + streak */
.lang-card {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
  padding: 24px 28px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s var(--ease);
}

.lang-card:hover {
  border-color: var(--border-accent);
}

.lang-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
}

.lang-row {
  margin-bottom: 16px;
}

.lang-row:last-child {
  margin-bottom: 0;
}

.lang-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.lang-head small {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.lang-pct {
  color: var(--accent);
  font-weight: 700;
}

.lang-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}

.lang-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--gradient);
  transition: width 1.2s var(--ease) 0.3s;
}

.lang-fill-alt {
  background: linear-gradient(120deg, var(--accent-3), var(--accent-2));
}

/* bars animate in when the section reveals */
.reveal.in .lang-fill {
  width: var(--w, 0);
}

#allGit img {
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#allGit img:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
}

/* ----------------------- Contact ----------------------- */
.form {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-1);
}

.contact-info {
  padding: clamp(1.8rem, 4vw, 3rem);
  position: relative;
}

.contact-info .title {
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.text {
  color: var(--muted);
  margin: 1.2rem 0 1.8rem 0;
}

.information {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0.9rem 0;
  font-size: 0.98rem;
  color: var(--muted);
}

.info-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--gradient-soft);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-size: 19px;
}

.social-media {
  padding-top: 1.6rem;
}

.social-media p {
  color: var(--muted);
  font-weight: 500;
}

.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 0.7rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--gradient);
  color: #fff;
  font-size: 19px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.social-icons a:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: var(--shadow-accent);
}

/* right: form panel */
.contact-form {
  position: relative;
  background: linear-gradient(135deg, var(--accent), #005ecc);
  overflow: hidden;
}

.circle {
  border-radius: 50%;
  background: linear-gradient(135deg, transparent 20%, rgba(255, 255, 255, 0.14));
  position: absolute;
}

.circle.one {
  width: 130px;
  height: 130px;
  top: 130px;
  right: -40px;
}

.circle.two {
  width: 80px;
  height: 80px;
  top: 10px;
  right: 30px;
}

.contact-form form {
  padding: clamp(1.8rem, 4vw, 2.6rem);
  position: relative;
  z-index: 2;
}

.contact-form .title {
  color: #fff;
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.input-container {
  position: relative;
  margin: 1.5rem 0;
}

.input {
  width: 100%;
  outline: none;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: none;
  padding: 0.65rem 1.2rem;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  transition: border-color 0.3s;
}

.input:focus {
  border-color: #fff;
}

textarea.input {
  padding: 0.8rem 1.2rem;
  min-height: 140px;
  resize: none;
  overflow-y: auto;
}

.input-container label {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  padding: 0 0.4rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 400;
  pointer-events: none;
  transition: 0.4s var(--ease);
}

.input-container.textarea label {
  top: 1rem;
  transform: translateY(0);
}

/* the old border-mask bars are retired: they can't match a gradient panel */
.input-container span {
  display: none;
}

/* floated state: label sits fully above the field, clear of the border */
.input-container.focus label,
.input:focus ~ label,
.input:not(:placeholder-shown) ~ label,
.input:-webkit-autofill ~ label {
  top: -5px;
  transform: translateY(-100%);
  left: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #d9ecff;
}

/* the floating labels rely on placeholder-shown; keep the placeholder invisible */
.input::placeholder {
  color: transparent;
}

/* Chrome autofill: keep the panel's blue instead of the default pale yellow/white */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0568da inset;
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  transition: background-color 600000s 0s;
}

.submit-btn {
  padding: 0.65rem 1.6rem;
  background-color: #fff;
  border: 2px solid #fff;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  transition: 0.3s;
}

.submit-btn:hover {
  background-color: transparent;
  color: #fff;
}

/* ----------------------- Footer ----------------------- */
.footer-bottom-area {
  border-top: 1px solid var(--border);
  padding: 26px var(--section-x);
}

.footer-text {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.text-white {
  color: var(--text);
}

.footer-love {
  color: #ff4d6d;
  font-style: normal;
  font-weight: 700;
}

.footer-name {
  color: var(--accent);
  transition: color 0.25s;
}

.footer-name:hover {
  color: var(--accent-2);
}

/* ----------------------- Toast (top-right, solid) ----------------------- */
.toast {
  position: fixed;
  top: calc(var(--nav-h) + 16px);
  right: 20px;
  transform: translateX(28px);
  z-index: 2000;
  max-width: min(90vw, 380px);
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid rgba(0, 120, 255, 0.35);
  border-left: 4px solid var(--accent);
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 14px 44px rgba(2, 6, 23, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.error {
  border-color: rgba(255, 77, 109, 0.45);
  border-left-color: #ff4d6d;
}

/* small screens: full-width bar under the navbar */
@media (max-width: 560px) {
  .toast {
    left: 16px;
    right: 16px;
    max-width: none;
    transform: translateY(-12px);
  }

  .toast.show {
    transform: translateY(0);
  }
}

/* ----------------------- Scroll reveal ----------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {

  .reveal,
  .home-img-ring,
  .scroll-down i,
  .home-role::after,
  .about-frame .orb,
  .intro-word,
  .lang-fill {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
  }
}

@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .home-visual {
    order: -1;
  }

  .home-img-ring {
    width: min(70vw, 360px);
  }

  .home-eyebrow,
  .home-cta {
    justify-content: center;
  }

  .about-container {
    grid-template-columns: 1fr;
  }

  .homeImage {
    max-width: 340px;
    margin: 0 auto;
  }

  #allGit {
    grid-template-columns: 1fr;
  }

  .form {
    grid-template-columns: 1fr;
  }
}

/* mobile nav */
@media (max-width: 820px) {
  #menu-icon {
    display: inline-flex;
  }

  .navbar {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    width: min(78vw, 320px);
    height: calc(100vh - var(--nav-h));
    height: calc(100svh - var(--nav-h));
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 28px 24px;
    /* solid panel: backdrop-filter is unreliable on a fixed child of the
       blurred header, so translucency lets the page bleed through the links */
    background: var(--bg);
    border-left: 1px solid var(--border);
    box-shadow: -28px 0 70px rgba(2, 6, 23, 0.55);
    overflow-y: auto;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.4s var(--ease), visibility 0s linear 0.4s;
  }

  .navbar.active {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s var(--ease);
  }

  .navbar li {
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    border-radius: 10px;
    border-bottom: 1px solid var(--border);
  }

  .navbar li:last-of-type .nav-link {
    border-bottom: none;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link.active {
    color: var(--accent);
    background: var(--gradient-soft);
    border-bottom-color: transparent;
  }

  .btn-resume {
    margin: 12px 0 0;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .about-frame {
    width: min(100%, 280px);
  }

  #allGit {
    grid-template-columns: 1fr;
  }

  .lang-card {
    padding: 18px 20px;
  }

  .skills-container,
  .tools-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
  }

  .skills-card {
    padding: 20px 12px 16px;
  }

  .skills-card-img {
    width: 46px;
    height: 46px;
  }

  .project-btn-div {
    flex-direction: column;
  }

  .project-btn-div .btn {
    width: 100%;
  }

  .slider {
    aspect-ratio: 4 / 3;
  }

  .scroll-down {
    display: none;
  }
}
