:root[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.08);
    --card-bg: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --accent-glow: rgba(0, 0, 0, 0.05);
    --timeline-line: #ff8c00;
}

:root[data-theme="dark"] {
    --bg-primary: #070314;
    --bg-secondary: #0f0a28;
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.12);
    --card-bg: rgba(255, 255, 255, 0.04);
    --nav-bg: rgba(7, 3, 20, 0.9);
    --accent-glow: rgba(0, 242, 254, 0.2);
    --timeline-line: #ff8c00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    padding: 0.8rem 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.header-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-name-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo img {
    height: 90px;
    width: 90px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ff8c00;
}


.header-right-controls {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
}

nav ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 8px 0;
}

nav ul li a:hover, nav ul li a.active {
    color: #ff8c00;
}

.theme-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    border-color: #ff8c00;
    color: #ff8c00;
}

/* Hidden on desktop */
.mobile-nav-bar {
    display: none;
}

/* Main Container Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 100px;
}

section {
    padding: 70px 0;
    border-bottom: 1px solid var(--glass-border);
}

h2.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

h2.section-title i {
    color: #ff8c00;
}

/* HOME Section */
.home-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: calc(100vh - 120px);
    gap: 40px;
}

.home-content {
    flex: 1.3;
}

.welcome-badge {
    display: inline-block;
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid #ff8c00;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: #ff8c00;
    font-weight: 600;
}

.home-content h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--text-main);
}

.home-content h1 span {
    color: #ff8c00;
}

.subtitle {
    font-size: clamp(1.2rem, 1.5vw, 1.3rem);
    color: var(--text-muted);
    margin-bottom: 25px;
    font-family: 'Fira Code', monospace;
    font-weight: 600;
}

.highlights-list {
    list-style: none;
    margin-bottom: 30px;
}

.highlights-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}

.highlights-list li i {
    color: #ff8c00;
}

.social-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icons a {
    width: 45px;
    height: 45px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: #ff8c00;
    color: #ffffff;
    border-color: #ff8c00;
    transform: translateY(-4px);
}

.profile-image {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.profile-image img {
    width: min(400px, 90vw);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.5));
}

.connect-btn {
    margin-top: 25px;
    background: #ff8c00;
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

.connect-btn:hover {
    transform: scale(1.05);
    background: #e07b00;
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px var(--accent-glow);
}

/* ABOUT Section */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    align-items: center;
}

.about-image {
    width: 350px;
    height: 350px;
    transform: rotate(45deg);
    overflow: hidden;
    border: 2px solid #ff8c00;
    border-radius: 20px;
    margin: 40px auto;
}

.about-image img {
    width: 142%;
    height: 142%;
    object-fit: cover;
    transform: rotate(-45deg);
    position: relative;
    top: -21%;
    left: -21%;
}

.about-description p {
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.about-description strong {
    color: var(--text-main);
}

/* EDUCATION Section */
.education-container {
    max-width: 1400px;
    margin: 0 auto;
}

.education-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    box-shadow: 0 12px 35px var(--accent-glow);
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.education-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    min-width: 1000px;
}

/* Mobile Education Card Divider Lines */
@media (max-width: 768px) {
    .education-table td {
        border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Adjust opacity for desired visibility */
        padding: 14px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    .education-table td:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .education-table td {
        border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    }
    .education-table td:last-child {
        border-bottom: none !important;
    }
}

.education-table th, .education-table td,.education-table tr {
    padding: 32px 26px;
    border-bottom: 1px solid var(--glass-border);
    font-size: 1.1rem;
    color: var(--text-main);
    vertical-align: middle;
    text-align: center;
}

.education-table th {
    font-weight: 700;
    color: #ff8c00;
    background: rgba(255, 140, 0, 0.08);
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
}

.education-table tr:last-child td {
    border-bottom: none;
}

.education-table tbody tr {
    transition: background-color 0.3s ease;
}

.education-table tbody tr:hover {
    background-color: var(--accent-glow);
}

.edu-table-period {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    color: #ff8c00;
    white-space: nowrap;
    font-size: 1.15rem;
}

.edu-table-degree {
    font-weight: 700;
    font-size: 1.2rem;
}

.edu-table-stream {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.edu-table-inst, .edu-table-board-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

.edu-table-inst img, .edu-table-board-cell img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 8px;
    border-radius: 18px;
    border: 3px solid #ff8c00;
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.35);
}

