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

body {
    background-color: #1e1e1e;
    font-family: sans-serif;
    color: #a0a0a0;
    line-height: 1.6;
}

.main-container {
    display: grid;
    max-width: 1200px;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    padding: 40px 20px;
    margin: auto;
}

.sidebar {
    height: fit-content;
    background-color: #2a2a2a;
    padding: 40px;
    position: sticky;
    top: 40px;
    border-radius: 16px;
    border: 1px solid #3a3a3a;
}

.main-content {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 16px;
    padding: 40px;
}

.profile {
    text-align: center;
}

.profile img {
    height: 120px;
    width: 120px;
    border-radius: 50%;
    border: 1px solid #3a3a3a;
    object-fit: cover;
}

.profile h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 20px;
    color: #e0e0e0;
}

.profile p {
    background-color: #1e1e1e;
    padding: 5px 15px;
    color: #FFBF00;
    border: 1px solid #3a3a3a;
    font-size: 0.8rem;
    border-radius: 8px;
    display: inline-block;
    margin-top: 10px;
}

.contact {
    margin-top: 20px;
    border-top: 2px solid #3a3a3a;
    padding-top: 20px;
}

.label {
    font-weight: 500;
    font-size: 0.8rem;
    color: #a0a0a0;
    margin-top: 10px;
}

.value {
    color: #e0e0e0;
    text-decoration: none;
    word-break: break-all; /* Prevents long emails from escaping layout fields */
}

.email, .phone, .location {
    margin-bottom: 15px;
}

.social {
    margin-top: 30px;
    border-top: 2px solid #3a3a3a;
    padding-top: 20px;
    text-align: center;
}

.social img {
    height: 24px;
    width: 24px;
    margin: 0 5px;
    
    transition: filter 0.3s ease;
}

.social img:hover {
    filter: grayscale(1) invert(0.7);
}

#navigation {
    border-bottom: 2px solid #3a3a3a;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

nav {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    flex-wrap: wrap; /* Keeps nav readable on tiny screens */
}

nav a {
    text-decoration: none;
    color: #a0a0a0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.active, nav a:hover {
    color: #FFBF00;
}

.heading {
    color: #e0e0e0;
    font-size: 2rem;
    margin-bottom: 15px;
    text-transform: capitalize;
}

.line {
    width: 60px;
    height: 5px;
    background-color: #FFBF00;
    margin-bottom: 15px;
}

.content {
    text-align: justify;
    color: #a0a0a0;
}

#about {
    margin-bottom: 40px;
}

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

.item {
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #3a3a3a;
    background-color: #1e1e1e;
    text-align: center;
    margin-top: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item img {
    height: 48px;
    width: 48px;
    filter: invert(75%) sepia(50%) saturate(1000%) hue-rotate(350deg) brightness(110%) contrast(101%);
}

.item h3 {
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 500;
}

.item:hover {
    transform: scale(1.05);
    box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.3);
}

#education {
    margin-top: 20px;
}

.edtech {
    position: relative;
    margin-top: 20px;
}

.year {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-bottom: 5px;
}

.degree {
    color: #e0e0e0;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.college {
    font-style: italic;
    color: #a0a0a0;
    margin-bottom: 10px;
}

.work {
    color: #a0a0a0;
}

.edfirst, .edsecond {
    margin-bottom: 30px;
    padding-left: 25px;
    position: relative;
}

.goal {
    height: 15px;
    width: 15px;
    border-radius: 50%;
    border: 3px solid #FFBF00;
    position: absolute;
    top: 5px;
    left: 0px;
    z-index: 5;
    background-color: #2a2a2a;
}

.liner {
    position: absolute;
    width: 2px;
    top: 0px;
    bottom: 0px;
    border: 1px solid #3a3a3a;
    left: 6px;
}

.project-container {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.project {
    background-color: #1e1e1e;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.project:hover {
    transform: translateY(-10px);
    box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.3);
}

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

.card {
    padding: 20px;
}

.card h3 {
    color: #e0e0e0;
    margin-bottom: 10px;
}

.card p {
    color: #a0a0a0;
    line-height: 1.6;
    margin-top: 15px;
    margin-bottom: 15px;
}

.card span {
    background-color: rgba(255, 191, 0, 0.1);
    color: #FFBF00;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
    margin-right: 5px;
    display: inline-block;
    margin-top: 5px;
}

/* --- CONTACT FORM --- */
#contact {
    margin-top: 40px;
    margin-bottom: 20px;
}

.contact-container {
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    background-color: #1e1e1e;
    border: 1px solid #3a3a3a;
    width: 90%;
}

.contact-subtitle {
    margin-bottom: 10px;
}

.contact-form .form-group {
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease, box-shadow 0.5 ease;
}

.contact-form .form-group:hover {
    color: #FFBF00;
    transform: scale(1.1);
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #e0e0e0;
    color: #1e1e1e;
    transition: border-color 0.3s ease;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none;
    border-color: #FFBF00;
}

.submit-btn {
    background: #FFBF00;
    color: #1e1e1e;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background: #a0a0a0;
    transform: scale(1.1);
}

#form-result {
    margin-top: 15px;
    font-weight: 500;
}

/* --- RESPONSIVE MEDIA QUERIES --- */

/* Laptop / Desktop breakpoint optimization */
@media screen and (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .sidebar {
        position: static;
        width: 100%;
    }
}

/* Tablet viewports */
@media screen and (max-width: 768px) {
    .main-content {
        padding: 25px;
    }
    nav {
        justify-content: center;
    }
    .project-container {
        grid-template-columns: 1fr;
    }
}

/* Mobile smartphones */
@media screen and (max-width: 480px) {
    .main-container {
        padding: 15px 10px;
    }
    .sidebar, .main-content {
        padding: 20px;
    }
    nav {
        gap: 12px;
    }
    nav a {
        font-size: 0.9rem;
    }
    .heading {
        font-size: 1.6rem;
    }
    .contact-container {
        padding: 15px;
    }
}
body.light-mode {
    background-color: #f4f4f4;
    color: #4a4a4a;
}

body.light-mode .sidebar,
body.light-mode .main-content {
    background-color: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.light-mode .profile h2,
body.light-mode .heading,
body.light-mode .degree,
body.light-mode .card h3,
body.light-mode .value {
    color: #1e1e1e;
}

body.light-mode .profile p,
body.light-mode .item,
body.light-mode .project,
body.light-mode .contact-container {
    background-color: #fcfcfc;
    border-color: #e0e0e0;
}

body.light-mode .goal {
    background-color: #ffffff;
}

body.light-mode #theme-toggle {
    color: #4a4a4a !important;
}

body.light-mode #theme-toggle:hover {
    color: #FFBF00 !important;
}