/* =====================================================
   MUNNA SAH PORTFOLIO
   Shared stylesheet
   ===================================================== */


/* =====================================================
   COLOR PALETTE
   ===================================================== */

:root {
    --bg-color: #ffffff;

    --text-main: #3f4b52;
    --text-heading: #24343d;
    --text-muted: #7c8b94;

    --nav-link: #526873;

    --accent: #72b6d6;
    --accent-dark: #4e9cc2;
    --accent-light: #eaf6fb;

    --hr-color: #dcecf3;

    --card-bg: #f4fafd;
    --card-border: #d8eaf2;
    --card-hover: #e8f5fa;

    --font-serif: "EB Garamond", Georgia, serif;
}


/* =====================================================
   DARK MODE
   ===================================================== */

body.dark-mode {
    --bg-color: #111211;

    --text-main: #d6d6d6;
    --text-heading: #f5f5f5;
    --text-muted: #999999;

    --nav-link: #c8c8c8;

    --accent: #82c7e6;
    --accent-dark: #a6d9ee;
    --accent-light: #303030;

    --hr-color: #3d3d3d;

    --card-bg: #292929;
    --card-border: #414141;
    --card-hover: #333333;
}


/* =====================================================
   BASIC RESET
   ===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth ;
}


body {
    background-color: var(--bg-color);
    color: var(--text-main);

    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.6;

    padding: 60px 20px 100px;

    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}


/* =====================================================
   MAIN CONTAINER
   ===================================================== */

.container {
    max-width: 720px;
    margin: 0 auto;
}


/* =====================================================
   NAVIGATION
   ===================================================== */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 30px;
}


nav {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}