/* EXPERIENCE SECTION LAYOUT */
.experience-section-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.exp-timeline {
    position: relative;
    margin: 0 auto;
    padding: 20px 0;
}

.exp-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background-color: var(--timeline-line);
}

.exp-timeline-item {
    position: relative;
    margin-bottom: 45px;
    width: 100%;
    display: flex;
    align-items: center;
}

.exp-timeline-content {
    width: 44%;
    background-color: #ff8c00;
    color: #ffffff;
    padding: 22px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.25);
    position: relative;
    transition: transform 0.3s ease;
}

.exp-timeline-content:hover {
    transform: translateY(-4px);
}

.exp-timeline-item.left {
    justify-content: flex-start;
}
.exp-timeline-item.left .exp-timeline-content {
    margin-right: auto;
    margin-left: 0;
}
.exp-timeline-item.left .exp-timeline-content::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -12px;
    transform: translateY(-50%);
    border-width: 10px 0 10px 12px;
    border-style: solid;
    border-color: transparent transparent transparent #ff8c00;
}

.exp-timeline-item.right {
    justify-content: flex-end;
}
.exp-timeline-item.right .exp-timeline-content {
    margin-left: auto;
    margin-right: 0;
}
.exp-timeline-item.right .exp-timeline-content::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -12px;
    transform: translateY(-50%);
    border-width: 10px 12px 10px 0;
    border-style: solid;
    border-color: transparent #ff8c00 transparent transparent;
}

.exp-node-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    background-color: #ffffff;
    color: #ff8c00;
    border: 3px solid #ff8c00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.exp-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 5px;
    font-family: 'Outfit', sans-serif;
}

.exp-company {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 0.95;
}

.exp-date {
    font-size: 0.85rem;
    font-family: 'Fira Code', monospace;
    opacity: 0.9;
}

/* SKILLS Section */
.skills-container-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.skill-category-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 25px var(--accent-glow);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-category-card:hover {
    transform: translateY(-5px);
    border-color: #ff8c00;
}

.skill-cat-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid rgba(255, 140, 0, 0.2);
    padding-bottom: 10px;
}

.skill-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.skill-badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 10px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.skill-badge-item:hover {
    border-color: #ff8c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.15);
}

.skill-badge-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.skill-badge-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

/* ACHIEVEMENTS Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.achievement-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 8px 25px var(--accent-glow);
}

.achievement-item:hover {
    transform: translateY(-6px);
    border-color: #ff8c00;
}

.achievement-item img {
    width: 100%;
    height: 190px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 8px;
}

.achievement-content {
    padding: 20px;
}

.achievement-description {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.achievement-details {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.achievement-details strong {
    color: #ff8c00;
}

/* PROJECTS Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px var(--accent-glow);
}

.project-item:hover {
    transform: translateY(-6px);
    border-color: #ff8c00;
}

.project-item img {
    width: 100%;
    height: 190px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 8px;
}

.project-info {
    padding: 20px;
}

.project-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-main);
}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.live-project-btn, 
.github-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid;
}

.live-project-btn {
    background: rgba(255, 140, 0, 0.15);
    border-color: #ff8c00;
    color: #ff8c00;
}

.live-project-btn:hover {
    background: #ff8c00;
    color: #ffffff;
}

:root[data-theme="light"] .github-btn {
    background: rgba(30, 41, 59, 0.08);
    border-color: #1e293b;
    color: #1e293b;
}

:root[data-theme="light"] .github-btn:hover {
    background: #1e293b;
    color: #ffffff;
}

:root[data-theme="dark"] .github-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

:root[data-theme="dark"] .github-btn:hover {
    background: #ffffff;
    color: #000000;
}

/* CONTACT Section */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 35px var(--accent-glow);
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.input-group:focus-within {
    border-color: #ff8c00;
}

