/* Import Google Font - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #3498db; /* A nice blue */
    --secondary-color: #2ecc71; /* A green for accents */
    --dark-bg: #2c3e50; /* Dark background for header/footer */
    --light-bg: #ecf0f1; /* Light background for sections */
    --text-color: #34495e; /* Darker text */
    --light-text: #ecf0f1; /* Light text on dark backgrounds */
    --card-bg: #ffffff; /* White for project cards */
    --border-radius: 8px;
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 40px 0;
    text-align: center;
    box-shadow: var(--box-shadow);
}

header h1 {
    margin: 0;
    font-size: 3em;
    font-weight: 700;
}

header p {
    font-size: 1.2em;
    margin-top: 5px;
    opacity: 0.9;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Hero Section (About Me) */
.hero {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--card-bg);
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.hero h2 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 15px;
}

/* Projects Grid Styles */
.projects-grid {
    padding: 40px 0;
    background-color: var(--light-bg);
}

.projects-grid h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 40px;
}

.projects-grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    /* align-items: stretch; */
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project-card img {
    max-width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.project-card h3 {
    margin: 15px 0;
    color: var(--dark-bg);
}

.project-card p {
    flex-grow: 1; /* Makes the button stay at the bottom */
}

/* Global Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #2980b9;
}

/* Skills Section */
.skills-section {
    padding: 40px 0;
    background-color: var(--card-bg);
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.skills-section h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 40px;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 25px;
}

.skill-category h3 {
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.skill-category i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* Contact Section */
.contact-section {
    padding: 60px 20px;
    text-align: center;
    background-color: var(--card-bg);
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-section h2 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 20px;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.contact-btn {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-btn:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

/* Footer Styles */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text);
    text-align: center;
    padding: 20px 0;
}

/* --- Added Blog Content Styling --- */

.content-section {
    background-color: var(--card-bg);
    padding: 40px 20px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.content-section h2 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.content-section h3 {
    color: var(--dark-bg);
    font-size: 1.5em;
    margin-top: 25px;
    margin-bottom: 10px;
}

.content-section ul {
    list-style-type: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

.content-section li {
    margin-bottom: 10px;
    font-size: 1em;
    color: var(--text-color);
}

.content-section code {
    background-color: #e8e8e8;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-color);
}
.hero-image-container {
    display: flex;
    flex-direction: column; /* Stacks the image and caption vertically */
    align-items: center;    /* Centers items horizontally */
    justify-content: center;
    margin: 20px 0;         /* Adds some breathing room around the container */
    text-align: center;     /* Ensures the caption text itself is centered */
}

.hero-image-container img {
    max-width: 100%;        /* Prevents the image from overflowing the container */
    height: auto;           /* Maintains aspect ratio */
    border-radius: var(--border-radius); /* Keeps styling consistent with your project cards */
}
/* New styles for images and captions within the blog post */
.blog-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
}

.blog-image-container img {
    max-width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.image-caption {
    font-style: italic;
    font-size: 0.9em;
    color: #777;
    text-align: center;
}

/* --- Terminal-style code block --- */
.code-snippet {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 45px 20px 20px 20px; /* Increased top padding for labels and buttons */
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    overflow-x: auto;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    position: relative; /* Required for absolute positioning */
}

/* Small label moved to the TOP-LEFT */
.code-snippet::before {
    /* content: 'PYTHON';  */
    /* position: absolute; */
    top: 0;
    left: 0; /* Changed from right to left to avoid button */
    background-color: #333;
    color: #888;
    padding: 4px 12px;
    font-size: 0.75em;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom-right-radius: 8px; /* Flipped radius for left side placement */
    text-transform: uppercase;
    pointer-events: none;
}

/* Copy Button Styling */
.copy-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: #333;
    border: 1px solid #444;
    color: #d4d4d4;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75em;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.copy-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Active/Success state */
.copy-btn.copied {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.code-snippet code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-family: inherit;
}