/* ============================================
   GODEN.AI — Personal Blog of Lex Goden
   Dark theme · Accent #96f0aa · Inter font
   ============================================ */

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

:root {
  --bg: #0a0e13;
  --bg-surface: #111820;
  --bg-card: #161d27;
  --text: #e4e8ef;
  --text-muted: #8a94a6;
  --accent: #96f0aa;
  --accent-dim: rgba(150, 240, 170, 0.12);
  --accent-glow: rgba(150, 240, 170, 0.25);
  --border: rgba(255, 255, 255, 0.06);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 820px;
  --max-width-wide: 1100px;
  --radius: 12px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover {
  opacity: 0.8;
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: 1.25em;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: var(--max-width-wide);
}

main {
  flex: 1;
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 19, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.navbar .container {
  max-width: var(--max-width-wide);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

.navbar__logo span {
  color: var(--accent);
}

.navbar__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.navbar__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--accent);
  opacity: 1;
}

.navbar__links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Mobile menu */
.navbar__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 640px) {
  .navbar__toggle {
    display: block;
  }
  .navbar__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 1rem;
  }
  .navbar__links.open {
    display: flex;
  }
}

/* --- Hero --- */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.hero__badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero__subtitle {
  color: var(--text-muted);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 100px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero__cta:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* --- Section --- */
.section {
  padding: 4rem 0;
}

.section__title {
  margin-bottom: 0.5rem;
}

.section__subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* --- Post Cards --- */
.posts-grid {
  display: grid;
  gap: 1.5rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition);
  display: block;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  opacity: 1;
}

.post-card__date {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.post-card__title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.post-card__excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.post-card__read {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.post-card__read::after {
  content: '→';
  transition: transform var(--transition);
}

.post-card:hover .post-card__read::after {
  transform: translateX(4px);
}

/* --- About Preview --- */
.about-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.about-preview p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.about-preview .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* --- Article --- */
.article {
  padding: 3rem 0 5rem;
}

.article__header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article__date {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  display: block;
}

.article__title {
  font-size: clamp(1.8rem, 4.5vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article__meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article__content {
  font-size: 1.05rem;
  line-height: 1.85;
}

.article__content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.article__content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article__content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--accent-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
  font-style: italic;
}

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

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

.article__content code {
  background: var(--bg-card);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.9em;
}

.article__content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* --- About Page --- */
.about-page {
  padding: 3rem 0 5rem;
}

.about-page h1 {
  margin-bottom: 1.5rem;
}

.about-page h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.4rem;
}

.about-page p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}

.about-page ul {
  list-style: none;
  margin: 1rem 0 1.5rem;
}

.about-page ul li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 1.05rem;
}

.about-page ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.value-card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.value-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

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

/* --- 404 --- */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.error-page__code {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  opacity: 0.3;
}

.error-page h2 {
  margin: 1rem 0 0.5rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: auto;
}

.footer .container {
  max-width: var(--max-width-wide);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer__text span {
  color: var(--accent);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer__links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--accent);
}

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.6s ease-out both;
}

.fade-up:nth-child(2) { animation-delay: 0.1s; }
.fade-up:nth-child(3) { animation-delay: 0.2s; }
.fade-up:nth-child(4) { animation-delay: 0.3s; }

/* --- Utilities --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3rem 0; }
  .about-preview { padding: 1.75rem; }
  .post-card { padding: 1.25rem; }
  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}
