/* ============================================
   Unhedged.in — Shared Stylesheet
   Dark theme: #0d1117 bg, #ffa657 accent
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #ffa657;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #ffbf80;
}

img {
  max-width: 100%;
  height: auto;
}

code {
  font-family: Consolas, 'Courier New', monospace;
  background: #1c2128;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: #e6edf3;
}

pre {
  background: #1c2128;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  margin: 1.5em 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.88em;
  line-height: 1.6;
}

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.container--narrow {
  max-width: 780px;
}

/* --- Navigation --- */
.nav {
  background: #161b22;
  border-bottom: 1px solid #30363d;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav__logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e6edf3;
  letter-spacing: -0.5px;
}

.nav__logo span {
  color: #ffa657;
}

.nav__links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav__links a {
  color: #8b949e;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav__links a:hover,
.nav__links a.active {
  color: #e6edf3;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: #c9d1d9;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
}

.hero__title {
  font-size: 2.8rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero__title span {
  color: #ffa657;
}

.hero__subtitle {
  font-size: 1.2rem;
  color: #8b949e;
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero__cta {
  display: inline-block;
  background: #ffa657;
  color: #0d1117;
  padding: 12px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s, transform 0.2s;
}

.hero__cta:hover {
  background: #ffbf80;
  color: #0d1117;
  transform: translateY(-1px);
}

/* --- Section --- */
.section {
  padding: 60px 0;
}

.section__title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 32px;
  padding-left: 16px;
  border-left: 3px solid #ffa657;
}

/* --- Cards Grid --- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: #ffa657;
  transform: translateY(-2px);
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.card__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 8px;
}

.card__text {
  color: #8b949e;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Blog Cards --- */
.blog-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.blog-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}

.blog-card:hover {
  border-color: #ffa657;
  transform: translateY(-2px);
}

.blog-card__date {
  font-size: 0.85rem;
  color: #8b949e;
  margin-bottom: 8px;
}

.blog-card__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 8px;
}

.blog-card__excerpt {
  color: #8b949e;
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.blog-card__link {
  font-size: 0.9rem;
  font-weight: 600;
}

/* --- Article --- */
.article {
  padding: 60px 0 80px;
}

.article__back {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 0.9rem;
  color: #8b949e;
}

.article__back:hover {
  color: #ffa657;
}

.article__title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.article__meta {
  font-size: 0.9rem;
  color: #8b949e;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid #30363d;
}

.article__content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e6edf3;
  margin: 2em 0 0.75em;
  padding-left: 14px;
  border-left: 3px solid #ffa657;
}

.article__content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #e6edf3;
  margin: 1.5em 0 0.5em;
}

.article__content p {
  margin-bottom: 1.2em;
}

.article__content ul,
.article__content ol {
  margin: 1em 0 1.5em 1.5em;
}

.article__content li {
  margin-bottom: 0.5em;
}

.article__content blockquote {
  border-left: 3px solid #ffa657;
  padding: 12px 20px;
  margin: 1.5em 0;
  background: #161b22;
  border-radius: 0 8px 8px 0;
  color: #8b949e;
  font-style: italic;
}

.article__content strong {
  color: #e6edf3;
}

/* --- About --- */
.about-section {
  padding: 60px 0;
}

.about-section__title {
  font-size: 2rem;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 24px;
}

.about-section__text {
  margin-bottom: 1.2em;
  max-width: 700px;
}

.about-topics {
  list-style: none;
  margin: 24px 0;
}

.about-topics li {
  padding: 8px 0 8px 20px;
  position: relative;
  color: #c9d1d9;
}

.about-topics li::before {
  content: '\25B8';
  position: absolute;
  left: 0;
  color: #ffa657;
}

.about-contact {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 24px;
  margin-top: 40px;
  max-width: 500px;
}

.about-contact__title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #e6edf3;
  margin-bottom: 12px;
}

/* --- Footer --- */
.footer {
  margin-top: auto;
  background: #161b22;
  border-top: 1px solid #30363d;
  padding: 32px 24px;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__copy {
  font-size: 0.85rem;
  color: #8b949e;
}

.footer__links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer__links a {
  color: #8b949e;
  font-size: 0.85rem;
}

.footer__links a:hover {
  color: #ffa657;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
  }

  .nav__links.open {
    display: flex;
  }

  .nav__toggle {
    display: block;
  }

  .hero {
    padding: 48px 24px 40px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__subtitle {
    font-size: 1.05rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .blog-cards {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .article__title {
    font-size: 1.6rem;
  }
}
