/* Global styles based on the Website project */
:root {
  --background: #000000;
  --foreground: #ededed;
}

body {
  margin: 0;
  padding: 0;
  color: var(--foreground);
  background: var(--background);
  font-family: "Fira Code", "Consolas", "Menlo", "Monaco", "Ubuntu Mono",
    "DejaVu Sans Mono", monospace;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 1100px;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  padding: 24px;
  box-sizing: border-box;
}

/* Grid background effect */
.grid-lines {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
  background-repeat: repeat;
}

/* Navbar styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-link {
  text-decoration: none;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.nav-link:hover {
  background-color: #d1d5db; /* gray-300 equivalent */
  color: black;
}

.nav-link.active {
  background-color: #d1d5db; /* gray-300 equivalent */
  color: black;
}

.nav-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.coffee-link {
  text-decoration: none;
  color: black;
  background-color: #93c5fd; /* blue-200 equivalent */
  padding: 8px 16px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.coffee-link:hover {
  transform: translateY(-4px); /* Match original hover effect */
}

.coffee-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Main content */
.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-grow: 1;
  padding: 20px 0;
}

.main-content h1 {
  color: white;
  margin-bottom: 20px;
  font-size: 2.5rem;
  font-weight: bold;
}

/* Static text styling */
.static-text {
  display: inline-block;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.3s forwards;
}

/* Rotating text styling */
.rotate-text {
  display: inline-block;
  position: relative;
  color: #fff;
  text-decoration: underline;
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.5s forwards;
}

/* Base h1 styling */
.typewriter {
  text-align: center;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* Space between "I am" and the rotating text */
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.about-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 600px;
  margin-top: 20px;
}

.about-section p {
  color: #ccc;
  line-height: 1.6;
  margin: 0;
  font-size: 1.1rem;
}

/* Blinking cursor effect for the paragraph */
.blinking-cursor {
  animation: blink 1s infinite;
  color: #fff;
  margin-right: 5px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1000px;
  margin-top: 30px;
}

/* Customizable project card variables */
.project-card {
  --card-bg: #000000;
  --card-border: rgba(255, 255, 255, 0.1);
  --card-border-radius: 8px;
  --card-height: 300px;
  --image-height-percent: 70%;
  --details-height-percent: 30%;
  --hover-transform: -5px;
  --hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  --title-font-size: 1.2rem;
  --title-hover-font-size: 1.5rem;
  --title-color: white;
  --description-color: #ccc;
  --details-bg: rgba(0, 0, 0, 0.85);
  --blur-intensity: 3px;

  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-border-radius);
  height: var(--card-height);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(var(--hover-transform));
  box-shadow:
    0 0 5px rgba(200, 200, 200, 0.1),
    0 0 10px rgba(180, 180, 180, 0.05),
    var(--hover-shadow);
  background-color: var(--card-bg);
  position: relative;
}

.project-card:hover::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(124deg,
    rgba(200, 200, 200, 0.15),
    rgba(255, 255, 255, 0.1),
    rgba(150, 150, 150, 0.15),
    rgba(200, 200, 200, 0.15));
  border-radius: calc(var(--card-border-radius) + 2px);
  z-index: -1;
}

.project-image {
  width: 100%;
  height: var(--image-height-percent);
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0; /* Prevent shrinking */
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.project-card:hover .project-image img {
  filter: blur(var(--blur-intensity));
}

/* Project title that appears at the bottom by default */
.project-title {
  color: var(--title-color);
  margin: 0;
  font-size: var(--title-font-size);
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--details-height-percent);
  position: relative;
  z-index: 2;
  opacity: 1;
  flex-shrink: 0; /* Prevent shrinking */
}

/* Project details overlay that appears on hover */
.project-details-overlay {
  position: absolute;
  top: var(--image-height-percent);
  left: 0;
  width: 100%;
  height: var(--details-height-percent);
  background-color: var(--details-bg);
  padding: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Align content to the top */
  align-items: center;
  text-align: center;
  gap: 8px;
  box-sizing: border-box;
  padding-top: 8px; /* Reduce top padding to move content higher */
}

.project-card:hover .project-details-overlay {
  opacity: 1;
  pointer-events: auto;
}

.project-description {
  color: var(--description-color);
  font-size: 0.8rem;
  margin: 0 0 8px 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  width: 100%;
}

