/* hipaa.app Ghost Theme Styles */

/* Import Plus Jakarta Sans */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --background: #0a0f1a;
    --card-bg: #0f1419;
    --accent: #14b8a6;
    --accent-hover: #0d9488;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: rgba(55, 65, 81, 0.5);
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius: 1rem;
    --radius-sm: 0.5rem;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--background);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 1rem;
}

p {
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
}

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

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

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo:hover {
    color: var(--text-primary);
}

.site-logo .accent {
    color: var(--accent);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-nav a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

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

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

.btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(180deg, var(--card-bg) 0%, var(--background) 100%);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Subscribe Form */
.subscribe-form {
    display: flex;
    gap: 0.75rem;
    max-width: 450px;
    margin: 0 auto;
}

.subscribe-form input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-family);
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.subscribe-form input[type="email"]::placeholder {
    color: var(--text-muted);
}

.subscribe-form input[type="email"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

.subscribe-form button {
    padding: 0.75rem 1.5rem;
}

/* Post Grid */
.post-feed {
    padding: 3rem 0;
}

.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Post Card */
.post-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.post-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: var(--background);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.post-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-card-title a {
    color: var(--text-primary);
}

.post-card-title a:hover {
    color: var(--accent);
}

.post-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.post-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-card-author-image {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Featured Post */
.post-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.post-card.featured .post-card-image {
    aspect-ratio: auto;
}

@media (max-width: 768px) {
    .post-card.featured {
        grid-template-columns: 1fr;
    }
}

/* Single Post */
.post-header {
    padding: 4rem 0 2rem;
    text-align: center;
}

.post-tag {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
    display: inline-block;
}

.post-title {
    font-size: 2.5rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-author-image {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.post-feature-image {
    max-width: 1000px;
    margin: 0 auto 3rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-feature-image img {
    width: 100%;
}

/* Post Content */
.post-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

.post-content h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
}

.post-content h3 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
}

.post-content p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content a {
    text-decoration: underline;
}

.post-content img {
    border-radius: var(--radius-sm);
    margin: 2rem 0;
}

/* Ghost card widths */
.kg-width-wide {
    max-width: 1000px;
    margin-left: calc(50% - 500px);
    margin-right: calc(50% - 500px);
}

.kg-width-full {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

@media (max-width: 1040px) {
    .kg-width-wide {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

.kg-image-card,
.kg-gallery-card {
    margin: 2rem 0;
}

.kg-image-card img,
.kg-gallery-card img {
    border-radius: var(--radius-sm);
}

.kg-gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kg-gallery-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-bookmark-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
}

.kg-bookmark-content {
    padding: 1.25rem;
    flex: 1;
}

.kg-bookmark-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.kg-bookmark-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.kg-bookmark-icon {
    width: 20px;
    height: 20px;
}

.kg-bookmark-thumbnail {
    width: 200px;
    min-height: 160px;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-content blockquote p {
    margin: 0;
    font-style: italic;
}

.post-content pre {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.9rem;
}

.post-content ul, .post-content ol {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo img {
    height: 32px;
    width: auto;
}

.footer-logo .accent {
    color: var(--accent);
}

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

.footer-nav a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* 404 Page */
.error-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--card-bg);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .site-nav {
        gap: 1rem;
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
}

/* Selection */
::selection {
    background-color: var(--accent);
    color: var(--background);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
