:root {
  --bg-color: #081b29;
  --second-bg-color: #112e42;
  --text-color: #ededed;
  --muted-color: #b8c7d1;
  --main-color: #00abf0;
  --card-color: rgba(255, 255, 255, 0.06);
  --border-color: rgba(255, 255, 255, 0.15);
  --header-color: rgba(8, 27, 41, 0.85);
  --footer-color: #06131d;
  --modal-color: rgba(8, 27, 41, 0.96);
  --button-text-color: #081b29;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body.theme-light {
  --bg-color: #f4f8fb;
  --second-bg-color: #e7eff5;
  --text-color: #102332;
  --muted-color: #50677a;
  --main-color: #0077b6;
  --card-color: rgba(255, 255, 255, 0.74);
  --border-color: rgba(16, 35, 50, 0.16);
  --header-color: rgba(244, 248, 251, 0.9);
  --footer-color: #dce8f0;
  --modal-color: rgba(244, 248, 251, 0.98);
  --button-text-color: #ffffff;
  --shadow: 0 12px 34px rgba(16, 35, 50, 0.14);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: none;
  outline: none;
  text-decoration: none;
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.page-glass-effect {
  --impact-x: 58%;
  --impact-y: 34%;
  position: fixed;
  inset: 0;
  z-index: 900;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}

section {
  min-height: 100vh;
  padding: 10rem 9% 4rem;
}

.heading {
  text-align: center;
  font-size: 4.5rem;
  margin-bottom: 5rem;
}

.heading span,
.logo span,
.home-content h1 span {
  color: var(--main-color);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 9%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  z-index: 1000;
  transition: 0.3s ease;
  background: transparent;
}

.header.sticky {
  background: var(--header-color);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.logo {
  font-size: 2.6rem;
  color: var(--text-color);
  font-weight: 700;
  white-space: nowrap;
}

.navbar {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}

.navbar a {
  font-size: 1.6rem;
  color: var(--text-color);
  font-weight: 500;
  transition: 0.3s;
}

.navbar a:hover,
.navbar a.active {
  color: var(--main-color);
}

.theme-switcher {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.theme-btn {
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 1.2rem;
  cursor: pointer;
  transition: 0.3s;
}

.theme-btn:hover,
.theme-btn.active {
  background: var(--main-color);
  color: #081b29;
  border-color: var(--main-color);
}

.menu-btn {
  display: none;
  width: 3.4rem;
  cursor: pointer;
  flex-direction: column;
  gap: 0.6rem;
}

.menu-btn span {
  display: block;
  width: 100%;
  height: 0.3rem;
  border-radius: 999px;
  background: var(--text-color);
  transition: 0.3s;
}

/* HOME */
.home {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 6rem;
}

.home-content h1 {
  font-size: 5.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.text-animate {
  margin: 1.5rem 0 2rem;
}

.text-animate h3 {
  font-size: 3rem;
  color: transparent;
  -webkit-text-stroke: 0.7px var(--main-color);
  letter-spacing: 0.05rem;
}

.home-content p {
  font-size: 1.6rem;
  line-height: 1.8;
  color: var(--muted-color);
  max-width: 65rem;
}

.profile-highlights {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.2rem;
  max-width: 65rem;
}

.profile-highlights span {
  padding: 0.8rem 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 0.8rem;
  background: var(--card-color);
  color: var(--text-color);
  font-size: 1.3rem;
}

.btn-box {
  display: flex;
  gap: 1.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 16rem;
  height: 5rem;
  padding: 0 2rem;
  background: var(--main-color);
  border: 2px solid var(--main-color);
  border-radius: 0.8rem;
  font-size: 1.6rem;
  color: var(--button-text-color);
  font-weight: 600;
  letter-spacing: 0.03rem;
  transition: 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.btn-outline {
  background: transparent;
  color: var(--main-color);
}

.btn-outline:hover {
  background: var(--main-color);
  color: var(--bg-color);
}

.home-sci {
  display: flex;
  gap: 1.2rem;
}

.home-sci a {
  width: 4.2rem;
  height: 4.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--main-color);
  border-radius: 50%;
  color: var(--main-color);
  font-size: 1.4rem;
  transition: 0.3s;
}

.home-sci a:hover {
  background: var(--main-color);
  color: var(--bg-color);
  transform: translateY(-4px);
}

.home-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  position: relative;
  z-index: 920;
}

.image-card {
  position: relative;
  width: 36rem;
  height: 46rem;
  border-radius: 2rem;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateY(-10deg) rotateX(4deg);
  transition: 0.4s ease;
}

.image-card:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) translateY(-8px);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2rem;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow);
}

