/* ========================================
   ONE-PAGE PORTFOLIO - MODERN UI/UX COLORS
   Professional Light Color Scheme
   ======================================== */

:root {
    /* Primary Colors - Soft Blues & Purples */
    --primary: #6366f1;        /* Indigo - Primary actions */
    --primary-light: #818cf8;  /* Light Indigo */
    --primary-dark: #4f46e5;   /* Dark Indigo */
    
    /* Secondary Colors - Accent */
    --secondary: #8b5cf6;      /* Purple - Secondary elements */
    --accent: #ec4899;         /* Pink - Highlights */
    --accent-light: #f472b6;   /* Light Pink */
    
    /* Neutral Colors - Light Mode */
    --bg: #f8fafc;             /* Slate 50 - Main background */
    --bg-card: #ffffff;        /* White - Card background */
    --bg-elevated: #f1f5f9;    /* Slate 100 - Elevated surfaces */
    
    /* Text Colors */
    --text: #0f172a;           /* Slate 900 - Primary text */
    --text-secondary: #475569; /* Slate 600 - Secondary text */
    --text-muted: #64748b;     /* Slate 500 - Muted text */
    
    /* Border & Divider */
    --border: #e2e8f0;         /* Slate 200 - Subtle borders */
    --border-strong: #cbd5e1;  /* Slate 300 - Strong borders */
    
    /* Success & Status Colors */
    --success: #10b981;        /* Emerald 500 */
    --info: #3b82f6;           /* Blue 500 */
    --warning: #f59e0b;        /* Amber 500 */
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Font */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.dark {
    /* Dark Mode Colors */
    --bg: #0f172a;             /* Slate 900 */
    --bg-card: #1e293b;        /* Slate 800 */
    --bg-elevated: #334155;    /* Slate 700 */
    
    --text: #f1f5f9;           /* Slate 100 */
    --text-secondary: #cbd5e1; /* Slate 300 */
    --text-muted: #94a3b8;     /* Slate 400 */
    
    --border: #334155;         /* Slate 700 */
    --border-strong: #475569;  /* Slate 600 */
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::selection {
    background: var(--primary-light);
    color: #ffffff;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 999;
    transition: all 0.3s ease;
}

body.dark .nav {
    background: rgba(15, 23, 42, 0.8);
}

.nav-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--primary-dark);
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.theme-toggle {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.05);
}

/* Main Content */
.main-content {
    padding-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Hero Compact */
.hero-compact {
    text-align: center;
    padding: 4rem 0 3rem;
}

.name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.title {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* Quick Links */
.quick-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.875rem 1.75rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.link-btn:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.link-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.link-btn:hover svg {
    transform: scale(1.1);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.info-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    font-size: 2.5rem;
    filter: grayscale(20%);
}

.card-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
}

.card-content p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.card-content p:last-child {
    margin-bottom: 0;
}

.card-content strong {
    color: var(--text);
    font-weight: 600;
}

/* Skills */
.skill-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.skill-row:last-child {
    margin-bottom: 0;
}

.skill-row strong {
    min-width: 85px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
}

.badges {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.badge:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    transform: translateY(-1px);
}

/* Experience Section */
.experience-section {
    margin-bottom: 4rem;
}

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

.experience-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.experience-card:hover {
    border-color: var(--secondary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.exp-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.company {
    color: var(--secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.exp-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    padding: 0.4rem 1rem;
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--border);
    font-weight: 500;
}

.exp-list {
    list-style: none;
    padding: 0;
}

.exp-list li {
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    line-height: 1.6;
}

.exp-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.exp-list li:last-child {
    margin-bottom: 0;
}

/* Projects Section */
.projects-section {
    margin-bottom: 4rem;
}

.section-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text);
}

.hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.projects-compact {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Project Item */
.project-item {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.project-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.project-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s ease;
}

.project-summary:hover {
    background: var(--bg-elevated);
}

.project-left {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    flex: 1;
}

.project-emoji {
    font-size: 2.75rem;
    flex-shrink: 0;
}

.project-summary h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.project-brief {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.expand-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: var(--text-muted);
}

.expand-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: #ffffff;
}

.expand-btn svg {
    transition: transform 0.3s ease;
}

.project-item.active .expand-btn {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.project-item.active .expand-btn svg {
    transform: rotate(180deg);
}

/* Project Details - Expandable */
.project-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.5rem;
}

.project-item.active .project-details {
    max-height: 600px;
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border);
}

.project-details p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.project-details ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.25rem;
}

.project-details li {
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    line-height: 1.6;
}

.project-details li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.project-tags span {
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    color: var(--secondary);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Project Links */
.project-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 10px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.project-link:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.project-link:nth-child(2) {
    background: var(--bg-card);
    color: var(--primary);
    border-color: var(--primary);
}

.project-link:nth-child(2):hover {
    background: var(--primary);
    color: #ffffff;
}

.project-link svg {
    flex-shrink: 0;
}

/* Blog Page Styles */
.blog-header {
    text-align: center;
    padding: 4rem 0 3rem;
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.blog-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

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

.blog-image {
    position: relative;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

body.dark .blog-category {
    background: rgba(15, 23, 42, 0.95);
    color: var(--primary-light);
}

.placeholder-image {
    font-size: 4rem;
    opacity: 0.3;
}

.blog-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: block;
    font-weight: 500;
}

.blog-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    flex: 1;
}

.blog-tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.blog-tag {
    padding: 0.35rem 0.85rem;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.blog-read-more:hover {
    gap: 1rem;
    color: var(--primary-dark);
}

.blog-read-more svg {
    flex-shrink: 0;
}

/* Newsletter Section */
.newsletter-section {
    margin-bottom: 4rem;
}

.newsletter-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.newsletter-card h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.newsletter-card p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 550px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.25);
}

.newsletter-form button {
    padding: 1rem 2.5rem;
    background: #ffffff;
    color: var(--primary);
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    background: var(--bg-elevated);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-content {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }

    .hero-compact {
        padding: 3rem 0 2rem;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .title {
        font-size: 1.25rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }

    .experience-grid {
        grid-template-columns: 1fr;
    }

    .exp-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .exp-date {
        width: fit-content;
    }
    
    .quick-links {
        flex-direction: column;
        align-items: stretch;
    }
    
    .link-btn {
        justify-content: center;
    }
    
    .skill-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .skill-row strong {
        min-width: auto;
    }
    
    .project-left {
        gap: 1rem;
    }
    
    .project-emoji {
        font-size: 2.25rem;
    }
    
    .project-summary h3 {
        font-size: 1rem;
    }
    
    .project-brief {
        font-size: 0.9rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .newsletter-form input {
        min-width: auto;
    }

    .newsletter-card {
        padding: 3rem 1.5rem;
    }

    .newsletter-card h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-content {
        padding: 1rem;
    }
    
    .project-summary {
        padding: 1.25rem;
    }
    
    .project-item.active .project-details {
        padding: 0 1.25rem 1.25rem 1.25rem;
    }

    .info-card,
    .experience-card {
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-card,
.project-item,
.experience-card,
.blog-card {
    animation: fadeIn 0.6s ease;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Print Styles */
@media print {
    .nav,
    .theme-toggle,
    .expand-btn,
    .newsletter-section {
        display: none;
    }
    
    .project-details {
        max-height: none !important;
        padding: 1rem !important;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}