/* --- Variables & Reset --- */
:root {
    --bg-color: #121212;
    --bg-darker: #0a0a0a;
    --bg-card: #1e1e1e;
    --bg-card-hover: #252525;

    --accent-color: #722F37;
    /* Wine Maroon */
    --accent-glow: rgba(114, 47, 55, 0.4);
    --accent-light: #943d46;

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Inter', sans-serif;
    /* Can switch to Playfair for serif headings if desired */

    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --spacing-container: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

/* --- Utilities --- */
.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-darker {
    background-color: var(--bg-darker);
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.dot {
    color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-primary-outline {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-primary-outline:hover {
    background: var(--accent-color);
    color: white;
}

.block-btn {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.navbar.scrolled {
    background: rgba(18, 18, 18, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 999;
    padding: 6rem 2rem;
    flex-direction: column;
    gap: 2rem;
    transition: 0.3s ease-in-out;
    display: flex;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    right: 0;
}

.mobile-link {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.mobile-link:hover {
    color: var(--text-primary);
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
    background: radial-gradient(circle at 80% 20%, rgba(114, 47, 55, 0.15) 0%, transparent 40%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-placeholder {
    width: 320px;
    height: 320px;
    background: var(--bg-card);
    border-radius: 20px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.placeholder-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
}

.profile-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    filter: blur(80px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: 1;
}

.chart-decoration {
    position: absolute;
    background: var(--accent-color);
    border-radius: 4px;
    bottom: 20px;
    width: 40px;
    opacity: 0.8;
}

.chart-1 {
    left: 40px;
    height: 100px;
}

.chart-2 {
    left: 90px;
    height: 160px;
    background: #fff;
    opacity: 0.1;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    display: block;
    position: relative;
}

.wheel {
    width: 4px;
    height: 4px;
    background: var(--text-primary);
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.about-text p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.skills-wrapper {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.subsection-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background: var(--bg-darker);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.skill-tag:hover {
    color: var(--text-primary);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.skill-tag i {
    width: 16px;
    height: 16px;
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.project-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-darker);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.project-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-thumb {
    transform: scale(1.1);
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-header {
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.tech-stack {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    color: var(--text-secondary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-achievements {
    margin-bottom: 2rem;
    list-style-type: none;
    flex-grow: 1;
}

.project-achievements li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.project-achievements li::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.project-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-link:hover {
    color: var(--accent-color);
}

.btn-link i {
    width: 16px;
    height: 16px;
}

/* --- Case Studies --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    padding-left: 3rem;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.timeline-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.timeline-problem {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-left: 3px solid var(--text-muted);
}

.timeline-body p {
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.btn-text {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.btn-text:hover {
    color: var(--accent-color);
    gap: 0.8rem;
    /* Slide effect */
}

/* --- Certifications --- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.cert-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: var(--transition-fast);
}

.cert-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: var(--bg-card-hover);
}

.cert-icon {
    width: 50px;
    height: 50px;
    background: rgba(114, 47, 55, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.cert-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.cert-provider {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cert-year {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.2rem;
}

/* --- Resume --- */
.resume-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.resume-preview {
    background: var(--bg-card);
    width: 200px;
    height: 280px;
    margin: 0 auto 3rem;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.resume-preview:hover {
    transform: scale(1.05) rotate(2deg);
}

.resume-page-mockup {
    padding: 20px;
}

.mockup-header {
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
}

.mockup-lines .line {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 12px;
}

.w-40 {
    width: 40%;
}

.w-80 {
    width: 80%;
}

.w-60 {
    width: 60%;
}

.w-90 {
    width: 90%;
}

.resume-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* --- Contact --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--bg-card);
    padding: 4rem;
    border-radius: 20px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.contact-item:hover {
    color: var(--accent-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: var(--bg-darker);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: white;
    font-family: var(--font-main);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.02);
}

/* --- Footer --- */
.footer {
    padding: 3rem 0;
    background: var(--bg-darker);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.social-links-footer {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links-footer a {
    color: var(--text-secondary);
}

.social-links-footer a:hover {
    color: var(--text-primary);
}

/* --- Animations --- */
@keyframes scroll {
    0% {
        top: 8px;
        opacity: 1;
    }

    100% {
        top: 24px;
        opacity: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-200 {
    animation-delay: 0.2s;
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        margin: 0 auto;
        margin-bottom: 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .about-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 3rem;
    }

    .timeline-marker {
        left: 14px;
    }

    .contact-wrapper {
        padding: 2rem;
    }
}