:root {
    --bg: #0f0f0f;
    --card: #1a1816;
    --card-hover: #232019;
    --text: #f5f0e8;
    --text-muted: #9a918a;
    --accent: #e07a3d;
    --accent-soft: #c96a32;
    --border: #2d2a26;
    --radius: 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    background:
        linear-gradient(to bottom, rgba(15, 15, 15, 0.92), rgba(15, 15, 15, 0.97)),
        url('https://images.unsplash.com/photo-1518770660439-4636190af475?w=1920&q=80') center/cover fixed;
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Bento Grid */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 1rem;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    background: var(--card-hover);
    transform: translateY(-2px);
}

/* Card Sizes */
.card.hero {
    grid-column: span 2;
    grid-row: span 2;
    justify-content: flex-end;
    background: linear-gradient(135deg, #3d2814 0%, #0f0f0f 100%);
}

.card.about {
    grid-column: span 2;
    grid-row: span 1;
}

.card.large {
    grid-column: span 2;
    grid-row: span 2;
}

.card.wide {
    grid-column: span 2;
}

.card.tall {
    grid-row: span 2;
}

/* Watermark */
.watermark {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(245, 240, 232, 0.15);
    pointer-events: none;
    user-select: none;
}

.card.hero {
    position: relative;
}

/* Hero Card */
.card.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.card.hero .tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Section Labels */
.card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* About Card */
.card.about p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Link Cards */
.card.link {
    justify-content: space-between;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
}

.card.link .icon {
    font-size: 2rem;
    margin-bottom: auto;
}

.card.link .link-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.card.link .link-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card.link:hover {
    border-color: var(--accent);
}

/* Projects Card */
.card.projects {
    grid-column: span 2;
    grid-row: span 2;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
    flex: 1;
}

.project-item {
    background: var(--bg);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.project-item .tech a,
.project-item .tech a:visited {
    color: var(--accent);
    text-decoration: none;
    text-decoration: underline;
    text-decoration-color: rgba(224, 122, 61, 0.3);
    text-underline-offset: 3px;
}

.project-item .tech a::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 4px;
    vertical-align: middle;
    opacity: 0.6;
    transition: opacity 0.2s;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M7 7h10v10'/%3E%3C/svg%3E") no-repeat center/contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M7 7h10v10'/%3E%3C/svg%3E") no-repeat center/contain;
}

.project-item .tech a:hover {
    text-decoration-color: var(--accent);
}

.project-item .tech a:hover::after {
    opacity: 1;
}

.project-item:hover {
    border-color: var(--accent);
}

.project-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.project-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.project-item .tech {
    font-size: 0.75rem;
    color: var(--accent);
}

.project-item .links {
    margin-top: 0.5rem;
}

.project-item .links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-right: 1rem;
}

.project-item .links a:hover {
    color: var(--text);
}

/* Skills/Tech Card */
.card.skills .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Weather Card */
.card.weather-card {
    justify-content: center;
    text-align: center;
}

.card.weather-card .time {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.card.weather-card .weather {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Status Card */
.card.status {
    background: linear-gradient(135deg, #4a2c17 0%, #0f0f0f 100%);
}

/* Copyable */
.copyable {
    cursor: pointer;
    position: relative;
}

.copyable::after {
    content: 'Copied!';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.copyable.copied::after {
    opacity: 1;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #e07a3d;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .card.hero {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

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

    .card.hero,
    .card.about,
    .card.large,
    .card.wide,
    .card.projects {
        grid-column: span 1;
    }

    .card.hero h1 {
        font-size: 2rem;
    }
}

/* ============ Blog Styles ============ */

.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.blog-nav h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

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

/* Posts List */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

.post-card:hover {
    background: var(--card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5rem 0;
}

.post-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Post Content */
.post-content {
    max-width: 700px;
    line-height: 1.7;
}

.post-content h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.post-content h2 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: var(--text);
}

.post-content h3 {
    font-size: 1.15rem;
    margin: 1.5rem 0 0.75rem;
}

.post-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.post-content a {
    color: var(--accent);
}

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

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

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

.post-content code {
    background: var(--card);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

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

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