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

:root {
    --bg: #ffffff;
    --bg-subtle: #f8f9fa;
    --surface: #ffffff;
    --surface-hover: #f1f3f4;
    --border: #dadce0;
    --border-hover: #bdc1c6;
    --text: #202124;
    --text-muted: #5f6368;
    --text-subtle: #80868b;
    --accent: #1a73e8;
    --accent-glow: rgba(26, 115, 232, 0.06);
    --accent-warm: #ea8600;
    --accent-blue: #1a73e8;
    --accent-emerald: #1e8e3e;
    --gradient-start: #4285f4;
    --gradient-mid: #34a853;
    --gradient-end: #fbbc04;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Canvas background */
#grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

/* Remove dark noise overlay */
.noise {
    display: none;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: var(--bg);
}

.nav-logo:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link:hover::after {
    width: 100%;
}

/* Main */
main {
    position: relative;
    z-index: 2;
    padding-top: 80px;
}

.container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Hero */
.hero {
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.greeting {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.greeting-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.greeting-text {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-subtle);
}

.name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.name-first {
    display: block;
    background: linear-gradient(135deg, #202124 0%, #5f6368 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.role {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.role-badge {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text);
    background: var(--bg-subtle);
}

.role-at {
    font-size: 0.875rem;
    color: var(--text-subtle);
    font-weight: 300;
}

.role-company {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.role-company::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.role-company:hover::after {
    width: 100%;
}

.philosophy {
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-muted);
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.philosophy-accent {
    color: var(--text);
    font-weight: 400;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-subtle);
}

/* Blog section */
.blog-section {
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 1s;
}

.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blog-card {
    display: block;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.blog-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.blog-date {
    font-size: 0.75rem;
    color: var(--text-subtle);
    font-weight: 400;
}

.blog-tag {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    background: var(--bg-subtle);
}

.blog-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--text);
}

.blog-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 0.75rem;
}

.blog-read {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    transition: all 0.3s ease;
}

.blog-card:hover .blog-read {
    letter-spacing: 0.02em;
}

/* Connect section */
.connect-section {
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 1.2s;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.link-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    transform: translateX(4px);
}

.link-card svg {
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.link-label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    flex: 1;
}

.link-arrow {
    font-size: 1rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
    color: var(--accent);
}

.link-card:hover .link-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Footer */
.footer {
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 1.4s;
}

.footer-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin-bottom: 1.5rem;
}

.footer-text {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
    text-align: center;
}

/* Blog post page styles */
.blog-post-layout {
    padding-top: 120px;
}

.blog-post-layout .container {
    max-width: 680px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2.5rem;
    transition: color 0.3s ease;
    letter-spacing: 0.02em;
}

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

.post-header {
    margin-bottom: 3rem;
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

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

.post-tag {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    background: var(--bg-subtle);
}

.post-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #202124 0%, #5f6368 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.6;
}

.post-content {
    opacity: 0;
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.post-content h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    color: var(--text);
}

.post-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-weight: 300;
}

.post-content strong {
    color: var(--text);
    font-weight: 500;
}

.post-content em {
    color: var(--text-subtle);
    font-style: italic;
}

.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--accent-glow);
    border-radius: 0 8px 8px 0;
}

.post-content blockquote p {
    color: var(--text);
    font-style: italic;
    font-weight: 400;
    margin-bottom: 0;
}

.post-content code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85em;
    background: var(--bg-subtle);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    border: 1px solid var(--border);
    color: var(--text);
}

.post-content ul,
.post-content ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.post-content li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.post-content .highlight-box {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-subtle);
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.post-content .highlight-box h3 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.post-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 2.5rem 0;
}

/* Like button */
.like-section {
    display: flex;
    justify-content: center;
    margin: 2.5rem 0 1.5rem;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.like-btn:hover {
    border-color: #e8384f;
    color: #e8384f;
    box-shadow: 0 2px 8px rgba(232, 56, 79, 0.1);
}

.like-btn.liked {
    border-color: #e8384f;
    color: #e8384f;
    background: rgba(232, 56, 79, 0.04);
}

.like-btn.liked .like-icon {
    fill: #e8384f;
    stroke: #e8384f;
}

.like-icon {
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

.like-count {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 0;
    transition: all 0.2s ease;
}

/* Animations */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 2rem 1.25rem;
    }

    .nav {
        padding: 1rem 1.25rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .link-card {
        padding: 0.875rem 1rem;
    }

    .blog-card {
        padding: 1.25rem;
    }
}