/* =============================================
   cloudwithgagan.com — Premium Editorial Theme
   ============================================= */

:root {
  --bg: #fafbfc;
  --bg-white: #ffffff;
  --bg-dark: #0a0f1e;
  --bg-dark-subtle: #111827;
  --text: #1b1f2e;
  --text-secondary: #4b5563;
  --text-muted: #8891a4;
  --accent: #0066FF;
  --accent-hover: #0052cc;
  --accent-glow: rgba(0, 102, 255, 0.15);
  --accent-light: #e6f0ff;
  --gradient-start: #0066FF;
  --gradient-end: #00C2FF;
  --border: #e5e7eb;
  --border-light: #f0f1f3;
  --code-bg: #0f1219;
  --code-text: #e2e8f0;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
  --max-width: 780px;
  --max-width-wide: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   Animations
   ============================================= */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.15s; }
.fade-in:nth-child(4) { transition-delay: 0.2s; }
.fade-in:nth-child(5) { transition-delay: 0.25s; }

/* =============================================
   Header
   ============================================= */
.site-header {
  padding: 0;
  position: sticky;
  top: 0;
  background: rgba(250, 251, 252, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark { display: flex; align-items: center; }

.logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.logo-tld {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--accent-light);
}

.nav-cta {
  background: var(--bg-dark) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}

.nav-cta:hover {
  background: var(--accent) !important;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* =============================================
   Hero — Home
   ============================================= */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 40%, rgba(0,102,255,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 30%, rgba(0,194,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 56px;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--text);
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 32px;
}

.hero-certs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cert-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-white);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 8px;
  letter-spacing: 0.2px;
  transition: all 0.2s;
}

.cert-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* =============================================
   Page Hero (Blog, About)
   ============================================= */
.page-hero {
  padding: 80px 0 40px;
  text-align: center;
}

.page-hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 44px;
  font-weight: 400;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.page-hero p {
  font-size: 17px;
  color: var(--text-secondary);
}

/* =============================================
   Posts Section
   ============================================= */
.posts-section {
  padding: 20px 24px 80px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.section-label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover { gap: 8px; }

/* Post Cards */
.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: all 0.25s ease;
  overflow: hidden;
}

.post-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-glow);
  transform: translateY(-2px);
}

.post-card-inner {
  padding: 24px 28px;
}

.post-card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.tag-sm {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.post-card h3 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.2px;
}

.post-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.post-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.post-card-meta time {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.read-arrow {
  font-size: 18px;
  color: var(--accent);
  transition: transform 0.2s;
  font-weight: 600;
}

.post-card:hover .read-arrow { transform: translateX(4px); }

/* =============================================
   Post Hero
   ============================================= */
.post-hero {
  padding: 80px 0 48px;
  background:
    radial-gradient(ellipse 50% 50% at 30% 50%, rgba(0,102,255,0.04) 0%, transparent 70%);
}

.post-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.post-meta-top time {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.meta-divider {
  color: var(--border);
}

.tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 12px;
  border-radius: 6px;
}

.post-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-bottom: 12px;
}

.post-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}

/* =============================================
   Post Content
   ============================================= */
.post {
  padding: 0 0 80px;
}

.post-content {
  padding-top: 40px;
}

.post-content h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  margin: 48px 0 16px;
  color: var(--text);
  letter-spacing: -0.2px;
}

.post-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text);
}

.post-content p {
  margin-bottom: 20px;
  color: var(--text);
  line-height: 1.8;
}

.post-content ul, .post-content ol {
  margin: 0 0 20px 24px;
  line-height: 1.8;
}

.post-content li {
  margin-bottom: 8px;
  color: var(--text);
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0,102,255,0.3);
  transition: text-decoration-color 0.2s;
}

.post-content a:hover {
  text-decoration-color: var(--accent);
}

.post-content strong {
  font-weight: 600;
  color: var(--text);
}

.post-content em {
  color: var(--text-secondary);
}

.post-content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 28px 0;
  box-shadow: var(--shadow-md);
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 28px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.7;
}

/* Code Blocks */
.post-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13.5px;
}

.post-content p code, .post-content li code {
  background: #f1f3f5;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 13.5px;
  color: #d6336c;
  border: 1px solid #e5e7eb;
}

.post-content pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 24px 28px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 28px 0;
  line-height: 1.6;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.post-content pre code {
  background: none;
  padding: 0;
  border: none;
  color: inherit;
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.post-content th {
  font-weight: 600;
  background: var(--bg-dark);
  color: #fff;
  text-align: left;
  padding: 12px 18px;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-content td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-white);
}

.post-content tr:last-child td {
  border-bottom: none;
}

/* Post Footer CTA */
.post-footer-cta {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.cta-box {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-subtle));
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  text-align: center;
}

.cta-text {
  color: rgba(255,255,255,0.8);
  font-size: 17px;
  margin-bottom: 20px;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,102,255,0.3);
}

/* =============================================
   About Page
   ============================================= */
.about-section {
  padding-bottom: 80px;
}

.about-intro {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.about-intro p {
  font-size: 17px;
}

.cert-showcase {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.cert-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  transition: all 0.25s ease;
}

.cert-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--accent-glow);
  transform: translateY(-3px);
}

.cert-number {
  display: block;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 36px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.cert-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.about-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s ease;
}

.about-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.about-card-icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.about-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.about-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.about-cta {
  text-align: center;
  padding: 40px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.about-cta p {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.about-cta-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn-outline {
  background: transparent !important;
  color: var(--text) !important;
  border: 1.5px solid var(--border);
}

.cta-btn-outline:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--accent-light) !important;
  box-shadow: none !important;
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.6);
  padding: 56px 0 0;
}

.footer-grid {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 10px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 300px;
}

.footer-heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-links-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14.5px;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-links-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 24px;
  text-align: center;
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: 36px; }
  .hero-sub { font-size: 16px; }
  .post-title { font-size: 30px; }
  .page-hero h1 { font-size: 32px; }
  .cert-showcase { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-box { padding: 28px 24px; }
}

@media (max-width: 600px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 4px;
  }
  .site-nav.open a { margin: 0; padding: 12px 16px; }
  .mobile-toggle { display: flex; }
  .hero h1 { font-size: 30px; }
  .hero-certs { gap: 8px; }
  .cert-badge { font-size: 12px; padding: 5px 10px; }
  .post-card-inner { padding: 20px; }
}
