:root {
 --primary: #E53935; /* Accent red */
 --primary-hover: #D32F2F;
 --bg-main: #F8FAFC; /* Soft slate white */
 --bg-card: #FFFFFF;
 --text-main: #0F172A; /* Rich deep slate */
 --text-muted: #475569; /* Balanced gray */
 --border-color: #E2E8F0;
 --font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
 scroll-behavior: smooth;
 scroll-padding-top: 2rem;
}

body {
 font-family: var(--font-family);
 background-color: var(--bg-main);
 color: var(--text-main);
 line-height: 1.6;
 overflow-x: hidden;
}

/* Desktop Sidebar / Page Wrapper */
.page-wrapper {
 display: flex;
 min-height: 100vh;
 width: 100%;
}

/* Sidebar styling */
.sidebar {
 width: 300px;
 background-color: var(--bg-card);
 border-right: 1px solid var(--border-color);
 padding: 3rem 2rem;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 position: fixed;
 top: 0;
 bottom: 0;
 left: 0;
 z-index: 100;
}

.sidebar-top {
 display: flex;
 flex-direction: column;
 gap: 4rem;
}

.logo-container img {
 max-width: 150px;
 height: auto;
 aspect-ratio: 256 / 150;
 display: block;
}

.sidebar-nav {
 display: flex;
 flex-direction: column;
 gap: 1.5rem;
}

.sidebar-nav a {
 color: var(--text-muted);
 text-decoration: none;
 font-size: 1.1rem;
 font-weight: 500;
 transition: all 0.2s ease;
 display: flex;
 align-items: center;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
 color: var(--primary);
 transform: translateX(6px);
}

.sidebar-footer {
 display: flex;
 flex-direction: column;
 gap: 1.5rem;
}

.social-link svg {
 fill: var(--text-muted);
 transition: fill 0.2s ease;
}

.social-link:hover svg {
 fill: var(--primary);
}

/* Content Panel */
.content-panel {
 flex: 1;
 margin-left: 300px;
 padding: 4rem 6rem;
 max-width: 1300px;
}

/* Mobile Elements */
.mobile-header {
 display: none;
 background-color: var(--bg-card);
 border-bottom: 1px solid var(--border-color);
 padding: 1rem 1.5rem;
 position: sticky;
 top: 0;
 z-index: 1000;
 justify-content: space-between;
 align-items: center;
}

.mobile-logo img {
 height: 70px;
 width: auto;
 aspect-ratio: 256 / 150;
 display: block;
}

.menu-toggle, .menu-close {
 background: none;
 border: none;
 color: var(--text-main);
 cursor: pointer;
 display: flex;
 align-items: center;
 justify-content: center;
 padding: 0.5rem;
}

.mobile-drawer {
 position: fixed;
 top: 0;
 right: -100%;
 width: 320px;
 height: 100vh;
 background-color: var(--bg-card);
 box-shadow: -10px 0 30px rgba(0,0,0,0.1);
 z-index: 1001;
 padding: 2rem;
 display: flex;
 flex-direction: column;
 gap: 3rem;
 transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer.open {
 right: 0;
}

.mobile-drawer-header {
 display: flex;
 justify-content: space-between;
 align-items: center;
}

.mobile-drawer-header img {
 height: 70px;
 width: auto;
 aspect-ratio: 256 / 150;
}

.mobile-drawer-nav {
 display: flex;
 flex-direction: column;
 gap: 1.5rem;
}

.mobile-link {
 font-size: 1.3rem;
 font-weight: 600;
 color: var(--text-muted);
 text-decoration: none;
 transition: color 0.2s ease;
}

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

/* Hero Banner */
.hero-banner {
 background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
 color: #FFFFFF;
 padding: 5rem 4rem;
 border-radius: 20px;
 margin-bottom: 4rem;
 box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
 position: relative;
 overflow: hidden;
}

.hero-banner::after {
 content: '';
 position: absolute;
 top: -50%;
 right: -20%;
 width: 400px;
 height: 400px;
 background: radial-gradient(circle, rgba(229, 57, 53, 0.15) 0%, transparent 70%);
 border-radius: 50%;
}

.hero-banner h1 {
 font-size: 2.8rem;
 font-weight: 800;
 line-height: 1.25;
 letter-spacing: -0.03em;
 max-width: 850px;
 position: relative;
 z-index: 2;
}

/* Services Grid */
.services-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
 gap: 2rem;
 margin-bottom: 6rem;
}

