:root {
    --bg-main: #0a0a0a;
    --bg-card: #171717;
    --bg-card-hover: #1f1f1f;
    --text-main: #fafafa;
    --text-muted: #a3a3a3;
    --accent: #f46c38;
    /* Orange matching the image */
    --accent-hover: #ea580c;
    --border-color: rgba(255, 255, 255, 0.05);
    --radius-lg: 2rem;
    --radius-md: 1.5rem;
    --radius-sm: 1rem;
    --transition: all 0.3s ease;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* offset for fixed navbar */
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

/* --- Navbar --- */
.navbar {
    padding: 2rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 1rem 0;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-brand img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

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

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

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

.btn-nav {
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-nav:hover {
    background-color: var(--text-main);
    color: var(--bg-main);
}

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

/* --- Layout & Typography --- */
section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: var(--transition);
}

.card:hover {
    background-color: var(--bg-card-hover);
}

/* --- Hero Bento Grid --- */
.hero {
    padding-top: 8rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr 2.2fr;
    gap: 1.5rem;
}

/* Profile Card */
.profile-card {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-img-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.profile-bg-circle {
    position: absolute;
    bottom: 10px;
    width: 100%;
    height: 100%;
    background-color: var(--accent);
    border-radius: 50%;
    z-index: 1;
}

.profile-img-wrapper img {
    position: relative;
    z-index: 2;
    width: 90%;
    border-radius: 0 0 50% 50%;
    /* if needed depending on image */
}

.profile-name {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.profile-role {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-icons a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-main);
}

.social-icons a:hover {
    background-color: var(--text-main);
    color: var(--bg-main);
    transform: translateY(-3px);
}

/* Intro Card */
.intro-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-greeting {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.intro-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    /* Green */
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background-color: var(--accent);
    color: #fff;
    padding: 0.8rem 1.8rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    border: none;
    cursor: pointer;
    width: max-content;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Experience Card */
.experience-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.experience-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    font-weight: 500;
}

.companies-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    align-items: center;
    opacity: 0.6;
}

.companies-grid i {
    font-size: 2.5rem;
    transition: var(--transition);
}

.companies-grid i:hover {
    color: var(--text-main);
    transform: scale(1.1);
}

.exp-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1rem;
}

.exp-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.exp-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.exp-role {
    font-size: 1.1rem;
    font-weight: 500;
}

.exp-company {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.exp-date {
    color: var(--accent);
    font-size: 0.9rem;
}

/* --- Skills Slider Section --- */
.skills-slider-container {
    width: 100%;
    overflow: hidden;
    /* Fade edges for a premium look */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    padding: 1rem 0;
}

.skills-slider {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: slide-left 35s linear infinite;
}

.skills-slider:hover {
    animation-play-state: paused;
}

@keyframes slide-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.skill-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.8rem 2.2rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    flex-shrink: 0;
    min-width: 140px;
    cursor: default;
}

.skill-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 8px 30px rgba(244, 108, 56, 0.15);
}

.skill-icon {
    font-size: 2.8rem;
    color: var(--accent);
    margin-bottom: 0.8rem;
    display: block;
}

.skill-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.project-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    overflow: hidden;
}

.project-card:hover {
    background-color: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-links {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    gap: 0.8rem;
    z-index: 10;
}

.project-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
    font-size: 1.1rem;
    transition: var(--transition);
}

.project-links a:hover {
    background-color: var(--accent);
    transform: scale(1.1);
}

.project-img-box {
    width: 100%;
    height: 220px;
    background-color: #1a1a1a;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
    position: relative;
}

.project-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform 0.4s ease;
    display: block;
}

.project-card:hover .project-img-box img {
    transform: scale(1.05);
}

/* Fallback overlay shown when image is missing */
.project-img-box img[src=""],
.project-img-box img:not([src]) {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    color: var(--text-muted);
}

/* --- Contact Section --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 3rem;
}

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

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

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
    font-size: 1.2rem;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.contact-item p,
.contact-item a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.input-box {
    width: 100%;
}

.input-box input,
.input-box textarea {
    width: 100%;
    padding: 1.2rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.input-box textarea {
    resize: vertical;
    min-height: 150px;
}

.input-box input:focus,
.input-box textarea:focus {
    border-color: var(--accent);
}

/* --- Form Success Message --- */
.form-success-msg {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: var(--radius-sm);
    padding: 1.2rem 1.5rem;
    margin-top: 0.5rem;
    color: var(--text-main);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-8px);
    transition: opacity 0.4s ease, max-height 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.form-success-msg.show {
    opacity: 1;
    max-height: 120px;
    transform: translateY(0);
    pointer-events: auto;
}

.form-success-msg i {
    font-size: 1.8rem;
    color: #22c55e;
    flex-shrink: 0;
}

.form-success-msg strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.15rem;
    color: #22c55e;
}

.form-success-msg p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0;
}

/* --- About Section --- */
.about-section {
    background: linear-gradient(180deg, var(--bg-main) 0%, #0d0d0d 100%);
}

.about-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.about-bio {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.about-highlight {
    color: #22d3ee;
    font-weight: 600;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.stat-value {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    color: #22d3ee;
    line-height: 1;
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.4);
}

.stat-suffix {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: #22d3ee;
    line-height: 1;
    margin-left: -4px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0.4rem;
}

/* --- Footer --- */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

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

/* =============================================
   RESPONSIVE — Complete Overhaul
   ============================================= */

/* Tablets: 992px and below */
@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .profile-card {
        grid-row: auto;
    }

    .intro-title {
        font-size: 2.4rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-stats {
        gap: 2.5rem;
    }
}

/* Mobile: 768px and below */
@media (max-width: 768px) {

    /* Navbar */
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background-color: rgba(10, 10, 10, 0.97);
        backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: center;
        padding: 2.5rem 0;
        gap: 1.8rem;
        border-bottom: 1px solid var(--border-color);
        transition: left 0.4s ease;
        z-index: 999;
    }

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

    .hamburger {
        display: block;
    }

    .btn-nav {
        display: none;
    }

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

    .section-subtitle {
        font-size: 1rem;
    }

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

    /* Hero */
    .hero {
        padding-top: 6rem;
    }

    .bento-grid {
        gap: 1rem;
    }

    .card {
        padding: 2rem 1.5rem;
    }

    .profile-img-wrapper {
        width: 180px;
        height: 180px;
    }

    .profile-name {
        font-size: 1.8rem;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    /* About stats */
    .about-stats {
        gap: 2rem;
    }

    .stat-number {
        font-size: 2.8rem;
    }

    .stat-suffix {
        font-size: 2rem;
    }

    .about-bio {
        font-size: 1.05rem;
    }

    /* Contact */
    .contact-container {
        padding: 1.5rem;
        gap: 2rem;
    }

    .contact-info h3 {
        font-size: 2rem;
    }

    /* Exp items */
    .exp-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
}

/* Small phones: 480px and below */
@media (max-width: 480px) {
    .container {
        width: 95%;
    }

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

    .intro-title {
        font-size: 1.7rem;
    }

    .nav-brand {
        font-size: 1.4rem;
    }

    .nav-brand img {
        width: 32px;
        height: 32px;
    }

    .profile-img-wrapper {
        width: 150px;
        height: 150px;
    }

    .profile-name {
        font-size: 1.6rem;
    }

    .about-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .stat-suffix {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .card {
        padding: 1.5rem 1.2rem;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .project-img-box {
        height: 160px;
    }

    .skill-card {
        padding: 1.2rem 1.5rem;
        min-width: 110px;
    }

    .skill-icon {
        font-size: 2.2rem;
    }
}