/* -- Reset & Base -- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color-base);
    transition: background-color 0.3s ease, color 0.3s ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; 
}

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

/* -- Variables -- */
:root {
    /* Base Dark Mode - Inspired by image_0.png */
    --bg-color: #0D0D0D;
    --navbar-bg: #161616;
    --logo-color: #FFFFFF;
    --link-color: #A891D9; /* Purple from initial image */
    --link-hover-color: #FFFFFF;
    --icon-fill: #A891D9;
    --text-color-base: #EDEDED;
    --text-color-muted: #A0A0A0;
    --hero-span-color: #A891D9;
    --primary-btn-bg: #A891D9;
    --primary-btn-text: #0D0D0D;
    --dark-btn-bg: #2C2C2E;
    --avatar-ring-border: #A891D9;
    --status-dot: #4FD1C5; /* Aqua dot from status */
    --status-bg: #2C2C2E;
    --status-text: #EDEDED;
}

body.light-mode {
    /* Light Mode - Contrasting values */
    --bg-color: #F5F5F7;
    --navbar-bg: #FFFFFF;
    --logo-color: #1A1A1A;
    --link-color: #7B61FF; /* Lighter, more vibrant purple */
    --link-hover-color: #000000;
    --icon-fill: #7B61FF;
    --text-color-base: #1A1A1A;
    --text-color-muted: #555555;
    --hero-span-color: #7B61FF;
    --primary-btn-bg: #7B61FF;
    --primary-btn-text: #FFFFFF;
    --dark-btn-bg: #EAEAEA;
    --avatar-ring-border: #7B61FF;
    --status-dot: #38B2AC;
    --status-bg: #EAEAEA;
    --status-text: #1A1A1A;
}

/* -- Header & Navbar -- */
.site-header {
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    background-color: var(--navbar-bg);
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 32px;
    max-width: 700px; /* Reduced for the capsule look */
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.nav-brand {
    color: var(--logo-color);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

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

.nav-socials {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nav-socials a,
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.nav-socials svg,
.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: var(--icon-fill);
    transition: fill 0.2s ease, transform 0.2s ease;
}

.nav-socials a:hover svg,
.theme-toggle:hover svg {
    fill: var(--link-hover-color);
    transform: scale(1.1);
}

/* -- Hero Section -- */
.hero {
    padding: 100px 0;
    min-height: calc(100vh - 120px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    align-content: center;
}

.hero-left h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-left h1 span {
    color: var(--hero-span-color);
}

.hero-left p {
    font-size: 1.125rem;
    color: var(--text-color-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background-color: var(--primary-btn-bg);
    color: var(--primary-btn-text);
}

.btn-dark {
    background-color: var(--dark-btn-bg);
    color: var(--text-color-base);
}

/* -- Hero Right & Avatar -- */
.hero-right {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-ring {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 4px solid var(--avatar-ring-border);
    padding: 8px;
    position: relative; /* Maintains position context for child */
    transition: transform 0.3s ease;
}

.avatar-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Base style for perfect horizontal centering and vertical offset */
.status-text {
    position: absolute;
    /* Move the left edge to the parent's horizontal midpoint */
    left: 50%; 
    /* Offset vertically */
    bottom: -20px; 
    
    /* Perfect horizontal centering + base vertical position */
    transform: translateX(-50%) translateY(0);
    
    /* Ensure text doesn't wrap unnecessarily */
    width: max-content; 
    
    background-color: var(--status-bg);
    color: var(--status-text);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.status-text::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--status-dot);
}

/* Hover effects (updated to maintain centering) */
.avatar-ring:hover {
    transform: scale(1.02);
}

.avatar-ring:hover .status-text {
    /* Maintain horizontal centering and apply vertical offset */
    transform: translateX(-50%) translateY(-5px);
}

.status-text {
    position: absolute;
    bottom: -50px;
    right: 40px;
    background-color: var(--status-bg);
    color: var(--status-text);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-text::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--status-dot);
}

/* -- Theme Toggle specific icon swaps -- */
.theme-toggle .icon-moon {
    display: none;
}

body.light-mode .theme-toggle .icon-sun {
    display: none;
}

body.light-mode .theme-toggle .icon-moon {
    display: block;
}

/* General moon icon style */
.icon-moon {
    fill: var(--icon-fill);
}

/* -- About Section -- */
.about {
    min-height: 100vh;
    padding: 120px 20px 80px;
}
.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: var(--hero-span-color);
}
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.about-card {
    background-color: var(--navbar-bg);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}
.about-card h3 {
    margin-bottom: 16px;
    font-size: 1.5rem;
}
.text-card p {
    color: var(--text-color-muted);
}
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.skill-tags span {
    background-color: var(--dark-btn-bg);
    color: var(--link-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}
@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr;
    }
}


/* -- Media Queries for Basic Responsiveness -- */
@media (max-width: 900px) {
    .navbar {
        max-width: 100%;
        margin: 0 20px;
    }
    .nav-links {
        display: none; /* Simplification for example; requires hamburger menu logic */
    }
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero-left p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-cta {
        justify-content: center;
    }
    .hero-right {
        order: -1; /* Move avatar above text on mobile */
    }
}