@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- CUSTOM PROPERTIES --- */
:root {
  --bg-primary: #080b11;
  --bg-secondary: #0f1422;
  --bg-card: rgba(20, 27, 45, 0.6);
  --bg-card-hover: rgba(28, 38, 62, 0.8);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-pink: #d946ef;
  
  --gradient-primary: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  --gradient-secondary: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  --gradient-accent: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  --gradient-dark: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  
  --border-glow: rgba(139, 92, 246, 0.15);
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-glass-hover: rgba(255, 255, 255, 0.12);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(139, 92, 246, 0.2);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(6, 182, 212, 0.03) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

input, button, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-secondary);
  border: 2px solid var(--bg-primary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- SELECTION --- */
::selection {
  background-color: rgba(139, 92, 246, 0.3);
  color: var(--text-primary);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

h1 { font-size: 2.75rem; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; letter-spacing: -0.01em; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.text-gradient-cyan {
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* --- LAYOUT & CONTAINERS --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 992px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  .section { padding: 4rem 0; }
}

/* --- HEADER & NAVIGATION --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(8, 11, 17, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition-normal);
}

.header-scrolled {
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.mobile-nav-toggle {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
}

.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: var(--transition-fast);
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 250px;
    height: calc(100vh - 80px);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-glass);
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
    transition: var(--transition-normal);
    backdrop-filter: blur(20px);
  }
  
  .nav-links.open {
    right: 0;
  }
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(var(--accent-purple), transparent 70%);
  top: 10%;
  right: -100px;
  opacity: 0.15;
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(var(--accent-blue), transparent 70%);
  bottom: 10%;
  left: -150px;
  opacity: 0.15;
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
}

.hero-subtitle {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-blue);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
  }
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 650px;
}

.cta-group {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-normal);
  cursor: pointer;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 8px;
  z-index: -1;
  opacity: 0;
  transition: var(--transition-normal);
  filter: blur(8px);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover::before {
  opacity: 0.6;
}

.btn-secondary {
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
}

/* --- GLASS CARDS --- */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 2.25rem;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

/* --- BLOG SECTIONS --- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3.5rem;
}

.section-header-left {
  max-width: 600px;
}

.section-tag {
  color: var(--accent-blue);
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: block;
}

/* --- BLOG CARD --- */
.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 0; /* Override default card padding */
}

.blog-card-image-wrap {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden;
}

.blog-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.blog-card:hover .blog-card-image {
  transform: scale(1.08);
}

.blog-card-category {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 30px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

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

.blog-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  align-items: center;
}

.blog-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-card-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.blog-card-title a:hover {
  color: var(--accent-blue);
}

.blog-card-summary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  padding-top: 1.25rem;
}

.blog-card-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.blog-card-author-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-glass);
}

.read-more-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.blog-card:hover .read-more-link {
  color: var(--accent-purple);
}

/* --- RECENT POSTS SECTION HOME --- */
.recent-posts {
  position: relative;
}

/* --- PROJECTS CARD --- */
.project-card {
  display: flex;
  flex-direction: column;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-purple);
  margin-bottom: 1.5rem;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.project-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
}

.project-link:hover {
  color: var(--text-primary);
}

/* --- FOOTER --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  padding: 4rem 0;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  list-style: none;
}

.footer-socials a {
  color: var(--text-secondary);
  font-size: 1.25rem;
}

.footer-socials a:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

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

/* --- BLOG LISTING PAGE --- */
.blog-hero {
  padding: 9rem 0 4rem;
  position: relative;
  text-align: center;
}

.blog-filters-container {
  margin-bottom: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.search-bar-wrap {
  position: relative;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  padding: 1rem 1.5rem 1rem 3.5rem;
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition-normal);
}

.search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.25);
  background: rgba(15, 20, 34, 0.9);
}

.search-icon {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.category-pills {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.category-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-normal);
}

.category-pill:hover, .category-pill.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.blog-grid-section {
  padding-bottom: 6rem;
}

.no-results {
  text-align: center;
  grid-column: 1 / -1;
  padding: 4rem 0;
  color: var(--text-secondary);
}

/* --- SINGLE BLOG POST VIEW --- */
.post-hero {
  padding: 9rem 0 4rem;
  border-bottom: 1px solid var(--border-glass);
  position: relative;
}

.post-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.post-back-btn:hover {
  color: var(--text-primary);
}

.post-header {
  max-width: 800px;
  margin: 0 auto;
}

.post-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.post-title {
  font-size: 3.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .post-title {
    font-size: 2.25rem;
  }
}

.post-author-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border-glass);
}

.post-author-name {
  font-weight: 600;
  font-size: 1rem;
}

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

.post-cover-wrap {
  margin: 3rem 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  max-height: 500px;
}

.post-cover-image {
  width: 100%;
  height: 100%;
  max-height: 500px;
  object-fit: cover;
}

.post-container {
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 8rem;
}

/* --- POST CONTENT STYLE --- */
.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #e2e8f0;
}

.post-content p {
  margin-bottom: 1.75rem;
}

.post-content h2 {
  font-size: 1.85rem;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}

.post-content h3 {
  font-size: 1.45rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-content ul, .post-content ol {
  margin-bottom: 1.75rem;
  padding-left: 1.75rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 4px solid var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
  padding: 1.5rem 2rem;
  border-radius: 0 12px 12px 0;
  margin: 2.5rem 0;
  font-style: italic;
  color: var(--text-primary);
}

.post-content code {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', Courier, monospace;
  color: #f472b6;
}

.post-content pre {
  background: #0d1117;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2.5rem 0;
  font-size: 0.95rem;
}

.post-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
  font-family: 'Courier New', Courier, monospace;
}

/* --- DYNAMIC LOADING SHIMMER --- */
.shimmer {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(40, 54, 88, 0.5) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmerAnim 1.5s infinite;
}

@keyframes shimmerAnim {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
