/* =========================================================
   Base Styles
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #0a0a0a;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 10px; /* Space for footer */
}

/* =========================================================
   Loader Styles
========================================================= */
.loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================================
   Hero Section
========================================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 0 2rem;
}

.hero-content {
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1s forwards 0.5s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    color: #cccccc;
}

/* Hero Badge */
.hero-badge {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    display: inline-block;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    width: 24px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 12px;
    animation: bounce 2s infinite;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    transform: translateX(-50%);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* =========================================================
   Projects Section
========================================================= */
.projects {
    padding: 8rem 2rem;
    position: relative;
    z-index: 1; /* keep above canvas */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section-title.in-view {
    opacity: 1;
    transform: translateY(0);
}

.projects-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Project Cards */
.project-card {
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.project-card.in-view {
    transform: translateY(0);
    opacity: 1;
}

.project-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #00ff88;
}

.project-info p {
    color: #cccccc;
    margin-bottom: 1.5rem;
}

/* Buttons */
.project-link {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 136, 0.3);
    backdrop-filter: blur(5px);
}

.project-link:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
}

.project-link::after {
    content: '→';
    margin-left: 0.8rem;
    transition: transform 0.3s ease;
}

.project-link:hover::after {
    transform: translateX(3px);
}

/* =========================================================
   About Section
========================================================= */
.about {
    padding: 8rem 2rem;
    position: relative;
    z-index: 1; /* above canvas */
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    color: #cccccc;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* About Section layout details */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    border: 2px solid rgba(255,255,255,0.1);
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.expertise h3 {
    color: #00ff88;
    margin-bottom: 1.5rem;
}

.expertise li {
    padding: 0.8rem;
    background: rgba(255,255,255,0.03);
    margin-bottom: 0.8rem;
    border-radius: 8px;
}

.about-list {
    text-align: left;
    max-width: 700px;
    margin: 2rem auto;
    list-style-type: none;
}

.about-list li {
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    margin-bottom: 1rem;
    border-radius: 8px;
    position: relative;
    padding-left: 2rem;
}

.about-list li::before {
    content: '▹';
    position: absolute;
    left: 0.8rem;
    color: #00ff88;
}

/* Skills */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 2rem auto;
    max-width: 800px;
}

.skill {
    padding: 0.8rem 1.8rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid #00ff88;
    border-radius: 25px;
    backdrop-filter: blur(5px);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
}

/* =========================================================
   Contact Section
========================================================= */
.contact {
    padding: 8rem 2rem;
    position: relative;
    z-index: 1; /* above canvas */
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.contact-text {
    color: #cccccc;
    max-width: 600px;
    margin: 1rem auto 3rem;
}

.contact-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.contact-link i {
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

.contact-link:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: #00ff88;
    transform: translateY(-3px);
}

/* =========================================================
   Footer
========================================================= */
.footer {
    padding: 0.75rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    position: relative;
    z-index: 1; /* above canvas */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    font-size: 1.25rem;
    margin: 0;
    line-height: 1;
}

.footer-brand p {
    margin: 0;
    font-size: 0.9rem;
    color: #9e9e9e;
}

.footer-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.social-box a i {
    font-size: 1.1rem;
    color: #cccccc;
    transition: color 0.3s ease;
}

.social-box a:hover i {
    color: #00ff88;
}

.contact-link {
    text-decoration: none;
    color: #cccccc;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
}

.footer-copyright {
    text-align: center;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.8rem;
}

/* =========================================================
   Responsive Design
========================================================= */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.2rem; }
    .projects-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
}

/* =========================================================
   Liquid Glass Navbar
========================================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    background: rgba(15, 15, 15, 0.25);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset,
                0 12px 30px rgba(0,0,0,0.35);
    overflow: hidden;
    isolation: isolate; /* keeps canvas effects behind pseudo elements */
}

.navbar::before {
    content: "";
    position: absolute;
    inset: -30% -20% auto -20%;
    height: 200%;
    background:
        radial-gradient(120px 80px at 15% 60%, rgba(0,255,136,0.18), transparent 60%),
        radial-gradient(140px 90px at 75% 30%, rgba(0,204,255,0.16), transparent 60%),
        radial-gradient(100px 70px at 45% 90%, rgba(255,255,255,0.06), transparent 60%);
    filter: blur(22px);
    opacity: 0.8;
    animation: liquidDrift 18s ease-in-out infinite alternate;
    pointer-events: none;
}

