/* 
   Premium Design System 
   Focus: Sophisticated Dark Mode, Glassmorphism, and Fluid Transitions
*/

:root {
  /* Colors - Modern Sophisticated Palette */
  --bg-main: #0a0c10;
  --bg-card: rgba(23, 27, 34, 0.6);
  --bg-nav: rgba(10, 12, 16, 0.8);
  
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --accent: #8b5cf6;
  --accent-glow: rgba(139, 92, 246, 0.5);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  --glass-blur: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  
  /* Subtle animated grid background */
  background-image: 
    radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 40px 40px;
  background-attachment: fixed;
}

/* Background Glow Effects */
body::before {
  content: "";
  position: fixed;
  top: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  bottom: -10%;
  left: -10%;
  width: 40%;
  height: 40%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(100px);
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); font-weight: 800; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; font-weight: 700; }

p { font-size: 1.1rem; color: var(--text-muted); }

/* Navigation */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-nav);
  backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  color: #ffffff;
  font-size: 1.1rem;
}

.monogram {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--primary-glow);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
  text-shadow: 0 0 10px var(--primary-glow);
}

/* Hero */
.hero {
  padding: 8rem 1.5rem 4rem;
  text-align: left;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h2 {
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero p {
  max-width: 700px;
  font-size: 1.25rem;
  margin-bottom: 3rem;
}

/* Buttons */
.button-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.primary-button, .secondary-button {
  padding: 0.8rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 10px 30px -10px var(--primary-glow);
}

.primary-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px -10px var(--primary-glow);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.05);
  color: white;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

/* Sections */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

section {
  margin-bottom: 8rem;
}

/* Cards & Grids */
.expertise-grid, .project-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card, .project-card, .feature-list li {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  list-style: none;
}

.card:hover, .project-card:hover, .feature-list li:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Accent lines for cards */
.card::after, .project-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
  opacity: 0;
  transition: var(--transition);
}

.card:hover::after, .project-card:hover::after {
  opacity: 1;
}

/* Project Card Specifics */
.project-card {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.project-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

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

.project-card h3 {
  margin-bottom: 1rem;
}

.project-link {
  margin-top: auto;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.project-link:hover {
  gap: 0.75rem;
  text-shadow: 0 0 10px var(--primary-glow);
}

/* Feature List (Highlights) */
.feature-list {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  padding: 0;
}

.feature-list li strong {
  display: block;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* Tech Stack */
.card ul {
  padding-left: 1.25rem;
  margin-top: 1.5rem;
}

.card li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  list-style: circle;
}

/* Article / Project Detail Styles */
article {
  max-width: 800px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 4rem;
}

.article-meta {
  color: var(--text-dim);
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

article img {
  width: 100%;
  border-radius: 24px;
  border: 1px solid var(--border);
  margin: 3rem 0;
}

article h2 {
  margin-top: 4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
}

article th, article td {
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  text-align: left;
}

article th {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

/* Blog Grid & Cards */
.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.blog-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.blog-card h3 {
  margin-bottom: 1rem;
  color: var(--text-main);
}

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

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

.blog-meta span {
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.read-more:hover {
  gap: 0.75rem;
  text-shadow: 0 0 10px var(--primary-glow);
}

/* Ad Container */
.ad-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  border-radius: 20px;
  padding: 1rem;
  margin-bottom: 4rem;
  overflow: hidden;
  text-align: center;
}

ins.adsbygoogle {
  background: transparent !important;
}

/* Featured Spotlight */
.featured-spotlight {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 3rem;
  margin-bottom: 5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.featured-spotlight::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 70%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  opacity: 0.15;
  pointer-events: none;
}

.spotlight-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.featured-spotlight h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.featured-spotlight p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.spotlight-visual img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

.featured-spotlight:hover .spotlight-visual img {
  transform: scale(1.03) rotate(1deg);
}

@media (max-width: 900px) {
  .featured-spotlight {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
  .spotlight-visual {
    order: -1;
  }
}

/* Footer */
footer {
  padding: 6rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-dim);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--text-main);
}

footer p {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Responsive Fixes */
@media (max-width: 768px) {
  .hero { padding: 6rem 1.5rem 2rem; }
  .hero h1 { font-size: 3rem; }
  .nav-links { display: none; } /* Could add hamburger menu if needed */
}