/* --- Global Styles & Variables --- */
:root {
    --bg-dark: #0a192f;
    --text-light: #ccd6f6;
    --text-secondary: #8892b0;
    --accent-color: #64ffda;
    --card-bg: #112240;
}

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

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

h1, h2, h3 {
    color: var(--text-light);
    font-weight: 600;
}

h2 {
    text-align: center;
    font-size: 2.8em;
    margin-bottom: 40px;
    color: var(--accent-color);
}

/* --- Hero Section & Typing Effect --- */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    padding: 0 20px;
}

.hero h1 {
    font-size: 1.5em;
    font-weight: 300;
    color: var(--accent-color);
}

.hero h2 {
    font-size: 4em;
    margin: 10px 0;
    color: var(--text-light);
}

#typing-effect {
    border-right: 3px solid var(--accent-color);
    animation: blink-caret .75s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-color); }
}

.hero .hero-subtitle {
    font-size: 1.2em;
    max-width: 600px;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.cta-button {
    display: inline-block;
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

/* --- Sections & Animations --- */
section {
    padding: 80px 0;
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Hero fade-in animation */
.fade-in {
    animation: fadeIn 1.5s ease-in forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* --- Skills Section --- */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.skill-card {
    background: var(--card-bg);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1em;
    color: var(--text-secondary);
    border: 1px solid var(--accent-color);
    transition: transform 0.3s ease;
}
.skill-card:hover {
    transform: translateY(-5px);
}


/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.project-card h3 {
    margin-top: 0;
    color: var(--accent-color);
}

/* --- Contact & Footer --- */
#contact {
    text-align: center;
}

.contact-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--bg-dark);
    font-weight: bold;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background: var(--text-light);
}

footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
}

/* --- About Me Section with Image --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px; /* Space between image and text */
}

.about-image {
    flex: 1; /* Assigns 1 part of the space */
    min-width: 250px;
}

.about-image img {
    width: 100%;
    border-radius: 10px; /* Soft rounded corners */
    border: 2px solid var(--accent-color);
}

.about-text {
    flex: 2; /* Assigns 2 parts of the space, making text area wider */
}

/* --- Responsive styles for mobile --- */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column; /* Stacks image on top of text */
        text-align: center;
    }
}

/* --- Responsive styles for mobile --- */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column; /* Stacks image on top of text */
        text-align: center;
    }

    /* ---- FIX STARTS HERE ---- */
    .about-image {
        min-width: unset; /* Resets the minimum width requirement */
        width: 80%; /* Makes the image container take up 80% of the screen width */
        max-width: 350px; /* Ensures the image doesn't get too big on tablets */
        margin-bottom: 30px; /* Adds a nice space between the image and the text below it */
    }
    /* ---- FIX ENDS HERE ---- */
}