nav a {
    color: var(--nav-link);

    text-decoration: none;

    font-size: 1.1rem;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


nav a:hover {
    color: var(--accent-dark);
}


nav a.active {
    color: var(--text-heading);

    text-decoration: underline;
    text-decoration-color: var(--accent);

    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}


/* =====================================================
   THEME TOGGLE
   ===================================================== */

.theme-toggle {
    color: var(--text-muted);

    font-size: 1.2rem;

    cursor: pointer;

    background: none;
    border: none;

    transition: color 0.2s ease;
}


.theme-toggle:hover {
    color: var(--accent-dark);
}


/* =====================================================
   HEADINGS
   ===================================================== */

h1 {
    font-size: 2.8rem;

    font-weight: 400;

    color: var(--text-heading);

    letter-spacing: -0.01em;
}


h2 {
    font-size: 1.8rem;

    font-weight: 500;

    color: var(--text-heading);

    margin-bottom: 15px;
}


h3 {
    color: var(--text-heading);
}


/* =====================================================
   HERO
   ===================================================== */

.hero-section {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    margin-bottom: 20px;
}


.profile-photo {
    width: 100px;
    height: 129px;

    border-radius: 0;

    object-fit: cover;

    border: 1px solid var(--card-border);

    margin-bottom: 5px;

    background-color: var(--accent-light);
}


/* =====================================================
   HORIZONTAL LINE
   ===================================================== */

hr {
    border: none;

    height: 1px;

    background-color: var(--hr-color);

    margin-bottom: 28px;
}


/* =====================================================
   TEXT
   ===================================================== */

p {
    margin-bottom: 24px;
}


.section-label {
    margin-top: 32px;
    margin-bottom: 20px;

    color: var(--text-heading);

    font-weight: 500;
}


/* =====================================================
   LISTS
   ===================================================== */

ul {
    list-style-type: disc;

    padding-left: 22px;
}


ul li {
    margin-bottom: 30px;

    color: var(--text-main);

    padding-left: 5px;
}


ul li::marker {
    color: var(--accent);
}


/* =====================================================
   PREVIEW CARDS
   ===================================================== */

.projects-grid {
    display: flex;

    flex-direction: column;

    gap: 20px;

    margin-top: 30px;
}


.preview-card {
    display: flex;

    align-items: center;

    background-color: var(--card-bg);

    border: 1px solid var(--card-border);

    padding: 12px;

    text-decoration: none;

    color: inherit;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;

    position: relative;
}


.preview-card:hover {
    background-color: var(--card-hover);

    border-color: var(--accent);

    transform: translateY(-2px);
}


.preview-card img {
    width: 160px;
    height: 100px;

    object-fit: cover;

    border: 1px solid var(--card-border);

    background-color: var(--accent-light);

    margin-right: 20px;
}


.card-content {
    flex: 1;

    padding-right: 40px;
}


.card-date {
    font-size: 0.9rem;

    color: var(--text-muted);

    margin-bottom: 4px;

    text-transform: uppercase;

    letter-spacing: 0.05em;
}


.card-title {
    font-weight: 600;

    font-size: 1.1rem;

    color: var(--text-heading);

    margin-bottom: 6px;

    line-height: 1.4;
}


.card-subtitle {
    font-size: 0.95rem;

    color: var(--text-muted);
}


.card-icon {
    position: absolute;

    right: 18px;

    top: 50%;

    transform: translateY(-50%);

    color: var(--text-muted);

    font-size: 1.2rem;
}


/* =====================================================
   PROJECT SECTION ON HOME
   ===================================================== */

.project-list-card {
    margin-top: 14px;
}


/* =====================================================
   SOCIAL LINKS
   ===================================================== */

.social-links {
    display: flex;

    gap: 25px;

    margin-top: 50px;
}


.social-links a {
    color: var(--text-main);

    font-size: 1.25rem;

    text-decoration: none;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.social-links a:hover {
    color: var(--accent-dark);

    transform: translateY(-2px);
}


/* =====================================================
   PAGE HEADER
   ===================================================== */

.page-header {
    margin-bottom: 30px;
}


.page-header h1 {
    margin-bottom: 18px;
}


.page-header p {
    color: var(--text-main);
}


/* =====================================================
   ARTICLE / INDIVIDUAL PAGE
   ===================================================== */

.article {
    max-width: 720px;

    margin: 0 auto;
}


.article h1 {
    margin-bottom: 20px;
}


.article h2 {
    margin-top: 40px;
}


.article h3 {
    margin-top: 30px;

    margin-bottom: 10px;
}


.article p {
    margin-bottom: 20px;
}


.article ul,
.article ol {
    margin-bottom: 20px;
}


.article li {
    margin-bottom: 8px;
}


.article pre {
    overflow-x: auto;

    background-color: #111827;

    color: #f9fafb;

    padding: 20px;

    border-radius: 6px;

    margin: 25px 0;
}


.article code {
    font-family: Consolas, monospace;
}


/* =====================================================
   FOOTER
   ===================================================== */

footer {
    margin-top: 80px;

    padding-top: 25px;

    border-top: 1px solid var(--hr-color);

    color: var(--text-muted);

    font-size: 14px;
}


/* =====================================================
   SELECTION
   ===================================================== */

::selection {
    background: var(--accent);

    color: #ffffff;
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 600px) {

    body {
        font-size: 15px;

        padding:
            35px 18px 70px;
    }


    header {
        margin-bottom: 50px;

        align-items: flex-start;
    }


    nav {
        gap: 15px;
    }


    nav a {
        font-size: 1rem;
    }


    .hero-section {
        flex-direction: column-reverse;

        align-items: flex-start;

        gap: 18px;
    }


    h1 {
        font-size: 2.0rem;
    }


    .profile-photo {
        width: 90px;
        height: 90px;
    }


    .preview-card {
        flex-direction: column;

        align-items: flex-start;
    }


    .preview-card img {
        width: 100%;

        height: auto;

        aspect-ratio: 16 / 9;

        margin-right: 0;

        margin-bottom: 15px;
    }


    .card-content {
        padding-right: 25px;
    }


    .card-icon {
        top: 20px;

        right: 15px;

        transform: none;
    }


    .social-links {
        margin-top: 40px;
    }
}