/* 
 * mattrude.org - Main Stylesheet
 * A minimalist black and white design with mint green accents
 */

/* Posts connector - horizontal dashed line (now removed) */
.blog-posts h2 {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden; /* Prevent spillover */
}

.posts-connector {
    position: relative;
    flex-grow: 1; /* Take all available space */
    margin-left: 15px; /* Space between heading text and start of connector */
}

/* Horizontal line - removed dashed line */
.posts-connector::before {
    content: none; /* Remove the dashed line */
}

/* Base styles and variables */
:root {
    /* Current variables */
    --color-background: #ffffff;
    --color-text: #000000;
    --color-accent: #98FB98; /* Mint Green */
    --color-light-gray: #f5f5f5;
    --color-dark-gray: #333333;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* New variables */
    --color-accent-light: rgba(152, 251, 152, 0.3); /* Lighter mint green for hover states */
    --color-accent-dark: #74d874; /* Darker mint green for active states */
    --color-border: #eaeaea;
    --color-shadow: rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-size-small: 0.875rem;
    --font-size-base: 1.125rem;
    --font-size-large: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 2rem;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    
    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Page transition styles */
.page-transition {
  transition: opacity 0.3s ease;
}

body.loading .page-transition {
  opacity: 0;
}

/* Back to Top button styles */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-accent);
  color: var(--color-text);
  border: none;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  z-index: 1000;
  box-shadow: 0 2px 5px var(--color-shadow);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--color-accent-dark);
}

/* Card component styles */
.card {
  background-color: var(--color-background);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: var(--space-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--color-shadow);
}

.card-accent-left {
  border-left: 4px solid var(--color-accent);
}

.card-accent-top {
  border-top: 4px solid var(--color-accent);
}

/* Reset and base elements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    line-height: 1.3;
}

p, ul, ol {
    margin-bottom: 1.5rem;
}

a {
    color: var(--color-text);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: all 0.2s ease;
}

a:hover, a:focus {
    background-color: var(--color-accent);
    text-decoration: none;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    padding: 2rem 0;
    border-bottom: 4px solid var(--color-accent);
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0;
}

nav ul {
    display: flex;
    list-style: none;
    margin-bottom: 0;
}

nav li {
    margin-left: 2rem;
}

nav a {
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0;
}

nav a.active {
    border-bottom: 3px solid var(--color-accent);
}

/* Footer */
footer {
    padding: 2rem 0;
    background-color: var(--color-light-gray);
    text-align: center;
    border-top: 1px solid #eaeaea;
    margin-top: 3rem;
}

/* Homepage - Blog listing */
.blog-posts {
    margin-top: 3rem;
}

.intro {
    margin: 4rem 0;
}

.post {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--color-light-gray);
}

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

.post-meta {
    font-size: 0.9rem;
    color: var(--color-dark-gray);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.edit-divider {
    color: var(--color-accent);
    font-weight: bold;
}

.edit-date {
    font-style: italic;
}

.read-more {
    font-weight: 600;
}

/* Individual blog post */
.blog-post article {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2rem;
}

/* Blog post content styling - enhanced lists */
.post-content ul {
    padding-left: 2.5rem !important;      /* Increase left padding for better indentation */
    margin-bottom: 2rem !important;       /* Add more space after the list */
    margin-top: 1rem !important;          /* Add space before the list */
    list-style-position: outside !important;  /* Ensures bullets are outside the text block */
}

.post-content ul li {
    margin-bottom: 0.75rem !important;    /* Space between list items */
    line-height: 1.6 !important;          /* Consistent line height with paragraph text */
    position: relative !important;        /* For potential custom bullet styling */
    padding-left: 0.5rem !important;      /* Additional padding between bullet and text */
}

/* Optional: Style the bullet points with mint green color */
.post-content ul li::marker {
    color: var(--color-accent) !important; /* Use your mint green accent color */
}

/* Feature list specific styling */
.feature-list {
    padding-left: 2.5rem !important;      /* Larger indentation for feature lists */
    margin-bottom: 2rem !important;       /* Extra space after the list */
    margin-top: 1rem !important;          /* Extra space before the list */
    list-style-position: outside !important;  /* Ensures bullets are outside the text block */
}

.feature-list li {
    margin-bottom: 0.75rem !important;    /* More space between feature items */
    padding-left: 0.5rem !important;      /* Additional padding between bullet and text */
    position: relative !important;        /* For custom bullet styling */
}

.feature-list li::marker {
    color: var(--color-accent) !important; /* Mint green bullets */
    font-weight: bold !important;         /* Make bullets more prominent */
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-light-gray);
}

/* Resume page */
.contact-info {
  margin-top: 1.5rem;  /* Adds space above the element */
}

.resume-header {
    margin-bottom: 2.5rem;
}

.education-item, .experience-item {
    margin-bottom: 2rem;
}

