/* General page styling */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'SF Pro Display', Arial, sans-serif;
    background: #f2f5f8;
    color: #333;
}

/* Main container for layout */
.container {
    min-height: 100vh; /* Ensure footer (if any) stays at bottom */
    box-sizing: border-box;
    padding: 32px 0 0 0;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.navbar {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0 10vw;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* Navigation bar elements alignment */
.navbar-left, .navbar-right {
    display: flex;
    align-items: center;
}

/* Right section of the navbar, typically for links */
.navbar-right {
    gap: 24px;
    margin-left: auto; /* Pushes to the right */
}

/* Left section of the navbar, can be used for brand/logo */
.navbar-left {
    margin-right: auto; /* Pushes to the left */
}

/* Decorative divider below the navbar */
.navbar-divider {
    width: 80vw;
    height: 2px;
    background: linear-gradient(90deg, #007cf0 0%, #00dfd8 100%);
    opacity: 0.8;
    margin: 72px auto 0 auto;
    border-radius: 1px;
    box-shadow: 0 2px 8px rgba(0, 124, 240, 0.1);
    position: relative;
}

/* Container for post title and date in blog detail view */
.post-metadata-container {
    position: absolute;
    right: 0;
    top: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Styling for the title of a blog post in the metadata area */
.post-title {
    font-size: 1em;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(90deg, #007cf0 0%, #00dfd8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Styling for the date of a blog post in the metadata area */
.post-date {
    font-size: 1em;
    color: #007cf0;
    font-weight: 500;
    opacity: 0.9;
}

/* General navigation link styling */
.nav-link {
    color: #333;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
    font-size: 20px;
    position: relative;
}

/* Underline style for navigation links */
.nav-link-underline {
    text-decoration: none;
    font-weight: 500;
}

/* Hover effect for navigation links */
.nav-link:hover {
    color: #007cf0;
    background-color: rgba(0, 124, 240, 0.05);
}

/* Focus style for navigation links (accessibility) */
.nav-link:focus {
    outline: none;
    box-shadow: none;
}

/* Main content area, flexible to fill space */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 70vh;
    margin-left: 10vw;
    margin-top: 24vh;
    position: relative;
}

/* Styling for the main greeting on the homepage */
.greeting {
    font-size: 72px;
    font-weight: 600;
    margin: 0 0 50px 0;
    background: linear-gradient(90deg, #007cf0 0%, #00dfd8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    align-self: flex-start;
}

/* Ensures the wave emoji in the greeting doesn't inherit gradient */
.greeting .wave {
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    background-clip: initial !important;
    color: inherit;
}

/* Wave emoji specific styling */
.wave {
    font-size: 1.2em;
    margin-right: 10px;
    vertical-align: middle;
}

/* Subtitle text on the homepage */
.subtitle {
    font-size: 18px;
    color: #555;
    opacity: 0.8;
    margin-top: 120px;
    margin-left: auto;
    margin-right: 10vw;
    text-align: right;
    max-width: 700px;
    align-self: flex-end;
}

/* Blinking cursor for the typewriter effect */
.type-cursor {
    display: inline-block;
    width: 0.2ch;
    color: #007cf0;
    font-weight: 600;
    font-size: inherit;
    vertical-align: baseline;
    transition: opacity 0.2s;
}

/* Styling for the main content area of a blog post */
.blog-content {
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
    color: #333;
    font-family: 'Inter', 'SF Pro Display', Arial, sans-serif;
    font-size: 20px;
    line-height: 1.7;
    opacity: 0.95;
}

/* Headings within blog content */
.blog-content h1, .blog-content h2, .blog-content h3 {
    color: #007cf0;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
}

/* Paragraphs within blog content */
.blog-content p {
    margin: 1em 0;
}

/* Inline code snippets within blog content */
.blog-content code {
    background: rgba(0,124,240,0.1);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Code blocks within blog content */
.blog-content pre {
    background: rgba(0,124,240,0.06);
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Ensure code within pre blocks is styled correctly and wraps */
.blog-content pre code {
    background: transparent;
    padding: 0;
    font-size: 0.9em;
    color: #333;
    display: block;
}

/* Lists (ordered and unordered) within blog content */
.blog-content ul, .blog-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

/* List items within blog content */
.blog-content li {
    margin: 0.5em 0;
}

/* Links within blog content */
.blog-content a {
    color: #007cf0;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s;
}

/* Hover effect for links within blog content */
.blog-content a:hover {
    color: #00dfd8;
}

/* Blockquotes within blog content */
.blog-content blockquote {
    border-left: 4px solid #007cf0;
    margin: 1.5em 0;
    padding: 0.8em 1.2em;
    color: #555;
    font-style: italic;
    background: rgba(0, 124, 240, 0.05);
    border-radius: 0 8px 8px 0;
}

/* Images within blog content */
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

/* Hover effect for images (slight zoom) */
.blog-content img:hover {
    transform: scale(1.01);
}

/* Centered layout for blog list and detail pages */
.blog-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    margin-left: 0;
    margin-top: 120px;
}

/* Container for the list of blog cards */
.blog-list {
    margin-top: 24px;
    max-width: 64vw;
    width: 64vw;
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
    justify-content: flex-start;
}

/* Individual blog card styling */
.blog-card {
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.05);
    padding: 30px 40px;
    transition: all 0.3s;
    border: 1.5px solid rgba(0,124,240,0.08);
    position: relative;
    overflow: hidden;
}

/* Decorative ::before element for blog card hover effect */
.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #007cf0 0%, #00dfd8 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

/* Hover effects for blog card: shadow, lift, and ::before element visibility */
.blog-card:hover {
    box-shadow: 0 8px 30px 0 rgba(0,124,240,0.15);
    transform: translateY(-3px);
}

.blog-card:hover::before {
    opacity: 1;
}

/* Ripple effect for card clicks */
.ripple-effect {
    position: absolute;
    background: rgba(0, 124, 240, 0.2);
    border-radius: 50%;
    width: 100px;
    height: 100px;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none; /* Ensures it doesn't interfere with clicks */
}

/* Animation for the ripple effect */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Content wrapper within a blog card, for z-index layering if needed */
.blog-card-content {
    position: relative;
    z-index: 1;
}

/* Title styling within a blog card */
.blog-card-title {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 0;
}

/* Link styling for blog titles within cards */
.blog-title-link {
    color: #007cf0;
    text-decoration: none;
    transition: all 0.2s;
}

/* Hover effect for blog title links (gradient text) */
.blog-title-link:hover {
    background: linear-gradient(90deg, #007cf0 0%, #00dfd8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Summary text styling within a blog card */
.blog-card-summary {
    color: #555;
    opacity: 0.8;
    font-size: 1.1em;
    margin-bottom: 18px;
    line-height: 1.6;
}

/* Metadata section (e.g., date) within a blog card */
.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
}

/* Date styling within a blog card */
.blog-card-date {
    color: #007cf0;
    font-size: 0.9em;
    font-weight: 600;
    background: rgba(0, 124, 240, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
}

/* Detail view for a single blog post */
.blog-detail {
    margin-top: 20px;
    max-width: 800px;
    color: #333;
    width: 100%;
    transition: opacity 0.3s, transform 0.3s;
    padding: 0 20px;
}

/* Breadcrumbs navigation (if used, not currently implemented in HTML) */
.blog-breadcrumbs {
    font-size: 1em;
    margin-bottom: 18px;
    color: #007cf0;
    opacity: 0.8;
}

/* Styling for breadcrumb links */
.navbar-breadcrumb-link {
    color: #007cf0;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
    text-decoration-color: #007cf0;
    transition: all 0.2s;
}

/* Hover effect for breadcrumb links */
.navbar-breadcrumb-link:hover {
    color: #00dfd8;
    text-decoration-color: #00dfd8;
}

/* Full-screen overlay for page transitions (if implemented) */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f2f5f8;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Adjustments for blog-centered layout when it's the main content */
.main-content.blog-centered {
    margin-left: 0;
    margin-top: 0;
    align-items: center;
    justify-content: flex-start;
}

/* Responsive adjustments for smaller screens (max-width: 800px) */
@media (max-width: 800px) {
    .navbar {
        right: 4vw;
        top: 72px;
    }
    .navbar-right {
        gap: 16px;
    }
    .navbar-divider {
        margin: 72px auto 0 auto;
    }
    .post-metadata-container {
        right: 4vw;
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }
    .post-title {
        font-size: 1em;
    }
    .post-date {
        font-size: 1em;
    }
    .main-content {
        margin-left: 4vw;
        margin-top: 6vh;
    }
    .main-content.blog-centered {
        margin-left: 0;
        margin-top: 0;
    }
    .subtitle {
        margin-right: 4vw;
        text-align: right;
    }
    .greeting {
        font-size: 32px;
    }
    .nav-card {
        padding: 8px 16px;
        font-size: 16px;
    }
    .blog-list {
        width: 90vw;
        max-width: 90vw;
    }
    .blog-card {
        padding: 20px 24px;
    }
    .blog-content {
        margin-top: 0;
    }
}

/* Responsive adjustments for larger screens (min-width: 800px) */
@media (min-width: 800px) {
  .blog-centered {
    min-height: 60vh; /* Ensure sufficient height on larger screens */
    display: flex;
    justify-content: center;
  }
  .blog-list {
    margin-top: 48px;
    width: 64vw;
    max-width: 900px;
  }
  .blog-centered .blog-detail {
    margin-top: 24px;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
  }
}