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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: rgba(30, 30, 30, 0.6);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --gradient-primary: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  --font-family: 'Inter', sans-serif;
  --shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

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

ul {
  list-style: none;
}

/* Glassmorphism helpers */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

/* Typography elements */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* --- Navigation --- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(15px);
}

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

.nav-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand-logo {
  height: 32px;
  width: auto;
}

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

.nav-links a {
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

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

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

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

.mobile-toggle {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
}

/* --- Hero Section --- */
.hero {
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle background glow effect */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(10,10,10,0) 70%);
  border-radius: 50%;
  z-index: -1;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

/* --- Sections --- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
}

/* --- Article Grid --- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: var(--radius);
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

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

.article-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag.ai { background: rgba(99, 102, 241, 0.1); color: #818cf8; border: 1px solid rgba(129, 140, 248, 0.2); }
.tag.cyber { background: rgba(236, 72, 153, 0.1); color: #f472b6; border: 1px solid rgba(244, 114, 182, 0.2); }
.tag.web { background: rgba(168, 85, 247, 0.1); color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.2); }
.tag.gadgets { background: rgba(52, 211, 153, 0.1); color: #6ee7b7; border: 1px solid rgba(110, 231, 183, 0.2); }

.article-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.article-title a {
  color: var(--text-primary);
}

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

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

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: auto;
}

/* --- Filters (Articles page) --- */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.page-btn:hover, .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Single Article --- */
.single-article {
  max-width: 800px;
  margin: 4rem auto;
}

.single-header {
  text-align: center;
  margin-bottom: 3rem;
}

.single-title {
  font-size: 3rem;
  line-height: 1.2;
  margin: 1.5rem 0;
}

.single-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.single-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 3rem;
  border: 1px solid var(--border-color);
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #d4d4d4;
}

.article-body h2 {
  font-size: 2rem;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body ul {
  list-style: disc;
  margin: 0 0 1.5rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body pre {
  background: #1e1e1e;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
}

/* --- Share Buttons --- */
.share-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  transition: var(--transition);
}

.share-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* --- Form --- */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.form-error {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

.form-success {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.2);
  margin-bottom: 1.5rem;
  display: none;
}

/* --- About --- */
.about-section {
  max-width: 800px;
  margin: 4rem auto;
  text-align: center;
}

.author-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 2rem;
  border: 3px solid var(--accent);
  padding: 5px;
}

/* --- Footer --- */
footer {
  margin-top: auto;
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: inline-block;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links h4 {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-links ul li {
  margin-bottom: 0.75rem;
}

.footer-links ul li a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* --- Utilities --- */
.mt-5 { margin-top: 3rem; }
.mb-5 { margin-bottom: 3rem; }
.text-center { text-align: center; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }

  .nav-links.active {
    left: 0;
  }

  .mobile-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .single-title {
    font-size: 2rem;
  }

  .single-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}