.experience-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.job-title {
    font-weight: 600;
    font-style: italic;
    margin-bottom: 1rem;
}

.job-section {
    margin-top: 1.5rem;
}

.job-section h5 {
    margin-bottom: 0.5rem;
}

.resume ul {
    padding-left: 1.5rem;
}

.resume ul li {
    margin-bottom: 0.5rem;
}

.work-with {
    background-color: var(--color-light-gray);
    padding: 2rem;
    border-left: 5px solid var(--color-accent);
    margin-top: 3rem;
}

/* Tag filtering */
.tags-filter {
    margin: 2rem 0;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Updated tag selection styles */
.tag {
    background-color: var(--color-light-gray);
    border: 1px solid var(--color-light-gray);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: var(--color-accent-light);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
    z-index: -1;
}

.tag:hover::before {
    width: 150%;
    height: 150%;
}

.tag.active {
    background-color: var(--color-accent);
    border-color: var(--color-accent-dark);
    font-weight: 600;
}

/* Loading placeholder */
.loading-placeholder,
.loading-more,
.post-content-placeholder {
    padding: 2rem;
    text-align: center;
    color: var(--color-dark-gray);
    background-color: var(--color-light-gray);
    border-radius: 4px;
    margin: 1rem 0;
}

.loading-more,
.post-content-placeholder {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Blog navigation styling */
.nav-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-dark-gray);
}

.nav-title {
    font-weight: 600;
}

.post-navigation a {
    display: inline-block;
    padding: 0.5rem;
    border: 1px solid var(--color-light-gray);
    border-radius: 4px;
    text-decoration: none;
}

.post-navigation a:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

/* Inline icon styling */
.inline-icon {
    height: 1em;
    vertical-align: middle;
    margin: 0 2px;
    display: inline-block;
}

/* RSS Feed icon */
.rss-link {
    display: inline-flex;
    align-items: center;
    margin-left: 1rem;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.rss-link:hover {
    background-color: var(--color-accent);
}

.rss-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.25rem;
}

