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

/* CSS Variables - Dark Theme */
:root {
    --primary-color: #ffffff;
    --accent-color: #a1a1aa;
    --background-color: #0a0a0a;
    --card-bg: #111111;
    --card-hover-bg: #161616;
    --text-color: #e5e5e5;
    --secondary-text: #a1a1aa;
    --border-color: #27272a;
    --code-bg: #1c1c1c;
    --shadow-color: rgba(59, 130, 246, 0.15);
    --hover-bg: #1a1a1a;
}

/* Base Styles */
body {
    font-family: "Playfair Display", serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.top-nav {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    object-fit: cover;
}

.site-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

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

.nav-link {
    color: var(--secondary-text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--secondary-text);
    transition: color 0.2s ease;
}

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

/* Hero Section */
.hero {
    text-align: start;
    max-width: 770px;
    margin: 0 auto;
    padding: 50px 10px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px; /* Less gap before tagline */
}

.hero .tagline {
    font-size: 1.2rem;
    color: #777;
    margin-bottom: 20px; /* Reduced from big default spacing */
}

.hero-description {
    font-size: 1.08em;
    line-height: 1.6;
    margin-bottom: 18px; /* Adds space between hero-description paragraphs */
}


/* Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Section Styles */
.section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: border-color 0.2s ease;
}

.section:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    font-size: 1.1rem;
}

/* Recent Blog Post */
.blog-post {
    padding: 1rem;
    background: var(--hover-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.blog-post:hover {
    background: var(--card-hover-bg);
    border-color: var(--secondary-text);
}

.blog-post-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.blog-post-title a {
    color: inherit;
    text-decoration: none;
}

.blog-post-excerpt {
    font-size: 0.95rem;
    color: var(--secondary-text);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.blog-post-meta {
    font-size: 0.85rem;
    color: var(--secondary-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

/* Lists */
.item-list {
    list-style: none;
}

.item-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-color);
}

.item-list li:last-child {
    border-bottom: none;
}

.item-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.item-list a:hover {
    color: var(--accent-color);
}

::selection {
    background: rgba(59, 130, 246, 0.4); /* Accent color, transparent */
    color: var(--primary-color);
}

/* ===== Smooth Fade-Up Animation ===== */
@keyframes fadeUpSmooth {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    filter: blur(6px);
  }
  60% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 1;
  }
}

/* ===== Base Fade-In Elements ===== */
.hero,
.section,
.blog-post,
.project-item {
  opacity: 0;
  animation: fadeUpSmooth 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; /* slower + smoother */
  will-change: transform, opacity, filter;
}

/* ===== Staggered Delays ===== */
.hero         { animation-delay: 0.2s; }
.section      { animation-delay: 0.4s; }
.blog-post    { animation-delay: 0.6s; }
.project-item { animation-delay: 0.8s; }

/* ===== Keyframes ===== */
@keyframes fadeUpSmooth {
  from {
    transform: translateY(20px); /* smaller movement for more elegance */
    opacity: 0;
    filter: blur(4px); /* subtle blur for a "synthesized" feel */
  }
  to {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
  }
}



/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

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

    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .social-links {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .section {
        padding: 1rem;
    }
}