.input-group i {
    color: #ff8c00;
    margin-right: 12px;
    font-size: 1.1rem;
}

.contact-input, .contact-textarea {
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-main);
    font-size: 1rem;
    width: 100%;
    font-family: 'Outfit', sans-serif;
}

.contact-textarea {
    resize: vertical;
    height: 120px;
}

.send-btn {
    width: 100%;
    padding: 14px;
    background: #ff8c00;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background: #e07b00;
    transform: translateY(-2px);
}

.success-message {
    display: none;
    text-align: center;
    color: #10b981;
    margin-top: 15px;
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer strong {
    color: #ff8c00;
}

/* RESPONSIVE MEDIA QUERIES (Tablets, Laptops, Phones) */
@media (max-width: 1024px) {
    .home-container, .about-container {
        gap: 30px;
    }
    .skills-container-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        width: 92%;
    }
    
    /* Hide desktop nav list */
    nav ul {
        display: none;
    }

    /* Show Diptronic-style category navigation scroll bar on mobile with direct links */
    .mobile-nav-bar {
        display: block;
        width: 100%;
        background: var(--nav-bg);
        border-bottom: 1px solid var(--glass-border);
        padding: 8px 12px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .mobile-nav-track {
        display: inline-flex;
        gap: 12px;
    }
    .mobile-nav-track a {
        display: inline-block;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        padding: 6px 14px;
        border-radius: 20px;
        color: var(--text-main);
        text-decoration: none;
        font-size: 0.85rem;
        font-weight: 600;
        font-family: 'Outfit', sans-serif;
        box-shadow: 0 4px 12px var(--accent-glow);
        transition: all 0.3s ease;
    }
    .mobile-nav-track a:hover {
        border-color: #ff8c00;
        color: #ff8c00;
    }

    .home-container, .about-container {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding-top: 20px;
    }
    .home-content {
        order: 2;
    }
    .profile-image {
        order: 1;
        margin-bottom: 20px;
    }
    
    /* Make About Me Mobile Friendly: Stack Image on top of Card */
    .about-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .about-image {
        margin: 10px auto;
        width: 250px;
        height: 250px;
    }
    .about-content {
        text-align: left;
    }

    .highlights-list li {
        justify-content: center;
    }
    .social-icons {
        justify-content: center;
    }
    .skills-container-grid {
        grid-template-columns: 1fr;
    }
    
    /* Convert Timeline to Single Column Stack on Mobile */
    .exp-timeline::before {
        left: 20px;
    }
    .exp-timeline-item {
        justify-content: flex-end !important;
    }
    .exp-timeline-content {
        width: 85% !important;
        margin-left: auto !important;
        margin-right: 0 !important;
    }
    .exp-timeline-item.left .exp-timeline-content::after,
    .exp-timeline-item.right .exp-timeline-content::after {
        left: -12px;
        right: auto;
        border-width: 10px 12px 10px 0;
        border-color: transparent #ff8c00 transparent transparent;
    }
    .exp-node-icon {
        left: 20px !important;
    }

    /* Convert Education Table into Centered Mobile-Friendly Cards with Dividers for all rows */
    .education-table-wrapper {
        padding: 10px;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    .education-table, .education-table tbody, .education-table tr, .education-table td {
        display: block;
        width: 100%;
        min-width: auto !important;
        text-align: center;
    }
    .education-table thead {
        display: none;
    }
    .education-table tr {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 16px;
        margin-bottom: 20px;
        padding: 20px;
        box-shadow: 0 8px 25px var(--accent-glow);
    }
    .education-table td {
        padding: 14px 0;
        border-bottom: 1px solid var(--glass-border);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    .education-table td:last-child {
        border-bottom: none;
    }
    .edu-table-inst, .edu-table-board-cell {
        align-items: center;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        width: 94%;
        padding-top: 70px;
    }
    section {
        padding: 50px 0;
    }
    .contact-form {
        padding: 20px;
    }
    .skill-items-grid {
        grid-template-columns: 1fr;
    }
    .about-image {
        width: 200px;
        height: 200px;
    }
}