.page-glass-effect::before,
.page-glass-effect::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
}

.page-glass-effect::before {
  background:
    radial-gradient(circle at var(--impact-x) var(--impact-y), rgba(255, 255, 255, 0.65) 0 0.35rem, transparent 0.5rem),
    linear-gradient(122deg, transparent 0 45%, rgba(255, 255, 255, 0.38) 46%, transparent 48%),
    linear-gradient(32deg, transparent 0 63%, rgba(255, 255, 255, 0.22) 64%, transparent 66%);
}

.page-glass-effect::after {
  background:
    linear-gradient(75deg, transparent 0 18%, rgba(255, 255, 255, 0.18) 19%, transparent 21%),
    linear-gradient(148deg, transparent 0 52%, rgba(255, 255, 255, 0.3) 53%, transparent 55%),
    linear-gradient(11deg, transparent 0 72%, rgba(255, 255, 255, 0.18) 73%, transparent 75%);
  filter: blur(0.2px);
}

.crack,
.glass-shard,
.impact-point {
  position: absolute;
  display: block;
}

.crack {
  left: var(--impact-x);
  top: var(--impact-y);
  width: var(--crack-length);
  height: 0.12rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(190, 235, 255, 0.25), transparent);
  box-shadow: 0 0 0.8rem rgba(255, 255, 255, 0.28);
  transform: rotate(var(--crack-angle));
  transform-origin: left center;
  opacity: 0.9;
}

.crack::after {
  content: "";
  position: absolute;
  right: 12%;
  top: -0.1rem;
  width: 38%;
  height: 0.1rem;
  background: rgba(255, 255, 255, 0.55);
  transform: rotate(var(--branch-angle));
  transform-origin: right center;
}

.crack-1 {
  --crack-length: 17rem;
  --crack-angle: -24deg;
  --branch-angle: 36deg;
}

.crack-2 {
  --crack-length: 15rem;
  --crack-angle: 18deg;
  --branch-angle: -42deg;
}

.crack-3 {
  --crack-length: 20rem;
  --crack-angle: 82deg;
  --branch-angle: 24deg;
}

.crack-4 {
  --crack-length: 13rem;
  --crack-angle: 145deg;
  --branch-angle: -28deg;
}

.crack-5 {
  --crack-length: 12rem;
  --crack-angle: -96deg;
  --branch-angle: 32deg;
}

.glass-shard {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(1.5px);
  opacity: 0.72;
}

.shard-1 {
  left: 7%;
  top: 11%;
  width: 31%;
  height: 24%;
  clip-path: polygon(0 8%, 100% 0, 52% 100%);
}

.shard-2 {
  right: 6%;
  top: 8%;
  width: 34%;
  height: 28%;
  clip-path: polygon(12% 0, 100% 18%, 36% 100%, 0 44%);
}

.shard-3 {
  left: 31%;
  top: 39%;
  width: 34%;
  height: 24%;
  clip-path: polygon(10% 0, 100% 20%, 72% 100%, 0 82%);
}

.shard-4 {
  left: 5%;
  bottom: 9%;
  width: 39%;
  height: 25%;
  clip-path: polygon(0 22%, 78% 0, 100% 100%, 18% 88%);
}

.shard-5 {
  right: 6%;
  bottom: 7%;
  width: 37%;
  height: 31%;
  clip-path: polygon(34% 0, 100% 16%, 78% 100%, 0 74%);
}

.shard-6 {
  left: 43%;
  top: 4%;
  width: 19%;
  height: 33%;
  clip-path: polygon(28% 0, 100% 100%, 0 78%);
}

.impact-point {
  left: var(--impact-x);
  top: var(--impact-y);
  width: 5rem;
  height: 5rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow:
    inset 0 0 1.4rem rgba(255, 255, 255, 0.34),
    0 0 2rem rgba(255, 255, 255, 0.26);
}

.page-glass-effect.glass-burst {
  animation: glassFlash 520ms ease;
}

.page-glass-effect.glass-burst .glass-shard {
  animation: shardJolt 520ms cubic-bezier(0.2, 0.8, 0.25, 1);
}

.page-glass-effect.glass-burst .impact-point {
  animation: impactPulse 520ms ease;
}

@keyframes glassFlash {
  0% {
    filter: brightness(1);
  }

  35% {
    filter: brightness(1.75);
  }

  100% {
    filter: brightness(1);
  }
}

@keyframes shardJolt {
  0% {
    transform: translate3d(0, 0, 0) rotate(0);
  }

  45% {
    transform: translate3d(var(--jolt-x, 0.5rem), var(--jolt-y, -0.6rem), 2rem) rotate(var(--jolt-r, 2deg));
  }

  100% {
    transform: translate3d(0, 0, 0) rotate(0);
  }
}

