/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

/* CSS Variables for Theming */
:root {
    /* Dark Theme (Default) */
    --bg-main: #060b13;
    --bg-surface: #0f1624;
    --bg-surface-alt: #0a101a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --border-color: #1e293b;
    --nav-bg: rgba(6, 11, 19, 0.85);
    --modal-bg: #0f1624;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --hover-shadow: 0 8px 30px rgba(6, 182, 212, 0.15);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
    --nav-bg: rgba(248, 250, 252, 0.85);
    --modal-bg: #ffffff;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography Utilities */
.text-gradient {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-purple {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-8 {
    margin-bottom: 32px;
}

.sub-heading {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.theme-btn:hover {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

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

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -10%;
    width: 50vw;
    height: 50vw;
    max-width: 500px;
    max-height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.hero-content {
    flex: 1;
    max-width: 650px;
}

.hero-image {
    flex-shrink: 0;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    box-shadow: 0 10px 40px rgba(6, 182, 212, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 6px solid var(--bg-main);
    transition: transform 0.5s ease;
}

.hero-image:hover .profile-pic {
    transform: scale(1.03);
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: inline-block;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.hero-desc {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    color: #fff;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

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

.btn-outline:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

/* Sections Layouts */
section {
    padding: 100px 0;
}

.bg-surface-alt {
    background-color: var(--bg-surface-alt);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    margin-bottom: 64px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
}

/* Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

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

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-blue);
    box-shadow: var(--hover-shadow);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent-cyan);
    margin-bottom: 24px;
}

.card-title {
    font-size: 1.35rem;
    margin-bottom: 20px;
}

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

.card-list li {
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.card-list li i {
    color: var(--accent-blue);
    font-size: 0.9rem;
    margin-top: 6px;
}

/* Styled Lists */
.styled-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.styled-list li {
    padding-left: 28px;
    position: relative;
    color: var(--text-secondary);
}

.styled-list li::before {
    content: '\f061';
    /* FontAwesome arrow-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent-cyan);
    font-size: 0.8rem;
}

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

/* Project Cards Specific */
.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
}

.project-card .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* Timeline */
.timeline {
    border-left: 2px solid var(--border-color);
    padding-left: 32px;
    margin-left: 16px;
    position: relative;
}

.timeline-item {
    margin-bottom: 48px;
    position: relative;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -41px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 2px solid var(--accent-blue);
    transition: background 0.3s ease;
}

.timeline-item:hover::before {
    background: var(--accent-blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent-cyan);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.timeline-subtitle {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Badges */
.badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

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

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--accent-purple);
    padding: 32px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
    border-radius: 0 16px 16px 0;
    margin-bottom: 24px;
    height: 100%;
}

blockquote p {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.8;
}

blockquote footer {
    font-weight: 600;
    color: var(--text-primary);
    border: none;
    padding: 0;
    text-align: left;
    font-family: 'Poppins', sans-serif;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.contact-card {
    text-align: center;
    padding: 40px 24px;
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.contact-card h4 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.contact-card a,
.contact-card p {
    color: var(--text-secondary);
    font-weight: 500;
}

.contact-card a:hover {
    color: var(--accent-cyan);
}

.flex-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    background-color: var(--bg-surface-alt);
}

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

.back-to-top {
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-to-top:hover {
    color: var(--accent-cyan);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--modal-bg);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    border-radius: 16px;
    padding: 48px;
    position: relative;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    transition: color 0.3s, transform 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-surface-alt);
}

.close-btn:hover {
    color: var(--accent-cyan);
    transform: rotate(90deg);
}

#modal-title {
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: var(--accent-blue);
    padding-right: 50px;
    line-height: 1.3;
}

#modal-body h2,
#modal-body h3,
#modal-body h4 {
    margin: 32px 0 16px;
    color: var(--text-primary);
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    display: inline-block;
}

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

#modal-body ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

#modal-body li {
    color: var(--text-secondary);
    padding-left: 24px;
    position: relative;
}

#modal-body li::before {
    content: '\f054';
    /* FontAwesome angle-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 4px;
    color: var(--accent-cyan);
    font-size: 0.7rem;
}

#modal-body strong {
    color: var(--text-primary);
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-inner {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 20px;
    }

    .hero-image {
        width: 280px;
        height: 280px;
        margin-bottom: 24px;
    }

    .hero-btns {
        justify-content: center;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 64px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 0;
        border-bottom: 1px solid var(--border-color);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        padding: 24px 0;
    }

    .mobile-menu-btn {
        display: block;
        margin-right: 15px;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-content {
        text-align: center;
    }

    section {
        padding: 80px 0;
    }

    .modal-content {
        padding: 32px 24px;
        width: 95%;
    }

    #modal-title {
        font-size: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

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

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