/* ==============================
   Base Styles
   ============================== */
body {
    background-color: #0f172a;
    color: #e5e7eb;
    font-family: 'Segoe UI', sans-serif;
    padding-top: 70px; /* fixed navbar offset */
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    transition: color 0.3s;
}

/* ==============================
   Navbar
   ============================== */
.navbar {
    background-color: rgba(15, 23, 42, 0.9);
    transition: background-color 0.3s;
}

.navbar .navbar-brand {
    color: #ffffff !important;
    font-weight: bold;
}

.navbar .nav-link {
    color: #e5e7eb;
    margin-left: 15px;
    transition: color 0.3s;
}

/* ==============================
   Hero Section
   ============================== */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
}

.hero-desc {
    color: #cbd5f5;
}

/* ==============================
   Buttons
   ============================== */
.btn-primary {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border: none;
    color: #fff;
    transition: all 0.3s;
}

.btn-primary:hover { opacity: 0.9; }

.btn-outline-light {
    color: #fff;
    border-color: #fff;
    transition: all 0.3s;
}

.btn-outline-light:hover {
    background-color: #fff;
    color: #0f172a;
}

.btn-outline-primary {
    color: #6366f1;
    border-color: #6366f1;
}

.btn-outline-primary:hover {
    background-color: #6366f1;
    color: #fff;
}

/* ==============================
   Skills Section
   ============================== */
.skills {
    padding: 80px 0;
}

.skills h3 {
    text-align: center;
    margin-bottom: 30px;
}

.progress {
    height: 22px;
    background-color: #334155;
    border-radius: 12px;
    overflow: hidden;
    transition: background-color 0.3s;
}

.progress-bar {
    height: 100%;
    line-height: 22px;
    color: #fff;
    text-align: center;
    font-weight: bold;
    transition: width 1s, color 0.3s;
}

/* ==============================
   Project & Certificate Cards
   ============================== */
.project-card {
    background-color: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    border: none;
    position: relative;
    min-height: 350px;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s, color 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.project-card img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

/* Overlay Button */
.project-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(15,23,42,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s;
    border-radius: 12px;
}

.project-card:hover .overlay {
    opacity: 1;
    background-color: rgba(15, 23, 42, 0.8);
}

.project-card .overlay a {
   color: #ffffff !important;       /* White text in dark mode */
    background-color: rgba(99,102,241,0.9); /* visible button background */
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}
.project-card .overlay a:hover {
    background-color: #4f46e5;
    color: #fff;
}

/* Card Text */
.project-card .card-body h5,
.project-card .card-body p {
    color: #e5e7eb;
    transition: color 0.3s;
}

.project-card .badge {
    margin-right: 5px;
    color: #fff;
}

.project-card .tech-used {
    font-size: 0.85rem;
    color: #cbd5f5 !important;
}

/* About Section Images */
.about img {
    border-radius: 50%;
    transition: filter 0.3s;
}

/* Contact Section Links */
.contact a {
    color: #6366f1;
    text-decoration: underline;
}

/* ==============================
   Light Mode
   ============================== */
body.light {
    background-color: #f8fafc;
    color: #0f172a;
}

body.light h1, body.light h2, body.light h3, body.light p, body.light .tech-used {
    color: #0f172a;
}

body.light .navbar {
    background-color: #ffffff !important;
}

body.light .navbar .navbar-brand {
    color: #0f172a !important;
}

body.light .navbar .nav-link {
    color: #0f172a !important;
}

body.light .hero {
    background: linear-gradient(135deg, #e0e7ff, #f8fafc);
}

body.light .hero-desc {
    color: #475569;
}

body.light .btn-primary {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    color: #fff;
}

body.light .btn-outline-light {
    color: #0f172a;
    border-color: #0f172a;
}

body.light .btn-outline-light:hover {
    background-color: #0f172a;
    color: #fff;
}

body.light .btn-outline-primary {
    color: #6366f1;
    border-color: #6366f1;
}

body.light .btn-outline-primary:hover {
    background-color: #6366f1;
    color: #fff;
}

body.light .progress {
    background-color: #e2e8f0;
}

body.light .progress-bar {
    color: #0f172a;
}

body.light .project-card {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

body.light .project-card .card-body h5,
body.light .project-card .card-body p {
    color: #0f172a;
}

body.light .project-card .overlay {
    background-color: rgba(255,255,255,0.7);
}

body.light .project-card .overlay a {
     color: #0f172a !important;    /* dark text on light overlay */
    background-color: #8b5cf6;
}

body.light .project-card .overlay a:hover {
    background-color: #6366f1;
    color: #fff;
}

body.light .project-card .badge {
    color: #0f172a;
}

body.light .contact a {
    color: #4f46e5;
}

/* ==============================
   Badge Colors for Light Mode
   ============================== */
body.light .badge.bg-primary {
    background-color: #6366f1 !important;
    color: #fff !important;
}

body.light .badge.bg-secondary {
    background-color: #64748b !important;
    color: #fff !important;
}

body.light .badge.bg-success {
    background-color: #16a34a !important;
    color: #fff !important;
}

body.light .badge.bg-info {
    background-color: #0ea5e9 !important;
    color: #fff !important;
}

body.light .badge.bg-warning {
    background-color: #facc15 !important;
    color: #000 !important; /* dark text for yellow */
}

body.light .badge.bg-dark {
    background-color: #334155 !important;
    color: #fff !important;
}

.hero-img-wrapper {
    max-width: 250px;  /* limits image size on desktop */
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero-img-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px #6366f1;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@media (max-width: 767px) {
    .hero-img-wrapper {
        max-width: 180px;  /* smaller on mobile */
        margin-top: 20px;
    }
}

body.light .project-card .tech-used {
    color: #475569 !important;    /* dark text for tech used in light mode */
}

/* Navbar toggler icon for light mode */
body.light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0,0,0,0.7)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}