/* --- Global Styles & Variables --- */
:root {
    --primary-color: #00bcd4; /* Cyan */
    --secondary-color: #ffeb3b; /* Yellow Accent */
    --bg-dark: #121212;        /* Very Dark Gray/Black */
    --bg-light-dark: #1e1e1e;  /* Slightly Lighter Dark */
    --text-light: #e0e0e0;     /* Light Gray */
    --text-dark: #ffffff;      /* White */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);

    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;

    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Enables smooth scrolling for anchor links */
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-secondary);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-primary);
    color: var(--text-dark);
    margin-bottom: 0.8em;
    line-height: 1.3;
    font-weight: 600;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; text-align: center; }
h3 { font-size: 1.5rem; color: var(--primary-color); }

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Utility Classes --- */
.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.alt-bg {
    background-color: var(--bg-light-dark);
}

.content-section {
    padding: 80px 0;
    opacity: 0; /* Start hidden for animation */
    transform: translateY(30px); /* Start slightly lower */
    animation: fadeInSection 0.8s ease-out forwards;
    /* Add delay for staggered effect if desired */
    /* animation-delay: 0.2s; */
}

/* --- Button Styles --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    font-family: var(--font-primary);
    text-align: center;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    cursor: pointer;
    border: none;
    margin: 5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(255, 235, 59, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* --- Header & Navigation --- */
header {
    background-color: rgba(30, 30, 30, 0.9); /* Slightly transparent */
    backdrop-filter: blur(5px); /* Glass effect */
    padding: 15px 0;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}
.logo:hover {
    color: var(--primary-color);
}

header nav ul {
    display: flex;
    gap: 25px;
}

header nav ul li a {
    font-weight: 500;
    color: var(--text-light);
    padding-bottom: 5px;
    position: relative;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

header nav ul li a:hover,
header nav ul li a.active /* Add 'active' class via JS if desired */
{
    color: var(--text-dark);
}
header nav ul li a:hover::after,
header nav ul li a.active::after {
    width: 100%;
}

/* --- Mobile Nav Toggle (Basic Styling) --- */
.nav-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    position: relative;
    transition: background-color 0s 0.1s ease; /* Delay disappearance */
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-light);
    transition: transform var(--transition-speed) ease, top var(--transition-speed) 0.1s ease;
}
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Active state for toggle */
.nav-toggle.active .hamburger {
    background-color: transparent; /* Middle bar disappears */
}
.nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
    transition: top var(--transition-speed) ease, transform var(--transition-speed) 0.1s ease;
}
.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
    transition: top var(--transition-speed) ease, transform var(--transition-speed) 0.1s ease;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.9)), url('../images/hero-bg.jpg') center center/cover no-repeat; /* Optional BG Image */
    background-color: var(--bg-dark); /* Fallback */
    position: relative;
    overflow: hidden; /* For background shapes */
    padding-top: 80px; /* Account for sticky header */
}

.hero-content {
    max-width: 800px;
    position: relative; /* Ensure content is above shapes */
    z-index: 2;
}

.hero-content h1 {
    margin-bottom: 0.2em;
    animation: slideInFromTop 0.8s ease-out forwards;
}

.hero-content .subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 1em;
    /* Basic Typing Effect */
    overflow: hidden;
    white-space: nowrap;
    border-right: .10em solid var(--primary-color); /* Cursor */
    width: 0; /* Start with no width */
    animation:
        typing 2.5s steps(30, end) 1s forwards, /* Delay typing start */
        blink-caret .75s step-end infinite;
     animation-delay: 0.8s; /* Start after h1 slides in */
}


.hero-content .description {
    font-size: 1.1rem;
    margin-bottom: 2em;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.5s forwards; /* Delay after typing */
}

.hero-content .btn {
    margin-top: 1em;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards; /* Delay after description */
}

.profile-pic { /* Optional */
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 20px auto;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.5);
    opacity: 0;
    animation: fadeIn 1s ease-out 1.8s forwards;
}

/* --- Optional Hero Background Shapes --- */
.hero-bg-shape {
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background-color: rgba(0, 188, 212, 0.1); /* Faint primary color */
    border-radius: 50%;
    filter: blur(50px);
    z-index: 1;
    animation: pulse 5s infinite ease-in-out alternate;
}

/* --- About Section --- */
.about-section h2 {
    margin-bottom: 1.5em;
}
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center; /* Or 'left' if preferred */
}
.about-photo { /* Optional */
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 2em auto; /* Center and add space below */
    border: 4px solid var(--primary-color);
}

/* --- Skills Section --- */
.skills-section h2 {
    margin-bottom: 1.5em;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.skill-card {
    background-color: var(--bg-dark);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.2); /* Primary color shadow */
}