@keyframes impactPulse {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.7);
  }

  45% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.35);
  }

  100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
  }
}

.image-glow {
  position: absolute;
  inset: -1rem;
  border-radius: 2.4rem;
  background: linear-gradient(135deg, var(--main-color), transparent, var(--main-color));
  filter: blur(2rem);
  opacity: 0.5;
  z-index: 1;
}

.qr-card {
  width: min(100%, 36rem);
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.2rem;
  border: 1px solid var(--border-color);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.qr-card img {
  width: 8.8rem;
  height: 8.8rem;
  flex: 0 0 auto;
  border-radius: 0.4rem;
  background: #ffffff;
}

.qr-card strong,
.qr-card span {
  display: block;
}

.qr-card strong {
  font-size: 1.6rem;
  color: var(--text-color);
}

.qr-card span {
  margin-top: 0.3rem;
  font-size: 1.3rem;
  color: var(--muted-color);
}

/* ABOUT */
.about {
  background: var(--second-bg-color);
}

.about-container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 5rem;
}

.about-img-box {
  position: relative;
  z-index: 920;
  border: 2px solid var(--main-color);
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-img-box img {
  width: 100%;
  display: block;
}

.about-content h3 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.about-content p {
  font-size: 1.6rem;
  line-height: 1.8;
  color: var(--muted-color);
  margin-bottom: 1.6rem;
}

.profile-note {
  margin: 2.2rem 0 0.4rem;
  padding: 1.6rem;
  border: 1px solid var(--border-color);
  border-left: 0.4rem solid var(--main-color);
  border-radius: 0.8rem;
  background: var(--card-color);
  color: var(--muted-color);
  font-size: 1.5rem;
  line-height: 1.7;
}

.profile-note strong {
  color: var(--text-color);
}

/* EDUCATION */
.education-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
}

.education-column-wide {
  grid-column: 1 / -1;
}

.education-column-wide .education-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 4rem;
}

.education-column-wide .education-content {
  margin-bottom: 0;
}

.education-column .title,
.skills-column .title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.education-box {
  border-left: 0.2rem solid var(--main-color);
  padding-left: 2rem;
}

.education-content {
  position: relative;
  margin-bottom: 2rem;
}

.education-content::before {
  content: "";
  position: absolute;
  left: -2.9rem;
  top: 1.8rem;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--main-color);
  border-radius: 50%;
}

.education-content .content {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 1.6rem;
  padding: 2rem;
  transition: 0.3s ease;
  transform-style: preserve-3d;
}

.education-content .content:hover {
  transform: translateY(-6px) rotateX(2deg) rotateY(-2deg);
  box-shadow: var(--shadow);
}

.year {
  font-size: 1.4rem;
  color: var(--main-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.education-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.education-content p {
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--muted-color);
}

/* SKILLS */
.skills {
  background: var(--second-bg-color);
}

.skills-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
}

