/* Base Styles */
:root {
  --bg-color: #0f1115;
  --text-color: #e5e7eb;
  --accent-color: #3b82f6;
  --card-bg: #1f2937;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* Navigation */
header {
  background-color: rgba(15, 17, 21, 0.95);
  padding: 1.5rem 5%;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav h1 {
  font-size: 1.5rem;
  color: var(--accent-color);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent-color);
}

/* Hero Section */
#hero {
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.hero-content h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  color: #9ca3af;
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #2563eb;
}

/* Projects Section */
#projects {
  padding: 5rem 5%;
}

#projects h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
}

.video-placeholder {
  overflow: hidden;
  width: 100%;
  height: 200px;
  background-color: #374151;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: #9ca3af;
  font-style: italic;
}

.video-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 'contain' ensures no code is cropped off the edges */
  border-radius: 4px; /* Matches the container's rounded corners */
  display: block;
}

.tech-stack {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--accent-color);
}

.project-links a {
  color: var(--text-color);
  text-decoration: underline;
}

/* Contact Section */
#contact {
  text-align: center;
  padding: 5rem 5%;
  background-color: var(--card-bg);
}

.contact-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  color: #9ca3af;
}

/* Modal Overlay Background */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); /* Heavy dark overlay */
  backdrop-filter: blur(5px); /* Modern blur effect */
}

/* Modal Content Container */
.modal-content {
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 90%;
  max-width: 1400px;
}

/* Expanded Image/Video Styling */
.modal-content img,
.modal-content video {
  width: 100%;
  height: auto;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  object-fit: contain;
}

/* Close Button */
.close-modal {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #e5e7eb;
  font-size: 45px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 1001;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--accent-color);
}

/* Indicate that the demo is clickable */
.clickable-demo {
  cursor: zoom-in;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.clickable-demo img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.clickable-demo:hover {
  opacity: 0.8;
}
