/* === Base Styles & Variables === */
:root {
    --primary-color: #4f46e5; /* Example Accent: Indigo */
    --primary-hover: #4338ca;
    --secondary-color: #6b7280; /* Grey for text */
    --dark-color: #111827; /* Dark text/elements */
    --light-color: #f9fafb; /* Light background */
    --white-color: #ffffff;
    --border-color: #e5e7eb;

    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;

    --container-width: 1140px;
    --section-padding: 6rem 0;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    color: var(--secondary-color);
    background-color: var(--white-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 600;
}

h1 { font-size: 3rem; font-weight: 700; }
h2 { font-size: 2.5rem; text-align: center; margin-bottom: 3rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.1rem; font-weight: 500; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul { list-style: none; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
    opacity: 0; /* For scroll fade-in */
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-bg {
    background-color: var(--light-color);
}

.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 3rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: 500;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}
.btn-link:hover {
    text-decoration: underline;
}
.btn-link i {
    margin-left: 4px;
    font-size: 0.8em;
}


/* === Header / Navbar === */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9); /* Start slightly transparent */
    backdrop-filter: blur(5px);
}

#header.scrolled {
    background-color: var(--white-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px; /* Adjust as needed */
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    font-family: var(--font-primary);
}
.nav-logo:hover {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem; /* Spacing between links */
}

.nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}
.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    transition: all 0.3s ease-in-out;
}

/* === Hero Section === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 70px; /* Account for navbar height */
    background-color: var(--white-color); /* Can add subtle gradient or pattern */
    position: relative;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    max-width: var(--container-width);
    padding: 2rem 1.5rem;
    width: 100%;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 0.5rem;
}

.hero-text h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: left;
}
.hero-text h2::after { /* Remove underline from h2 in hero */
    display: none;
}

.typed-text {
    color: var(--primary-color);
    font-weight: 600;
}

.hero-bio {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.social-icons {
    margin-bottom: 2.5rem;
}

.social-icons a {
    color: var(--secondary-color);
    font-size: 1.6rem;
    margin-right: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.hero-image {
    flex-basis: 350px; /* Adjust size */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    width: 300px; /* Control avatar size */
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--light-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--secondary-color);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}
.scroll-down:hover {
    color: var(--primary-color);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
  40% {transform: translateX(-50%) translateY(-10px);}
  60% {transform: translateX(-50%) translateY(-5px);}
}


/* === About Section === */
.about-content {
    display: flex; /* Could be flex or grid */
    align-items: center;
    gap: 3rem; /* Space between text and potential image */
    max-width: 900px; /* Center content block */
    margin: 0 auto;
}

.about-text p {
    text-align: justify;
    margin-bottom: 1.5rem;
}

/* === Skills Section === */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.skill-card {
    background-color: var(--white-color);
    padding: 1.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block; /* Ensure icon takes space */
}

.skill-card h4 {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--dark-color);
}


/* === Education/Experience Timeline === */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 30px; /* Position line to the left */
    width: 3px;
    background-color: var(--border-color);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding-left: 65px; /* Space for icon and line */
}

.timeline-icon {
    position: absolute;
    left: 18px; /* Center icon on the line */
    top: 0;
    width: 24px; /* Icon container size */
    height: 24px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border: 3px solid var(--white-color); /* Create overlap effect */
    z-index: 1;
}

.timeline-content {
    background-color: var(--white-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative; /* For potential arrow */
}
.timeline-content::before { /* Optional: arrow pointing to timeline */
    content: '';
    position: absolute;
    top: 10px;
    left: -10px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--border-color);
}
.timeline-content::after { /* Arrow fill */
     content: '';
    position: absolute;
    top: 10px;
    left: -9px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid var(--white-color);
}


.timeline-content h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    color: var(--dark-color);
}
.timeline-content p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}
.date {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
    display: block;
    margin-top: 0.5rem;
}

/* === Projects Section === */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--white-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.card-image img { /* Add if you include images */
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    color: var(--dark-color);
}

.card-text {
    font-size: 0.95rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-tags span {
    background-color: var(--light-color);
    color: var(--secondary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
}

.card-links {
    margin-top: auto;
}


/* === Contact Section === */
.contact-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
    color: var(--secondary-color);
}
.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    text-align: center;
}
.contact-item {
    flex-basis: 250px; /* Adjust width */
}
.contact-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}
.contact-item p, .contact-item a {
    color: var(--secondary-color);
    font-size: 1rem;
}
.contact-item a:hover {
    color: var(--primary-color);
}

/* === Footer === */
.footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 4rem;
}
.footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #9ca3af; /* Lighter grey for footer */
}

/* === Responsive === */
@media (max-width: 992px) {
    .container { padding: 0 1rem; }
    .section { padding: 4rem 0; }
    .hero-container { flex-direction: column; text-align: center; gap: 1rem; }
    .hero-text { order: 2; }
    .hero-text h2 { text-align: center; }
    .hero-image { order: 1; margin-bottom: 2rem; flex-basis: auto;}
    .hero-image img { width: 250px; height: 250px; }
    .social-icons { justify-content: center; }
    .scroll-down { display: none; } /* Hide scroll arrow on smaller screens */
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; margin-bottom: 2rem;}
    .section-title { margin-bottom: 2rem; }

    /* Mobile Nav */
    .nav-menu {
        position: fixed;
        left: -100%; /* Start off-screen */
        top: 70px; /* Below navbar */
        flex-direction: column;
        background-color: var(--white-color);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: left 0.3s ease; /* Slide in */
        gap: 1.5rem;
        padding-top: 2rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }
    .nav-link { font-size: 1.1rem; }
    .nav-link::after { display: none; } /* No underlines on mobile */

    .hamburger {
        display: block;
    }

    /* Hamburger Animation */
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Timeline adjustments */
     .timeline::before { left: 15px; }
    .timeline-item { padding-left: 45px; }
     .timeline-icon { left: 4px; width: 22px; height: 22px; font-size: 0.7rem; }
     .timeline-content::before, .timeline-content::after { display: none; } /* Hide arrows */

    .skills-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
    .skill-card { padding: 1rem 0.5rem; }
    .skill-icon { font-size: 2rem; }
}

@media (max-width: 480px) {
    html { font-size: 15px; }
    .hero-text h1 { font-size: 2rem; }
    .hero-text h2 { font-size: 1.3rem; }
    .hero-bio { font-size: 1rem; }
    .social-icons a { font-size: 1.4rem; margin-right: 1rem; }
     .hero-image img { width: 200px; height: 200px; }
     .projects-grid { grid-template-columns: 1fr; }
}