/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-nav: #0a0a0a;

    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;

    --accent: #ff9800;
    /* Industrial Orange */
    --accent-hover: #e68900;
    --border: #333;

    --font-heading: 'Space Mono', monospace;
    --font-body: 'Roboto', sans-serif;

    --container-width: 1100px;
}

body.light-mode {
    --bg-dark: #f8f9fa;
    --bg-card: #ffffff;
    --bg-nav: #ffffff;

    --text-main: #121212;
    --text-muted: #555555;

    --accent: #e65100;
    /* Darker orange for better contrast on light bg */
    --accent-hover: #ff9800;
    --border: #e0e0e0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* =========================================
   2. UTILITIES & LAYOUT
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 10px auto 0;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    border: 2px solid var(--accent);
    color: var(--accent);
    margin-left: 10px;
}

.btn-secondary:hover {
    background: var(--accent);
    color: #fff;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
.navbar {
    background: var(--bg-nav);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 15px;
    transition: color 0.3s ease;
}

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

.lang-selector {
    margin-left: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.lang-btn:hover {
    color: var(--text-main);
}

.lang-btn.active {
    color: var(--accent);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom-color: transparent;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: bold;
}

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

.nav-links li a {
    font-size: 0.95rem;
    color: var(--text-main);
}

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

.btn-highlight {
    border: 1px solid var(--accent);
    padding: 5px 15px;
    border-radius: 4px;
    color: var(--accent) !important;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at center, #1b1b1b 0%, var(--bg-dark) 100%);
    padding-top: 60px;
    /* Offset for fixed nav */
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.greeting {
    font-family: var(--font-heading);
    color: var(--accent);
    margin-bottom: 10px;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero-text h2 {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-bottom: 20px;
}

.bio-short {
    max-width: 500px;
    color: #ccc;
    margin-bottom: 30px;
}

.img-wrapper {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
    margin: 0 auto;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.2);
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   5. ABOUT SECTION
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.about-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
}

.about-card h3 {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.about-info ul {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.about-info li {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.about-info .label {
    font-weight: bold;
    color: var(--accent);
}

.about-info .email-text {
    word-break: break-all;
    /* Prevents overflow */
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    font-size: 1.5rem;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* =========================================
   6. EXPERIENCE (TIMELINE)
   ========================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

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

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

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

.timeline-dot.educational {
    background: #2196f3;
    /* Different color for education */
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.company {
    display: block;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.company i {
    margin-right: 5px;
    color: var(--accent);
}

/* =========================================
   7. SKILLS
   ========================================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 8px;
    border-top: 3px solid var(--accent);
}

.skill-category h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.skill-bar .info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.skill-bar .bar {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

.skill-bar .bar span {
    display: block;
    height: 100%;
    background: var(--accent);
}

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

.skill-tags span {
    background: var(--bg-nav);
    color: var(--text-main);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

/* =========================================
   8. PROJECTS
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid var(--border);
}

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

.project-img {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.project-img>img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    /* Changed to top to show app headers */
    transition: transform 0.5s ease;
    display: block;
}

.project-card:hover .project-img>img {
    transform: scale(1.05);
    /* Slight zoom effect on hover */
}

.project-img .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .overlay {
    opacity: 1;
}

.project-img .overlay i {
    font-size: 3rem;
    color: var(--accent);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.tech-stack {
    margin-bottom: 15px;
}

.tech-stack span {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.project-links {
    margin-top: 15px;
}

.project-links a {
    display: inline-block;
    font-size: 0.85rem;
}

/* =========================================
   8.5. CONTACT
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 8px;
    border-top: 3px solid var(--accent);
}

.contact-info h3 {
    margin-bottom: 15px;
    color: var(--accent);
}

.contact-info p {
    margin-bottom: 25px;
    color: var(--text-muted);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-body);
    transition: border-color 0.3s;
}

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

/* =========================================
   9. FOOTER
   ========================================= */
footer {
    background: var(--bg-nav);
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Utility classes for Scroll Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   10. RESPONSIVE (MEDIA QUERIES)
   ========================================= */
@media (max-width: 900px) {
    .container {
        width: 100%;
        /* Fix width */
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }

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

    .bio-short {
        margin: 0 auto 30px;
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu hidden by default */
        position: absolute;
        top: 60px;
        right: 0;
        background: var(--bg-nav);
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 20px 0;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
        color: var(--text-main);
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 0;
    }

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

    .timeline-dot {
        left: -9px;
    }

    /* Prevent Overlaps */
    .about-info li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}