/* ===========================================
   Personal Site - Dark Mode Theme
   =========================================== */

:root {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-color: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-secondary: #10b981;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow-1: #3b82f6;
    --glow-2: #10b981;
    --card-bg: rgba(30, 41, 59, 0.8);
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ===========================================
   Navigation
   =========================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--glow-1), var(--glow-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* ===========================================
   Hero Section
   =========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    color: #34d399;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #34d399;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 8px #34d399;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================================
   Buttons
   =========================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--glow-1), var(--glow-2));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    filter: brightness(1.1);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===========================================
   Sections
   =========================================== */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* ===========================================
   Cards
   =========================================== */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover handled by GSAP for smoother animation */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* ===========================================
   Blog Cards
   =========================================== */
.blog-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover handled by GSAP for smoother animation */

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

.blog-card-date {
    font-size: 0.875rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

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

.blog-card-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.25rem 0.75rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent-color);
}

/* ===========================================
   Skills
   =========================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.skill-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.skill-item:hover {
    background: rgba(255, 255, 255, 0.08);
    /* transform handled by GSAP */
}

.skill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.skill-icon svg {
    width: 48px;
    height: 48px;
}

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

/* ===========================================
   Social Links
   =========================================== */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    transform: translateY(-2px);
}

/* ===========================================
   Footer
   =========================================== */
.footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.footer p {
    font-size: 0.875rem;
}

/* ===========================================
   Blog Article
   =========================================== */
.article {
    max-width: 800px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.article-header {
    margin-bottom: 3rem;
}

.article-date {
    color: var(--accent-color);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.article-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-content {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
}

.article-content h3 {
    color: var(--text-color);
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-content pre {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

.article-content ul,
.article-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

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

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.article-content th,
.article-content td {
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    text-align: left;
}

.article-content th {
    background: var(--bg-secondary);
    color: var(--text-color);
    font-weight: 600;
}

.article-content tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 2.5rem 0;
}

.article-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.article-content a:hover {
    opacity: 0.8;
}

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

    .nav-links {
        gap: 1rem;
    }

    .hero {
        padding: 5rem 1.5rem 3rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    .article {
        padding: 6rem 1.5rem 3rem;
    }
}

@media (max-width: 480px) {
    .nav-links {
        font-size: 0.9rem;
        gap: 0.75rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ===========================================
   GSAP Animation States
   =========================================== */
/* Prevent FOUC - hide elements before GSAP initializes */
.hero-badge,
.hero h1,
.hero-subtitle,
.btn-group,
.section-title,
.section-subtitle,
.card,
.blog-card,
.skill-item,
.social-link {
    visibility: visible;
}

/* Smooth will-change for better performance */
.card,
.blog-card,
.skill-item {
    will-change: transform, opacity;
}
