/* Google Fonts - Inter (body) + JetBrains Mono (code) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');


:root {
    --color-zinc-50: #fafafa;
    --color-zinc-100: #f4f4f5;
    --color-zinc-200: #e4e4e7;
    --color-zinc-300: #d4d4d8;
    --color-zinc-400: #a1a1aa;
    --color-zinc-500: #71717b;
    --color-zinc-600: #52525b;
    --color-zinc-700: #3f3f46;
    --color-zinc-800: #27272a;
    --color-zinc-900: #18181b;
    --color-zinc-950: #09090b;

    --color-emerald-400: #34d399;
    --color-emerald-500: #10b981;
    --color-emerald-600: #059669;

    --bg-dark: var(--color-zinc-950);
    --bg-card: var(--color-zinc-900);
    --bg-card-hover: var(--color-zinc-800);

    --text-main: var(--color-zinc-100);
    --text-muted: var(--color-zinc-400);

    --primary: var(--color-emerald-500);
    --secondary: var(--color-emerald-400);
    --accent: var(--color-emerald-600);

    --gradient-main: linear-gradient(135deg, var(--color-emerald-500), var(--color-emerald-600));
    --gradient-text: linear-gradient(to right, var(--color-emerald-400), var(--color-emerald-500));

    --navbar-height: 80px;
    --border-radius: 12px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--navbar-height);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);

    background-image:
        radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.15), transparent 80%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 50px 50px, 50px 50px;
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1,
h2,
h3,
.nav-brand {
    font-family: 'Geist', sans-serif;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 4.5rem;
    /* Slightly larger for impact */
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, var(--color-emerald-400), var(--color-emerald-500));
    /* White to Emerald gradient */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.1;
    padding-bottom: 0.2em;
    /* Prevent descender clipping */
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--navbar-height);
    /* background: rgba(9, 9, 11, 0.8); Zinc-950 with opacity */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scroll-up {
    transform: translateY(0);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    height: 1.5rem;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    /* Add these two lines: */
    border-bottom: 2px solid transparent;
    padding-bottom: 4px;
    /* Adds a little space between text and underline */
}

.nav-links a.active {
    color: var(--primary);
    /* Sets the Green Theme Color */
    border-bottom-color: var(--primary);
    /* Colors the underline Green */
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
}

/* --- Main Structure --- */
main {
    margin-top: var(--navbar-height);
    padding: 0 5%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section {
    min-height: calc(100vh - var(--navbar-height));
    padding: 6rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    align-items: center;
    padding-top: 4rem;
}


.profile-image {
    width: 160px;
    height: 160px;
    border-radius: 24px;
    /* Creates a modern rounded rectangle */
    margin: 0 auto 2.5rem;
    padding: 2px;
    background: linear-gradient(to bottom right, var(--color-zinc-700), var(--color-zinc-900));
    border: 1px solid var(--color-zinc-800);
    transform: rotate(-3deg);
    /* Optional: Adds a stylish tilt */
    transition: transform 0.3s ease;
}

/* Optional: Hover effect to straighten it */
.profile-image:hover {
    transform: rotate(0deg) scale(1.02);
}

.profile-image img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    /* Slightly less than container to fit inside padding */
    object-fit: cover;
    background-color: var(--bg-dark);
}

.hero h2 {
    font-size: 1.5rem;
    color: var(--primary);
    background: none;
    -webkit-text-fill-color: initial;
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Typewriter Effect Styles */
.typewriter-text {
    color: var(--primary);
    font-weight: 600;
}

.cursor {
    color: var(--primary);
    font-weight: 400;
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.hero p {
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
}


.btn.primary {
    /* Apply the H1 text gradient to the button background */
    background: linear-gradient(to right, #ffffff, var(--color-emerald-400), var(--color-emerald-500));
    color: var(--bg-dark);
    /* Keep text dark for readability */
    font-weight: 700;
    /* Made slightly bolder to pop against the gradient */
    border: none;
    /* Removes default borders */
}

.btn.primary:hover {
    background: linear-gradient(to right, #ffffff, var(--color-emerald-300), var(--color-emerald-400));
    color: #ffffff;
    /* Forces text to remain white on hover */
    transform: translateY(0px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Cards (Skills, Projects) --- */
.skills-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    width: 100%;
}


/* --- Cards (Skills, Projects, Contact) --- */
.skill-category,
.project-card,
.contact-info,
.contact-form {
    /* Glass Effect Settings */
    /* background: rgba(24, 24, 27, 0.6);   Semi-transparent version of your dark theme */
    backdrop-filter: blur(8px);
    /* The "frosted glass" blur */
    -webkit-backdrop-filter: blur(8px);
    /* Safari support */
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* A subtle, crisp border */
    box-shadow: 0 8px 32px 0 rgba(37, 56, 46, 0.3);
    /*Depth shadow
    
    /* Existing layout properties */
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition);
}

.skill-category:hover,
.project-card:hover {
    border-color: var(--color-zinc-700);
    transform: translateY(-2px);
}

/* Headings inside cards */
.skill-category h3,
.project-card h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Lists in Skills */
.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.skill-category li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

/* Tech Stack Tags */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.tech-stack span {
    background: rgba(39, 39, 42, 0.5);
    /* Zinc-800/50 */
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid var(--color-zinc-800);
}

/* Project Links */
.project-links {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-zinc-800);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-link:hover {
    color: var(--primary);
}

/* --- Contact Section --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: start;
}

.contact-info h2,
.contact-form h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-zinc-800);
}

.info-item i {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    margin-left: 0.5rem;
}

.copy-btn:hover {
    color: var(--text-main);
}

/* Social Links Large */
.social-links-large {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--color-zinc-800);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--color-zinc-800);
    color: var(--text-main);
    border-color: var(--color-zinc-700);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-zinc-950);
    border: 1px solid var(--color-zinc-800);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.contact-form button {
    width: 100%;
    margin-top: 1rem;
}


footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4rem;

    /* Transparency Effect (Matches Header) */
    background: transparent;
    /* Removes the solid dark color */
    backdrop-filter: blur(8px);
    /* Applies the blur to content behind it */
    -webkit-backdrop-filter: blur(8px);
    /* Safari support */

    /* Border matching the Header's style */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--text-main);
}

