:root {
    /* Light Mode (Default) */
    --primary-color: #007AFF; /* Apple's blue */
    --secondary-color: #F2F2F7; /* Light Gray Background */
    --background-color: #ffffff; /* White background */
    --text-color: #1d1d1f; /* Near-black text */
    --secondary-text-color: #6e6e73; /* Gray text */
    --container-bg-color: #ffffff;
    --header-bg-color: rgba(255, 255, 255, 0.85); /* Semi-transparent light background for blur */
    --header-border-color: rgba(0, 0, 0, 0.15);
    --footer-bg-color: var(--secondary-color);
    --footer-border-color: rgba(0, 0, 0, 0.1);
    --shadow-color-light: rgba(0, 0, 0, 0.05);
    --shadow-color-cta: rgba(0, 122, 255, 0.2);
    --shadow-color-cta-hover: rgba(0, 122, 255, 0.3);
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --border-radius-small: 8px;
    --border-radius-medium: 12px;
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #0A84FF; /* Slightly brighter blue for dark mode */
    --secondary-color: #1C1C1E; /* Dark Gray Background */
    --background-color: #000000; /* Black background */
    --text-color: #ffffff;
    --secondary-text-color: #8e8e93; /* Lighter Gray text */
    --container-bg-color: #1C1C1E;
    --header-bg-color: rgba(28, 28, 30, 0.85);
    --header-border-color: rgba(255, 255, 255, 0.15);
    --footer-bg-color: var(--secondary-color);
    --footer-border-color: rgba(255, 255, 255, 0.1);
    --shadow-color-light: rgba(255, 255, 255, 0.08);
    --shadow-color-cta: rgba(10, 132, 255, 0.3);
    --shadow-color-cta-hover: rgba(10, 132, 255, 0.4);
}

/* Apply prefers-color-scheme by default */
@media (prefers-color-scheme: dark) {
    :root {
        /* Set dark mode variables directly for OS preference */
        --primary-color: #0A84FF;
        --secondary-color: #1C1C1E;
        --background-color: #000000;
        --text-color: #ffffff;
        --secondary-text-color: #8e8e93;
        --container-bg-color: #1C1C1E;
        --header-bg-color: rgba(28, 28, 30, 0.85);
        --header-border-color: rgba(255, 255, 255, 0.15);
        --footer-bg-color: var(--secondary-color);
        --footer-border-color: rgba(255, 255, 255, 0.1);
        --shadow-color-light: rgba(255, 255, 255, 0.08);
        --shadow-color-cta: rgba(10, 132, 255, 0.3);
        --shadow-color-cta-hover: rgba(10, 132, 255, 0.4);
    }
    /* Apply dark mode class styles if user *overrides* OS preference */
    body:not(.light-mode) {
         /* Re-apply variables if dark mode is forced via JS */
        --primary-color: #0A84FF;
        --secondary-color: #1C1C1E;
        --background-color: #000000;
        --text-color: #ffffff;
        --secondary-text-color: #8e8e93;
        --container-bg-color: #1C1C1E;
        --header-bg-color: rgba(28, 28, 30, 0.85);
        --header-border-color: rgba(255, 255, 255, 0.15);
        --footer-bg-color: var(--secondary-color);
        --footer-border-color: rgba(255, 255, 255, 0.1);
        --shadow-color-light: rgba(255, 255, 255, 0.08);
        --shadow-color-cta: rgba(10, 132, 255, 0.3);
        --shadow-color-cta-hover: rgba(10, 132, 255, 0.4);
    }
}

