/* ==========================================================================
   Base site styles: tokens, reset, navigation, hero, about and shared CTA.
   Sections live in sections.css; the project modal in modal.css + media.css.
   ========================================================================== */

:root {
    --red: #dc2626;
    --red-dark: #991b1b;
    --ink: #000000;
    --text: #333333;
    --muted: #555555;
    --subtle: #666666;
    --faint: #999999;
    --line: #eeeeee;
    --bg: #ffffff;
    --bg-alt: #f9f9f9;
    --dark: rgba(12, 12, 12, 0.97);
    --radius: 12px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

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

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(12, 12, 12, 0.9);
    backdrop-filter: blur(10px);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
}

    .navbar.visible {
        transform: translateY(0);
        opacity: 1;
    }

.nav-container {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    max-width: 1200px;
    height: 60px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    position: relative;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .nav-link::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -5px;
        width: 0;
        height: 2px;
        background: var(--red);
        transition: width 0.3s ease;
    }

    .nav-link:hover {
        color: var(--red);
    }

        .nav-link:hover::after {
            width: 100%;
        }

.hamburger {
    display: none;
    position: absolute;
    right: 20px;
    flex-direction: column;
    cursor: pointer;
}

    .hamburger span {
        width: 25px;
        height: 3px;
        margin: 3px 0;
        background: #fff;
    }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0 0 auto 0;
    height: 120%;
    background: url('../assets/homebg.jpg') center / cover no-repeat;
    z-index: -2;
    will-change: transform;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(220, 38, 38, 0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 4rem;
    text-align: center;
    color: #fff;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    animation: bounce 2s infinite;
}

    .hero-scroll i {
        font-size: 2rem;
        color: var(--red);
    }

/* ---------- Shared section chrome ---------- */
.about,
.techstack,
.experience,
.projects,
.contact {
    padding: 5rem 0;
}

.about,
.experience {
    background: var(--bg-alt);
}

.techstack,
.projects {
    background: var(--bg);
}

.section-title {
    position: relative;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ink);
}

    .section-title::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -10px;
        width: 60px;
        height: 4px;
        background: var(--red);
    }

/* ---------- About ---------- */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: var(--muted);
}

    .location i {
        flex-shrink: 0;
        font-size: 0.5rem;
        color: var(--red);
    }

.about-image {
    display: flex;
    justify-content: center;
}

.profile-image {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

    .profile-image:hover {
        transform: scale(1.05);
        box-shadow: 0 20px 45px rgba(220, 38, 38, 0.3);
    }

/* Resume button + profile links */
.resume-button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.resume-btn,
.about-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    border: 1px solid #d4d4d4;
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

    .resume-btn:hover,
    .about-link:hover {
        border-color: var(--red);
        color: var(--red);
    }

    .resume-btn:focus-visible,
    .about-link:focus-visible {
        outline: 2px solid var(--red);
        outline-offset: 3px;
    }

/* ---------- Animation ---------- */
.fade-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        width: 100%;
        padding: 2rem 0;
        background: var(--dark);
        text-align: center;
        transition: 0.3s;
    }

        .nav-menu.active {
            left: 0;
        }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .resume-button-container {
        justify-content: center;
        margin-top: 2rem;
    }

    .profile-image {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .profile-image {
        width: 200px;
        height: 200px;
    }
}