/* Service Cards */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.service-card {
    background-color: var(--color-light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid var(--color-accent);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.service-card h4 {
    margin-bottom: 1rem;
    color: var(--color-text);
}

.service-card p {
    margin-bottom: 0.5rem;
}

/* Data comparison and analysis styling */
/* Minimalist Table Section */
.table-section {
    margin: 3rem 0;
    background-color: #f9f9f9; /* Very subtle light gray background */
    border-radius: var(--radius-md);
    overflow: hidden; /* Keep inner elements contained */
}

/* Table Title */
.table-title {
    margin: 0;
    padding: 1.5rem;
    border-bottom: 1px solid #eaeaea;
}

/* Table Metadata Section */
.table-meta {
    padding: 1.5rem;
    border-top: 1px solid #eaeaea;
    background-color: #f5f5f5;
}

/* Sources styling */
.table-sources {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

/* Technical Notes styling */
.table-notes {
    font-size: 0.9rem;
    color: #666;
    border-left: 2px solid var(--color-accent);
    padding-left: 1rem;
}

.table-notes h5 {
    margin-top: 0;
    color: #333;
}

/* Storage table styling */
.storage-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Update storage table to work inside minimalist container */
.table-section .storage-table {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border-collapse: collapse;
}

.storage-table thead tr {
    background-color: var(--color-accent); /* Using mint green variable */
    color: #333;
}

.storage-table th, 
.storage-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #eaeaea;
}

.storage-table th:nth-child(5),
.storage-table th:nth-child(6),
.storage-table td:nth-child(5),
.storage-table td:nth-child(6) {
    text-align: right;
    font-weight: 600;
}

.storage-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.storage-table tbody tr:nth-child(even) {
    background-color: #ffffff;
}

.storage-table .cell-webhost {
    font-weight: bold;
}

/* Personal experience section */
.personal-experience {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid var(--color-accent);
    background-color: var(--color-light-gray);
}

.personal-experience h4 {
    margin-top: 0;
    color: var(--color-dark-gray);
}

/* GitHub callout */
.github-callout {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: var(--color-light-gray); /* Updated to use site variable */
    border-left: 4px solid var(--color-accent);
    border-radius: 4px;
}

.github-callout p {
    margin: 0;
}

/* Table notes */
.table-notes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.info-card {
    flex: 1 1 300px;
    background-color: var(--color-light-gray);
    border-left: 3px solid var(--color-accent);
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #666;
}

.info-card h5 {
    margin-top: 0;
    color: var(--color-dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.info-card sup {
    color: var(--color-dark-gray);
    font-weight: 600;
    font-size: 0.7rem;
}

/* Regular table styling */
.cost-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
}

.cost-comparison-table th, .cost-comparison-table td {
    padding: 12px;
    text-align: left;
    border: 1px solid #ddd;
}

.cost-comparison-table th {
    background-color: var(--color-accent);
    color: var(--color-text);
    font-weight: bold;
}

.cost-comparison-table tr:nth-child(even) {
    background-color: var(--color-light-gray);
}

.cost-comparison-table .average-row {
    background-color: #f0f0f0;
    font-weight: bold;
}

.table-notes {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.data-comparison {
    margin-bottom: 40px;
}

/* Annotations styles */
.annotations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.annotation-card {
    background-color: var(--color-light-gray);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border-left: 4px solid var(--color-accent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.annotation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--color-shadow);
}

.annotation-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.annotation-card h2 a {
    text-decoration: none;
    color: var(--color-text);
}

.annotation-card h2 a:hover {
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 2px;
}

.annotation-card .authors {
    color: var(--color-dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.annotation-card .date {
    color: var(--color-dark-gray);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.annotation-card .preview {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.annotation-card .metadata-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 1rem;
}

.annotation-card .tag {
    background-color: var(--color-accent);
    color: var(--color-text);
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    cursor: default;
}

.annotation-card .topic-tag {
    background-color: var(--color-dark-gray);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    cursor: default;
}

/* Annotations controls */
.annotations-controls {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--color-light-gray);
    border-radius: var(--radius-md);
}

#searchInput {
    width: 100%;
    max-width: 500px;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filters select {
    padding: 0.8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background-color: var(--color-background);
    font-size: 0.9rem;
    min-width: 150px;
}

/* Individual annotation page styles */
.annotation .annotation-metadata {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.annotation .metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.annotation .metadata-item {
    margin-bottom: 0.5rem;
}

.annotation .status-badge {
    background-color: var(--color-accent);
    color: var(--color-text);
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.85rem;
}

.annotation .citation-text {
    padding: 1rem;
    background-color: var(--color-light-gray);
    border-left: 3px solid var(--color-accent);
    font-family: monospace;
    line-height: 1.5;
}

.annotation section {
    margin-bottom: 2rem;
}

.annotation section h2 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-light-gray);
}

.annotation blockquote {
    border-left: 3px solid var(--color-accent);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
}

/* Tags and topics in annotations */
.annotation .tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.annotation .tag {
    background-color: var(--color-accent);
    color: var(--color-text);
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}

.annotation .topic-tag {
    background-color: var(--color-dark-gray);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}

/* Placeholder message styling */
.placeholder-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    opacity: 0.8;
}

.placeholder-message .annotation-card {
    max-width: 500px;
    margin: 0 auto;
}

.quote-section {
    margin: 40px 0;
    padding: 0; /* Remove padding */
    background-color: var(--color-light-gray);
    border-left: 5px solid var(--color-accent);
}

blockquote {
    font-style: italic;
    margin: 0;
    font-size: 18px;
    position: relative;
    padding: 20px 20px 10px 20px;
    border-left: none;
}

blockquote p {
    margin-bottom: 10px;
}

blockquote footer {
    font-style: normal;
    font-size: 16px;
    text-align: right;
    color: var(--color-dark-gray);
    margin-top: 15px;
    padding-right: 20px;
    padding-bottom: 20px;
}

.svg-container {
    margin: 40px 0;
}

.svg-wrapper {
    margin: 20px 0;
    text-align: center;
}

.full-width-svg {
    max-width: 100%;
    height: auto;
}

.svg-caption {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Hide mobile toggle by default */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
}

/* Phishing alert box styling */
.phishing-alert {
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background-color: var(--color-light-gray);
    border-left: 4px solid var(--color-accent);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive styles */
@media (max-width: 768px) {
    /* Updated mobile navigation styles */
    .mobile-nav-toggle {
        display: block;
    }
    
    header .container {
        display: flex;
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    nav {
        width: 100%;
        margin-top: var(--space-md);
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease;
    }
    
    nav.open {
        max-height: 200px;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
        margin: 0;
    }
    
    nav li {
        margin: var(--space-xs) 0;
        margin-left: 0;
    }
    
    /* Updated responsive typography */
    :root {
        --font-size-base: 1rem; /* Slightly smaller base font */
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .container {
        width: 95%; /* Slightly wider container on mobile */
    }
    
    /* Responsive table */
    .storage-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .tags-container {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    /* Remove white-space: nowrap to fix wrapping issues */
    .tag {
        /* white-space property removed */
    }
    
    .service-cards {
        grid-template-columns: 1fr;
    }
    
    .table-notes-container {
        flex-direction: column;
    }
    
    .posts-connector {
        margin-left: 10px; /* Less space on mobile */
    }
    
    body {
        font-size: 16px;
    }
}

/* Phone-sized screens */
@media (max-width: 480px) {
    .post-meta {
        /* Improve wrapping for better mobile display */
        flex-direction: column;
        align-items: flex-start;
    }

    /* Add spacing between elements when stacked */
    .edit-divider {
        display: none;
    }

    .edit-date {
        margin-top: 0.3rem;
    }
    
    /* Fix for long titles in post cards */
    .post h3 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}