.service-card {
 background-color: var(--bg-card);
 border: 1px solid var(--border-color);
 border-radius: 16px;
 overflow: hidden;
 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 display: flex;
 flex-direction: column;
 height: 100%;
 box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.service-card:hover {
 transform: translateY(-6px);
 box-shadow: 0 12px 30px rgba(0,0,0,0.08);
 border-color: rgba(229, 57, 53, 0.25);
}

.service-img-container {
 position: relative;
 width: 100%;
 padding-top: 60%; /* Aspect Ratio */
 overflow: hidden;
}

.service-img-container img {
 position: absolute;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 object-fit: cover;
 transition: transform 0.5s ease;
}

.service-card:hover .service-img-container img {
 transform: scale(1.05);
}

.service-info {
 padding: 2rem;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 flex-grow: 1;
}

.service-info h2 {
 font-size: 1.4rem;
 margin-bottom: 0.75rem;
 font-weight: 700;
}

.service-info p {
 color: var(--text-muted);
 font-size: 0.95rem;
 margin-bottom: 1.75rem;
 line-height: 1.5;
}

.service-btn {
 align-self: flex-start;
 background-color: var(--text-main);
 color: #FFFFFF;
 text-decoration: none;
 padding: 0.6rem 1.3rem;
 border-radius: 30px;
 font-size: 0.85rem;
 font-weight: 600;
 transition: background-color 0.2s ease;
}

.service-btn:hover {
 background-color: var(--primary);
}

/* Deep Dive Section Details */
.section-block {
 margin-bottom: 6rem;
 scroll-margin-top: 4rem;
}

.section-title {
 font-size: 2.2rem;
 font-weight: 800;
 margin-bottom: 2rem;
 letter-spacing: -0.02em;
 position: relative;
 padding-bottom: 0.75rem;
 display: inline-block;
}

.section-title::after {
 content: '';
 position: absolute;
 bottom: 0;
 left: 0;
 width: 60px;
 height: 4px;
 background-color: var(--primary);
 border-radius: 2px;
}

.use-case-list {
 list-style: none;
 display: grid;
 grid-template-columns: 1fr;
 gap: 1.25rem;
}

.use-case-item {
 background-color: var(--bg-card);
 border: 1px solid var(--border-color);
 border-radius: 12px;
 padding: 1.75rem;
 display: flex;
 gap: 1.5rem;
 align-items: flex-start;
 transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.use-case-item:hover {
 border-color: rgba(229, 57, 53, 0.15);
 box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.use-case-number {
 background-color: rgba(229, 57, 53, 0.08);
 color: var(--primary);
 font-weight: 700;
 width: 40px;
 height: 40px;
 border-radius: 50%;
 display: flex;
 align-items: center;
 justify-content: center;
 flex-shrink: 0;
 font-size: 1rem;
}

.use-case-content h2 {
 font-size: 1.15rem;
 font-weight: 700;
 margin-bottom: 0.4rem;
}

.use-case-content p {
 color: var(--text-muted);
 font-size: 0.95rem;
 line-height: 1.5;
}

/* Projects styling */
.project-card {
 background-color: var(--bg-card);
 border: 1px solid var(--border-color);
 border-radius: 20px;
 padding: 3rem;
 margin-top: 1.5rem;
}

.project-title {
 font-size: 1.6rem;
 font-weight: 700;
 margin-bottom: 0.5rem;
}

.project-title a {
 color: var(--text-main);
 text-decoration: none;
 transition: color 0.2s ease;
}

.project-title a:hover {
 color: var(--primary);
}

.project-description {
 color: var(--text-muted);
 font-size: 1.05rem;
 margin-bottom: 2.5rem;
 max-width: 800px;
}

.video-wrapper {
 border-radius: 16px;
 overflow: hidden;
 background: #000;
 box-shadow: 0 8px 30px rgba(0,0,0,0.1);
 margin-bottom: 2.5rem;
 max-width: 900px;
}

.video-wrapper video {
 width: 100%;
 height: auto;
 display: block;
}

.project-cta {
 display: inline-flex;
 align-items: center;
 background-color: var(--primary);
 color: #FFFFFF;
 text-decoration: none;
 padding: 0.8rem 1.8rem;
 border-radius: 30px;
 font-weight: 600;
 transition: background-color 0.2s ease;
}

.project-cta:hover {
 background-color: var(--primary-hover);
}

/* About Me Credentials List */
.certs-list {
 display: flex;
 flex-direction: column;
 gap: 1.75rem;
 margin-top: 2rem;
}

.cert-card {
 background-color: var(--bg-card);
 border: 1px solid var(--border-color);
 border-radius: 16px;
 padding: 2rem;
 display: flex;
 gap: 2.5rem;
 align-items: center;
 transition: all 0.25s ease;
}

.cert-card:hover {
 border-color: rgba(229, 57, 53, 0.25);
 transform: translateY(-2px);
 box-shadow: 0 6px 20px rgba(0,0,0,0.03);
}

.cert-img-wrapper {
 width: 100px;
 height: 100px;
 flex-shrink: 0;
 display: flex;
 align-items: center;
 justify-content: center;
}

.cert-img-wrapper img {
 max-width: 100%;
 max-height: 100%;
 object-fit: contain;
}

.cert-info h3 {
 font-size: 1.2rem;
 font-weight: 700;
 margin-bottom: 0.5rem;
}

.cert-info p {
 color: var(--text-muted);
 font-size: 1rem;
 line-height: 1.5;
}

/* Polished Contact Form Wrapper */
.contact-container {
 background-color: var(--bg-card);
 border: 1px solid var(--border-color);
 border-radius: 20px;
 padding: 3.5rem;
 margin-top: 2rem;
 max-width: 800px;
 box-shadow: 0 4px 15px rgba(0,0,0,0.01);
}

.wpforms-field {
 margin-bottom: 2rem;
}

.wpforms-field-label {
 display: block;
 font-weight: 600;
 font-size: 0.95rem;
 margin-bottom: 0.6rem;
 color: var(--text-main);
}

.wpforms-required-label {
 color: var(--primary);
 margin-left: 0.25rem;
}

.wpforms-field input[type="text"],
.wpforms-field input[type="email"],
.wpforms-field textarea {
 width: 100%;
 padding: 0.9rem 1.1rem;
 border: 1px solid var(--border-color);
 border-radius: 10px;
 background-color: var(--bg-main);
 color: var(--text-main);
 font-family: inherit;
 font-size: 0.95rem;
 transition: all 0.2s ease;
}

.wpforms-field input:focus,
.wpforms-field textarea:focus {
 outline: none;
 border-color: var(--primary);
 background-color: #FFFFFF;
 box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.12);
}

.wpforms-field textarea {
 min-height: 160px;
 resize: vertical;
}

.wpforms-submit {
 background-color: var(--text-main);
 color: #FFFFFF;
 border: none;
 padding: 0.9rem 2.2rem;
 border-radius: 30px;
 font-weight: 600;
 font-size: 1rem;
 cursor: pointer;
 transition: all 0.2s ease;
 display: inline-block;
}

.wpforms-submit:hover {
 background-color: var(--primary);
}

.wpforms-submit:disabled {
 background-color: var(--text-muted);
 cursor: not-allowed;
 opacity: 0.6;
}

.success {
 color: #059669;
 font-weight: 600;
 background-color: rgba(5, 150, 105, 0.08);
 padding: 1.25rem;
 border-radius: 10px;
 display: block;
}

.error {
 color: var(--primary);
 font-weight: 600;
 background-color: rgba(229, 57, 53, 0.08);
 padding: 1.25rem;
 border-radius: 10px;
 display: block;
}

/* Modern Footer */
.footer-site {
 border-top: 1px solid var(--border-color);
 padding: 3rem 0;
 margin-top: 6rem;
 display: flex;
 justify-content: space-between;
 align-items: center;
 flex-wrap: wrap;
 gap: 1.5rem;
}

.footer-left {
 display: flex;
 align-items: center;
 gap: 0.75rem;
 font-weight: 700;
}

.footer-left a {
 color: var(--text-main);
 text-decoration: none;
}

.footer-left a:hover {
 color: var(--primary);
}

.footer-site p {
 color: var(--text-muted);
 font-size: 0.95rem;
}

/* --- Added Blog Post Styling --- */
.blog-article {
 background-color: var(--bg-card);
 border: 1px solid var(--border-color);
 border-radius: 20px;
 padding: 3.5rem;
 margin-top: 2.5rem;
 box-shadow: 0 4px 15px rgba(0,0,0,0.01);
 max-width: 900px;
}

.blog-meta {
 font-size: 0.9rem;
 color: var(--text-muted);
 margin-bottom: 1.5rem;
 display: flex;
 gap: 1rem;
 font-weight: 500;
}

.blog-summary-box {
 background-color: #F1F5F9; /* slate-100 */
 border-left: 4px solid var(--primary);
 padding: 1.75rem;
 border-radius: 4px 16px 16px 4px;
 margin-bottom: 2.5rem;
}

.blog-summary-box p {
 font-style: italic;
 color: var(--text-main);
 font-size: 1.05rem;
 line-height: 1.6;
 margin: 0;
}

.blog-content h3 {
 font-size: 1.75rem;
 margin-top: 2.5rem;
 margin-bottom: 1rem;
 font-weight: 800;
 color: var(--text-main);
 letter-spacing: -0.02em;
}

.blog-content h4 {
 font-size: 1.25rem;
 margin-top: 2rem;
 margin-bottom: 0.75rem;
 font-weight: 700;
 color: var(--text-main);
}

.blog-content p {
 color: var(--text-muted);
 font-size: 1.05rem;
 line-height: 1.75;
 margin-bottom: 1.5rem;
}

.blog-content ul, 
.blog-content ol {
 margin-left: 1.5rem;
 margin-bottom: 1.75rem;
 color: var(--text-muted);
}

.blog-content li {
 margin-bottom: 0.75rem;
 font-size: 1.05rem;
 line-height: 1.65;
}

.blog-content li strong {
 color: var(--text-main);
}

/* Responsive Adjustments */
@media (max-width: 1023px) {
 html {
  scroll-padding-top: 8.5rem; /* Prevents mobile sticky header from covering the anchor targets */
 }

 .sidebar {
  display: none;
 }

 .mobile-header {
  display: flex;
 }

 .content-panel {
  margin-left: 0;
  padding: 3rem 1.5rem;
 }

 .hero-banner {
  padding: 3.5rem 2rem;
  margin-bottom: 3rem;
 }

 .hero-banner h1 {
  font-size: 2.1rem;
 }

 .project-card, .contact-container, .blog-article {
  padding: 2rem;
 }
}

@media (max-width: 640px) {
 .cert-card {
  flex-direction: column;
  text-align: center;
  gap: 1.5rem;
  padding: 1.5rem;
 }

 .footer-site {
  flex-direction: column;
  align-items: flex-start;
 }
}