:root {
    /* Colors */
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-primary: #38bdf8;
    --color-primary-hover: #0ea5e9;
    --color-accent: #34d399;
    --color-border: #334155;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;


    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

/* --- Visual Wow Factors --- */

/* Particle Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* Behind everything */
    pointer-events: none;
    /* Let clicks pass through */
}

/* Animated Gradient Orbs */
.orb {
    position: fixed;
    /* Fixed so they stay in background while scrolling */
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    /* Behind content, in front of particles (optional, or behind particles) */
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--color-primary), transparent 70%);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-accent), transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(50px, 50px) scale(1.1);
    }

    100% {
        transform: translate(-30px, 20px) scale(0.9);
    }
}

/* 3D Tilt Effect Utility */
.tilt-card {
    transition: transform 0.1s ease-out;
    /* Fast transition for smooth mouse follow */
    will-change: transform;
    transform-style: preserve-3d;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Animations & Effects --- */

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typewriter Cursor */
.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--color-primary);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Scroll Reveal */
.scroll-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Card Style */
/* Glassmorphism Card Style */
.project-card,
.skill-card {
    background: rgba(30, 41, 59, 0.7);
    /* translucent dark blue */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    position: relative;
    overflow: hidden;
}

.project-card::before,
.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}

.project-card:hover::before,
.skill-card:hover::before {
    left: 100%;
}

.project-card:hover,
.skill-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    border-color: var(--color-primary);
}

/* Staggered Animation Delays */
.scroll-visible:nth-child(1) {
    transition-delay: 0.1s;
}

.scroll-visible:nth-child(2) {
    transition-delay: 0.2s;
}

.scroll-visible:nth-child(3) {
    transition-delay: 0.3s;
}

.scroll-visible:nth-child(4) {
    transition-delay: 0.4s;
}

.scroll-visible:nth-child(5) {
    transition-delay: 0.5s;
}

/* Special Glow for Featured/Ping Project */
#ping.project-card {
    border: 1px solid rgba(56, 189, 248, 0.3);
    background: rgba(30, 41, 59, 0.85);
}

#ping.project-card:hover {
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
    border-color: var(--color-primary-hover);
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #0f172a;
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-secondary:hover {
    border-color: var(--color-text);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: -2px;
    /* Tighter spacing to mimic connected letters */

    /* Fallback color */
    color: #22d3ee;

    /* Gradient Text Magic: Vibrant Cyan to Emerald */
    background: linear-gradient(to right, #22d3ee, #34d399);
    -webkit-background-clip: text;
    background-clip: text;

    /* Transparency trick */
    -webkit-text-fill-color: transparent;
    color: transparent;

    padding: 0.5rem 0;
    line-height: 1;
}

.logo img {
    display: none;
    /* Hide image if present */
}

.logo:hover {
    opacity: 0.9;
}

/* Old image style removed */

.nav-list {
    display: flex;
    gap: var(--spacing-md);
}

.nav-list a {
    color: var(--color-text-muted);
    font-weight: 500;
}

.nav-list a:hover {
    color: var(--color-primary);
}

/* Hero */
.hero {
    padding: 12rem 0 8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: transparent;
    /* Changed to allow glow to be visible if needed, but radial gradient is on pseudo */
}

/* Background Glow Effect */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

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

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

/* About */
.about {
    background-color: var(--color-bg-alt);
}

/* About */
.about {
    background-color: var(--color-bg-alt);
    position: relative;
    overflow: hidden;
}

/* Flex container for Image + Text */
.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Image container with gradient border */
.about-image-container {
    flex-shrink: 0;
    width: 220px;
    height: 220px;
    position: relative;
    border-radius: 50%;
    padding: 6px;
    /* This creates the gradient border effect */
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.5);
    transition: transform 0.3s ease;
}

.about-image-container:hover {
    transform: scale(1.02);
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--color-bg-alt);
    /* Inner border */
    background-color: var(--color-bg);
    display: block;
}

.about-text {
    flex: 1;
    font-size: 1.125rem;
    color: var(--color-text-muted);
    text-align: left;
}

.about-text p {
    margin-bottom: var(--spacing-sm);
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .about-text {
        text-align: center;
    }
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.skill-card {
    background-color: var(--color-bg-alt);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.skill-card h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.skill-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    color: var(--color-text-muted);
}

.skill-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--color-primary);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-md);
}

