/* Reset & Fonts */
* {
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: #121212;
  color: #eee;
  line-height: 1.6;
  overflow-x: hidden;
  text-align: center;
}
a {
  color: #64d2ff;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover,
a:focus {
  color: #a0e9ff;
  text-decoration: underline;
  outline: none;
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #1f1f1f;
  color: #eee;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
header h1 {
  margin: 0 0 0.5rem 0;
  font-weight: 700;
  font-size: 2.2rem;
  letter-spacing: 1.5px;
  user-select: none;
}
nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
nav a {
  font-weight: 600;
  font-size: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  user-select: none;
}
nav a:focus-visible {
  outline: 2px solid #64d2ff;
  outline-offset: 2px;
}

/* Layout Containers */
main {
  max-width: 900px;
  margin: 3rem auto 5rem auto;
  padding: 0 1rem;
  position: relative;
}
section {
  margin-bottom: 5rem;
  padding: 2rem 1rem 1rem;
  border-radius: 12px;
  background: #1e1e1e;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}
h2 {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #64d2ff;
  user-select: none;
}

/* Geometric Backgrounds */
.geom-bg {
  position: absolute;
  z-index: 0;
  opacity: 0.12;
  filter: blur(10px);
  pointer-events: none;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
.geom-header {
  width: 320px;
  height: 320px;
  top: -130px;
  right: -170px;
  background: linear-gradient(135deg, #64d2ff, #2a9df4);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  animation-name: floatRotate1;
  animation-duration: 16s;
}
.geom-header-2 {
  width: 250px;
  height: 250px;
  top: -90px;
  right: -60px;
  background: linear-gradient(45deg, #a0e9ff, #4db8ff);
  clip-path: polygon(50% 0%, 85% 25%, 100% 75%, 65% 100%, 35% 100%, 0% 75%, 15% 25%);
  animation-name: floatRotate2;
  animation-duration: 18s;
  opacity: 0.08;
}
.geom-section {
  width: 270px;
  height: 270px;
  bottom: -100px;
  left: -120px;
  background: linear-gradient(45deg, #ff64a0, #f42a8d);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation-name: floatRotate3;
  animation-duration: 14s;
}
.geom-section-2 {
  width: 200px;
  height: 200px;
  bottom: -80px;
  left: -40px;
  background: linear-gradient(135deg, #ff9ac7, #f668b5);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 50% 100%, 0 70%);
  animation-name: floatRotate4;
  animation-duration: 15s;
  opacity: 0.07;
}

.geom-extra {
  width: 180px;
  height: 180px;
  top: 60px;
  left: 60px;
  background: linear-gradient(135deg, #ffcc70, #ffaa00);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation-name: floatRotate5;
  animation-duration: 20s;
  opacity: 0.1;
}

.geom-extra2 {
  width: 200px;
  height: 130px;
  top: 80px;
  left: 120px;
  background-color: rgba(255, 255, 255, 0.08); /* Light and subtle */
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); /* Hexagon shape */
  animation: floatRotate6 30s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}



/* Keyframes */
@keyframes floatRotate1 {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.12; }
  50%  { transform: translateY(25px) rotate(20deg); opacity: 0.25; }
  100% { transform: translateY(0) rotate(0deg); opacity: 0.12; }
}
@keyframes floatRotate2 {
  0%   { transform: translateY(0) rotate(10deg); opacity: 0.08; }
  50%  { transform: translateY(-20px) rotate(-25deg); opacity: 0.18; }
  100% { transform: translateY(0) rotate(10deg); opacity: 0.08; }
}
@keyframes floatRotate3 {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.12; }
  50%  { transform: translateY(-20px) rotate(-20deg); opacity: 0.25; }
  100% { transform: translateY(0) rotate(0deg); opacity: 0.12; }
}
@keyframes floatRotate4 {
  0%   { transform: translateY(0) rotate(10deg); opacity: 0.07; }
  50%  { transform: translateY(18px) rotate(18deg); opacity: 0.15; }
  100% { transform: translateY(0) rotate(10deg); opacity: 0.07; }
}

@keyframes floatRotate5 {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0.1;}
  50%  { transform: translateY(15px) rotate(15deg); opacity: 0.2;}
  100% { transform: translateY(0) rotate(0deg); opacity: 0.1;}
}

@keyframes floatRotate6 {
  0% {transform: translate(-50%, -50%) rotate(0deg);}
  50% {transform: translate(-48%, -52%) rotate(180deg);}
  100% {transform: translate(-50%, -50%) rotate(360deg);}
}


/* About */
#about p {
  max-width: 650px;
  font-size: 1.2rem;
  color: #ddd;
  line-height: 1.75;
  margin: 0 auto;
}

/* Projects */
.projects-heading {
  font-size: 2.5rem;
  color: #64d2ff;
  margin-bottom: 2rem;
}
.project-card {
  background: #292929;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease;
  cursor: pointer;
  text-align: left;
}

.container {
  max-width: 1000px;      /* adjust to your layout width */
  margin: 0 auto;         /* this centers it */
  padding: 0 1rem;        /* optional: adds breathing room on mobile */
  box-sizing: border-box;
}


.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* reduce 388px to 320px */
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

.project-card:hover,
.project-card:focus-within {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(100, 210, 255, 0.7);
}
.project-card img {
  width: 100%;        /* force all images to fill the width of the container */
  height: auto;       /* auto height to keep aspect ratio */
  border-radius: 8px;
  margin-bottom: 1rem;
  object-fit: contain;  /* prevents cropping, but usually not needed with width/height auto */
  box-shadow: 0 4px 10px rgb(0 0 0 / 0.4);
  background: #111;
  user-select: none;
  display: block;     /* helps avoid small inline spacing issues */
}

.project-card h3 {
  font-size: 1.3rem;
  margin: 0.2rem 0 0.6rem;
  color: #64d2ff;
}
.project-card p {
  flex-grow: 1;
  font-size: 1rem;
  color: #ccc;
}
.project-card a {
  margin-top: 1rem;
  font-weight: 600;
  color: #a0e9ff;
  align-self: flex-start;
}
.project-card a:hover,
.project-card a:focus {
  color: #d0f4ff;
}

/* Media & Video */
.media img {
  max-width: 100%;
  height: auto;
  margin-bottom: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}
.responsive-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}
.responsive-video iframe,
.responsive-video video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Resume */
#resume a {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: #64d2ff;
  color: #121212;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 6px 15px rgba(100, 210, 255, 0.7);
  transition: background-color 0.3s ease;
}
#resume a:hover,
#resume a:focus {
  background: #3aa0e8;
}

/* Contact */
#contact p {
  font-size: 1.2rem;
  color: #ccc;
  max-width: 450px;
  margin: 0 auto;
}
#contact a {
  font-weight: 600;
  color: #64d2ff;
}
#contact a:hover,
#contact a:focus {
  color: #a0e9ff;
}

/* Footer */
footer {
  text-align: center;
  padding: 1rem 0;
  color: #666;
  font-size: 0.9rem;
  border-top: 1px solid #333;
  margin-top: 5rem;
}

/* Responsive */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.8rem;
  }
  nav {
    gap: 1rem;
  }
  nav a {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }
  #about p {
    font-size: 1.1rem;
  }
  #projects {
    grid-template-columns: 1fr;
  }
  .project-card {
    text-align: center;
  }
  .project-card a {
    align-self: center;
  }
  #contact p {
    font-size: 1.1rem;
    max-width: 90%;
  }
}
