* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif
}

body {
    background: linear-gradient(135deg, #020617, #0f172a);
    color: #e2e8f0;
    line-height: 1.6;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    position: sticky;
    top: 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
}

header h1 {
    color: #38bdf8
}

nav a {
    margin-left: 25px;
    text-decoration: none;
    color: #e2e8f0;
    transition: .3s
}

nav a:hover {
    color: #38bdf8
}

.hero {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px
}

.hero h2 {
    font-size: 56px;
    background: linear-gradient(90deg, #38bdf8, #22c55e);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    margin: 20px 0;
    color: #94a3b8;
    font-size: 20px
}

.buttons {
    display: flex;
    gap: 15px
}

.btn {
    padding: 12px 26px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: .3s
}

.primary {
    background: #38bdf8;
    color: #020617
}

.primary:hover {
    transform: translateY(-3px)
}

.secondary {
    border: 2px solid #38bdf8;
    color: #38bdf8
}

.secondary:hover {
    background: #38bdf8;
    color: #020617
}

.section {
    padding: 90px 8%
}

.section h2 {
    text-align: center;
    margin-bottom: 60px;
    color: #38bdf8
}

.about {
    max-width: 800px;
    margin: auto;
    text-align: center;
    color: #94a3b8
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 40px
}

.stat {
    background: #020617;
    padding: 30px;
    border-radius: 12px;
    text-align: center
}

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

.skill {
    background: #020617;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: .3s
}

.skill:hover {
    transform: translateY(-6px);
    border: 1px solid #38bdf8
}

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

/* Ensure each project card's inner article stretches so action buttons align */
.projects > .project {
    display: flex;
}
.projects > .project > article.project {
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #020617;
    padding: 30px;
    border-radius: 14px;
    transition: .3s;
}

.projects > .project > article.project:hover {
    transform: translateY(-8px);
}

.project {
    /* keep a safe default for other uses */
}

.project {
    background: #624e66;
    padding: 20px;
    border-radius: 14px;
    transition: .3s;
    display: flex;
    flex-direction:column;
    justify-content: space-between;
}

.project:hover {
    transform: translateY(-8px)
}

.project h3 {
    color: #22c55e
}

.tech {
    font-size: 13px;
    color: #38bdf8;
    margin-top: 10px
}

/* Repository panel */
.project-actions {
    margin-top: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.repo-panel {
    display: none;
}

.repo-panel.open {
    display: inline-block;
}

/* Responsive: stack actions on small screens */
@media (max-width: 640px) {
    .project-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .repo-panel.open {
        display: block;
    }
}

.repo-toggle {
    background: transparent;
    border: 2px solid #38bdf8;
    color: #38bdf8;
    padding: 8px 12px;
    border-radius: 8px;
    width: max-content
}

.repo-toggle:hover {
    background: #38bdf8;
    color: #020617
}

.repo-link {
    background: #10b981;
    color: #020617;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block
}

.github{
    text-align: center;
    color:#94a3b8;
    font-size:18px;
}
.timeline {
    max-width: 800px;
    margin: auto
}

.timeline-item {
    border-left: 3px solid #38bdf8;
    padding-left: 20px;
    margin-bottom: 25px
}

.contact {
    text-align: center
}

.contact a {
    margin: 10px 15px;
    color: #38bdf8;
    text-decoration: none
}

footer {
    text-align: center;
    padding: 30px;
    background: #020617;
    margin-top: 60px
}

.fade {
    opacity: 0;
    transform: translateY(20px);
    transition: 1s
}

.fade.show {
    opacity: 1;
    transform: translateY(0)
}