:root {
    --bg-color: #0d1117;
    --text-color: #ffffff;
    --accent-color: #ff6b4a;
    /* Orange-ish red from the design */
    --accent-gradient: linear-gradient(135deg, #ff8c6b 0%, #ff4b2b 100%);
    --secondary-text: #a0a0a0;
    --card-bg: #161b22;
    --nav-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: var(--nav-height);
    background-color: transparent;
    /* Or var(--bg-color) if sticky */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(30, 34, 41, 0.95);
    /* Dark background on scroll */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
}

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

.nav-links li a {
    font-size: 0.9rem;
    color: var(--secondary-text);
    transition: color 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--text-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center the container */
    padding: 120px 10% 80px;
    min-height: 100vh;
    /* Full viewport height */
    background-color: #1e2229;
    /* Dark background from reference */
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    /* Behind content but above background */
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    z-index: 2;
    /* Above particles */
}

.hero-content {
    flex: 1;
    color: #fff;
}

.hello-label {
    color: var(--accent-color);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.cursor {
    font-weight: 100;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.hero-description {
    color: #b0b0b0;
    font-size: 1rem;
    margin-bottom: 40px;
    max-width: 500px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 35px;
    border-radius: 30px;
    /* Rounded pill shape */
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 74, 0.4);
}

.btn-primary:hover {
    background: #ff5230;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    /* Align image to right */
    position: relative;
}

.profile-img {
    width: 100%;
    max-width: 450px;
    /* Adjust as needed */
    height: auto;
    object-fit: cover;
    /* Removed specific border-radius to show full cutout or distinct shape */
}

/* Creating the red ring effect */
.circle-bg::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border-radius: 50%;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-color), var(--bg-color)) padding-box,
        linear-gradient(45deg, var(--accent-color), transparent 70%) border-box;
    z-index: -1;
    transform: rotate(-45deg);
}

.profile-img {
    width: 350px;
    height: auto;
    border-radius: 0 0 1000px 1000px;
    /* Semi-circle sort of */
    object-fit: cover;
    /* This will depend on the image provided. 
       If it's a cutout, this works well. 
       If it's a box, we might need masking. */
}

.arrow {
    position: absolute;
    color: #333;
    /* Darker arrow color */
    font-size: 2rem;
    font-weight: 300;
}

.arrow-top-left {
    top: 20%;
    left: 10%;
    transform: rotate(45deg);
}

.arrow-bottom-right {
    bottom: 20%;
    right: 10%;
    transform: rotate(45deg);
}

/* Tech Stack */
.tech-stack {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 30px 0;
    background-color: #0f131a;
    /* Any slight variation */
    margin-bottom: 80px;
    flex-wrap: wrap;
}

.tech-item {
    font-size: 1.1rem;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
}

/* Services & About Grid - REFACTORED for Redesign */
.services-about {
    padding: 100px 10%;
    background-color: #f9f9f9;
    /* Light background from reference */
    color: #333;
    /* Dark text for light bg */
}

/* Hide old services/stats for now to match reference strictly, or adapt */
.services,
.stats {
    display: none;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-image-wrapper {
    flex: 1;
    position: relative;
    /* Removed frame effect styles */
}

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

.about-content {
    flex: 1.2;
}

.about-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1e2229;
}

.about-title .highlight {
    color: var(--accent-color);
}

.about-description {
    color: #666;
    line-height: 1.7;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.personal-info-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 40px;
}

.info-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
}

.info-label {
    font-weight: 700;
    color: #1e2229;
    font-size: 1rem;
}

.info-value {
    color: #555;
    font-size: 1rem;
}

.download-btn {
    background-color: var(--accent-color);
    color: #fff;
    padding: 12px 40px;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(255, 107, 74, 0.4);
}

.download-btn:hover {
    background-color: #ff5230;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .about-container {
        flex-direction: column;
    }

    .about-image-wrapper,
    .about-content {
        width: 100%;
    }
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
}

/* Projects Section */
.projects-section {
    padding: 100px 10%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #2d3748;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 20px;
}

.project-info h4 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.project-info p {
    color: var(--secondary-text);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.project-tech {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.project-tech span {
    background-color: rgba(255, 107, 74, 0.1);
    color: var(--accent-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links {
    display: flex;
    gap: 15px;
}

.btn-small {
    padding: 8px 16px;
    border: 1px solid var(--secondary-text);
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-small:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* =========================================
   New Sections & Theme Handling 
   ========================================= */

/* Light Theme Helper */
.light-theme {
    background-color: #f9f9f9;
    color: #333;
}

.light-theme .section-title {
    color: #1e2229;
}

.light-theme .project-card,
.light-theme .edu-card,
.light-theme .achievement-item {
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.light-theme .project-info h4,
.light-theme .edu-card h4,
.light-theme .achievement-text h4 {
    color: #1e2229;
}

.light-theme .project-info p,
.light-theme .edu-card p,
.light-theme .achievement-text p {
    color: #666;
}

/* Skills Section */
.skills-section {
    padding: 100px 10%;
    background-color: #0f131a;
    /* Darker than global bg */
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #2d3748;
    transition: transform 0.3s;
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.skill-category h4 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid #2d3748;
    padding-bottom: 10px;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-items span {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ddd;
}

/* Experience Section (Timeline) */
.experience-section {
    padding: 100px 10%;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--accent-color);
    top: 0;
    bottom: 0;
    left: 20px;
    /* Align line left */
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 50px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 12px;
    top: 5px;
    background-color: var(--bg-color);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 20px 30px;
    border-radius: 8px;
    border: 1px solid #2d3748;
}

.timeline-content h4 {
    color: #fff;
    font-size: 1.2rem;
}

.timeline-content .date {
    display: block;
    color: var(--accent-color);
    font-size: 0.9rem;
    margin: 5px 0 10px;
    font-weight: 600;
}

/* Education Section */
.education-section {
    padding: 100px 10%;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.edu-card {
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color) !important;
}

.edu-meta {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.edu-meta span {
    color: var(--accent-color);
}

/* Certifications Section */
.certifications-section {
    padding: 100px 10%;
    background-color: #0f131a;
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.cert-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #2d3748;
    transition: transform 0.3s;
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.cert-card h4 {
    margin-bottom: 10px;
}

.cert-card span {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--secondary-text);
}

/* Achievements Section */
.achievements-section {
    padding: 100px 10%;
}

.achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.achievement-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    border-radius: 10px;
}

.achievement-item i {
    font-size: 2rem;
    color: var(--accent-color);
}

/* Enhanced Contact Section */
.contact-section {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    color: #fff;
    padding: 100px 10%;
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.contact-section .section-title {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
}

.contact-section .section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    margin: 20px auto 0;
    border-radius: 2px;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 74, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.contact-item .details h5 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-item .details p {
    color: #b0b0b0;
    font-size: 1rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.social-icon:hover {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 74, 0.3);
}

.contact-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 45px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 10px;
}

.footer-resume {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-resume .btn-primary {
    padding: 15px 50px;
    font-size: 1rem;
}

/* Mobile & Responsive Additions */
@media (max-width: 768px) {
    .timeline::after {
        left: 10px;
    }

    .timeline-item {
        padding-left: 35px;
    }

    .timeline-item::after {
        left: 2px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form {
        padding: 30px 25px;
    }

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

    .social-links {
        justify-content: center;
    }
}