:root {
  --bg-color: #0d0d0d;
  --card-bg: #161618;
  --text-main: #f0f0f0;
  --text-muted: #a0a0a0;
  --accent: #ff3333;
  --accent-hover: #ff6666;
  --border: #2a2a2e;
}

/* Feature #2: Smooth Scrolling & Native Dark Scheme */
html {
  color-scheme: dark;
  scroll-behavior: smooth;
  background-color: var(--bg-color);
  scrollbar-color: var(--accent) var(--bg-color);
  scrollbar-width: thin;
}

/* WebKit custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

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

body {
  background: radial-gradient(circle at top, #1f0a0a 0%, var(--bg-color) 70%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  display: flex;
  justify-content: center;
  padding: 4rem 1.5rem;
  min-height: 100vh;
}

/* Feature #3: Page Load Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  max-width: 600px;
  width: 100%;
  animation: fadeIn 0.6s ease-out forwards;
}

/* Header & Navigation Layout */
header {
  margin-bottom: 2.5rem;
  text-align: left;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

h1 {
  font-size: 3.2rem;
  font-weight: 1000;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(255, 51, 51, 0.4);
}

.github-link {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition: color 0.2s ease, transform 0.2s ease, filter 0.2s ease;
}

.github-link svg {
  width: 40px;
  height: 40px;
}

.github-link:hover {
  color: var(--accent);
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(255, 51, 51, 0.6));
  text-decoration: none;
}

.subtitle {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 1.50rem;
  margin-top: 0.2rem;
}

section {
  font-size: 1.3rem;
  margin-bottom: 3rem;
}

h2 {
  font-size: 2.2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

h2::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 32px;
  background-color: var(--accent);
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(255, 51, 51, 0.9);
}

h2::after {
  content: '';
  flex: 1;
  height: 2px;
  background-color: var(--border);
}

/* Clickable Project Card */
.project-card {
  display: block;
  text-decoration: none;
  background-color: var(--card-bg);
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(255, 51, 51, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.project-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.view-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.project-card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-top: 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 51, 51, 0.3);
}

/* Feature #1: Interactive Hover, Focus & Active States */
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 51, 51, 0.22);
  text-decoration: none;
}

.project-card:hover .view-link {
  color: var(--accent-hover);
  text-decoration: underline;
}

.project-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 51, 51, 0.1);
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Keyboard Focus Rings for Accessibility */
a:focus-visible,
.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

footer {
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
  body {
    padding: 2rem 1rem;
  }

  h1 {
    font-size: 2.8rem;
  }

  .github-link svg {
    width: 32px;
    height: 32px;
  }

  .subtitle {
    font-size: 1.1rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h2::before {
    height: 24px;
    width: 8px;
  }
}