/* ----------------------------------- */
/* Root Variables */
/* ----------------------------------- */
:root {
  --primary-color: #2e2e2e;
  --accent-color: #61dafb;
  --text-color: #f5f5f5;
  --card-bg: rgba(30, 30, 30, 0.8);
  --heading-color: rgb(135, 156, 174);
}

/* ----------------------------------- */
/* Global Styles */
/* ----------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: var(--text-color);
  min-height: 100vh;
  overflow-x: hidden;
  perspective: 1000px;
  padding: 20px 10px;
  background-position: center center;
}

html {
  scroll-behavior: smooth; /* Smooth scrolling for anchor links */
}

/* ----------------------------------- */
/* Container */
/* ----------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 100px;;
  padding: 1rem;
  width: 100%;
  padding-top: 80px; /* Space for fixed navbar */
}

/* ----------------------------------- */
/* Navigation Bar */
/* ----------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 32, 39, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(97, 218, 251, 0.2);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar-brand .logo {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.navbar-brand .logo:hover {
  color: #00ffcc;
}

.navbar-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-menu li a {
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.navbar-menu li a:hover,
.navbar-menu li a.active {
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
}

.navbar-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--accent-color);
  cursor: pointer;
}

.navbar.scrolled {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ----------------------------------- */
/* Header */
/* ----------------------------------- */
header {
  text-align: center;
  margin-bottom: 4rem;
  transform-style: preserve-3d;
  animation: float 6s ease-in-out infinite;
  transition: transform 1s ease-in;
  margin-top: 20px; /* Prevent navbar overlap */
}

.greeting {
  text-align: left;
}

h1 {
  color: var(--heading-color);
  transform: translateZ(50px);
  text-align: left;
  font-size: 3.5rem;
  transition: transform 0.3s ease;
  text-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

h1:hover {
  color: rgb(48, 55, 62);
  transform: scale(1.1) translateZ(50px);
}

.subtitle {
  color: rgb(8, 194, 194);
  text-align: left;
  font-size: 20px;
  margin-bottom: 2rem;
  transition: transform 0.5s ease;
}

.subtitle:hover {
  transform: scale(1.1);
}

/* ----------------------------------- */
/* Profile Container */
/* ----------------------------------- */
.profile-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0 2rem;
  width: 100%;
  margin-top: 20px; /* Adjusted for mobile */
}

.diamond-shape {
  width: 150px;
  height: 150px;
  margin: 1rem auto;
  transform: rotate(45deg);
  overflow: hidden;
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 25px rgba(97, 218, 251, 0.5);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-pic {
  width: 220px;
  height: 220px;
  transform: rotate(-45deg) translate(0%, -20%);
  object-fit: cover;
  object-position: center;
  position: relative;
  top: 0;
  left: 0;
}

/* ----------------------------------- */
/* Social Buttons */
/* ----------------------------------- */
.social-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.social-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
  font-size: 1.3rem;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid rgba(97, 218, 251, 0.3);
}

.social-btn:hover {
  background: var(--accent-color);
  color: #0f2027;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ----------------------------------- */
/* Headings */
/* ----------------------------------- */
h2 {
  color: var(--text-color);
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 1rem;
  text-align: center;
}

/* ----------------------------------- */
/* Skills Section */
/* ----------------------------------- */
.skills-section {
  margin: 2rem 0;
  position: relative;
  width: 100%;
}

.skill-bars {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.skill {
  margin-bottom: 1.5rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skill-name {
  font-weight: bold;
}

.skill-level {
  color: var(--accent-color);
}

.progress-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(to right, #61dafb, #00ffcc);
  border-radius: 5px;
  transition: width 1s ease;
}

/* ----------------------------------- */
/* About Me Section */
/* ----------------------------------- */
.aboutme {
  color: var(--text-color);
  font-size: clamp(1rem, 3vw, 1.2rem);
  margin-bottom: 1.5rem;
  text-align: left;
  line-height: 1.6;
}

/* ----------------------------------- */
/* Skills Cube Section */
/* ----------------------------------- */
.scene {
  perspective: 800px;
  margin-bottom: 2rem;
  transform-style: preserve-3d;
}

.cube-container {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.cube {
  width: 100%;
  height: 280px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 1s;
  margin-bottom: 1rem;
}

.cubesides:hover .cube {
  transform: rotateY(180deg);
}

.face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.face h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.front {
  background: linear-gradient(145deg, var(--card-bg), rgb(8, 1, 40));
}

.back {
  background: linear-gradient(145deg, var(--card-bg), rgb(0, 0, 0));
  transform: rotateY(180deg);
}

.icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--accent-color);
}

/* ----------------------------------- */
/* Project Section */
/* ----------------------------------- */
.section-title {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  perspective: 1000px;
}

.project-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  height: auto;
  width: 100%;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  transform-style: preserve-3d;
  transition: all 0.5s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transform: translateZ(20px);
  filter: brightness(0.9);
  transition: filter 0.3s ease;
}

.project-card:hover .project-image {
  filter: brightness(1.1);
}

.project-info {
  padding: 1.5rem;
  transform: translateZ(30px);
}

.project-info h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: rgba(97, 218, 251, 0.2);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--accent-color);
}

