/**
 * main.css
 * Main styles and variables for portfolio site
 */

/* Color Variables & Theme */
:root {
    --primary: #4f83ff;
    --primary-hover: #3c6fe0;
    --secondary: #ffffff;
    --text: #f3f5f9;
    --muted: #94a3b8;
    --bg: #0c111a;
    --accent: #7aa5ff;
    --card: #141b24;
    --border: rgba(79, 131, 255, 0.18);
    --card-shadow: 0 18px 45px rgba(5, 8, 15, 0.45);
    --card-shadow-hover: 0 24px 60px rgba(5, 8, 15, 0.6);
    --nav-bg: rgba(12, 18, 26, 0.92);
    --nav-border: rgba(79, 131, 255, 0.25);
    --hero-gradient-start: #101726;
    --hero-gradient-end: #0b121f;
    --section-bg: rgba(17, 23, 32, 0.75);
    --section-border: rgba(79, 131, 255, 0.12);
    --section-shadow: 0 22px 55px rgba(5, 8, 15, 0.55);
    --section-backdrop: blur(18px);
    --chip-bg: rgba(79, 131, 255, 0.18);
    --chip-text: #dbe4ff;
    --tag-bg: rgba(79, 131, 255, 0.16);
    --button-bg: rgba(79, 131, 255, 0.12);
    --button-border: rgba(79, 131, 255, 0.28);
    --button-hover-bg: rgba(79, 131, 255, 0.18);
    --button-primary-shadow: 0 16px 32px rgba(79, 131, 255, 0.35);
    --project-link-border: rgba(79, 131, 255, 0.25);
    --project-link-bg: rgba(255, 255, 255, 0.04);
}

body[data-theme="light"] {
    --primary: #c5557f;
    --primary-hover: #b24f75;
    --secondary: #ffffff;
    --text: #211722;
    --muted: #6c5b68;
    --bg: #fdfcfe;
    --accent: #d87a9c;
    --card: #ffffff;
    --border: rgba(197, 85, 127, 0.16);
    --card-shadow: 0 18px 45px rgba(24, 17, 28, 0.08);
    --card-shadow-hover: 0 22px 55px rgba(24, 17, 28, 0.12);
    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-border: rgba(197, 85, 127, 0.18);
    --hero-gradient-start: #fdfcfe;
    --hero-gradient-end: #f6eef3;
    --section-bg: transparent;
    --section-border: transparent;
    --section-shadow: none;
    --section-backdrop: none;
    --chip-bg: rgba(197, 85, 127, 0.08);
    --chip-text: var(--primary);
    --tag-bg: rgba(197, 85, 127, 0.12);
    --button-bg: rgba(197, 85, 127, 0.06);
    --button-border: rgba(33, 23, 34, 0.12);
    --button-hover-bg: rgba(197, 85, 127, 0.12);
    --button-primary-shadow: 0 16px 30px rgba(178, 76, 117, 0.3);
    --project-link-border: rgba(33, 23, 34, 0.12);
    --project-link-bg: var(--secondary);
}

/* Base Styles */
html {
    font-size: 18px;
}

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

/* Better focus styles without the blue outline */
a:focus,
button:focus {
    outline: none;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 1.05rem;
    overflow-x: hidden;
}

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

/* General Layout */
section {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: clamp(2.27rem, 3.35vw, 3.07rem) clamp(0.73rem, 2vw, 1.17rem);
    margin-top: clamp(0.8rem, 2.35vw, 1.2rem);
    margin-bottom: clamp(1.33rem, 3.35vw, 2rem);
    background: transparent;
    border: none;
    box-shadow: none;
}

section:first-of-type {
    margin-top: clamp(1.4rem, 3.5vw, 2.4rem);
}

/* Section Titles */
h2.section-title {
    text-align: left;
    color: var(--text);
    font-size: 2rem;
    margin-bottom: clamp(1.4rem, 2.6vw, 1.9rem);
    position: relative;
    font-weight: 600;
    display: inline-block;
}

h2.section-title::after {
    content: '';
    width: 100%;
    height: 2px;
    background: var(--primary);
    display: block;
    margin: .4rem 0;
    border-radius: 2px;
    opacity: 0.7;
}

/* Section dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary) 50%, transparent);
    opacity: 0.15;
    width: 50%;
    max-width: 600px;
    margin: 2.5rem auto;
    border-radius: 2px;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding: 1.5rem;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
    font-size: 0.95rem;
}

/* Buttons */
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.1rem;
    margin-top: 1.5rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: .01em;
    border: 1px solid var(--button-border);
    color: var(--text);
    background: var(--button-bg);
    transition: background .25s ease, border-color .25s ease, transform .25s ease, color .25s ease;
}

.cta-button--primary {
    background: var(--primary);
    border-color: transparent;
    color: var(--secondary);
    box-shadow: var(--button-primary-shadow);
}

.cta-button--outline {
    background: transparent;
    color: var(--accent);
}

body[data-theme="light"] .cta-button--outline {
    background: var(--secondary);
    color: var(--text);
}

.cta-button:hover {
    transform: translateY(-2px);
    background: var(--button-hover-bg);
    border-color: var(--button-border);
}

.cta-button--primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--button-primary-shadow);
}

@media (max-width: 768px) {

    h2.section-title {
        font-size: 1.75rem;
        margin-bottom: 1.35rem;
    }

    .section-divider {
        width: 70%;
        margin: 2rem auto;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.9rem;
    }

    .cta-button {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {

    h2.section-title {
        font-size: 1.55rem;
        margin-bottom: 1.2rem;
    }

    .cta-button {
        max-width: 100%;
        font-size: 0.95rem;
        padding: 0.7rem 1.1rem;
    }

    footer {
        padding: 1.25rem;
        font-size: 0.9rem;
    }
}
