/* ================================
   Super Clean Design + Secret Fun
   Ghost Theme for Andrew Mitrak
   ================================ */

:root {
    --black: #111;
    --gray: #666;
    --light-gray: #999;
    --border: #e0e0e0;
    --bg: #fff;
    --accent: #2563eb;
    --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'IBM Plex Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.7;
    color: var(--black);
    background: var(--bg);
}

/* Hide Ghost's auto-generated site description */
.site-description,
.gh-site-description,
body > .site-header-content p,
.home-template .site-header-content {
    display: none !important;
}

/* ================================
   Navigation - Dead Simple
   ================================ */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-weight: 600;
    font-size: 1rem;
    color: var(--black);
    text-decoration: none;
    transition: color 0.2s;
}

.logo:hover {
    color: var(--gray);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--black);
}

/* ================================
   Main Content
   ================================ */
main {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================
   Hero - Minimal
   ================================ */
.hero {
    padding: 80px 0 60px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

/* Name hovers */
.name-hover {
    cursor: help;
    border-bottom: 1px dotted var(--light-gray);
}

/* ================================
   Sections
   ================================ */
.section {
    padding: 60px 0;
    border-top: 1px solid var(--border);
}

.section h2 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--light-gray);
    margin-bottom: 32px;
}

.section-intro {
    color: var(--gray);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* ================================
   About
   ================================ */
.about-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.headshot {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.about-content p {
    margin-bottom: 20px;
    color: var(--black);
}

.about-content p:last-child {
    margin-bottom: 0;
}

.about-content strong {
    font-weight: 600;
}

/* ================================
   Work
   ================================ */
.work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.work-item {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.work-item:hover {
    border-color: var(--black);
}

.work-featured {
    grid-column: span 2;
    background: var(--black);
    color: white;
    border-color: var(--black);
    display: block;
    position: relative;
}

.work-featured:hover {
    background: #222;
}

.work-featured .work-label {
    color: rgba(255,255,255,0.6);
}

.work-featured h3 {
    color: white;
}

.work-featured p {
    color: rgba(255,255,255,0.95);
}

.work-featured-large {
    padding: 32px;
}

.work-featured-large h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.work-featured-large p {
    font-size: 1rem;
    line-height: 1.7;
}

.work-arrow {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.5;
    transition: all 0.2s;
}

.work-featured:hover .work-arrow {
    opacity: 1;
    right: 20px;
}

.work-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 8px;
}

.work-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.work-item p {
    font-size: 0.85rem;
    color: var(--gray);
    margin: 0;
}

.listen-links {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    gap: 16px;
    align-items: center;
}

.listen-links a {
    color: var(--black);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.2s;
}

.listen-links a:hover {
    border-color: var(--black);
}

/* ================================
   Episode Carousel
   ================================ */
.episode-carousel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.carousel-track-container {
    overflow: hidden;
    flex: 1;
}

.carousel-track {
    display: flex;
    gap: 16px;
    transition: transform 0.3s ease;
}

.episode-card {
    flex-shrink: 0;
    width: 120px;
    text-decoration: none;
    color: inherit;
}

.episode-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.2s;
}

.episode-card:hover img {
    transform: scale(1.03);
}

.episode-title {
    display: block;
    font-size: 0.8rem;
    margin-top: 8px;
    color: var(--gray);
}

.carousel-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: var(--gray);
    transition: all 0.2s;
    flex-shrink: 0;
}

.carousel-btn:hover {
    border-color: var(--black);
    color: var(--black);
}

/* ================================
   Projects Grid
   ================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project-card {
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.project-card:hover {
    border-color: var(--black);
}

.project-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.project-info {
    padding: 16px;
}

.project-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-info p {
    font-size: 0.85rem;
    color: var(--gray);
    margin: 0;
}

/* ================================
   Topic Toggle
   ================================ */
.topic-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.topic-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    background: var(--bg);
    border-radius: 20px;
    font-family: var(--font);
    font-size: 0.85rem;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
}

.topic-btn:hover {
    border-color: var(--black);
    color: var(--black);
}

.topic-btn.active {
    background: var(--black);
    border-color: var(--black);
    color: white;
}

