/* Professional Portfolio CSS - Optimized */

:root {
    /* Colors */
    --base: #1e1e2e;
    --surface: #313244;
    --text: #cdd6f4;
    --subtext: #bac2de;
    --mauve: #cba6f7;
    --blue: #89b4fa;
    --yellow: #f9e2af;
    --peach: #fab387;
    --light-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --light-text: #1f2937;
    --light-surface: #ffffff;
    --light-border: #e5e7eb;
    --light-secondary: #f3f4f6;
    
    /* Spacing */
    --gap-xs: 0.5rem;
    --gap-sm: 1rem;
    --gap-md: 1.5rem;
    --gap-lg: 2rem;
    --gap-xl: 3rem;
    
    /* Borders */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 50%;
    
    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-slow: all 0.3s ease;
}

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

html {
    background: var(--base);
    color: var(--text);
    scroll-behavior: smooth;
    transition: none;
}

html:not(.dark-mode) {
    background: var(--light-bg);
    color: var(--light-text);
}

body {
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    color: var(--light-text);
    background: var(--light-bg);
    min-height: 100vh;
    transition: var(--transition-slow);
}

/* Common Components */
.card {
    background: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: var(--radius-md);
    padding: var(--gap-md);
    transition: var(--transition-slow);
}

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

.btn {
    padding: 0.6rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-slow);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag {
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    background: #667eea;
}

/* Navigation */
.nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--light-border);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gap-sm) var(--gap-lg);
}

.nav-brand span {
    font-weight: 600;
    font-size: 1.1rem;
    color: #667eea;
}

.nav-tabs {
    display: flex;
    gap: var(--gap-lg);
}

.nav-tab {
    color: #6b7280;
    text-decoration: none;
    padding: var(--gap-xs) var(--gap-sm);
    border-radius: var(--radius-sm);
    transition: var(--transition-slow);
    font-weight: 500;
}

.nav-tab:hover,
.nav-tab.active {
    color: var(--light-text);
    background: var(--light-secondary);
}

.nav-tab.active {
    color: #667eea;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 80px auto 20px;
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    padding: var(--gap-xl) var(--gap-lg);
}

.profile-section {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--gap-lg);
    align-items: center;
    margin-bottom: var(--gap-lg);
}

.profile-image img {
    width: 150px;
    height: 150px;
    border-radius: var(--radius-full);
    border: 4px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    transition: transform var(--transition-fast);
}

.profile-image img:hover {
    transform: scale(1.05);
}

.profile-info h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--gap-xs);
}

.profile-info h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: var(--gap-sm);
    color: #93c5fd;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--gap-sm);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: var(--transition-slow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.contact-item i {
    width: 20px;
    color: #93c5fd;
}

.contact-item a {
    color: white;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-item a:hover {
    color: #93c5fd;
}

/* Content */
.main-content {
    padding: var(--gap-lg);
}

.section {
    margin-bottom: var(--gap-lg);
    background: var(--light-surface);
    border-radius: var(--radius-md);
    padding: var(--gap-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--light-border);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--gap-md);
    color: var(--light-text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: var(--gap-sm);
    border-bottom: 1px solid var(--light-border);
}

.section-title i {
    color: #667eea;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--gap-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--gap-lg);
}

/* ===================
   CARD SYSTEM - Base Styles
   =================== */

/* Base card styles - shared across all card components */
.card-base {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: var(--gap-md);
    position: relative;
    transition: var(--transition-slow);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-base::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: var(--transition-slow);
}

.card-base:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

/* ===================
   SKILLS SECTION
   =================== */

/* ===================
   GRID SYSTEM - Reusable Layouts
   =================== */

/* Base grid layout for cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap-lg);
    margin-top: var(--gap-lg);
}

/* Skills */
.skills-grid {
    /* Inherits from .card-grid */
}

/* Projects Grid - same layout as skills */
.projects-grid {
    /* Inherits from .card-grid */
}

/* Interest Grid - same layout pattern */
.interest-grid {
    /* Inherits from .card-grid */
}

.skill-category {
    /* Inherits from .card-base */
    padding: var(--gap-lg); /* Larger padding for skills */
    cursor: default;
}



.skill-category h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--gap-md);
    color: #374151;
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm);
    margin-top: var(--gap-xs);
}