.skill-card h3 {
    margin-bottom: 1em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5em;
    display: inline-block;
}

.skill-card ul li {
    margin-bottom: 0.5em;
    position: relative;
    padding-left: 20px;
}

.skill-card ul li::before {
    content: '▹'; /* Custom bullet */
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* --- Projects Section --- */
.projects-section h2 {
    margin-bottom: 1.5em;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-light-dark);
    border-radius: 8px;
    overflow: hidden; /* Ensure image corners are rounded */
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.project-card img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
  
    border-bottom: 1px solid var(--border-color);
   
}

.project-info {
    padding: 25px;
    flex-grow: 1; /* Allow info section to fill space */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push links to bottom */
}

.project-info h3 {
    margin-bottom: 0.5em;
}

.project-info p {
    font-size: 0.95rem;
    margin-bottom: 1.5em;
    flex-grow: 1; /* Allow paragraph to take available space */
}

.project-links {
    margin-top: auto; /* Push links to the bottom */
}
.project-links .btn {
    margin-right: 10px;
}

/* --- Contact Section --- */
.contact-section h2 {
    margin-bottom: 0.5em;
}
.contact-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2em auto;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-dark);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.form-group {
    margin-bottom: 1.5em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light-dark);
    color: var(--text-light);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.3);
}

.form-group textarea {
    resize: vertical; /* Allow vertical resize */
    min-height: 120px;
}

.contact-form button[type="submit"] {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

.contact-alternative {
    text-align: center;
    margin-top: 2em;
}
.contact-alternative p {
    margin-bottom: 1em;
}
.social-links { /* Optional */
    margin-top: 1em;
   
}
.social-links a {
    color: var(--text-light);
    font-size: 1.8rem;
    margin: 0 15px;
    transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}


/* --- Footer --- */
footer {
    background-color: var(--bg-light-dark);
    text-align: center;
    padding: 25px 0;
    margin-top: 50px; /* Space above footer */
    border-top: 1px solid var(--border-color);
}

footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* --- Animations --- */
@keyframes fadeInSection {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Typing effect */
@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

/* Cursor blink effect */
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: var(--primary-color); }
}

@keyframes pulse {
    0% { transform: scale(0.9) rotate(0deg); opacity: 0.1; }
    100% { transform: scale(1.2) rotate(45deg); opacity: 0.05; }
}

/* --- Responsiveness --- */

/* Tablets & Smaller Desktops */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .container { padding: 0 30px; } /* More padding on sides */
    .projects-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* Mobile Devices */
@media (max-width: 768px) {
    html { font-size: 15px; } /* Slightly smaller base font */
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .content-section { padding: 60px 0; }

    /* Mobile Navigation */
    .nav-toggle {
        display: block; /* Show the toggle button */
        z-index: 1001; /* Ensure it's above nav items */
    }

    header nav ul {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 70%; /* Adjust as needed */
        height: 100vh;
        background-color: var(--bg-light-dark);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding-top: 80px; /* Space for logo/close button */
        transition: right var(--transition-speed) ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }

    header nav ul.nav-active {
        right: 0; /* Slide in */
    }

    header nav ul li {
        margin: 20px 0;
    }
    header nav ul li a {
        font-size: 1.2rem;
    }
    header nav ul li a::after { /* Mobile nav hover effect maybe different */
        display: none; /* Or style differently */
    }


    .hero-section {
        min-height: 80vh; /* Slightly shorter on mobile */
        padding-top: 60px;
    }
     .hero-content .subtitle {
         font-size: 1.3rem;
         /* Adjust typing animation if needed */
    }
    .hero-content .description {
        font-size: 1rem;
    }

    .skills-grid {
        grid-template-columns: 1fr; /* Stack skill cards */
    }

    .projects-grid {
        grid-template-columns: 1fr; /* Stack project cards */
    }

    .contact-form {
        padding: 20px;
    }
}

/* Smaller Mobiles */
@media (max-width: 480px) {
    html { font-size: 14px; }
    .container { padding: 0 15px; }
    h1 { font-size: 2rem; }
    .hero-content .subtitle { font-size: 1.2rem; }
    .hero-content .btn { padding: 10px 20px; font-size: 0.9rem; }
    header nav ul { width: 85%; } /* Wider nav panel */
}

.profile-img img{
    height: 300px;
    width: 300px;
    object-fit: cover;
    border-radius: 500px;
    justify-self: center;
    margin-bottom: 50px;
    border: 4px solid var(--primary-color);
    transition: transform var(--transition-speed) ease;
  
}
.profile-img img:hover{
    transform: scale(1.05);
    box-shadow: 0 0 10px var(--primary-color);
}