/* ================================
   Blog List
   ================================ */
.blog-list {
    display: flex;
    flex-direction: column;
}

.blog-item {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    align-items: center;
}

.blog-item:hover {
    padding-left: 8px;
}

.blog-item:hover .blog-title {
    color: var(--accent);
}

.blog-date {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--light-gray);
    min-width: 80px;
}

.blog-title {
    font-size: 1rem;
    transition: color 0.2s;
    flex: 1;
}

.blog-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    white-space: nowrap;
}

.view-all {
    display: inline-block;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s;
}

.view-all:hover {
    color: var(--black);
}

/* ================================
   Contact
   ================================ */
.section#contact p {
    color: var(--gray);
}

.section#contact p a {
    color: var(--black);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.2s;
}

.section#contact p a:hover {
    border-color: var(--black);
}

/* ================================
   Footer
   ================================ */
.footer {
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 24px;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 0.85rem;
    color: var(--light-gray);
}

.year-click {
    cursor: pointer;
    border-bottom: 1px dotted transparent;
    transition: border-color 0.2s;
}

.year-click:hover {
    border-color: var(--light-gray);
}

.footer-tiny {
    font-size: 0.75rem;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.5s;
}

/* ================================
   EASTER EGGS
   ================================ */

/* Scroll secret at bottom */
.scroll-secret {
    text-align: center;
    padding: 40px 24px;
    font-size: 0.8rem;
    color: var(--light-gray);
    font-style: italic;
    opacity: 0;
    transition: opacity 1s;
}

.scroll-secret.visible {
    opacity: 1;
}

/* Beatles overlay */
.easter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #5f27cd
    );
    background-size: 400% 400%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.easter-overlay.active {
    opacity: 1;
    animation: psychedelic 0.5s ease infinite;
}

@keyframes psychedelic {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.beatles-text {
    font-size: 3rem;
    font-weight: 600;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: wobble 0.3s ease infinite;
}

/* Google hover */
.google-hover {
    font-weight: 600;
    cursor: help;
    border-bottom: 1px dotted var(--light-gray);
    transition: all 0.2s;
}

.google-hover:hover {
    color: #4285F4;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti-quote {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 24px 32px;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--black);
    max-width: 500px;
    text-align: center;
    animation: pop-in 0.3s ease;
}

@keyframes pop-in {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Quote popup for name hovers */
.quote-popup {
    position: absolute;
    background: var(--black);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity 0.2s;
    white-space: nowrap;
}

.quote-popup.visible {
    opacity: 1;
}

.quote-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--black);
}

/* ================================
   Blog Page Styles
   ================================ */
.page-header {
    padding: 60px 0;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--gray);
}

.blog-list-page {
    padding-bottom: 60px;
}

.blog-list-page .blog-item {
    padding: 20px 0;
    align-items: flex-start;
}

.blog-thumb {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.blog-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.blog-list-page .blog-title {
    font-weight: 500;
}

.blog-list-page .blog-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 4px;
}

.blog-year-divider {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--light-gray);
    padding: 40px 0 16px;
    border-bottom: none;
    letter-spacing: 0.05em;
}

/* ================================
   Post Styles (Ghost)
   ================================ */
.post-full,
.page-full {
    padding: 60px 0;
}

.post-header,
.page-header {
    margin-bottom: 40px;
}

.post-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 16px;
}

.post-title,
.page-title {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.post-meta {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--light-gray);
}

.reading-time {
    margin-left: 4px;
}

.post-feature-image,
.page-feature-image {
    margin-bottom: 40px;
}

.post-feature-image img,
.page-feature-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-feature-image figcaption {
    font-size: 0.85rem;
    color: var(--light-gray);
    text-align: center;
    margin-top: 12px;
}

/* Post Content */
.post-content,
.page-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content h2,
.page-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 48px 0 24px;
}

.post-content h3,
.page-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 40px 0 20px;
}

.post-content p,
.page-content p {
    margin-bottom: 24px;
}

.post-content a,
.page-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid var(--accent);
    transition: opacity 0.2s;
}

.post-content a:hover,
.page-content a:hover {
    opacity: 0.7;
}

.post-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 32px 0;
}

