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

:root {
    --primary-color: #3b82f6;
    --secondary-color: #1e293b;
    --accent-color: #93c5fd;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-alt: #f1f5f9;
    --border-color: #dbe4f0;
    --shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 35px rgba(15, 23, 42, 0.14);
}

html {
    scroll-padding-top: 7rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: radial-gradient(circle at top right, #eff6ff 0%, #ffffff 45%);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    z-index: 1000;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    gap: 1rem;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--secondary-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.nav-brand:hover,
.nav-brand:focus-visible {
    opacity: 0.78;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.45rem 0.7rem;
    border-radius: 0.5rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
    color: var(--secondary-color);
    background-color: #e2e8f0;
}

/* Hero Section */
.hero {
    padding: 9rem 0 6rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #334155 100%);
    color: white;
    margin-top: 0;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-kicker {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.08);
}

.hero-title {
    font-size: 3.4rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.45rem;
    font-weight: 500;
    margin-bottom: 1.2rem;
    color: #dbeafe;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0 auto 2rem;
    max-width: 760px;
    color: #e2e8f0;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.metric-value {
    font-size: 1.3rem;
    font-weight: 700;
}

.metric-label {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.72rem 1.7rem;
    border-radius: 0.6rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: var(--secondary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Sections */
.section {
    padding: 5rem 0;
    scroll-margin-top: 7rem;
}

.section-alt {
    background-color: var(--bg-alt);
}

.section-title {
    font-size: 2.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 760px;
    margin: 0 auto 2.3rem;
    font-size: 1.03rem;
}

/* About Section */
.about-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.4rem;
    margin-top: 3rem;
}

.skill-category {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.2rem;
    box-shadow: var(--shadow);
}

.skill-category h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tags span {
    background: linear-gradient(135deg, #eff6ff 0%, #e2e8f0 100%);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    font-weight: 500;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 920px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #94a3b8, #cbd5e1);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: 11px;
    top: 0.9rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    border: 3px solid #f1f5f9;
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 0.85rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.timeline-header {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.company-logo {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.company-logo svg {
    width: 100%;
    height: 100%;
    display: block;
}

.timeline-info {
    flex: 1;
}

.timeline-info h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.company {
    display: inline-block;
    font-weight: 600;
    color: var(--secondary-color);
    margin-right: 1rem;
    font-size: 1rem;
}

.period, .location {
    display: inline-block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-right: 0.7rem;
}

.timeline-details {
    list-style: none;
    padding-left: 0;
}

.timeline-details li {
    padding-left: 1.4rem;
    margin-bottom: 0.5rem;
    position: relative;
    color: var(--text-secondary);
}

.timeline-details li::before {
    content: '\25B9';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    padding: 1.6rem;
    border-radius: 0.8rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: #93c5fd;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.9rem;
    color: var(--text-primary);
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.65;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    background: #eff6ff;
    padding: 0.32rem 0.72rem;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    color: #1e3a8a;
    font-weight: 500;
    border: 1px solid #bfdbfe;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
    gap: 1.5rem;
}

.blog-placeholder {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    grid-column: 1 / -1;
    padding: 2rem;
}

.blog-card {
    background: white;
    border-radius: 0.6rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-card-content {
    padding: 1.3rem;
}

.blog-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.blog-date {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.blog-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
}

.blog-card.featured {
    position: relative;
}

.blog-card.featured::before {
    content: 'First Post';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1d4ed8;
    background: #dbeafe;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}

/* Blog Article */
.article-shell {
    padding: 8rem 0 5rem;
}

.article-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.article-hero {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 65%);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.article-eyebrow {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    margin-bottom: 1rem;
}

.article-hero h1 {
    font-size: 2.8rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 0.9rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.article-lead {
    font-size: 1.08rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.article-content {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.article-content h2 {
    font-size: 1.6rem;
    margin: 2rem 0 0.85rem;
    letter-spacing: -0.02em;
}

.article-content h3 {
    font-size: 1.18rem;
    margin: 1.4rem 0 0.7rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content p {
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 1rem;
}

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

.article-content li {
    margin-bottom: 0.45rem;
    line-height: 1.8;
}

.article-content code {
    font-family: 'Consolas', 'Courier New', monospace;
    background: #eff6ff;
    color: #1e3a8a;
    padding: 0.12rem 0.35rem;
    border-radius: 0.35rem;
}

.article-content pre {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 1rem;
    padding: 1.15rem;
    overflow-x: auto;
    margin: 1.25rem 0 1.5rem;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

.article-figure {
    margin: 1.5rem 0;
}

.article-figure img {
    width: 100%;
    display: block;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.article-figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
}

.article-note {
    background: #f8fafc;
    border-left: 4px solid #60a5fa;
    border-radius: 0.85rem;
    padding: 1rem 1.1rem;
    margin: 1.5rem 0;
}

.article-note p:last-child {
    margin-bottom: 0;
}

.article-backlink {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: #1d4ed8;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.article-backlink:hover {
    text-decoration: underline;
}

/* 404 */
.error-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 7rem 0 4rem;
}

.error-card {
    max-width: 760px;
    margin: 0 auto;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 62%);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2.2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.error-code {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    margin-bottom: 1rem;
}

.error-card h1 {
    font-size: 3rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.error-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.error-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1.5rem;
}

/* Contact */
.contact-content {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.2rem;
    background: white;
    border-radius: 0.7rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s, box-shadow 0.3s;
    min-width: 0;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Footer */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    text-align: center;
    padding: 1.8rem 0;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4.25rem 0;
    }

    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.85rem 1rem;
    }

    .nav-menu {
        width: 100%;
        gap: 0.4rem;
        font-size: 0.88rem;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .nav-menu a {
        padding: 0.4rem 0.6rem;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .article-shell {
        padding: 7rem 0 4rem;
    }

    .article-hero,
    .article-content {
        padding: 1.35rem;
        border-radius: 1rem;
    }

    .article-hero h1 {
        font-size: 2.1rem;
    }

    .error-card {
        padding: 1.5rem;
        border-radius: 1rem;
    }

    .error-card h1 {
        font-size: 2.3rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-marker {
        left: 2px;
    }

    .timeline-header {
        flex-direction: column;
        gap: 1rem;
    }

    .timeline-info > div {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }

    .company-logo {
        width: 48px;
        height: 48px;
    }

    .company,
    .period,
    .location {
        margin-right: 0;
    }
}

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

    .hero {
        padding: 7rem 0 4.2rem;
    }

    .nav-brand {
        font-size: 1.25rem;
    }

    .nav-menu {
        font-size: 0.82rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-description {
        font-size: 0.98rem;
    }

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

    .article-meta {
        font-size: 0.9rem;
    }

    .error-card h1 {
        font-size: 1.9rem;
    }

    .project-card,
    .timeline-content,
    .contact-item,
    .skill-category {
        padding: 1.1rem;
    }

    .contact-item {
        align-items: flex-start;
    }

    .contact-item span:last-child {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}