/* --- Animations --- */
.animate-text,
.animate-on-scroll {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease-out;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* =============================================
   RESPONSIVE DESIGN - Mobile First Approach
   ============================================= */

/* --- Small Mobile Devices (max-width: 480px) --- */
@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
        padding-bottom: 0.1em;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    p {
        font-size: 1rem;
    }

    main {
        padding: 0 1rem;
    }

    .section {
        padding: 3rem 0;
        min-height: auto;
    }

    .hero {
        padding-top: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .profile-image {
        width: 100px;
        height: 100px;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }

    .profile-image img {
        border-radius: 14px;
    }

    .hero h2 {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .skill-category,
    .project-card,
    .contact-info,
    .contact-form {
        padding: 1.25rem;
    }

    .tech-stack {
        gap: 0.4rem;
        margin: 1rem 0;
    }

    .tech-stack span {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .social-links-large {
        gap: 0.4rem;
    }

    .social-link {
        padding: 0.75rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    footer {
        padding: 2rem 1rem;
        margin-top: 2rem;
    }

    .navbar {
        padding: 0 1rem;
        height: 60px;
    }

    :root {
        --navbar-height: 60px;
    }
}

/* --- Mobile Devices (max-width: 768px) --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    main {
        padding: 0 1.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    .navbar {
        padding: 0 1.5rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        border-bottom: 1px solid var(--color-zinc-800);
        clip-path: circle(0% at 100% 0);
        transition: clip-path 0.4s ease-in-out;
    }

    .nav-links.active {
        clip-path: circle(150% at 100% 0);
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .profile-image {
        width: 120px;
        height: 120px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
}

/* --- Tablet Devices (769px - 1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    main {
        padding: 0 3%;
    }

    .section {
        padding: 5rem 0;
    }

    .profile-image {
        width: 140px;
        height: 140px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .contact-container {
        grid-template-columns: 1fr 1.2fr;
        gap: 1.5rem;
    }

    .hero p {
        max-width: 500px;
    }
}

/* --- Desktop (1025px - 1440px) Default styles apply --- */

/* --- Large Desktop (1440px+) --- */
@media (min-width: 1440px) {
    main {
        max-width: 1400px;
    }

    h1 {
        font-size: 5rem;
    }

    h2 {
        font-size: 3rem;
    }

    h3 {
        font-size: 1.75rem;
    }

    p {
        font-size: 1.25rem;
    }

    .section {
        padding: 8rem 0;
    }

    .profile-image {
        width: 180px;
        height: 180px;
        border-radius: 28px;
    }

    .profile-image img {
        border-radius: 24px;
    }

    .hero p {
        max-width: 700px;
        font-size: 1.4rem;
    }

    .hero h2 {
        font-size: 1.75rem;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .skill-category,
    .project-card,
    .contact-info,
    .contact-form {
        padding: 2.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr 2fr;
        gap: 3rem;
    }

    .nav-links {
        gap: 3rem;
    }

    .nav-links a {
        font-size: 1.05rem;
    }

    footer {
        padding: 5rem 0;
    }
}

/* --- Extra Large Desktop (1920px+) --- */
@media (min-width: 1920px) {
    main {
        max-width: 1600px;
    }

    h1 {
        font-size: 5.5rem;
    }

    .section {
        padding: 10rem 0;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

/* --- Fluid Background --- */
#fluid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Places it behind the content */
    pointer-events: none;
    /* Allows clicking through the fluid */
    opacity: 0.2;
    /* Adjust brightness of the fluid */
}

/* Ensure content sits on top of the fluid animation */
main,
footer {
    position: relative;
    z-index: 2;
}