/* Custom Properties (Variables) for Colors */
:root {
  --primary-bg: #f4f4f4;
  --secondary-bg: #fff;
  --header-bg: #1c2b33;
  --header-text: #eae0d5;
  --nav-bg: #333;
  --nav-text: #fff;
  --accent-color: #3498db;
  --main-text: #333;
  --link-color: #2a76b5;
}

/* General Body and Typography */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--primary-bg);
  color: var(--main-text);
  font-size: 16px;
}

/* Container for centered content */
.main-content {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

/* Header and Navigation Styling */
.site-header {
  background-color: var(--header-bg);
  color: var(--header-text);
  text-align: center;
  padding: 2rem 0;
}

.site-title {
  margin: 0;
  font-size: 2.5em;
  font-weight: bold;
}

.site-tagline {
  margin: 0;
  font-size: 1.2em;
  opacity: 0.8;
}

.main-nav {
  background-color: var(--nav-bg);
  color: var(--nav-text);
  padding: 0.5rem 0;
  text-align: center;
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.main-nav li {
  margin: 0 15px;
}

.main-nav a {
  text-decoration: underline;
  color: var(--nav-text);
  font-weight: bold;
  padding: 10px 15px;
  display: block;
  transition: background-color 0.3s, outline 0.3s;
}

.main-nav a:hover,
.main-nav a:focus {
  background-color: #555;
  border-radius: 5px;
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.main-nav a.active {
  background-color: #555;
  border-radius: 5px;
  cursor: default;
}

/* Main Content Sections */
.intro-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background-color: var(--secondary-bg);
  padding: 40px;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  flex-direction: row-reverse;
}

.intro-section .text-content,
.intro-section .image-content {
  flex: 1;
  min-width: 300px;
}

.intro-section .text-content {
  padding-left: 20px;
  padding-right: 0;
}

.profile-image {
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: block;
  margin: 0 auto;
}

.section-title {
  color: #2c3e50;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.portfolio-section {
  background-color: #ecf0f1;
  padding: 40px;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.project-item {
  background-color: var(--secondary-bg);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.project-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Footer Styling */
.site-footer {
  text-align: center;
  background-color: var(--header-bg);
  color: var(--header-text);
  padding: 1rem 0;
  margin-top: 20px;
}

.site-footer p {
  margin: 5px 0;
}

/* General Link Styling for content area */
a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover,
a:focus {
  color: #2c3e50;
  text-decoration: underline;
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .intro-section {
    flex-direction: column;
  }

  .intro-section .text-content,
  .intro-section .image-content {
    min-width: auto;
    width: 100%;
  }

  .intro-section .text-content {
    padding-right: 0;
    padding-left: 0;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
  }
}

/* For the page-switching script */
.hidden {
  display: none;
}

/* Skip link styling */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}
