:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --secondary: #fd79a8;
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a2e;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --gradient: linear-gradient(135deg, #6c5ce7, #fd79a8);
    --gradient-2: linear-gradient(135deg, #6c5ce7, #a29bfe, #fd79a8);
    --shadow: 0 4px 20px rgba(108, 92, 231, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

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

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 48px;
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ── Header / Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

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

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar .logo span {
    font-weight: 300;
    -webkit-text-fill-color: var(--text-muted);
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

/* Mobile toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(253, 121, 168, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: 24px;
    font-weight: 500;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero h1 .highlight {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 560px;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
}

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

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* ── About ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image .avatar-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.about-image .avatar-placeholder::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: calc(var(--radius-lg) - 4px);
    background: var(--bg-card);
}

.about-image .avatar-placeholder .initials {
    position: relative;
    z-index: 1;
    font-weight: 800;
    font-size: 5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.about-text .role {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 16px;
    display: block;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.stat-card .number {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Skills ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: var(--transition);
    cursor: default;
}

.skill-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.skill-card .icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.skill-card .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.skill-card .level {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.skill-card .bar {
    height: 3px;
    background: var(--border);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.skill-card .bar .fill {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 1s ease;
}

/* ── Experience ── */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 48px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item .date {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-item h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.timeline-item .company {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.timeline-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Projects ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.project-card .project-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.project-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.project-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.project-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-card .tags span {
    padding: 4px 12px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--primary);
}

.project-card .project-links {
    display: flex;
    gap: 12px;
}

.project-card .project-links a {
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── Blog ── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

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

.blog-card .blog-image {
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    opacity: 0.7;
}

.blog-card .blog-body {
    padding: 24px;
}

.blog-card .blog-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.blog-card .blog-meta .category {
    color: var(--primary);
    font-weight: 600;
}

.blog-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.blog-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.blog-card .read-more {
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blog-card .read-more:hover {
    gap: 8px;
}

/* ── Post Single ── */
.post-header {
    padding-top: 150px;
    padding-bottom: 48px;
    text-align: center;
}

.post-header .post-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.post-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    max-width: 800px;
    margin: 0 auto 16px;
}

.post-content {
    max-width: 720px;
    margin: 0 auto;
}

.post-content p {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.post-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 40px 0 16px;
}

.post-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 32px 0 12px;
}

.post-content code {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    border: 1px solid var(--border);
}

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

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

.post-content ul,
.post-content ol {
    margin: 16px 0;
    padding-left: 24px;
    color: var(--text-muted);
}

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

.post-content blockquote {
    border-left: 3px solid var(--primary);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-muted);
    font-style: italic;
}

/* ── Contact ── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.contact-item .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-item .info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

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

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-success {
    display: none;
    padding: 16px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 8px;
    color: #22c55e;
    text-align: center;
    font-weight: 500;
}

.form-success.show {
    display: block;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 32px;
}

.footer-brand h4 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-col h5 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

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

.footer-col ul a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

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

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ── Back to Top ── */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 100;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

/* ── Page Header ── */
.page-header {
    padding: 140px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ── Animations ── */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger > *.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── 404 ── */
.error-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-page h1 {
    font-size: 8rem;
    font-weight: 900;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.error-page p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin: 16px 0 32px;
}

/* ── Typed cursor ── */
.typed-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--primary);
    margin-left: 4px;
    animation: blink 0.8s infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ── Responsive ── */

/* Menu toggle always hidden on desktop */
.menu-toggle {
    display: none;
}

/* Large tablets / small desktops */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3.2rem;
    }

    .about-grid {
        gap: 40px;
    }

    .projects-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        position: relative;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100dvh;
        background: var(--bg-card);
        border-left: 1px solid var(--border);
        flex-direction: column;
        padding: 100px 32px 32px;
        gap: 20px;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.05rem;
        padding: 8px 0;
    }

    .navbar.scrolled .nav-links {
        top: 0;
    }

    /* Overlay do menu mobile */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-overlay.active {
        display: block;
    }

    .hero {
        min-height: 90dvh;
        padding: 100px 0 60px;
    }

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

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

    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-image .avatar-placeholder {
        max-width: 260px;
        margin: 0 auto;
    }

    .about-text h3 {
        font-size: 1.5rem;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .section {
        padding: 60px 0;
    }

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

    .section-subtitle {
        font-size: 1rem;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .skill-card {
        padding: 20px 12px;
    }

    .skill-card .icon {
        font-size: 2rem;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-item::before {
        left: -30px;
        width: 10px;
        height: 10px;
    }

    .projects-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-card {
        padding: 24px;
    }

    .page-header {
        padding: 120px 0 40px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .post-header {
        padding-top: 120px;
        padding-bottom: 32px;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .post-content {
        padding: 0;
    }

    .post-content p {
        font-size: 1rem;
    }

    .post-content pre {
        padding: 16px;
        font-size: 0.85rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .contact-form {
        padding: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        min-height: 85dvh;
        padding: 80px 0 40px;
    }

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

    .hero-tag {
        font-size: 0.75rem;
        padding: 4px 12px;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .number {
        font-size: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .skill-card {
        padding: 16px 10px;
    }

    .skill-card .icon {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .skill-card .name {
        font-size: 0.8rem;
    }

    .section {
        padding: 48px 0;
    }

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

    .page-header {
        padding: 100px 0 32px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header p {
        font-size: 0.95rem;
    }

    .project-card h3 {
        font-size: 1.1rem;
    }

    .blog-card .blog-body {
        padding: 20px;
    }

    .post-header h1 {
        font-size: 1.6rem;
    }

    .post-content h2 {
        font-size: 1.3rem;
    }

    .post-content h3 {
        font-size: 1.1rem;
    }

    .contact-form {
        padding: 20px;
    }

    .contact-item .icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .footer {
        padding: 32px 0 20px;
    }

    .error-page h1 {
        font-size: 5rem;
    }

    .error-page p {
        font-size: 1rem;
    }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100dvh;
        padding: 100px 0 40px;
    }

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

    .nav-links {
        padding: 60px 24px 24px;
        gap: 12px;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 4px 0;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}
