:root {
    /* Dark Theme (Default) */
    --bg-color: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-card: #252525;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #3b82f6;
    /* Vibrant Blue */
    --accent-hover: #2563eb;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.5);

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition-speed: 0.3s;
}

[data-theme="light"] {
    --bg-color: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(10, 10, 10, 0.85);
    /* Dark semi-transparent */
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-speed);
}

[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.85);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}

.logo .dot {
    color: var(--accent-color);
    font-size: 2rem;
    line-height: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width var(--transition-speed);
}

.nav-link:hover::after {
    width: 100%;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 10px;
    transition: color var(--transition-speed);
}

#theme-toggle:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    /* Navbar height */
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

.hero-content {
    max-width: 800px;
}

.greeting {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.hero-name {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero-role {
    font-size: 2rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 25px;
}

.hero-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

/* About Section */
.about-section {
    background-color: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-line {
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0 auto;
    border-radius: 2px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.placeholder-img {
    width: 300px;
    height: 300px;
    background-color: var(--bg-card);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8rem;
    color: var(--border-color);
    border: 4px solid var(--accent-color);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.about-profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    box-shadow: 0 20px 40px var(--shadow-color);
    animation: float 6s ease-in-out infinite;
    transition: all 0.3s ease;
}

.about-profile-img:hover {
    box-shadow: 0 0 30px var(--accent-color);
    transform: scale(1.05);
    /* This overrides float momentarily on hover which is a nice interactive 'grab' feel, or we can just pause */
    /* To mix both, better to just pause or rely on the fact that hover overrides transform */
    animation-play-state: paused;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-speed);
}

.skill-category:hover {
    transform: translateY(-5px);
}

.category-title {
    font-size: 1.25rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.category-title i {
    color: var(--accent-color);
}

.skill-list li {
    padding: 8px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.skill-list li::before {
    content: '▹';
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.project-content {
    padding: 30px;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.project-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    min-height: 80px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags span {
    font-size: 0.8rem;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Experience Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background-color: var(--accent-color);
    border: 4px solid var(--bg-color);
    border-radius: 50%;
    position: absolute;
    top: 15px;
    right: -10px;
    z-index: 10;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -10px;
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.timeline-content {
    padding: 20px;
    background-color: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.timeline-role {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.timeline-list {
    text-align: left;
    /* Keep lists left-aligned inside cards even on right side */
}

.timeline-list li {
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-size: 0.95rem;
}

/* Services Section */
.services-section {
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--bg-card);
    padding: 40px 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
    cursor: default;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Career Objective */
.objective-section {
    padding: 80px 0;
}

.objective-box {
    background-color: var(--bg-card);
    padding: 60px;
    text-align: center;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px var(--shadow-color);
    max-width: 900px;
    margin: 0 auto;
}

.objective-title {
    font-size: 2rem;
    margin-bottom: 25px;
}

.objective-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-secondary);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background-color: var(--bg-card);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.contact-form {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Footer */
.footer {
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-to-top {
    width: 40px;
    height: 40px;
    background-color: var(--bg-card);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

.back-to-top:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Animations Helpers */
.fade-in,
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in-up {
    transform: translateY(30px);
}

.fade-in-left {
    transform: translateX(-30px);
}

.fade-in-right {
    transform: translateX(30px);
}

.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    .hero-name {
        font-size: 3.5rem;
    }
}

@media screen and (max-width: 900px) {
    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: var(--bg-card);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        justify-content: center;
        border-right: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.5rem;
        margin: 15px 0;
    }

    /* Timeline responsive */
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(odd) {
        text-align: left;
    }

    .timeline-dot {
        left: 21px;
        /* Align with line */
        right: auto;
    }

    .timeline-item:nth-child(even) .timeline-dot {
        left: 21px;
    }
}

@media screen and (max-width: 768px) {
    .hero-name {
        font-size: 2.8rem;
    }

    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media screen and (max-width: 480px) {
    .hero-name {
        font-size: 2.2rem;
    }

    .hero-role {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .contact-form {
        padding: 25px;
    }
}