.skills-box .skills-content {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 1.6rem;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.progress {
  margin-bottom: 2rem;
}

.progress:last-child {
  margin-bottom: 0;
}

.progress h3 {
  display: flex;
  justify-content: space-between;
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.bar {
  width: 100%;
  height: 1.6rem;
  border: 0.2rem solid var(--main-color);
  border-radius: 999px;
  padding: 0.2rem;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--main-color);
}

/* PROJECT PLACEHOLDER */
.projects-placeholder {
  min-height: auto;
  padding-top: 10rem;
  padding-bottom: 10rem;
  text-align: center;
}

.projects-text {
  font-size: 1.7rem;
  color: var(--muted-color);
  max-width: 70rem;
  margin: 0 auto;
}

.skill-tags {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 92rem;
  margin: -2rem auto 2.6rem;
}

.skill-tags span {
  padding: 1rem 1.3rem;
  border: 1px solid var(--border-color);
  border-radius: 0.8rem;
  background: var(--card-color);
  color: var(--text-color);
  font-size: 1.4rem;
}

.skill-context {
  max-width: 86rem;
}

/* CONTACT */
.contact-details {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  max-width: 90rem;
  margin: -2rem auto 3rem;
}

.contact-intro {
  margin-bottom: 3rem;
}

.contact-details a {
  padding: 1rem 1.4rem;
  border: 1px solid var(--border-color);
  border-radius: 0.8rem;
  background: var(--card-color);
  color: var(--text-color);
  font-size: 1.4rem;
  transition: 0.3s ease;
}

.contact-details a:hover {
  border-color: var(--main-color);
  color: var(--main-color);
  transform: translateY(-2px);
}

.contact-actions {
  justify-content: center;
}

.contact-form {
  max-width: 90rem;
  margin: 0 auto;
}

.input-box {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.input-field,
.textarea-field {
  width: 100%;
}

.input-field input,
.input-field select,
.textarea-field textarea {
  width: 100%;
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  font-size: 1.6rem;
  color: var(--text-color);
}

.input-field select {
  appearance: none;
  cursor: pointer;
}

.input-field:has(select) {
  position: relative;
}

.input-field:has(select)::after {
  content: "";
  position: absolute;
  right: 1.6rem;
  top: 50%;
  width: 0.8rem;
  height: 0.8rem;
  border-right: 2px solid var(--muted-color);
  border-bottom: 2px solid var(--muted-color);
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.input-field input[type="date"],
.input-field input[type="time"] {
  color-scheme: dark;
}

body.theme-light .input-field input[type="date"],
body.theme-light .input-field input[type="time"] {
  color-scheme: light;
}

.input-field input::placeholder,
.textarea-field textarea::placeholder {
  color: var(--muted-color);
}

.textarea-field {
  margin-bottom: 2rem;
}

.textarea-field textarea {
  resize: vertical;
  min-height: 20rem;
}

.btn-box-center {
  justify-content: center;
}

.contact-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
}

.contact-popup.active {
  opacity: 1;
  visibility: visible;
}

.contact-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.contact-popup-panel {
  position: relative;
  width: min(100%, 76rem);
  max-height: min(90vh, 78rem);
  overflow-y: auto;
  padding: 3rem;
  border: 1px solid var(--border-color);
  border-radius: 0.8rem;
  background: var(--modal-color);
  box-shadow: var(--shadow);
}

.contact-popup-panel h3 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

.contact-popup-panel p {
  color: var(--muted-color);
  font-size: 1.4rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.contact-popup-panel code {
  color: var(--main-color);
}

.agent-response-panel {
  width: min(100%, 52rem);
}

.agent-response-text {
  padding: 1.6rem;
  border: 1px solid var(--border-color);
  border-left: 0.4rem solid var(--main-color);
  border-radius: 0.8rem;
  background: var(--card-color);
  color: var(--text-color);
  white-space: pre-wrap;
}

.contact-popup-close {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  width: 3.8rem;
  height: 3.8rem;
  border-radius: 0.8rem;
  background: var(--card-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 2.8rem;
  line-height: 1;
  cursor: pointer;
  transition: 0.3s ease;
}

.contact-popup-close:hover {
  color: var(--main-color);
  border-color: var(--main-color);
}

.form-status {
  min-height: 2.4rem;
  color: var(--muted-color);
  font-size: 1.4rem;
  text-align: center;
}

.form-status.success {
  color: #6dffbd;
}

.form-status.error {
  color: #ff9ba9;
}

/* FOOTER */
.footer {
  padding: 2.5rem 9%;
  background: var(--footer-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-text p {
  font-size: 1.5rem;
  color: var(--muted-color);
}

.top {
  width: 4.4rem;
  height: 4.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.8rem;
  background: var(--main-color);
  color: var(--bg-color);
  font-size: 2rem;
  font-weight: 700;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  html {
    font-size: 58%;
  }
}

@media (max-width: 991px) {
  .header,
  section,
  .footer {
    padding-left: 5%;
    padding-right: 5%;
  }

  .home,
  .about-container,
  .education-row,
  .skills-row,
  .education-column-wide .education-box {
    grid-template-columns: 1fr;
  }

  .home {
    padding-top: 14rem;
  }

  .home-image {
    order: -1;
  }

  .theme-switcher {
    display: none;
  }
}

@media (max-width: 768px) {
  .menu-btn {
    display: flex;
  }

  .navbar {
    position: absolute;
    top: 100%;
    left: 5%;
    right: 5%;
    background: rgba(8, 27, 41, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 1.2rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
    display: none;
  }

  .navbar.active {
    display: flex;
  }

  .home-content h1 {
    font-size: 4.5rem;
  }

  .text-animate h3 {
    font-size: 2.5rem;
  }

  .image-card {
    width: 30rem;
    height: 40rem;
  }

  .input-box {
    flex-direction: column;
  }

  .contact-details {
    align-items: stretch;
    flex-direction: column;
  }

  .contact-details a {
    text-align: center;
  }
}

@media (max-width: 520px) {
  html {
    font-size: 54%;
  }

  .heading {
    font-size: 3.8rem;
  }

  .btn {
    width: 100%;
  }

  .btn-box {
    flex-direction: column;
  }

  .home-sci {
    flex-wrap: wrap;
  }
}