/* Apply light mode styles if user explicitly chooses light mode */
body.light-mode {
     /* Set light mode variables explicitly */
    --primary-color: #007AFF;
    --secondary-color: #F2F2F7;
    --background-color: #ffffff;
    --text-color: #1d1d1f;
    --secondary-text-color: #6e6e73;
    --container-bg-color: #ffffff;
    --header-bg-color: rgba(255, 255, 255, 0.85);
    --header-border-color: rgba(0, 0, 0, 0.15);
    --footer-bg-color: var(--secondary-color);
    --footer-border-color: rgba(0, 0, 0, 0.1);
    --shadow-color-light: rgba(0, 0, 0, 0.05);
    --shadow-color-cta: rgba(0, 122, 255, 0.2);
    --shadow-color-cta-hover: rgba(0, 122, 255, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden; /* Prevent horizontal scroll */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

.container {
    max-width: 980px; /* Slightly narrower container */
    margin: 0 auto;
    padding: 0 22px; /* Standard HIG padding */
}

/* Header & Nav */
header {
    background-color: var(--header-bg-color);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px); /* Safari */
    color: var(--text-color); /* Adjust text color for light bg */
    padding: 0.8rem 0; /* Slightly adjust padding */
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Softer shadow */
    box-shadow: 0 1px 2px var(--shadow-color-light), 0 0 0 0.5px var(--header-border-color);
    border-bottom: 0.5px solid var(--header-border-color); /* Subtle border */
    transition: background-color 0.3s ease, box-shadow 0.3s ease, border-bottom 0.3s ease; /* Smooth transition */
}

header nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.3rem;
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li {
    margin-left: 25px; /* Increase spacing */
}

header nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400; /* Regular weight */
    font-size: 0.95rem;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block; /* For transform */
}

header nav ul li a:hover {
    color: var(--primary-color);
    transform: scale(1.05); /* Subtle scale on hover */
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, var(--background-color) 0%, var(--secondary-color) 100%);
    overflow: hidden;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.hero-title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.hero-title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--secondary-text-color);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.4s forwards;
    letter-spacing: 0.5px;
}

.hero-accent {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    margin: 0 auto;
    opacity: 0;
    transform: scaleX(0);
    animation: scaleIn 0.6s ease-out 0.6s forwards;
}

/* Floating background elements */
.hero-background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.element-1 {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    width: 60px;
    height: 60px;
    background: #34C759;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.element-3 {
    width: 40px;
    height: 40px;
    background: #FF9500;
    bottom: 30%;
    left: 20%;
    animation-delay: 4s;
}

.element-4 {
    width: 50px;
    height: 50px;
    background: #FF3B30;
    top: 30%;
    right: 25%;
    animation-delay: 1s;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Dark mode adjustments for hero */
body.dark-mode .hero-section {
    background: linear-gradient(135deg, var(--background-color) 0%, var(--secondary-color) 100%);
}

body.dark-mode .floating-element {
    opacity: 0.05;
}





/* Sections */
section {
    padding: 5rem 0; /* Increase padding */
}

section h2 {
    text-align: center;
    margin-bottom: 3rem; /* Increase bottom margin */
    font-size: 2.2rem;
    color: var(--text-color);
    font-weight: 600;
}

.about-section,
.expertise-section,
.contact-section {
    /* Use the secondary background color for these sections */
    background-color: var(--secondary-color);
    transition: background-color 0.3s ease; /* Add transition */
}

/* Optional: Add rounded corners and shadow to content within sections */
.section-content {
    background-color: var(--container-bg-color);
    padding: 2.5rem;
    border-radius: var(--border-radius-medium);
    box-shadow: 0 4px 15px var(--shadow-color-light);
    max-width: 700px;
    margin: 0 auto; /* Center the content box */
    transition: background-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition */
}

.about-section .section-content {
    /* Add flex display for image and text layout */
    display: flex;
    align-items: flex-start; /* Align items to the top */
    gap: 2rem; /* Space between image and text */
    text-align: left; /* Ensure text alignment is left */
}

.profile-image {
    width: 150px; /* Adjust size as needed */
    height: 150px;
    border-radius: 50%; /* Make it circular */
    object-fit: cover; /* Ensure image covers the area well */
    flex-shrink: 0; /* Prevent image from shrinking */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

body.dark-mode .profile-image {
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.15);
}

.about-text {
    flex-grow: 1; /* Allow text to take remaining space */
}

.about-section .section-content p,
.contact-section .section-content p,
.expertise-section .section-content p { /* Added expertise section */
    text-align: left; /* Align text left for readability */
    max-width: none; /* Remove max-width as container handles it */
    margin-bottom: 1rem;
    color: var(--secondary-text-color);
}

.about-section .section-content p:last-child,
.contact-section .section-content p:last-child {
    margin-bottom: 0;
}

.contact-section ul {
    list-style: none;
    text-align: left; /* Align list items left */
    margin-top: 1.5rem;
    padding-left: 0; /* Remove default padding */
}

.contact-section ul li {
    margin-bottom: 0.8rem; /* Increase spacing */
    color: var(--secondary-text-color);
}

.contact-section a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-section a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--footer-bg-color);
    color: var(--secondary-text-color);
    text-align: center;
    padding: 2rem 0; /* Increase padding */
    font-size: 0.85rem;
    border-top: 0.5px solid var(--footer-border-color); /* Subtle top border */
    transition: background-color 0.3s ease, color 0.3s ease, border-top 0.3s ease; /* Smooth transition */
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

