/* Base & Typography Settings */
:root {
    --h1-size: 3.5rem;
    --p-size: 1.1rem;
    --section-title-size: 2.5rem;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    transition: background-color 0.5s ease, color 0.5s ease;
}

h1 {
    font-size: var(--h1-size) !important;
    line-height: 1.2 !important;
}

p {
    font-size: var(--p-size) !important;
    line-height: 1.6 !important;
}

#typed {
    font-size: 1.5rem !important;
}

.section-title {
    font-size: var(--section-title-size) !important;
    font-weight: 800;
    color: #475569;
    margin-bottom: 12px;
}

/* UI Components: Nav, Buttons & Socials */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: inherit;
}

.nav-link {
    position: relative;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2.5px;
    background: #2563eb;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 10px;
}

.nav-link:hover::after {
    width: 100%;
}

.btn {
    padding: 12px 28px;
    border-radius: 9999px;
    font-weight: 700;
    transition: .4s;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-outline {
    border: 2px solid #2563eb;
    color: #2563eb;
}

#home .flex-nowrap.overflow-x-auto {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 12px;
    overflow: visible !important;
    padding-bottom: 5px;
}

.social {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f8fafc;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .3s;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.social:hover {
    transform: translateY(-4px);
    background: #2563eb;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.pro-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 30px;
    transition: .4s;
}

/* Images, Dividers & Layout Spacing */
.profile-ring {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #2563eb, #22d3ee, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem !important;
    text-align: center;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1e293b;
    font-weight: 700;
    margin-bottom: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    border-radius: 50%;
}

.title-underline {
    width: 60px;
    height: 5px;
    background: linear-gradient(to right, #2563eb, #93c5fd);
    border-radius: 10px;
}

section,
.education-wrapper,
.achievements-wrapper,
.skills-wrapper,
.container,
.mx-auto,
.px-4,
.px-6,
.px-8 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

#contact-content .pro-card {
    width: 100% !important;
    margin: 0 auto 15px auto !important;
    padding: 20px 15px !important;
}

.section-divider {
    display: block !important;
    height: 2px !important;
    width: 300px !important;
    background: rgba(15, 23, 42, 0.2) !important;
    margin: 1.5rem auto !important;
    border: none !important;
    opacity: 0.8 !important;
}

/* Dark Mode Overrides */
.copyright-text {
    font-size: 0.9rem;
    color: #64748b;
    margin: 20px 0;
    text-align: center;
    width: 100%;
    display: block;
}

footer p {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

html.dark .section-divider {
    background: rgba(255, 255, 255, 0.2) !important;
}

html.dark .section-tag {
    color: #e5e7eb;
}

html.dark .section-title {
    color: #94a3b8;
}

html.dark .pro-card {
    background: #1e293b;
    border-color: #334155;
}

html.dark .profile-img {
    border: 6px solid #0f172a;
}

html.dark .social {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}

html.dark .copyright-text {
    color: #cbd5e1;
}

html.dark .logo-dark-mode {
    display: block;
}

html.dark .logo-light-mode {
    display: none;
}

.logo-dark-mode {
    display: none;
}

/* Tablet & Mobile Responsiveness (Up to 1024px) */
@media (max-width: 1024px) {
    #home .flex-nowrap.overflow-x-auto {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 12px !important;
        max-width: 100% !important;
        margin: 15px auto 0 !important;
        padding-left: 25px !important;
        padding-right: 25px !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    body {
        overflow-x: hidden !important;
    }

    h1 {
        text-align: center !important;
        font-size: 2.3rem !important;
        margin-top: -10px !important;
    }

    #typed {
        text-align: center !important;
        display: block;
    }

    #home p {
        text-align: center !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .profile-ring {
        max-width: 250px !important;
        margin-bottom: 10px !important;
    }

    #home .flex-wrap {
        justify-content: center !important;
    }

    nav {
        padding-left: 30px !important;
        padding-right: 30px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        left: 0 !important;
        top: 0 !important;
    }

    nav .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .logo-img {
        height: 100px !important;
        width: auto !important;
        max-height: 50px !important;
    }

    nav a.font-bold,
    .logo-text {
        font-size: 1.5rem !important;
    }

    #theme-toggle,
    .theme-toggle-btn {
        transform: scale(1.3) !important;
        margin-right: 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #theme-toggle svg {
        width: 30px !important;
        height: 30px !important;
        stroke-width: 2px !important;
    }

    #mobile-menu-btn {
        transform: scale(1.4) !important;
        margin-right: 5px !important;
        cursor: pointer !important;
    }

    #mobile-menu-btn svg {
        width: 35px !important;
        height: 35px !important;
        stroke-width: 2.5px !important;
    }
}

