/* ===============================================================
   1. GENERAL & VARIABLES
   =============================================================== */
html {
    scroll-behavior: smooth;
}

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

body {
    font-family: sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    padding-top: 70px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><defs><pattern id='p' patternUnits='userSpaceOnUse' width='40' height='40'><path d='M0 20 L20 0 L40 20 L20 40 Z' fill='none' stroke='rgba(0,0,128,0.05)' stroke-width='1'/></pattern></defs><rect width='100%' height='100%' fill='url(%23p)'/></svg>");
    background-repeat: repeat;
}

/* ===============================================================
   2. APP LAYOUT & MAIN COMPONENTS
   =============================================================== */

/* --- Navbar --- */
.navbar {width: 100%; position: fixed; top: 0; left: 0; background: rgba(0, 0, 0, 0.5); z-index: 999; padding: 15px 0;}
.navbar-container {width: 90%; max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;}
.logo a {color: inherit; text-decoration: none; display: inline-block; font-size: 1.2rem; font-weight: bold;}
.nav-links {list-style: none; display: flex; gap: 20px;}
.nav-links li a {text-decoration: none; color: #fff; font-size: 0.9rem; transition: color 0.3s;}
.nav-links li a:hover {color: #ccc;}

/* --- Hero Section --- */
.hero-section {min-height: 80vh; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;}
.hero-bg {position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url("bg.jpg") center center no-repeat; background-size: cover; filter: brightness(0.4); z-index: 1;}
.introduction-content {position: relative; z-index: 2; width: 90%; max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-end;}
.intro-text {max-width: 550px; margin-bottom: 250px; position: relative;}
.main-heading {font-size: 3rem; font-weight: bold; margin-bottom: 20px; position: relative; display: inline-block; overflow: visible;}
.main-heading::before {content: "00"; position: absolute; font-size: 6rem; color: rgba(180, 180, 180, 0.3); top: -50px; left: -10px; z-index: -1; display: block; pointer-events: none; white-space: nowrap;}
.main-heading a {color: inherit; text-decoration: none; position: relative; z-index: 1; display: inline-block;}
.description {font-size: 1rem; line-height: 1.7; color: #dddddd; margin-bottom: 20px;}
.social-icons {display: flex; gap: 10px; margin-bottom: 20px;}
.social-btn {width: 35px; height: 35px; background: #333; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.3s, transform 0.3s; text-decoration: none;}
.social-btn:hover {background: #555; transform: scale(1.05);}
.icon-img {width: 70%; height: 70%; object-fit: contain;}
.about-me {margin-top: 10px; display: flex; align-items: center;}
.about-content {background: rgba(255, 255, 255, 0.05); padding: 15px 20px; border-radius: 8px; backdrop-filter: blur(4px);}
.about-label {font-size: 0.8rem; color: #cccccc; margin-bottom: 5px; display: inline-block;}
.about-description {font-size: 1rem; color: #fff;}
.hero-images {position: relative; display: flex; align-items: flex-end;}
.activity-chart {max-width: 500px; animation: chartEnter 1s ease-out forwards;}
@keyframes chartEnter { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* --- Skills Section --- */
.skills-section {width: 90%; max-width: 1200px; margin: 1px auto;}
.skills-content {position: relative;}
.skill-heading {position: relative; font-size: 2.5rem; font-weight: bold; margin-bottom: 20px;}
.skill-heading::before {content: "01"; position: absolute; font-size: 6rem; color: rgba(180, 180, 180, 0.4); top: -50px; left: -10px; z-index: -1; display: block; pointer-events: none; white-space: nowrap;}
.skills-container {display: flex; flex-wrap: wrap; gap: 10px;}
.skill-card {background: #1f1f1f; border: 1px solid #333; padding: 15px 20px; border-radius: 6px; transition: transform 0.3s, background 0.3s;}
.skill-card:hover {transform: scale(1.05); background: #2a2a2a;}

/* --- Projects Section --- */
.projects-section {width: 90%; max-width: 1200px; margin: 80px auto;}
.projects-content {position: relative;}
.projects-heading {position: relative; font-size: 2.5rem; font-weight: bold; margin-bottom: 30px;}
.projects-heading::before {content: "02"; position: absolute; font-size: 6rem; color: rgba(180, 180, 180, 0.4); top: -50px; left: -10px; z-index: -1; display: block; pointer-events: none; white-space: nowrap;}
.projects-container {display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;}
.project-card {background: #1f1f1f; border-radius: 8px; padding: 20px; min-height: 270px; transition: transform 0.3s; position: relative;}
.project-card:hover {transform: translateY(-5px);}
.project-card h3 {margin-bottom: 10px; font-size: 1.2rem;}
.project-card h3 a {text-decoration: none; color: #61dc48;}
.project-desc {max-height: 160px; overflow-y: auto; padding: 5px; margin-bottom: 40px; border-radius: 4px;}
.project-card p {font-size: 0.9rem; color: #ccc; margin: 0;}
.copy-btn {position: absolute; top: 10px; right: 10px; background: transparent; border: none; cursor: pointer; color: #fff;}
.card-footer {position: absolute; bottom: 10px; left: 10px; display: flex; gap: 10px; font-size: 0.8rem;}
.card-info-item {display: flex; align-items: center; gap: 5px;}
.info-link {text-decoration: none; color: #fff;}
.info-link .icon {width: 20px; height: 20px; display: inline-block;}

/* --- Footer --- */
.footer {text-align: center; padding: 20px; background: #1a1a1a; color: #ccc; font-size: 0.85rem; border-top: 1px solid #333; margin-top: 50px;}
.footer a {color: inherit; text-decoration: none; display: inline-block;}

/* --- Utility & Animations --- */
.copy-tag {position: absolute; top: 30px; left: 250px; background: rgba(0, 0, 0, 0.8); color: #fff; padding: 5px 10px; border-radius: 4px 0 0 4px; font-size: 0.8rem; z-index: 10; transform: scaleX(0); transform-origin: right; opacity: 0; animation: openClose 4s ease-in-out forwards;}
.copy-tag::after {content: ""; position: absolute; top: 50%; right: -8px; transform: translateY(-50%); border-width: 8px; border-style: solid; border-color: transparent transparent transparent rgba(0, 0, 0, 0.8);}
@keyframes openClose {
    0% {transform: scaleX(0); opacity: 0; transform-origin: right;}
    20% {transform: scaleX(1); opacity: 1; transform-origin: right;}
    80% {transform: scaleX(1); opacity: 1; transform-origin: right;}
    100% {transform: scaleX(0); opacity: 0; transform-origin: right;}
}

/* ==============================
   RESPONSIVE DESIGN
   ============================== */
@media (max-width: 768px) {
    body::before {content: ""; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: url("public/img.png") center center no-repeat; background-size: contain; opacity: 0.15; z-index: -1; pointer-events: none;}
    .navbar {padding: 10px 0;}
    .navbar-container {width: 95%; padding: 0 10px;}
    .hero-section {min-height: 60vh;}
    .main-heading {font-size: 2rem; margin-top: 20px;}
    .main-heading::before {top: 50%; left: 50%; transform: translate(-50%, -50%);}
    .social-icons {justify-content: center; align-items: center;}
    .description {font-size: 0.9rem;}
    .about-description {text-align: justify;}
    .hero-images {display: none;}
    .projects-container {grid-template-columns: 1fr;}
    .skill-heading {display: flex; justify-content: center; align-items: center; text-align: center; position: relative;}
    .skill-heading::before {left: 50%; bottom: 0%; transform: translateX(-50%);}
    .skills-container {display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; text-align: initial;}
    .skill-card {width: auto; max-width: 100%; display: inline-block; padding: 15px 20px; margin: 0px; white-space: nowrap;}
    .intro-text {margin-bottom: 150px; text-align: center;}
    .projects-heading {display: flex; justify-content: center; align-items: center; text-align: center; position: relative;}
    .projects-heading::before {left: 50%; bottom: 0%; transform: translateX(-50%);}
    .introduction-content {flex-direction: column; align-items: center;}
}