/* Global variables for consistent design */
:root {
    --primary-color: #2563eb;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

/* Base styles reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

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

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Hero Section Styling */
.hero {
    background-color: var(--dark-bg);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    letter-spacing: -1px;
}

.hero h2 {
    color: #94a3b8;
    font-weight: 400;
    margin: 10px 0 20px;
}

.hero p {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
    color: #cbd5e1;
}

/* Button & Link styles */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Titles */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin: 60px 0 40px;
}

/* Grid Layouts for Projects and Gallery */
.project-grid, .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* Project Card styles */
.project-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.badge {
    align-self: flex-start;
    background: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.tech-stack {
    margin: 20px 0;
}

.tech-stack span {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-right: 5px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 5px;
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    margin-top: auto;
}

/* Gallery and Certificate card styles */
#certifications {
    padding-bottom: 100px;
}

.gallery-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.image-container {
    width: 100%;
    height: 240px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cert-image {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    padding: 10px;
    transition: transform 0.5s ease;
    cursor: pointer; /* Indicates the image is clickable */
}

.gallery-card:hover .cert-image {
    transform: scale(1.05);
}

.gallery-info {
    padding: 20px;
    text-align: center;
    background: white;
}

.gallery-info h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.gallery-info p {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
}

/* Preview Modal (Lightbox) Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.95); /* Darker backdrop */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    animation: zoom 0.3s ease;
}

@keyframes zoom {
    from {transform: scale(0.7); opacity: 0;} 
    to {transform: scale(1); opacity: 1;}
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--primary-color);
}

#caption {
    margin-top: 20px;
    color: #cbd5e1;
    font-size: 1.2rem;
    text-align: center;
}

/* Footer Section styling */
footer {
    text-align: center;
    padding: 40px;
    background: var(--dark-bg);
    color: #64748b;
}