/* --- VARIABLES & GLOBAL STYLES --- */
:root {
    --bg-color: #ffffff;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-color: #1f2937;
    --subtle-text-color: #6b7280;
    --border-color: #e5e7eb;
    --section-bg-color: #f9fafb;
    --accent-color: #f59e0b;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Lora', Georgia, serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Dark mode variables */
[data-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --subtle-text-color: #94a3b8;
    --border-color: #334155;
    --section-bg-color: #1e293b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
}

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

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
}

h2 {
    font-size: 2.25rem;
    color: var(--text-color);
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

h3 {
    font-size: 1.375rem;
    color: var(--primary-color);
    font-family: var(--font-primary);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

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

/* --- HERO/HEADER SECTION --- */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    text-align: center;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e2e8f0' fill-opacity='0.4'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* Dark mode hero styles */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

[data-theme="dark"] .hero::before {
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23334155' fill-opacity='0.4'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

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

.hero-name {
    font-family: var(--font-primary);
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.hero-tagline {
    font-size: 1.375rem;
    color: var(--subtle-text-color);
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.hero-contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-contact a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--subtle-text-color);
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.hero-contact a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.hero-contact svg {
    width: 20px;
    height: 20px;
}

/* --- DARK MODE TOGGLE --- */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--section-bg-color);
    color: var(--primary-color);
}

/* --- NAVIGATION --- */
nav {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] nav {
    background-color: rgba(15, 23, 42, 0.95);
}

nav .container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.2s ease;
}

nav a:hover::after {
    width: 100%;
}

/* --- MAIN CONTENT & SECTIONS --- */
main {
    padding: 4rem 0;
}

.content-section {
    padding: 4rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.content-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

/* --- EXPERIENCE TIMELINE --- */
.timeline .job {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    border-left: 3px solid var(--primary-color);
    position: relative;
    background: var(--section-bg-color);
    border-radius: 0 8px 8px 0;
    box-shadow: var(--shadow-sm);
}

.job-date {
    font-size: 0.875rem;
    color: var(--subtle-text-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
}

.job ul, .achievements-list ul, .education-list ul {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

.job li, .achievements-list li, .education-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.6;
}

.job li::before, .achievements-list li::before, .education-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1em;
}

/* --- SKILLS SECTION --- */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background-color: var(--section-bg-color);
    color: var(--text-color);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.skill-tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* --- OTHER LISTS --- */
.achievements-list, .education-list {
    list-style: none;
    padding-left: 0;
}

.achievements-list li, .education-list li {
    padding-left: 1.5em;
    position: relative;
    margin-bottom: 0.75rem;
}

.achievements-list li::before, .education-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* --- PROJECT STYLES --- */
.project-grid {
    margin-top: 2rem;
}

.project-card {
    background: var(--section-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.2s ease;
}

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

.project-content h3 {
    margin-bottom: 0.5rem;
}

.project-content h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-content h3 a:hover {
    color: var(--primary-color);
}

.project-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--text-color);
}

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

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.project-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* --- BLOG PREVIEW SECTION --- */
.blog-preview {
    margin-top: 2rem;
}

.blog-item {
    background: var(--section-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.2s ease;
}

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

.blog-item h3 {
    margin-bottom: 0.5rem;
}

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

.blog-item h3 a:hover {
    color: var(--primary-color);
}

.blog-meta {
    color: var(--subtle-text-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.blog-item p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: var(--text-color);
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.read-more:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* --- BLOG POSTS --- */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.blog-meta {
    color: var(--subtle-text-color);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.blog-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.blog-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.blog-content h4 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

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

.blog-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

.highlight-box {
    background: var(--section-bg-color);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--section-bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    color: var(--subtle-text-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.day-entry {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.day-entry:last-child {
    border-bottom: none;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.day-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

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

.day-subtitle {
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.milestone {
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    text-align: center;
}

.milestone strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--subtle-text-color);
    background: var(--section-bg-color);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 60px;
    }
    
    .hero-name {
        font-size: 2.75rem;
    }
    
    .hero-tagline {
        font-size: 1.125rem;
    }
    
    h2 {
        font-size: 1.875rem;
    }
    
    nav .container {
        gap: 1rem;
    }
    
    .hero-contact {
        gap: 1rem;
    }
    
    .hero-contact a {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .timeline .job {
        padding: 1.25rem;
        margin-bottom: 2rem;
        border-radius: 0 6px 6px 0;
    }
    
    .job li, .achievements-list li, .education-list li {
        padding-left: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .job li::before, .achievements-list li::before, .education-list li::before {
        font-size: 1em;
    }
    
    .content-section {
        padding: 2.5rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-name {
        font-size: 2.25rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .timeline .job {
        padding: 1rem;
        margin-bottom: 1.5rem;
        border-radius: 0 4px 4px 0;
    }
    
    .job-date {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .job li, .achievements-list li, .education-list li {
        padding-left: 0.75rem;
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
    }
    
    .job li::before, .achievements-list li::before, .education-list li::before {
        font-size: 0.9em;
    }
}