/*
  Theme: Tech / Futuristic
  Primary Font: Montserrat (Headings)
  Secondary Font: Fira Code (Body)
*/

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&family=Montserrat:wght@700;900&display=swap');

:root {
  --bg-color: #0d1117;
  --primary-color: #161b22;
  --border-color: #30363d;
  --accent-color: #22d3ee;
  --text-color: #c9d1d9;
  --heading-color: #ffffff;
  --link-hover-color: #67e8f9;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Fira Code', monospace;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.7;
  font-size: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

/* --- Header & Navigation --- */
.site-header {
  background-color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  text-align: center;
}

.site-header h1 {
  font-family: var(--font-heading);
  color: var(--heading-color);
  font-size: 2.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.site-header h1 a {
  text-decoration: none;
  color: inherit;
}

.site-nav {
  background-color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.site-nav ul li a {
  color: var(--text-color);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.site-nav ul li a:hover, .site-nav ul li a.active {
  color: var(--accent-color);
  background-color: rgba(34, 211, 238, 0.1);
}

/* --- Search Form --- */
.search-form {
  display: flex;
  align-items: center;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
}

.search-input {
  background-color: transparent;
  border: none;
  color: var(--text-color);
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  width: 180px;
  transition: width 0.3s ease-in-out;
}

.search-input::placeholder {
  color: #8b949e;
}

.search-input:focus {
  width: 240px;
  box-shadow: 0 0 5px rgba(34, 211, 238, 0.5);
}

.search-btn {
  background-color: transparent;
  border: none;
  color: var(--accent-color);
  cursor: pointer;
  padding: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.search-btn:hover {
  background-color: rgba(34, 211, 238, 0.1);
}

.search-btn svg {
  fill: var(--accent-color);
}


/* --- Main Layout --- */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0;
}

@media (min-width: 992px) {
  .main-layout {
    grid-template-columns: 3fr 1fr;
  }
}

main {
  background-color: var(--primary-color);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: 8px;
}

aside {
  background-color: var(--primary-color);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 8px;
  height: fit-content;
}

/* --- Typography & Content --- */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--heading-color);
  margin-bottom: 1rem;
  line-height: 1.3;
}

h1.page-title {
  font-size: 2.2rem;
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.8rem;
}

h3 {
  font-size: 1.4rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

ul {
  list-style-position: inside;
  padding-left: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

/* --- Homepage Article Grid --- */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.article-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 240, 255, 0.1);
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  margin-top: 0;
  font-size: 1.5rem;
}

.card-content h3 a {
  color: var(--heading-color);
}

.card-content p {
  flex-grow: 1;
}

.read-more-btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--bg-color);
  font-family: var(--font-heading);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: 700;
  text-align: center;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.read-more-btn:hover {
  background-color: var(--link-hover-color);
  text-decoration: none;
}

/* --- Search Results --- */
.no-results {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    margin-top: 1.5rem;
}

/* --- Article Page --- */
.article-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.article-meta {
  font-size: 0.9rem;
  color: #8b949e;
  margin-top: -0.5rem;
}

/* --- Sidebar --- */
.sidebar-widget {
  margin-bottom: 2rem;
}

.sidebar-widget:last-child {
  margin-bottom: 0;
}

.sidebar-widget h3 {
  font-size: 1.2rem;
  color: var(--accent-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
}

.sidebar-widget ul li a {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-color);
  transition: padding-left 0.3s ease;
}

.sidebar-widget ul li:last-child a {
  border-bottom: none;
}

.sidebar-widget ul li a:hover {
  padding-left: 10px;
  text-decoration: none;
}

.promo-text {
  background-color: rgba(34, 211, 238, 0.1);
  padding: 1rem;
  border-left: 3px solid var(--accent-color);
  border-radius: 4px;
  font-style: italic;
  font-size: 0.95rem;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--primary-color);
  border-top: 1px solid var(--border-color);
  color: #8b949e;
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}