/* =============================
   Root Variables
============================= */
:root {
  --bg: #1e1f26;
  --text: #ffffff;
  --text-muted: #a1a1a1;
  --accent: #ff595e;
  --highlight: #8ac926;
}

/* =============================
   Reset & Base Styles
============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Courier New', monospace;
  line-height: 1.6;
  padding: 20px;
}

a {
  color: var(--highlight);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

/* =============================
   Container
============================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================
   Header & Navigation
============================= */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.header-bar h1 {
  margin: 0;
  font-size: 2rem;
  color: var(--accent);
}

.logo {
  width: 40px;
  height: auto;
}

nav a {
  color: var(--text-muted);
  margin-left: 15px;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--highlight);
}

/* =============================
   Hero Section
============================= */
.hero {
  margin: 40px 0;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.hero-image img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 10px var(--highlight);
}

.hero-text {
  max-width: 70%;
}

.hero-text h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.hero-text p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* =============================
   Sections
============================= */
section {
  margin: 30px 0;
}

h3 {
  color: var(--accent);
  margin-bottom: 10px;
}
#projects {
  margin: 20px 0;
}
#projects h3 {
  margin-bottom: 0; /* Remove space under the heading */
}

.project-card {
  margin-top: 5px; /* Small spacing above each card */
}
#projects h3 {
  margin-bottom: 10px;
  margin: 20px 0;
}
.project-card {
  background-color: #2a2b38;
  padding: 15px;
  border-left: 4px solid var(--highlight);
  margin: 10px 0; /* Stack cards vertically with spacing */
  width: 100%;
  max-width: 300px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
}

.project-card h4 a {
  color: var(--highlight);
}
.project-flex-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.project-list {
  flex: 1;
  min-width: 250px;
}
.carousel {
  flex: 1;
  min-width: 60%
  max-width: 60%; /* limit carousel size */
  overflow: hidden;
  position: relative;
  padding:0;
  margin: 0;
}

.carousel-track {
  display: flex;
  scroll-behavior: smooth;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.carousel-track pre {
  min-width: 100%; /* show one at a time */
  flex-shrink: 0;
  scroll-snap-align: start;
  margin: 0;
  padding: 10px;
  background: #2a2b38;
  color: white;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0,0,0,0.3);
  max-height: 400px;
}

/* ===== Updated carousel buttons with improved accessibility & contrast ===== */
.carousel-btn {
  background-color: #1a7f29; /* Dark green for strong contrast */
  color: var(--text); /* white text */
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 1.2rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  outline-offset: 3px;
}

.carousel-btn:hover,
.carousel-btn:focus {
  background-color: var(--highlight); /* bright green */
  color: var(--bg); /* dark background for text */
  outline: 3px solid #ffd700; /* gold focus outline */
  outline-offset: 3px;
}

.carousel-btn:focus-visible {
  outline: 3px solid #ffd700; /* visible keyboard focus */
  outline-offset: 3px;
}

.carousel-btn:disabled {
  background-color: #555; /* dimmed grey */
  color: #aaa;
  cursor: not-allowed;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}
.carousel-track {
  scrollbar-width: none; /* Firefox */
}

/* =============================
   Footer
============================= */
footer {
  margin-top: 40px;
  text-align: center;
  color: var(--text-muted);
}

/* =============================
   Responsive Design
============================= */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  .header-bar {
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
  }

  nav a {
    display: block;
    margin: 10px 0;
  }

  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-image img {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
    font-size: 0.95rem;
  }

  .hero-image img {
    width: 120px;
    height: 120px;
  }

  .logo {
    width: 30px;
  }
}