.project-card {
    background-color: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: var(--spacing-md);
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.project-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.project-description {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
}

.project-tech li {
    font-size: 0.875rem;
    font-family: monospace;
    color: var(--color-accent);
}

.link-text {
    font-weight: 600;
}

/* Contact */
.contact {
    text-align: center;
}

.contact-text {
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    color: var(--color-text-muted);
    font-size: 1.25rem;
}

/* Footer */
.footer {
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-list {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* --- Resume Page Styling --- */

.resume-container {
    max-width: 900px;
    margin: 8rem auto 4rem;
    /* Top margin accounts for fixed header */
    background-color: var(--color-bg-alt);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Subtle top accent border */
.resume-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

.resume-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.resume-header h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--color-text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.resume-header p {
    font-size: 1.1rem;
    color: var(--color-primary);
}

.resume-header a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.resume-header a:hover {
    color: var(--color-primary);
}

.resume-section {
    margin-bottom: 2.5rem;
}

.resume-section h3 {
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

/* Line decoration next to section titles */
.resume-section h3::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: var(--color-border);
    margin-left: 1rem;
}

.job {
    margin-bottom: 2rem;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
    /* Wrap on mobile */
    gap: 0.5rem;
}

.job-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}

.job-company {
    color: var(--color-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.job-date {
    color: var(--color-text-muted);
    font-family: monospace;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.job-details {
    list-style: none;
    margin-top: 0.75rem;
}

.job-details li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.job-details li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

.job-details strong {
    color: var(--color-text);
    font-weight: 600;
}

/* Resume Skills Grid */
.skills-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.skill-category strong {
    color: var(--color-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.skill-category div {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .skills-grid-compact {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    body {
        background-color: white;
        color: black;
    }

    .header,
    .footer,
    .btn,
    #particles-canvas,
    .orb {
        display: none !important;
    }

    .resume-container {
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
        background: none;
        max-width: 100%;
        color: black;
    }

    .resume-container::before {
        display: none;
    }

    .resume-header h1 {
        -webkit-text-fill-color: black;
        color: black;
    }

    .resume-header p,
    .resume-header a,
    .job-title,
    .job-company,
    .job-date,
    .job-details li,
    .job-details strong {
        color: black !important;
    }

    .job-date {
        background: none;
        border: 1px solid #ccc;
    }

    .resume-section h3 {
        color: black;
        border-bottom: 2px solid black;
        padding-bottom: 0.5rem;
    }

    .resume-section h3::after {
        display: none;
    }

    /* Print Compactness */
    .resume-header h1 {
        font-size: 2.2rem;
        margin-bottom: 0.2rem;
    }

    .resume-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .resume-section {
        margin-bottom: 1.2rem;
        page-break-inside: avoid;
    }

    .resume-section h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        padding-bottom: 0.25rem;
    }

    .job {
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }

    .job-title {
        font-size: 1.1rem;
    }

    .job-company {
        font-size: 1rem;
    }

    .job-details li {
        margin-bottom: 0.25rem;
        line-height: 1.35;
        font-size: 0.9rem;
    }

    .view-pdf-button {
        display: none !important;
    }

    /* FORCED COMPACT LAYOUT */
    @page {
        margin: 0.4in;
    }

    .resume-container {
        width: 100%;
        max-width: 100%;
        padding: 0 !important;
        margin: 0 !important;
    }

    .resume-header {
        margin-bottom: 0.8rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #ddd;
    }

    .resume-header h1 {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .resume-header p {
        margin-top: 0.2rem !important;
        font-size: 0.9rem;
    }

    /* Turn the skills grid into 4 columns to save vertical space */
    .skills-grid-compact {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.8rem !important;
        margin-bottom: 0.5rem;
    }

    .skill-category div {
        font-size: 0.8rem !important;
    }

    .resume-section {
        margin-bottom: 0.8rem;
        page-break-inside: avoid;
    }

    .resume-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
        padding-bottom: 0.2rem;
        border-bottom: 1px solid #000;
    }

    .job {
        margin-bottom: 0.6rem;
    }

    .job-title {
        font-size: 1rem;
    }

    .job-company {
        font-size: 0.95rem;
    }

    .job-details li {
        margin-bottom: 0.15rem;
        line-height: 1.25;
        font-size: 0.85rem;
    }
}/* Mobile Menu Base Styles */
.mobile-menu-btn {
    display: none;
    /* Hidden on desktop */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-text);
    transition: all 0.3s ease-in-out;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        /* Show on mobile */
    }

    .header-container {
        flex-direction: row;
        /* Keep logo and burger in a row */
        flex-wrap: wrap;
    }

    .nav {
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--color-bg-alt);
        border-bottom: 1px solid var(--color-border);
        overflow: hidden;
        max-height: 0;
        /* Hidden by default */
        transition: max-height 0.3s ease-out;
    }

    .nav.active {
        max-height: 300px;
        /* Show when active */
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        gap: 1.5rem;
    }

    /* Hamburger Animation when Active */
    .mobile-menu-btn.active .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
