﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: #0f0f0f;
  color: #f0f0f0;
  line-height: 1.6;
  font-family: 'Poppins', sans-serif;
}

/* Navbar Styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  background: #0f0f0f;
}

.logo {
  font-size: 2rem;
  color: white;
  font-weight: bold;
  text-decoration: none;
}

.logo span {
  color: orangered;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-item a {
  color: white;
  text-decoration: none;
  position: relative;
  transition: 0.3s;
  font-size: 1rem;
}

.nav-item a:hover {
  color: orangered;
}

.nav-item a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: orangered;
  transition: width 0.3s;
}

.nav-item a:hover::after {
  width: 100%;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #313030;
  min-width: 100px;
  list-style: none;
  padding: 0;
  margin: 0px -20px;
  top: 100%;
  left: 0;
  z-index: 999;
}

.dropdown-content li a {
  padding: 10px 15px;
  display: block;
  color: white;
  text-decoration: none;
  font-size: 14px;
}

.dropdown-content li a:hover {
  background: #666;
}

.mobile-only{
  display: none;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Hero Section */
.hero {
  height: 100vh;
  background: linear-gradient(to right, #0f0f0f, #1c1c1c);
  position: relative;
  padding-top: 0px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden; /* Add this to contain the blobs */
}

.hero-text {
  max-width: 750px;
  width: 90%;
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
  padding-left: 40px;
  position: relative; /* Add this */
  z-index: 1; /* Add this to ensure text is above blobs */
}

.hero .hero-image {
  padding-right: 40px;
  margin-top: 60px;
  position: relative; /* Add this */
  z-index: 1; /* Add this to ensure image is above blobs */
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero h1 {
  font-size: 2.9rem;
  color: orangered;
}

.hero-text h1 {
  color: white;
}

.hero p {
  font-size: 1.3rem;
  color: #E63946;
  margin-top: 8px;
}

.hero .para{
  margin-top: 20px;
  font-size: 1.1rem;
  color: #ccc;
  max-width: 650px;
}

.hero .hero-image{
  padding-right: 40px;
  margin-top: 60px;
}

.hero .hero-image  img{
  border-radius: 20px;
  box-shadow: 
        0 0 15px rgba(255, 75, 0, 0.4),   /* soft orange glow */
        0 0 30px rgba(255, 75, 0, 0.2);   /* bigger outer glow */
  transition: box-shadow 0.3s ease-in-out;
}

.hero .hero-image  img:hover{
  box-shadow: 
        0 0 20px rgba(255, 75, 0, 0.6), 
        0 0 40px rgba(255, 75, 0, 0.4);
}

.typewriter {
  color: orangered;
}

.typewriter::after {
  content: "|";
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  50%,
  100% {
    opacity: 1;
  }

  25%,
  75% {
    opacity: 0;
  }
}

/* Section Titles */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin: 60px 0 30px;
  color: white;
}

/* About */
.glass-section {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 20px 5%;
  border-radius: 20px;
  margin: 40px;
  min-height: 500px;
}

.container {
  gap: 40px;
  min-height: 400px;
}

.date {
  font-size: 0.9rem;
  font-weight: 300;
  color: #bbb;
}

#education h2 {
  margin-bottom: 30px;
  font-size: 1.8rem;
  font-weight: 500;
}

/* Education/Experience Card */
.education-item {
  background: #262626;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 40px;
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease, border 0.3s ease;
  border: 2px solid transparent; /* default invisible border */
}

/* Full border on hover */
.education-item:hover {
  transform: translateY(-5px);
  background: #2e2e2e;
  border: 2px solid #E63946;
}

/* Visible vertical line (now inside safe area) */
.education-item::before {
  content: "";
  position: absolute;
  left: -12px; /* offset from box */
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #E63946, #FF4B00);
  border-radius: 2px;
  z-index: -1; /* so it doesn’t cover text */
}

/* Make sure parent allows overflow */
.glass-section,
.container {
  overflow: visible;
}

/* Title color */
.education-item h3 {
  color: #ff4c4c;
  margin-bottom: 5px;
}

/* Custom reddish arrows */
.education-item ul.custom-arrows {
  list-style: none;
  padding-left: 0;
  margin-top: 20px;
}

.education-item ul.custom-arrows li {
  position: relative;
  padding-left: 35px;
  margin-bottom: 8px;
  color: lightgray;
  font-weight: 300;
}

.education-item ul.custom-arrows li::before {
  content: "➤";
  position: absolute;
  left: 0;
  bottom: 0.5px;
  color: #E63946;
  font-size: 18px;
}

.education-item .experience-upper {
  display: flex;
  justify-content: space-between;
}

.degree {
  display: block;
  font-weight: 500;
  color: #ccc;
  margin-bottom: 5px;
}