/* Tags have been removed from the project details */

.view-details-btn {
  text-decoration: none;
  color: black;
  background-color: #d1d5db;
  padding: 8px 16px;
  border-radius: 4px;
  display: block;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  pointer-events: auto;
  width: 100%;
  text-align: center;
  max-width: 150px; /* Fixed width for consistency */
}

.view-details-btn:hover {
  background-color: #9ca3af;
  transform: translateY(-2px);
}

/* Title that moves to center of image on hover */
.project-card:hover .project-title {
  position: absolute;
  top: calc(var(--image-height-percent) / 2);
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--title-hover-font-size);
  z-index: 4;
  width: 80%;
  height: auto;
  text-align: center;
  background-color: transparent;
  padding: 10px;
  border-radius: 4px;
  opacity: 1;
}

/* Project Detail Page Styles */
.project-detail-container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.go-back-container {
  margin-bottom: 30px;
}

.go-back-button {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-size: 1rem !important;
  padding: 8px 16px !important;
}

.project-detail-content {
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
  color: #ccc;
}

.project-title-detail {
  color: white;
  font-size: 2.5rem;
  margin-top: 0;
  margin-bottom: 20px;
  text-align: left;
}

.project-image-large {
  width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
}

.project-image-large img {
  width: 100%;
  height: auto;
  display: block;
}

.project-description-full h2,
.project-description-full h3 {
  color: white;
  margin-top: 25px;
  margin-bottom: 15px;
  text-align: left;
}

.project-description-full h2 {
  font-size: 1.8rem;
}

.project-description-full h3 {
  font-size: 1.4rem;
}

.project-description-full p {
  line-height: 1.6;
  margin-bottom: 15px;
  text-align: left;
}

.project-description-full ul {
  text-align: left;
  padding-left: 20px;
  margin-bottom: 15px;
}

.project-description-full li {
  margin-bottom: 8px;
  line-height: 1.5;
}

/* Footer */
.footer {
  padding-top: 20px;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px; /* gap-6 equivalent */
  padding: 16px; /* p-4 equivalent */
  color: black; /* text-black */
}

.copyright-container, .social-links-container {
  background-color: #d1d5db; /* bg-gray-300 */
  box-shadow: 0 4px 6px -1px rgba(209, 213, 219, 0.5), 0 2px 4px -1px rgba(209, 213, 219, 0.5); /* shadow-md shadow-gray-200 */
  border-radius: 9999px; /* rounded-full */
  padding-top: 4px; /* py-1 */
  padding-bottom: 4px; /* py-1 */
  padding-left: 24px; /* px-6 */
  padding-right: 24px; /* px-6 */
  height: 40px; /* h-10 */
  display: flex;
  align-items: center;
}

.social-links-container {
  display: flex;
  align-items: center;
  gap: 24px; /* gap-6 equivalent */
}

.social-link {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.social-link:hover {
  transform: translateY(-4px); /* Removed scale to prevent box expansion */
}

.social-icon {
  width: 20px; /* h-5 w-5 */
  height: 20px;
  fill: black;
  transition: all 0.3s ease;
}

.social-link:hover .social-icon {
  width: 24px; /* Slightly larger size on hover */
  height: 24px;
}

.source-code-container {
  text-decoration: none;
}

.source-code-content {
  background-color: #d1d5db; /* bg-gray-300 */
  box-shadow: 0 4px 6px -1px rgba(209, 213, 219, 0.5), 0 2px 4px -1px rgba(209, 213, 219, 0.5); /* shadow-md shadow-gray-200 */
  border-radius: 9999px; /* rounded-full */
  padding-top: 4px; /* py-1 */
  padding-bottom: 4px; /* py-1 */
  padding-left: 24px; /* px-6 */
  padding-right: 24px; /* px-6 */
  height: 40px; /* h-10 */
  display: flex;
  align-items: center;
  gap: 12px; /* gap-3 */
  transition: transform 200ms ease; /* duration-200 */
  color: black;
}

.source-code-content:hover {
  transform: translateY(-4px); /* hover:translate-y-[-4px] */
}

.source-code-icon {
  width: 20px; /* h-5 w-5 */
  height: 20px;
  fill: black;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 16px;
    gap: 16px;
  }
  
  .navbar {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .nav-links {
    width: 100%;
    justify-content: space-around;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    text-align: center;
  }
}