:root {
    --bg-dark: #0B1120;
    --bg-card: #151E32;
    --bg-card-hover: #1A253D;
    --accent-blue: #3B82F6;
    --accent-blue-hover: #2563EB;
    --accent-cyan: #22D3EE;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(21, 30, 50, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 10px 30px rgba(59, 130, 246, 0.2);
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.section {
    padding: 80px 0;
}

.section-icon {
    color: var(--accent-blue);
    margin-right: 12px;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.3);
    background-color: var(--bg-card-hover);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-primary);
    line-height: 1.2;
}

p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

p:last-child {
    margin-bottom: 0;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-blue-hover);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.btn-link {
    color: var(--accent-blue);
    padding: 0;
    margin-top: 24px;
    font-weight: 500;
}

.btn-link:hover {
    color: var(--accent-blue-hover);
    gap: 12px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 16px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

.btn-nav {
    padding: 8px 20px;
}

.hamburger {
    display: none;
    cursor: pointer;
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 32px;
}

.badge-icon {
    width: 10px;
    height: 10px;
    fill: var(--accent-blue);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.highlight {
    color: var(--accent-blue);
}

.hero-desc {
    font-size: 1.25rem;
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* About & Education Grid */
.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.education-card {
    display: flex;
    flex-direction: column;
}

.education-card .card-header {
    margin-bottom: auto;
}

/* Mini Stats (About) */
.about-stats {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.mini-stat-card {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mini-stat-card:hover {
    transform: translateY(-4px);
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.mini-stat-icon {
    color: var(--accent-blue);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.mini-stat-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.mini-stat-info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
    display: block;
}

/* Modern Education */
.modern-edu {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 16px;
}

.edu-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.edu-title-group h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.edu-title-group .degree {
    font-size: 0.95rem;
    color: var(--accent-blue);
    font-weight: 500;
    margin-bottom: 0;
}

.edu-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}

.edu-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
    margin: 20px 0;
}

.edu-focus h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-card h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--accent-blue);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.tag-small {
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: none;
}

.tool-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.tool-icon {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
}

/* Projects */
.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 600;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.project-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    padding: 0;
    overflow: hidden;
    align-items: center;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-soft);
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: var(--shadow-glow), 0 0 20px rgba(59, 130, 246, 0.1);
}

.project-card.reverse {
    grid-template-columns: 1fr 1.2fr;
}

.project-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    background-color: rgba(0,0,0,0.2);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

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

.project-content {
    padding: 40px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.project-details {
    margin-bottom: 24px;
}

.project-details p {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.project-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-blue);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-card {
    padding: 40px 24px;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-card p {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-weight: 500;
}

/* Experience */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -30px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.timeline-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 8px;
    background-color: rgba(59, 130, 246, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.timeline-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

/* Contact */
.contact-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.contact-header h2 {
    font-size: 1.5rem;
}

.contact-desc {
    margin-bottom: 32px;
    max-width: 600px;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 300px;
}

.contact-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.contact-icon {
    color: var(--accent-blue);
}

.contact-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.contact-value {
    font-weight: 500;
    font-size: 1.05rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 20px;
}

.footer-left p {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-right {
    display: flex;
    gap: 24px;
}

.footer-skills {
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    font-weight: 500;
    opacity: 0.85;
    transition: var(--transition);
}

.footer-skills:hover {
    color: var(--text-primary);
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 17, 32, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 24px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-modal {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 130, 246, 0.15);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-blue);
    transform: rotate(90deg);
}

.modal-body {
    padding: 40px;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 12px;
    padding-right: 40px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.modal-image-container {
    margin-bottom: 32px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.modal-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.modal-gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.modal-gallery img:hover {
    transform: scale(1.02);
}


.tools-tags {
    margin-top: 12px;
}

.modal-details h4 {
    color: var(--accent-blue);
    margin-bottom: 12px;
    margin-top: 24px;
    font-size: 1.1rem;
}

.modal-details h4:first-child {
    margin-top: 0;
}

.modal-details p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-list {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--text-secondary);
}

.modal-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.modal-list strong {
    color: var(--text-primary);
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Button Glow */
.btn-glow {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: var(--transition);
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-cyan));
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    border-color: transparent;
    color: #fff;
}

.btn-glow:hover::before {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card, .project-card.reverse {
        grid-template-columns: 1fr;
    }
    
    .project-image {
        min-height: 300px;
    }
    
    .project-card.reverse .project-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .modal-body {
        padding: 24px;
    }
    .modal-title {
        font-size: 1.4rem;
    }

    .section {
        padding: 60px 0;
    }

    .nav-links, .btn-nav {
        display: none;
    }
    
    .hamburger {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-desc {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

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

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

    .project-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    
    .about-stats {
        flex-direction: column;
    }
}

/* Live Dashboard Button */
.btn-live-dashboard {
    width: 100%;
    justify-content: center;
    margin-bottom: 32px;
    border-radius: var(--radius-md);
    padding: 14px 24px;
    font-size: 1.05rem;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
}

.btn-live-dashboard:hover {
    transform: scale(1.02) translateY(-2px);
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    color: #fff;
}