/* Skills Section */
#skills h2 {
  margin-bottom: 30px;
  font-size: 1.8rem;
  font-weight: 500;
}

/* Skill category containers */
.skills-category {
  margin-bottom: 40px; /* space after each category */
}

.skills-category h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  margin-bottom: 15px; /* space below heading */
}

.skills-category.proficient h3 { color: #4CAF50; }   /* Green for Proficient */
.skills-category.intermediate h3 { color: #FFC107; } /* Yellow for Intermediate */
.skills-category.familiar h3 { color: #03A9F4; }     /* Blue for Familiar */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 140px); /* fixed width columns */
  grid-auto-rows: 140px; /* fixed height rows */
  gap: 20px;
  justify-content: center; /* center the grid items */
}

.skill-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease, border 0.3s ease;
  width: 140px; /* fixed width */
  height: 140px; /* fixed height */
}

.skill-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 76, 76, 0.1);
  border: 2px solid #E63946;
}

.skill-item i {
  font-size: 42px; /* bigger icon */
  margin-bottom: 14px; /* more space before text */
  color: #E63946;
}

.skill-item span {
  font-size: 1rem; /* slightly larger text */
  color: lightgray;
}

/* Services */
.services-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 0 10%;
  margin-bottom: 60px;
}

.service-card {
  background: #1c1c1c;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s, background 0.3s;
}

.service-card:hover {
  transform: translateY(-10px);
  background: orangered;
  color: white;
}

.service-card i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: orangered;
}

.service-card:hover i {
  color: white;
}

/* Projects */
/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 0 6% 60px;
}

.project-card {
  background: #1c1c1c;
  padding: 20px;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  height: 100%; /* Make all cards equal height */
}

/* Media container with fixed aspect ratio (16:9) */
.media-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 15px;
}

.media-container video,
.media-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures media fills container */
}

.project-card h3 {
  color: orangered;
  margin: 15px 0 0px;
  min-height: 3rem; /* Fixed height for titles */
}

.project-card p {
  flex-grow: 1; /* Makes description take remaining space */
  margin-bottom: 15px;
  font-size: 15px;
}

/* Loading indicator for videos */
.media-container.video-loading::after {
  content: "Loading...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  z-index: 2;
}

.media-container.video-loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 1;
}

/* Contact */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 0 10% 60px;
  justify-content: center;
}

.contact-info {
  flex: 1;
  min-width: 280px;
}

.contact-info p {
  margin-bottom: 20px;
  font-size: 1rem;
  display: flex;
  align-items: center;
}

.contact-info i {
  color: orangered;
  margin-right: 10px;
  font-size: 1.2rem;
}

.socials {
  margin-top: 30px;
}

.socials a {
  font-size: 1.5rem;
  color: #ccc;
  margin-right: 15px;
  transition: 0.3s;
}

.socials a:hover {
  color: orangered;
}

form {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
}

form input,
form textarea {
  background: #262626;
  border: none;
  color: white;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

form button {
  background: orangered;
  border: none;
  color: white;
  padding: 15px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

form button:hover {
  background: darkred;
}

#msg {
  margin-top: 10px;
  color: lawngreen;
  text-align: center;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: #1c1c1c;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }

  .mobile-only{
    display: block;
  }

  .dropdown{
    display: none;
  }

  .hero{
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .hero-text {
    padding: 0 20px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero .para{
    font-size: 0.9rem;
  }

  .hero .hero-image{
    display: none;
  }

  .education-item h3 {
    font-size: 14px;
  }

  .education-item span{
    font-size: 13px;
  }

  .education-item .degree{
    margin-bottom: 1px;
    padding-top: 2px;
  }

  .experience-upper{
    flex-direction: column;
    justify-content: start;
    margin-bottom: 3px;
  }

  .container {
    flex-direction: column;
  }

  .about-img img {
    width: 250px;
  }

  .contact-container {
    padding: 0 20px 60px;
  }

  .education-item ul.custom-arrows li{
    font-size: 14px;
  }

  .education-item ul.custom-arrows li::before{
    bottom: 50%;
  }

  .skills-grid{
    grid-template-columns: repeat(auto-fill, 135px);
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-text {
    max-width: 80%;
  }

  .container {
    justify-content: space-around;
  }

  .hero .hero-image{
    display: none;
  }
}

/* Animated Blob Background */
.hero-bg-blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 8s ease-in-out infinite;
  z-index: 0;
}

.hero-bg-blob.primary {
  width: 24rem;
  height: 24rem;
  background: orangered;
  top: 25%;
  left: 25%;
}

.hero-bg-blob.secondary {
  width: 18rem;
  height: 18rem;
  background: #E63946;
  bottom: 25%;
  right: 25%;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

/* Ensure hero content is above blobs */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-text, .hero-image {
  position: relative;
  z-index: 1;
}