.post-content blockquote,
.page-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--gray);
}

.post-content ul,
.post-content ol,
.page-content ul,
.page-content ol {
    margin: 24px 0;
    padding-left: 24px;
}

.post-content li,
.page-content li {
    margin-bottom: 8px;
}

.post-content code,
.page-content code {
    font-family: var(--mono);
    font-size: 0.9em;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
}

.post-content pre,
.page-content pre {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 32px 0;
}

.post-content pre code,
.page-content pre code {
    background: none;
    padding: 0;
}

/* Ghost Koenig Editor - Wide and Full Width */
.kg-width-wide {
    position: relative;
    width: 85vw;
    min-width: 100%;
    margin: 32px calc(50% - 42.5vw);
}

.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 32px;
    margin-bottom: 32px;
}

.kg-width-full img {
    width: 100%;
}

/* Ghost Cards */
.kg-card {
    margin: 32px 0;
}

.kg-image-card img {
    width: 100%;
    height: auto;
}

.kg-card figcaption {
    font-size: 0.85rem;
    color: var(--light-gray);
    text-align: center;
    margin-top: 12px;
}

.kg-gallery-card {
    margin: 32px 0;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kg-gallery-row {
    display: flex;
    gap: 16px;
}

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

/* Video/YouTube Embeds */
.kg-embed-card,
.kg-video-card {
    margin: 32px 0;
}

.kg-embed-card iframe,
.kg-video-card video,
.post-content iframe,
.page-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
}

.kg-embed-card figcaption,
.kg-video-card figcaption {
    font-size: 0.85rem;
    color: var(--light-gray);
    text-align: center;
    margin-top: 12px;
}

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

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

.kg-bookmark-content {
    flex: 1;
    padding: 20px;
}

.kg-bookmark-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
}

.kg-bookmark-description {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--light-gray);
}

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

.kg-bookmark-thumbnail {
    width: 180px;
    flex-shrink: 0;
}

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

/* Post Footer */
.post-footer {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.post-tag-link {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--gray);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 3px;
    transition: all 0.2s;
}

.post-tag-link:hover {
    border-color: var(--black);
    color: var(--black);
}

/* Post Navigation */
.post-nav {
    display: flex;
    gap: 24px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.post-nav-item {
    flex: 1;
    text-decoration: none;
    color: inherit;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: border-color 0.2s;
}

.post-nav-item:hover {
    border-color: var(--black);
}

.post-nav-next {
    text-align: right;
}

.post-nav-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 8px;
}

.post-nav-title {
    font-weight: 500;
    font-size: 0.95rem;
}

/* ================================
   Error Page
   ================================ */
.error-page {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 24px;
}

.error-code {
    font-family: var(--mono);
    font-size: 8rem;
    font-weight: 500;
    color: var(--border);
    line-height: 1;
    margin-bottom: 16px;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.error-desc {
    color: var(--gray);
    margin-bottom: 32px;
    max-width: 400px;
}

.error-link {
    color: var(--black);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
    transition: border-color 0.2s;
}

.error-link:hover {
    border-color: var(--black);
}

.error-quote {
    margin-top: 60px;
    font-size: 0.85rem;
    color: var(--light-gray);
    font-style: italic;
    max-width: 500px;
}

.error-quote span {
    display: block;
    margin-top: 8px;
    font-style: normal;
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 768px) {
    .nav {
        padding: 24px;
        flex-direction: column;
        gap: 16px;
    }

    .nav-links {
        gap: 20px;
    }

    .hero {
        padding: 40px 0 60px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .about-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: left;
    }

    .headshot {
        width: 120px;
        height: 120px;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .work-featured {
        grid-column: span 1;
    }

    .blog-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .blog-thumb {
        width: 80px;
        height: 45px;
    }

    .blog-tag {
        margin-left: auto;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .carousel-btn {
        display: none;
    }

    .carousel-track-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .episode-carousel {
        margin-left: -24px;
        margin-right: -24px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .post-title,
    .page-title {
        font-size: 1.8rem;
    }

    .post-nav {
        flex-direction: column;
    }

    .post-nav-next {
        text-align: left;
    }

    .error-code {
        font-size: 5rem;
    }
}
