@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Space+Grotesk:wght@400;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-elevated: #101621;
  --surface: #121a26;
  --surface-2: #182234;
  --text: #d7e1f2;
  --text-muted: #9fb0c9;
  --accent: #7aa2f7;
  --accent-2: #f7768e;
  --border: #1f2a3a;
  --glow: rgba(122, 162, 247, 0.18);
}

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

body {
  font-family: "Space Grotesk", "JetBrains Mono", sans-serif;
  background: radial-gradient(1200px 800px at 10% -10%, rgba(122, 162, 247, 0.18), transparent 55%),
    radial-gradient(900px 600px at 110% 10%, rgba(247, 118, 142, 0.12), transparent 60%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding: 0;
  overflow-x: hidden;
}

/* Container for main content */
.container {
  width: 80%;
  margin: 0 auto;
  max-width: 1200px;
}

/* Header Section */
header {
  background: linear-gradient(135deg, rgba(24, 34, 52, 0.9), rgba(16, 22, 33, 0.95));
  border-bottom: 1px solid var(--border);
  padding: 48px 0 36px;
  text-align: center;
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

header h1 {
  font-size: 3.4em;
  margin-bottom: 0.05em;
  letter-spacing: 0.02em;
  color: var(--text);
}

header p {
  font-size: 1.3em;
  color: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  margin: 0;
}

header p:not(.subtitle) {
  margin-top: 0;
  margin-bottom: 0;
}

header .subtitle {
  margin-top: 2.25em;
  margin-bottom: 2.25em;
  font-size: 0.95em;
  color: rgba(122, 162, 247, 0.8);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Navigation Bar */
nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  background: var(--bg-elevated);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.05em;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

nav a:hover {
  color: var(--accent);
  text-shadow: 0 0 14px var(--glow);
}

/* Main Section */
section.main-content {
  background-color: var(--bg);
  padding: 48px 0 56px;
  margin-top: 0;
  color: var(--text);
}

section.main-content h2 {
  font-size: 2.5em;
  color: var(--accent);
  text-align: center;
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

section.main-content p {
  font-size: 1.15em;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.8;
  margin-bottom: 30px;
}

/* Project List */
.projects {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* 3 columns */
  gap: 30px;
  margin-top: 40px;
}

.project-item {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border: 1px solid var(--border);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

/* Remove default anchor tag styling */
a {
  text-decoration: none; /* Remove underline */
  color: inherit; /* Inherit color from the parent element */
}

/* Add custom hover effect for the anchor tags */
.project-item:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(122, 162, 247, 0.55);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(122, 162, 247, 0.12);
  cursor: pointer;
}

.project-item img {
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border);
}

.project-item h3 {
  font-size: 1.6em;
  color: var(--text);
  margin: 20px 20px 10px;
}

.project-item p {
  font-size: 1.05em;
  color: var(--text-muted);
  margin: 0 20px 22px;
}

/* Footer Section */
footer {
  background: var(--bg-elevated);
  text-align: center;
  padding: 24px 0 28px;
  color: var(--text);
  border-top: 1px solid var(--border);
}

footer p {
  font-size: 1.05em;
  margin-bottom: 10px;
  color: var(--text-muted);
}

/* Styling for social media links */
.social-links {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.social-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1rem;
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.social-link:hover {
  color: var(--accent);
  text-shadow: 0 0 14px var(--glow);
  transform: translateY(-1px);
}

.social-link i {
  font-size: 1.2rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 2.6em; /* Smaller header */
  }

  header p {
    font-size: 1.1em; /* Adjust subheading size */
  }

  .projects {
    grid-template-columns: 1fr 1fr; /* 2 columns on tablets */
  }
  .container {
    width: 90%; /* Reduce width for small screens */
  }

  nav {
    flex-direction: column;
    align-items: center; /* Center items vertically */
    gap: 12px;
  }
}

/* Adjust project items layout for smaller screens */
@media (max-width: 480px) {
  .projects {
    grid-template-columns: 1fr; /* Stack project items in one column */
    gap: 20px; /* Reduced gap between items */
  }

  .project-item {
    padding: 10px; /* Add some padding to give the content breathing room */
  }

  .project-item img {
    width: 100%; /* Ensure images are responsive */
    height: auto;
  }

  .project-item h3 {
    font-size: 1.4em; /* Adjust heading size */
  }

  .project-item p {
    font-size: 1em; /* Adjust text size */
  }
}
