/* style.css */

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar (optional, for a more modern feel) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1E293B; /* phruler-dark */
}

::-webkit-scrollbar-thumb {
  background-color: #3B82F6; /* phruler-blue */
  border-radius: 10px;
  border: 2px solid #1E293B; /* phruler-dark */
}

::-webkit-scrollbar-thumb:hover {
  background-color: #2563EB; /* darker phruler-blue */
}

/* Header styling */
header nav a {
  position: relative; /* For the underline effect */
  padding-bottom: 4px; /* Space for the underline */
}

header nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background-color: #F59E0B; /* phruler-accent */
  transition: width 0.3s ease-in-out;
}

header nav a:hover::after {
  width: 100%;
}

/* Hero section enhancements */
#hero h1 {
  /* Optional: Add a subtle text shadow or gradient if desired */
  /* text-shadow: 0 2px 4px rgba(0,0,0,0.3); */
}

#hero p {
  /* max-width: 600px; /* Constrain paragraph width for readability */
  /* margin-left: auto; */
  /* margin-right: auto; */
}

/* Section title styling */
section h2 {
  position: relative;
  display: inline-block; /* Allows for underline effect */
  padding-bottom: 0.5rem; /* Space for the underline */
}

section h2::after {
  content: '';
  position: absolute;
  display: block;
  width: 60px; /* Width of the underline */
  height: 3px; /* Thickness of the underline */
  background: linear-gradient(90deg, #3B82F6, #8B5CF6); /* phruler-blue to phruler-purple */
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Card hover effects for projects and interests */
#projects .grid > div,
#interests .grid > div {
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

#projects .grid > div:hover,
#interests .grid > div:hover {
  /* transform: translateY(-5px) scale(1.02); Tailwind's hover:scale-105 is similar */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 6px 6px rgba(0, 0, 0, 0.15);
}

/* Specific styling for Phruler project card */
#projects .bg-phruler-dark h3 {
  /* Ensure the project title stands out */
}

/* Tag styling for project cards */
.inline-block.bg-phruler-blue\/30 {
  transition: background-color 0.2s ease, color 0.2s ease;
}
.inline-block.bg-phruler-blue\/30:hover {
  background-color: #3B82F6; /* phruler-blue */
  color: #F1F5F9; /* phruler-light */
}
.inline-block.bg-phruler-purple\/30:hover {
  background-color: #8B5CF6; /* phruler-purple */
  color: #F1F5F9; /* phruler-light */
}
.inline-block.bg-phruler-accent\/30:hover {
  background-color: #F59E0B; /* phruler-accent */
  color: #1E293B; /* phruler-dark */
}
.inline-block.bg-sky-500\/30:hover {
  background-color: #0EA5E9; /* sky-500 */
  color: #F1F5F9; /* phruler-light */
}


/* Interests section icon styling */
#interests .fas, #interests .fab {
  display: block; /* Center icons */
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.75rem; /* Tailwind's mb-3 */
  width: fit-content; /* Ensure icon container doesn't take full width */
}

/* Contact section button */
#contact a.bg-phruler-blue {
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); /* phruler-blue with opacity */
}
#contact a.bg-phruler-blue:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Footer styling */
footer {
  border-top: 1px solid #334155; /* slate-700, a bit lighter than phruler-dark */
}

/* Add a subtle animated gradient border to cards on hover (optional and more complex) */
/*
.card-gradient-border {
  position: relative;
  overflow: hidden;
}

.card-gradient-border::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent,
    transparent,
    #8B5CF6,
    #3B82F6,
    #8B5CF6,
    transparent,
    transparent
  );
  animation: rotateGradient 4s linear infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.card-gradient-border:hover::before {
  opacity: 1;
}

@keyframes rotateGradient {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
*/

/* Animation utility for elements to fade in on scroll */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments for navigation if needed */
@media (max-width: 768px) {
  header nav .space-x-4 {
    display: none; /* Example: Hide nav links, implement a burger menu with JS */
    /* Or, stack them:
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--phruler-dark-alpha);
    padding: 1rem;
    */
  }
  /* Add a burger menu icon display here if hiding links */

  #hero h1 {
    font-size: 2.5rem; /* Tailwind's text-4xl */
  }
  #hero p {
    font-size: 1.125rem; /* Tailwind's text-lg */
  }
  section h2 {
    font-size: 1.875rem; /* Tailwind's text-3xl */
  }
}