.skill-tag {
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 500;
    transition: var(--transition-slow);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.skill-tag:hover {
    transform: translateY(-2px) scale(1.05);
    background: #5a67d8;
    box-shadow: var(--shadow-sm);
}

/* Projects */
.project-card {
    /* Inherits from .card-base */
    cursor: pointer;
}



.project-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 0.75rem;
}

.project-card h4::before {
    content: '🚀';
    margin-right: var(--gap-xs);
}

.project-card p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: var(--gap-sm);
    font-size: 0.9rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tech span {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-lg);
    font-size: 0.7rem;
    font-weight: 500;
}

/* Education & About */



.education-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: var(--gap-xs);
}

.education-item h5 {
    font-size: 1rem;
    font-weight: 500;
    color: #667eea;
    margin-bottom: var(--gap-xs);
}

.education-date {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: var(--gap-sm);
}

.education-item p {
    color: #4b5563;
    line-height: 1.6;
    font-size: 0.9rem;
}

.about-content {
    line-height: 1.7;
}

.about-content p {
    margin-bottom: var(--gap-md);
    color: #4b5563;
    font-size: 0.95rem;
}

.about-content ul {
    list-style: none;
    padding: 0;
}

.about-content li {
    padding: var(--gap-xs) 0 var(--gap-xs) var(--gap-md);
    border-bottom: 1px solid var(--light-secondary);
    color: #4b5563;
    position: relative;
}

.about-content li:before {
    content: '▸';
    color: #667eea;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.certification-item,
.interest-item {
    margin-bottom: var(--gap-lg);
}

.certification-item h4,
.interest-item h4 {
    color: var(--light-text);
    font-size: 1.1rem;
    margin-bottom: var(--gap-sm);
    display: flex;
    align-items: center;
    gap: var(--gap-xs);
}

.interest-item {
    /* Inherits from .card-base */
    text-align: center;
}



.interest-item i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: var(--gap-sm);
}

.interest-item p {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Dark Mode Toggle & Footer */
.dark-mode-btn {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #374151;
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.dark-mode-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
    border-radius: var(--radius-full);
}

.dark-mode-btn:active {
    transform: scale(0.95);
}

.dark-mode-btn:hover .fa-moon {
    color: #4f46e5;
    text-shadow: 0 0 8px rgba(79, 70, 229, 0.3);
}

.footer {
    background: var(--light-text);
    color: white;
    padding: var(--gap-lg);
    text-align: center;
}

.visitor-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-xs);
    margin-bottom: var(--gap-sm);
    font-size: 1rem;
    font-weight: 500;
}

.visitor-counter i,
#visitor-count {
    color: #667eea;
}

#visitor-count {
    font-weight: 600;
}

