/* =========================================
   1. VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* Slate Palette for Light Mode */
    --bg-body: #f8fafc;
    /* Slate-50 */
    --bg-card: #ffffff;
    --text-main: #334155;
    /* Slate-700 */
    --text-muted: #64748b;
    /* Slate-500 */
    --text-light: #94a3b8;
    /* Slate-400 */
    --accent-color: #2563eb;
    /* Blue-600 */
    --accent-hover: #1d4ed8;
    /* Blue-700 */
    --bg-section: #f1f5f9;
    /* Slate-100 */

    /* Borders & Shadows */
    --border-color: #e2e8f0;
    /* Slate-200 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --radius-md: 0.5rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
    --bg-body: #0f172a;
    /* Slate-900 */
    --bg-card: #1e293b;
    /* Slate-800 */
    --text-main: #f1f5f9;
    /* Slate-100 */
    --text-muted: #cbd5e1;
    /* Slate-300 */
    --text-light: #94a3b8;
    /* Slate-400 */
    --bg-section: #182236;
    /* Darker Slate */
    --border-color: #334155;
    /* Slate-700 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    -webkit-font-smoothing: antialiased;
}

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

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* =========================================
   3. UTILITIES & LAYOUT
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section__title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

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

.section__desc {
    max-width: 700px;
    margin: -2rem auto 3rem;
    color: var(--text-muted);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================
   4. COMPONENTS
   ========================================= */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.btn--primary {
    background-color: var(--accent-color);
    color: #fff;
}

.btn--primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: var(--shadow-md);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background-color: var(--accent-color);
    color: white;
    transform: rotate(15deg);
}

/* Language Switcher */
.lang-switch {
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    z-index: 1100;
    background: var(--bg-card);
    padding: 0.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 0.25rem;
}

.lang-btn {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.lang-btn:hover {
    background-color: var(--bg-body);
}

.lang-btn.active {
    background-color: var(--accent-color);
    color: white;
}

/* Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-normal);
}

[data-theme="dark"] .header {
    background-color: rgba(15, 23, 42, 0.8);
}

.nav {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav__list {
    display: flex;
    gap: 2rem;
}

.nav__link {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
}

.nav__link:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
    /* Offset for fixed header */
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero__subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero__socials {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 2rem;
}

.social-link {
    color: var(--text-main);
}

.social-link:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* About Section */
.about__container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem;
}

.about__img-wrapper {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.about__img {
    width: 280px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.about__content {
    flex: 2;
    min-width: 300px;
}

.about__role {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.about__content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Facts */
.facts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.fact-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.fact-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.fact-card span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Skills */
.skills__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.skill-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.skill-pill:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Resume */
.resume__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.resume__col h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.resume__item {
    margin-bottom: 2rem;
    position: relative;
    padding-left: 1.5rem;
    border-left: 2px solid var(--border-color);
}

.resume__item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bg-body);
    border: 2px solid var(--accent-color);
}

.resume__item h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.resume__item h5 {
    font-size: 0.875rem;
    background: var(--bg-section);
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Portfolio Masonry */
.projects-grid {
    column-count: 3;
    column-gap: 1.5rem;
}

.project-card {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-info {
    padding: 1rem;
}

.project-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius-md);
    padding: 1rem;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    font-size: 2rem;
    color: white;
}

/* Carousel dummy styles */
.carousel {
    background: #eee;
    height: 400px;
    /* Placeholder */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    position: relative;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-btn.prev {
    left: 1rem;
}

.carousel-btn.next {
    right: 1rem;
}

/* Contact */
.contact__container {
    display: flex;
    gap: 4rem;
}

.contact__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    float: left;
    margin-right: 1rem;
}

.contact-form {
    flex: 2;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-body);
    color: var(--text-main);
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {

    .resume__container,
    .contact__container {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 2rem;
    }

    .projects-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .hero__title {
        font-size: 2.5rem;
    }

    .projects-grid {
        column-count: 1;
    }

    .header {
        display: none;
    }

    /* Mobile nav implementation would be next step */
    .hero {
        padding-top: 0;
    }
}