footer p {
    margin-bottom: 0.5rem;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px); /* Slightly more playful animation */
    transition: opacity 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
        padding: 6rem 0 4rem;
    }
    
    .hero-title {
        font-size: clamp(2rem, 7vw, 3rem);
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .floating-element {
        opacity: 0.05;
    }

    header nav .container {
        /* Keep flex-direction row for better mobile nav */
    }

    /* Basic Mobile Nav Toggle - Requires JS update or different approach */
    /* For simplicity, keeping the row layout - adjust if needed */
    header nav ul {
        /* Hide on mobile - requires JS to toggle */
        /* display: none; */
        margin-top: 0; /* Reset margin if keeping row layout */
    }

    header nav ul li {
        margin: 0 10px;
    }

    section h2 {
        font-size: 1.8rem;
    }

    .section-content {
        padding: 1.5rem;
    }

    .about-section .section-content {
        flex-direction: column; /* Stack image and text on smaller screens */
        align-items: center; /* Center items when stacked */
        text-align: center; /* Center text when stacked */
    }

    .about-section .section-content p {
        text-align: center;
    }

    .profile-image {
        width: 120px;
        height: 120px;
        margin-bottom: 1.5rem;
    }

    .expertise-section .section-content li {
        padding-left: 0; /* Remove padding for checkmark */
        text-align: center; /* Center list items */
    }

    .expertise-section .section-content li::before {
        display: none; /* Hide checkmark on small screens */
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 60vh;
        padding: 4rem 0 3rem;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .hero-accent {
        width: 40px;
    }

    header nav ul {
       /* Example: Force wrap or hide/toggle */
       /* flex-wrap: wrap; */
       /* justify-content: center; */
       /* Consider a hamburger menu for very small screens */
    }

    header nav ul li {
        margin: 5px 8px;
    }
}

/* Theme Toggle Button Style */
.theme-toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem; /* Adjust size as needed */
    padding: 0 5px;
    color: var(--secondary-text-color);
    transition: color 0.3s ease, transform 0.2s ease;
    display: flex; /* Align icon vertically */
    align-items: center;
}

.theme-toggle-button:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Hide one icon based on theme */
body.dark-mode .theme-toggle-button .sun-icon {
    display: inline-block;
}
body.dark-mode .theme-toggle-button .moon-icon {
    display: none;
}
body:not(.dark-mode) .theme-toggle-button .sun-icon {
    display: none;
}
body:not(.dark-mode) .theme-toggle-button .moon-icon {
    display: inline-block;
}

.expertise-section .section-content ul {
    list-style: none; /* Remove default bullets */
    padding-left: 0;
    text-align: left;
}

.expertise-section .section-content li {
    margin-bottom: 1rem;
    padding-left: 1.5rem; /* Add space for custom bullet/icon */
    position: relative;
    color: var(--secondary-text-color);
}

.expertise-section .section-content li::before {
    content: '\2713'; /* Checkmark symbol */
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--primary-color);
    font-weight: bold;
}

.expertise-section .section-content strong {
    color: var(--text-color); /* Make the emphasized text darker */
    font-weight: 600;
}



 