.footer p {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* Dark Mode */
.dark-mode {
    background: var(--base);
    color: var(--text);
}

.dark-mode .nav-panel {
    background: rgba(30, 30, 46, 0.95);
    border-bottom-color: var(--surface);
}

.dark-mode .nav-brand span {
    color: var(--mauve);
}

.dark-mode .nav-tab {
    color: var(--subtext);
}

.dark-mode .nav-tab:hover,
.dark-mode .nav-tab.active {
    color: var(--text);
    background: var(--surface);
}

.dark-mode .nav-tab.active {
    color: var(--mauve);
}

.dark-mode .container {
    background: #181825;
    border-color: var(--surface);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.dark-mode .header,
body.dark-mode .header,
html.dark-mode .header,
.dark-mode .container .header {
    background: linear-gradient(135deg, var(--surface), #45475a) !important;
    color: var(--text) !important;
}

.dark-mode .profile-image img {
    border-color: var(--mauve);
    border-width: 3px;
}

.dark-mode .profile-image img:hover {
    border-color: #f5c2e7;
    transform: scale(1.05);
}

.dark-mode .profile-info h2 {
    color: var(--mauve);
}

.dark-mode .profile-info h1 {
    color: var(--text);
}

.dark-mode .profile-info p,
.dark-mode .description {
    color: var(--subtext);
}

.dark-mode .contact-item {
    background: rgba(49, 50, 68, 0.8);
    border-color: #45475a;
}

.dark-mode .contact-item:hover {
    background: rgba(69, 71, 90, 0.9);
    transform: translateY(-1px);
}

.dark-mode .contact-item i {
    color: var(--mauve);
}

.dark-mode .contact-item a {
    color: var(--text);
}

.dark-mode .contact-item a:hover {
    color: var(--mauve);
}

/* ===================
   DARK MODE - Card System
   =================== */

/* Dark mode base card styles - enhanced contrast and modern design */
.dark-mode .card-base,
.dark-mode .skill-category,
.dark-mode .project-card,
.dark-mode .education-item,
.dark-mode .interest-item {
    background: #1e1e2e;
    border-color: #45475a;
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-mode .card-base::before,
.dark-mode .skill-category::before,
.dark-mode .project-card::before,
.dark-mode .education-item::before,
.dark-mode .interest-item::before {
    background: linear-gradient(90deg, var(--mauve), #f5c2e7);
}

.dark-mode .card-base:hover,
.dark-mode .skill-category:hover,
.dark-mode .project-card:hover,
.dark-mode .education-item:hover,
.dark-mode .interest-item:hover {
    border-color: var(--mauve);
    background: #252542;
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.dark-mode .section,
.dark-mode .card {
    background: #1e1e2e;
    border-color: #45475a;
    color: var(--text);
}

.dark-mode .section-title {
    color: var(--text);
    border-bottom-color: #45475a;
}

.dark-mode .section-title {
    color: var(--text);
}

.dark-mode .section-title i {
    color: var(--mauve);
}

.dark-mode .skill-category h4,
.dark-mode .project-card h4,
.dark-mode .education-item h4,
.dark-mode .certification-item h4,
.dark-mode .interest-item h4 {
    color: var(--text);
}

.dark-mode .project-card p,
.dark-mode .education-item p,
.dark-mode .about-content p,
.dark-mode .about-content li,
.dark-mode .interest-item p {
    color: var(--subtext);
}

.dark-mode .education-item h5 {
    color: var(--mauve);
}

.dark-mode .about-content li {
    border-bottom-color: #45475a;
}

.dark-mode .about-content li:before {
    color: var(--mauve);
}

.dark-mode .skill-tag {
    background: var(--blue);
    color: #11111b;
    border-color: transparent;
}

.dark-mode .skill-tag:hover {
    background: var(--mauve);
    color: #11111b;
    transform: translateY(-1px);
}

.dark-mode .project-tech span,
.dark-mode .education-date {
    background: var(--blue);
    color: #11111b;
}

.dark-mode .interest-item i {
    color: var(--mauve);
}

.dark-mode .footer {
    background: #11111b;
    color: var(--text);
}

.dark-mode .visitor-counter i {
    color: var(--mauve);
}

.dark-mode #visitor-count {
    color: var(--blue);
}

.dark-mode .footer p {
    color: #a6adc8;
}

.dark-mode .dark-mode-btn,
body.dark-mode .dark-mode-btn,
html.dark-mode .dark-mode-btn {
    background: var(--surface);
    border-color: #45475a;
    color: var(--text);
}

.dark-mode .dark-mode-btn:hover,
body.dark-mode .dark-mode-btn:hover,
html.dark-mode .dark-mode-btn:hover {
    background: #45475a;
    transform: scale(1.05);
    border-radius: var(--radius-full);
}

.dark-mode .dark-mode-btn:active,
body.dark-mode .dark-mode-btn:active,
html.dark-mode .dark-mode-btn:active {
    transform: scale(0.95);
}

.dark-mode .dark-mode-btn .fa-sun {
    color: var(--yellow);
    text-shadow: 0 0 10px rgba(249, 226, 175, 0.5);
    transition: var(--transition-slow);
}

.dark-mode .dark-mode-btn:hover .fa-sun {
    color: var(--peach);
    text-shadow: 0 0 15px rgba(249, 226, 175, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: var(--radius-md);
    }
    
    .header {
        padding: var(--gap-lg) var(--gap-sm);
    }
    
    .profile-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--gap-md);
    }
    
    .profile-info h1 {
        font-size: 2rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        text-align: left;
    }
    
    .main-content,
    .section {
        padding: var(--gap-md);
    }
    
    .grid-2,
    .grid-3,
    .grid-4,
    .card-grid,
    .skills-grid,
    .projects-grid,
    .interest-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-category {
        padding: var(--gap-md);
    }
    
    .skill-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .profile-image img {
        width: 120px;
        height: 120px;
    }
    
    .profile-info h1 {
        font-size: 1.5rem;
    }
    
    .profile-info h2 {
        font-size: 1.2rem;
    }
    
    .skill-tag {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}

@media print {
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
        margin: 0;
    }
    
    .section {
        break-inside: avoid;
        box-shadow: none;
    }
}
