:root {
    --bg: #0f1724;
    --accent: #06b6d4;
    --muted: #9aa6b2;
    --ff: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--ff);
    background: #071024;
    color: #e6f0f6;
    line-height: 1.6;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #0b1220;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 30px;
    z-index: 10;
    animation: slideDown 0.8s ease;
}

header a {
    color: var(--muted);
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
    transition: color 0.3s;
}

header a:hover {
    color: var(--accent);
}

section {
    min-height: 100vh;
    padding: 100px 20px 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1s ease forwards;
}

section:nth-of-type(1) { animation-delay: 0.2s; }
section:nth-of-type(2) { animation-delay: 0.6s; }
section:nth-of-type(3) { animation-delay: 1s; }
section:nth-of-type(4) { animation-delay: 1.4s; }

#home {
    background: linear-gradient(180deg, #071024aa, #071a2aee), url("./src/heroBg.jpg") no-repeat center/cover;
    color: #fff;
}

#about { background: #0f1724; }
#projects { background: #0b1220; }
#getintouch { background: #071a2a; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }

h1, h2 { margin-bottom: 20px; color: var(--accent); animation: fadeIn 1.2s ease; }
p { max-width: 800px; color: var(--muted); animation: fadeIn 1.5s ease; }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    max-width: 800px;
}

.stat {
    margin-top: 25px;
    background: #101828;
    padding: 20px;
    border-radius: 10px;
    transform: scale(0.9);
    opacity: 0;
    animation: popIn 0.8s ease forwards;
}

.stat:hover {
    cursor: pointer;
    box-shadow: 0 1px 5px var(--accent);
}

.stat:nth-child(1) { animation-delay: 1.2s; }
.stat:nth-child(2) { animation-delay: 1.4s; }
.stat:nth-child(3) { animation-delay: 1.6s; }

.skills-title{
    margin-top: 40px;
}
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
}

.skill {
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--muted);
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.skill:hover {
    cursor: pointer;
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 6px 20px var(--accent);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
    width: 100%;
    max-width: 900px;
}

.project {
    background: #101828;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    animation: fadeUp 1s ease forwards;
}

.project:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 20px var(--accent);
}

.project h3 { margin-top: 0; color: #fff; }
.project p { color: var(--muted); }
.tag {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--muted);
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--muted);
    background: #0b1220;
    animation: fadeIn 2s ease;
}

/* Animations */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

/* Responsive */
@media (max-width: 1024px) {
    header { padding: 12px 20px; }
    section { padding: 80px 15px 30px 15px; }
    .projects-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .grid-3 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}

@media (max-width: 768px) {
    header { flex-direction: column; gap: 10px; }
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    p { font-size: 14px; }
    .skill { padding: 6px 12px; font-size: 12px; }
    footer p{
        font-size: 10px !important;
    }
}