/* GLOBAL THEME VARIABLES */
:root {
  --bg: #0b1220;
  --nav-bg: rgba(2, 6, 23, 0.8);
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --accent-glow: rgba(56, 189, 248, 0.3);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

/* PREMIUM FLOATING NAVIGATION */
nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1000px;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  z-index: 2000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.4s ease;
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  list-style: none;
  padding: 10px 20px;
  margin: 0;
  flex-wrap: wrap;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 15px;
  border-radius: 50px;
  transition: 0.3s;
}

nav a:hover {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
}

/* ACTIVE LINK STYLE */
nav a.active {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

/* HEADERS & HERO CENTERING FIX */
header {
  text-align: center;
  padding: 140px 20px 60px; /* Increased top padding to clear floating nav */
}

/* Specific class for the content under your name */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;    /* THE FIX: Centers everything horizontally */
  text-align: center;     /* THE FIX: Centers text lines */
  margin: 0 auto;
}

section {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

/* CARDS */
.card {
  background: var(--card);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid #1f2937;
  margin-bottom: 30px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  border-color: var(--accent);
}

.card h2, .card h3 {
  margin-bottom: 15px;
  color: var(--accent);
}

.card p {
  color: #c7d2fe;
}

/* BUTTONS */
.button {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 12px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.button:hover {
  background: #0ea5e9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.button-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* TRUNCATION LOGIC */
.post-content {
  transition: max-height 0.5s ease;
  overflow: hidden;
}

.post-content.collapsed {
  max-height: 120px;
  position: relative;
}

.post-content.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(transparent, var(--card));
}

.post-content.expanded {
  max-height: 5000px;
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--accent);
  padding: 10px 0;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  font-size: 1rem;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 80px 20px;
  background: #020617;
  color: var(--muted);
  border-top: 1px solid #1f2937;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

/* RESPONSIVE NAV FOR MOBILE */
@media (max-width: 768px) {
  nav {
    top: 10px;
    border-radius: 20px;
    width: 95%;
  }
  nav ul {
    gap: 5px;
    padding: 10px;
  }
  nav a {
    font-size: 0.7rem;
    padding: 6px 10px;
  }
}