/* ----------------------------------- */
/* Buttons */
/* ----------------------------------- */
/* ----------------------------------- */
/* Buttons */
/* ----------------------------------- */
.getintouch {
  background: transparent;
  color: var(--accent-color);
  padding: 0.8rem 1.5rem;
  border: 2px solid transparent;
  border-image: linear-gradient(to right, var(--accent-color), #00ffcc) 1;
  border-radius: 10px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  font-size: 1rem;
  box-shadow: 0 0 15px rgba(97, 218, 251, 0.3);
  animation: pulse 1s infinite;
}

.getintouch:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(97, 218, 251, 0.5);
  border-image: linear-gradient(to left, var(--accent-color), #00ffcc) 1;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 15px rgba(97, 218, 251, 0.3); }
  50% { box-shadow: 0 0 30px rgba(97, 218, 251, 0.7); }
  100% { box-shadow: 0 0 15px rgba(97, 218, 251, 0.3); }
}

/* ----------------------------------- */
/* Links */
/* ----------------------------------- */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #00ffcc;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(97, 218, 251, 0.2);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.contact-form p {
  text-align: center;
  color: var(--accent-color);
  font-size: 1.2rem;
  margin-bottom: 0;
}

.contact-form input,
.contact-form textarea {
  padding: 0.8rem;
  border: 1px solid rgba(97, 218, 251, 0.3);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(97, 218, 251, 0.3);
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form button {
  background: transparent;
  color: var(--accent-color);
  padding: 0.8rem 1.5rem;
  border: 2px solid transparent;
  border-image: linear-gradient(to right, var(--accent-color), #00ffcc) 1;
  border-radius: 10px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(97, 218, 251, 0.3);
}

.contact-form button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(97, 218, 251, 0.5);
  border-image: linear-gradient(to left, var(--accent-color), #00ffcc) 1;
}
/* ----------------------------------- */
/* Bubbles Background */
/* ----------------------------------- */
.bubbles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.bubble {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: hsla(183, 94%, 76%, 0.3);
  transition: left 0.5s ease;
}


/* ----------------------------------- */
/* Footer */
/* ----------------------------------- */
/* ----------------------------------- */
/* Footer Section */
/* ----------------------------------- */
.site-footer {
  margin-top: 2rem;
  padding: 2rem 1rem;
  background: transparent;
  border-top: 2px solid transparent;
  border-image: linear-gradient(to right, var(--accent-color), #00ffcc) 1;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.footer-content p {
  color: var(--text-color);
  font-size: 1rem;
  margin: 0;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--accent-color);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #00ffcc;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: transparent;
  color: var(--accent-color);
  padding: 0.8rem;
  border: 2px solid transparent;
  border-image: linear-gradient(to right, var(--accent-color), #00ffcc) 1;
  border-radius: 50%;
  cursor: pointer;
  display: none; /* Hidden by default */
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(97, 218, 251, 0.3);
}

.back-to-top:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(97, 218, 251, 0.5);
  border-image: linear-gradient(to left, var(--accent-color), #00ffcc) 1;
}

.back-to-top i {
  font-size: 1.2rem;
}

.footer-clock {
  margin-top: 1rem;
  max-width: 300px;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 2px solid transparent;
  border-image: linear-gradient(to right, var(--accent-color), #00ffcc) 1;
  border-radius: 5px;
  display: inline-block;
  position: relative;
}

.footer-clock span {
  color: var(--accent-color);
  font-size: 1rem;
  font-weight: 500;
  
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .site-footer {
    padding: 1.5rem 0.5rem;
  }

  .footer-links {
    gap: 1rem;
  }

  .footer-links a {
    font-size: 0.9rem;
  }

  .back-to-top {
    bottom: 15px;
    right: 15px;
    padding: 0.6rem;
  }
}

@media (max-width: 480px) {
  .footer-content p {
    font-size: 0.9rem;
  }

  .footer-links {
    gap: 0.8rem;
  }

  .footer-links a {
    font-size: 0.8rem;
  }

  .back-to-top {
    bottom: 10px;
    right: 10px;
    padding: 0.5rem;
  }
}


/* ----------------------------------- */
/* Animations */
/* ----------------------------------- */
@keyframes rise {
  0% {
    bottom: -10%;
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    bottom: 110%;
    opacity: 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* ----------------------------------- */
/* Desktop Layout (min-width: 768px) */
/* ----------------------------------- */
@media (min-width: 768px) {
  header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    text-align: left;
    margin-bottom: 3rem;
    margin-top: 0; /* Reset for desktop */
  }

  .profile-container {
    justify-content: flex-start;
    margin: 0;
    width: auto;
  }

  .diamond-shape {
    width: 200px;
    height: 200px;
    margin: 0;
    border: 4px solid var(--accent-color);
    box-shadow: 0 0 30px rgba(97, 218, 251, 0.6);
  }

  .diamond-shape:hover {
    transform: rotate(45deg) scale(1.05);
    box-shadow: 0 0 40px rgba(97, 218, 251, 0.8);
  }

  .profile-pic {
    width: 300px;
    height: 300px;
    transform: rotate(-45deg) translate(0%, -20%);
  }

  .greeting {
    flex: 1;
    margin-left: 2rem;
    padding-top: 1rem;
  }

  h1 {
    font-size: 4rem;
  }

  .subtitle {
    font-size: 1.5rem;
  }

  .social-buttons {
    margin-top: 1.5rem;
  }
}

/* ----------------------------------- */
/* Mobile Layout (max-width: 768px) */
/* ----------------------------------- */
@media (max-width: 768px) {
  .container {
    padding: 0.5rem;
    padding-top: 60px; /* Adjusted for mobile navbar */
  }

  .navbar {
    padding: 1rem;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 32, 39, 0.95);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  }

  .navbar-menu.active {
    display: flex;
  }

  .navbar-menu li {
    padding: 1rem 2rem;
    text-align: center;
  }

  .navbar-menu li a {
    font-size: 1.1rem;
  }

  .navbar-toggle {
    display: block;
  }

  header {
    padding: 0 0.5rem;
  }

  .greeting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  h1,
  .subtitle {
    text-align: center;
  }

  .social-buttons {
    justify-content: center;
  }

  .diamond-shape {
    width: 120px;
    height: 120px;
  }

  .profile-pic {
    width: 180px;
    height: 180px;
  }

  .aboutme {
    padding: 0 0.5rem;
  }

  .cube {
    height: 250px;
  }

  .getintouch {
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
  }

  .project-image {
    height: 180px;
  }
}

/* ----------------------------------- */
/* Small Mobile Layout (max-width: 480px) */
/* ----------------------------------- */
@media (max-width: 480px) {
  body {
    padding: 10px 5px;
  }

  .container {
    padding: 0.3rem;
  }

  h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .diamond-shape {
    width: 100px;
    height: 100px;
  }

  .profile-pic {
    width: 150px;
    height: 150px;
  }

  .social-btn {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .cube {
    height: 220px;
  }

  .face {
    padding: 1rem;
  }

  .face h3 {
    font-size: 1.3rem;
  }

  .project-image {
    height: 160px;
  }

  .icon {
    font-size: 2rem;
  }

  .getintouch {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}