.navbar::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transform: skewX(-12deg);
    animation: glassSheen 6.5s ease-in-out infinite;
    pointer-events: none;
}

.nav-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #00ff88, #00ccff, #00ff88);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: nameGlow 4s ease-in-out infinite alternate;
    text-shadow: 0 0 8px rgba(0,255,136,0.3),
                 0 0 12px rgba(0,204,255,0.2);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.logo-text:hover {
    transform: scale(1.05);
    text-shadow: 0 0 15px rgba(0,255,136,0.8),
                 0 0 25px rgba(0,204,255,0.6);
    animation: shine 2s linear infinite;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    position: relative;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    font-size: 1rem;
    background: linear-gradient(90deg, #00ff88, #00ccff);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position .4s ease,
                text-shadow .4s ease,
                opacity .3s ease;
    opacity: 0.95;
}

.nav-links a:hover {
    background-position: 100%;
    text-shadow: 0 0 10px rgba(0,255,136,0.45),
                 0 0 16px rgba(0,204,255,0.35);
    opacity: 1;
}

@keyframes liquidDrift {
    0% { transform: translateY(0) translateX(0) rotate(0deg); }
    100% { transform: translateY(-6%) translateX(4%) rotate(2deg); }
}

@keyframes glassSheen {
    0% { left: -40%; opacity: 0; }
    10% { opacity: 0.5; }
    50% { left: 110%; opacity: 0.35; }
    80% { opacity: 0; }
    100% { left: 110%; opacity: 0; }
}

/* (Optional) basic keyframes for the logo text animations used above */
@keyframes nameGlow {
    from { background-position: 0% 50%; }
    to   { background-position: 100% 50%; }
}
@keyframes shine {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}

/* =========================================================
   Scroll Reveal
========================================================= */
:root {
    --reveal-distance: 28px;
    --reveal-duration: 600ms;
    --reveal-ease: cubic-bezier(.21,.61,.35,1);
    --reveal-stagger: 90ms;
}

.reveal {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
    filter: blur(6px);
    transition: opacity var(--reveal-duration) var(--reveal-ease),
                transform var(--reveal-duration) var(--reveal-ease),
                filter var(--reveal-duration) var(--reveal-ease);
}

.reveal.in-view {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .parallax {
        transition: none !important;
        animation: none !important;
    }
}

/* =========================================================
   Interactive Background Canvas
========================================================= */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;             /* sits behind everything */
    pointer-events: none;    /* clicks go to content */
    background: radial-gradient(1200px 800px at 20% 20%, #08110e 0%, #0a0a0a 60%);
    opacity: 0.8;            /* blend with your dark theme */
}

@media (prefers-reduced-motion: reduce) {
    #bg-canvas { display: none; }
}

/* =========================================================
   ✨ Neon Gradient Section Divider (non-blocking)
========================================================= */
.section-divider {
    position: relative;
    width: 100%;
    height: 100px;              /* visual space between sections */
    pointer-events: none;       /* no interaction */
    z-index: 1;                 /* above canvas, below nav */
    overflow: visible;
}

.section-divider::before {
    /* crisp glowing line centered */
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(72%, 980px);
    height: 2px;
    background: linear-gradient(90deg,
        rgba(0,0,0,0) 0%,
        #00ff88 18%,
        #00ccff 50%,
        #00ff88 82%,
        rgba(0,0,0,0) 100%);
    filter:
      drop-shadow(0 0 10px rgba(0,255,136,0.55))
      drop-shadow(0 0 16px rgba(0,204,255,0.45));
    opacity: 0.95;
}

.section-divider::after {
    /* soft ambient glow that fades to transparent */
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(78%, 1100px);
    height: 100%;
    background:
      radial-gradient(60% 120% at 50% 50%, rgba(0,255,136,0.15), transparent 70%),
      radial-gradient(60% 120% at 50% 50%, rgba(0,204,255,0.12), transparent 72%);
    filter: blur(18px);
    opacity: 0.55;
    mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}

/* subtle shimmer on scroll (respects reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  .section-divider::before {
    animation: dividerShift 10s ease-in-out infinite alternate;
  }
  @keyframes dividerShift {
    from { transform: translate(-50%, -50%) scaleX(1); }
    to   { transform: translate(-50%, -50%) scaleX(1.04); }
  }
}