/* Mobile Screen Settings (768px and below) */
@media (max-width: 768px) {
    :root {
        --h1-size: 2.2rem;
        --p-size: 0.88rem;
        --section-title-size: 1.4rem;
    }

    #typed {
        font-size: 1.5rem !important;
        line-height: 1.5 !important;
    }

    nav .h-24 {
        height: 50px !important;
    }

    .logo-img {
        height: 25px !important;
    }

    section {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .profile-ring {
        margin-bottom: 0 !important;
    }

    h1 {
        margin-top: 4px !important;
        margin-bottom: 6px !important;
    }

    #home .grid {
        gap: 10px !important;
    }

    #home {
        padding-top: 0.5rem !important;
    }
}

/* Specific Mobile Fixes (Max-Width: 767px) */
@media (max-width: 767px) {
    nav {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    .logo-img {
        height: 25px !important;
        width: auto !important;
    }

    nav a.font-bold,
    .logo-text {
        font-size: 1.1rem !important;
    }

    #theme-toggle,
    .theme-toggle-btn,
    #mobile-menu-btn {
        padding: 0 !important;
        width: 25px !important;
        height: 25px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        transform: none !important;
    }

    #theme-toggle svg,
    #mobile-menu-btn svg {
        width: 12px !important;
        height: 12px !important;
        stroke-width: 2px !important;
    }

    #theme-toggle,
    .theme-toggle-btn {
        margin-right: 2px !important;
    }

    #mobile-menu-btn {
        margin-right: 0 !important;
    }

    .section-divider {
        margin: 1rem auto !important;
    }

    #education p,
    #education h3,
    #education span,
    .education-content p {
        text-align: left !important;
    }

    .profile-ring {
        max-width: 180px !important;
    }

    #contact-content .pro-card {
        width: 98% !important;
        margin: 0 auto 10px auto !important;
        padding: 15px !important;
    }

    .social {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.7rem;
    }

    #contact-content h4,
    #contact-content span,
    #contact-content a,
    #contact-content p {
        font-size: 0.85rem !important;
        word-break: break-all !important;
    }
}

/* Desktop Only Enhancements (Min-Width: 1025px) */
@media (min-width: 1025px) {
    #home .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    h1 {
        text-align: left !important;
        font-size: 3.5rem !important;
        margin-top: 0 !important;
    }

    #home p {
        text-align: left !important;
        padding-left: 0 !important;
    }

    .profile-ring {
        max-width: 460px !important;
        border-radius: 4rem;
    }

    .profile-img {
        border-radius: calc(4rem - 6px);
    }

    nav .h-24 {
        height: 70px !important;
        min-height: 70px !important;
    }

    .logo-img {
        height: 40px !important;
        width: auto;
    }

    nav .container {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
    }

    nav {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    #typed {
        font-size: 1rem !important;
    }
}

@media (min-width: 1024px) {
    .hidden.xl\:flex {
        display: flex !important;
    }

    #mobile-menu-btn {
        display: none !important;
    }

    nav .px-6 {
        padding-left: 5rem !important;
        padding-right: 5rem !important;
    }
}

.footer-link {
    transition: .3s;
}

.footer-link:hover {
    color: #3b82f6;
    padding-left: 5px;
}

@media (min-width: 768px) and (max-width: 1024px) {
    body {
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box;
    }
}

/* Typed Cursor Effect Styling */
@media (min-width: 768px) {
    .typed-cursor {
        font-size: 1.2em !important;
        color: inherit !important;
        font-weight: 100 !important;
        display: inline-block !important;
        transform: translateY(6px) !important;
        opacity: 1 !important;
        line-height: 1 !important;
    }
}