/* Custom Properties & Variables (Light Mode Default) */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;

    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-light: #f1f5f9;

    --text-main: #0f172a;
    --text-muted: #64748b;

    --border-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.05);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --transition: all 0.3s ease;
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-light: #1e293b;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
}

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

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.highlight {
    color: var(--primary-color);
}

.bg-light {
    background-color: var(--bg-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

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

.secondary-btn {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--border-color);
}

.secondary-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}

body.dark-mode .navbar.scrolled {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition);
}

.navbar.scrolled .nav-content {
    height: 70px;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-main);
}

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

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

.nav-links li a {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

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

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-color);
}

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

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 8px;
    border-radius: 50%;
}

.theme-btn:hover {
    color: var(--primary-color);
    background: rgba(128, 128, 128, 0.1);
}

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

/* Full Width Hero Profile */
.hero-section {
    padding-top: 80px;
    margin-bottom: 50px;
}

.full-width-profile {
    width: 100%;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.cover-photo {
    width: 100%;
    height: 350px;
    position: relative;
}

.cover-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-container.compact-layout {
    display: flex;
    flex-direction: column;
    margin-top: -70px;
    /*padding: 0 20px 40px;*/
    position: relative;
    z-index: 2;
}

.profile-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
}

.profile-picture {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid var(--bg-main);
    background: var(--bg-main);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

body.dark-mode .profile-picture {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contact Form Alert */
.alert {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    display: none;
    transition: var(--transition);
}

.alert.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.alert.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.alert.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.profile-details.left-align {
    text-align: left;
    width: 100%;
}

.name {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.main-rank {
    position: relative;
    top: -15px;
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(110deg,
            var(--text-main) 0%,
            var(--text-main) 40%,
            var(--primary-color) 50%,
            var(--text-main) 60%,
            var(--text-main) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 3s linear infinite;
    display: inline-block;
}

@keyframes textShine {
    to {
        background-position: -200% center;
    }
}

.sub-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
    line-height: 1.4;
}

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

.action-buttons {
    display: flex;
    gap: 15px;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inline About Text inside Hero */
.about-text-inline {
    margin-top: 35px;
    background: var(--bg-card);
    padding: 30px 35px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

body.dark-mode .about-text-inline {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-text-inline p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 15px;
    line-height: 1.7;
}

.inline-info {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.inline-info ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px 30px;
    align-items: center;
}

.inline-info li {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
}

.inline-info strong {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

body.dark-mode .skill-card {
    background: var(--bg-main);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

body.dark-mode .skill-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.skill-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

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

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 50px;
}

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

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--bg-main);
    box-shadow: 0 0 0 2px var(--primary-color);
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-date {
    display: inline-block;
    padding: 6px 15px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.timeline-content:hover {
    border-color: var(--primary-color);
    transform: translateX(10px);
}

.timeline-content h3 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 15px;
}

.timeline-content p {
    color: var(--text-muted);
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
}

.contact-info {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-info p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    font-size: 1.2rem;
}

.social-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

.contact-form-container {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.input-group {
    margin-bottom: 20px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

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

footer p {
    color: var(--text-muted);
}

/* Compact Skills Grid */
.skills-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 20px;
}

.skill-card.compact {
    padding: 20px 15px;
}

.skill-card.compact .skill-icon {
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.skill-card.compact h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.skill-card.compact p {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Inline Social in About */
.about-social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-social {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 10px;
}

.inline-social a {
    display: flex;
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: var(--transition);
}

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

/* Media Queries */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .profile-top-row {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 10px;
    }

    .action-buttons .btn {
        flex: 1;
        padding: 10px;
        font-size: 0.9rem;
        justify-content: center;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 45px;
    }

    .timeline-dot {
        left: 6px;
    }

    .name {
        font-size: 2.2rem;
    }

    .profile-picture {
        width: 120px;
        height: 120px;
        margin-top: 0;
    }

    .profile-info-container.compact-layout {
        margin-top: -50px;
    }

    .cover-photo {
        height: 200px;
    }
}