/* ---- CSS VARIABLES ---- */
:root {
    /* Color Palette - Light Mode */
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #3b82f6;
    /* Blue */
    --accent-hover: #2563eb;
    --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --border-color: #e2e8f0;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;

    /* Variables */
    --transition: 0.3s ease;
    --border-radius: 12px;
}

/* Dark Mode (Default as requested by adding dark-mode class to body initially) */
body.dark-mode {
    --bg-color: #0b1120;
    --surface-color: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ---- RESET & GLOBAL ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

ul {
    list-style: none;
}

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

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

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

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ---- BUTTONS ---- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: transparent;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-secondary:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

/* ---- NAVIGATION ---- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(var(--bg-color), 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.theme-toggle,
.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--transition);
}

.theme-toggle:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
}

/* ---- HERO SECTION ---- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

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

.greeting {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 0.5rem;
}

.hero h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero .intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ---- ABOUT SECTION ---- */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-image-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.about-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

.about-image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--gradient);
    opacity: 0.1;
    transition: opacity var(--transition);
}

.about-image-placeholder:hover::before {
    opacity: 0.2;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* ---- SKILLS SECTION ---- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 2rem;
}

.skill-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

body:not(.dark-mode) .skill-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.skill-card ul li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ---- PROJECTS SECTION ---- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition);
    position: relative;
    box-shadow: var(--card-shadow);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-content {
    padding: 2.5rem;
}

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-content h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.project-content p {
    color: var(--text-secondary);
}

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

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 60px;
}

.timeline-dot {
    position: absolute;
    top: 5px;
    left: 11px;
    width: 20px;
    height: 20px;
    background: var(--bg-color);
    border: 4px solid var(--accent-color);
    border-radius: 50%;
    z-index: 2;
}

.timeline-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: transform var(--transition);
}

.timeline-content:hover {
    transform: translateX(10px);
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.timeline-date {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: rgba(var(--text-secondary), 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.timeline-content ul {
    list-style-type: disc;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

/* ---- SERVICES SECTION ---- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--surface-color);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all var(--transition);
}

.service-card:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-5px);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    transition: color var(--transition);
}

.service-card:hover .service-icon,
.service-card:hover p {
    color: white;
}

.service-card h3 {
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
}

/* ---- OBJECTIVE SECTION ---- */
.objective-card {
    background: var(--surface-color);
    padding: 4rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.objective-card::before {
    content: '"';
    position: absolute;
    top: 2rem;
    left: 2rem;
    font-size: 8rem;
    color: rgba(59, 130, 246, 0.1);
    font-family: serif;
    line-height: 1;
}

.objective-card p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ---- CONTACT SECTION ---- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    font-family: var(--font-primary);
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.submit-btn {
    align-self: flex-start;
}

.contact-info {
    background: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    height: fit-content;
    word-break: break-word;
}

.contact-info h3 {
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-details {
    list-style: none;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-details li i {
    color: var(--accent-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.contact-details li a {
    color: var(--text-secondary);
    transition: color var(--transition);
}

.contact-details li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-primary);
    transition: all var(--transition);
}

.social-link:hover {
    background: var(--gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
}

/* ---- FOOTER ---- */
footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
}

.back-to-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color var(--transition);
}

.back-to-top:hover {
    color: var(--accent-color);
}

/* ---- ANIMATIONS ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 968px) {

    .about-content,
    .contact-wrapper {
        grid-template-columns: minmax(0, 1fr);
        gap: 3rem;
    }

    .about-image-placeholder {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .theme-toggle {
        margin-left: auto;
        margin-right: 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--surface-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: right var(--transition);
    }

    .nav-links.active {
        right: 0;
    }

    .hero {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .section {
        padding: 4rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.2rem;
    }

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

    .objective-card {
        padding: 2.5rem 1.5rem;
    }

    .objective-card::before {
        font-size: 5rem;
        top: 0.5rem;
        left: 0.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}