:root {
    --intro-bg-color: #f1f0ee;
    --resume-bg-color: #ffffff;
    --text-color-dark: #1a1a1a;
    --text-color-muted: #555555;
    --text-color-blue-content: #0055ff;
    --font-family-mono: 'IBM Plex Mono', monospace;
    --font-family-main: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--intro-bg-color);
    font-family: var(--font-family-mono);
    color: var(--text-color-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}


body::before {
    content: '';
    position: fixed;
    top: -200%;
    left: -200%;
    width: 200%;
    /* Reduced from 500% */
    height: 200%;
    /* Reduced from 500% */
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    /* Ensure it doesn't spill */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    background-repeat: repeat;
    opacity: 0.1;
    animation: grainAnimation 8s steps(10) infinite;
}

.intro-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    /* Behind text (z-index 2), on top of grain */
}

@keyframes grainAnimation {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -10%);
    }

    20% {
        transform: translate(-15%, 5%);
    }

    30% {
        transform: translate(7%, -25%);
    }

    40% {
        transform: translate(-5%, 25%);
    }

    50% {
        transform: translate(-15%, 10%);
    }

    60% {
        transform: translate(20%, -10%);
    }

    70% {
        transform: translate(-20%, -15%);
    }

    80% {
        transform: translate(10%, 20%);
    }

    90% {
        transform: translate(-10%, -5%);
    }
}

.blurred-text {
    position: absolute;
    right: 13vw;
    top: 43%;
    transform: translateY(-50%);
    z-index: 2;
    font-size: 11vw;
    font-weight: 600;
    line-height: 0.7;
    text-align: right;
    color: rgba(0, 0, 0, 0.4);
    filter: blur(4px) contrast(100%) brightness(100%);
    -webkit-filter: blur(4px) contrast(100%) brightness(100%);
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.blurred-text .word-part {
    display: block;
    white-space: nowrap;
}

.my-name {
    position: absolute;
    right: 5vw;
    top: 50%;
    transform: translateY(-50%) translateY(-4em);
    font-size: 1.5rem;
    /* Increased from 0.9rem */
    font-weight: 600;
    /* Bolder */
    letter-spacing: 0.1em;
    color: var(--text-color-dark);
    text-transform: uppercase;
    z-index: 2;
}

.bottom-categories {
    position: absolute;
    bottom: 100px;
    /* Moved up to avoid overlap with scroll button */
    left: 0;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    justify-content: flex-end;
    padding: 0 5vw;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-color-dark);
    z-index: 2;
}

.bottom-categories span {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    font-size: 1.5rem;
    /* Increased from 1rem */
    font-weight: 600;
    /* Bolder */
    color: var(--text-color-dark);
}

/* Typed Cursor Styling */
.typed-cursor {
    color: var(--text-color-blue-content);
    font-size: 1rem;
}

.resume-page {
    background-color: var(--resume-bg-color);
    padding: 100px 40px;
    min-height: 100vh;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
    border-top: 1px solid #eee;
}

.Profskills {
    position: relative;
    padding-bottom: 100px;
    min-height: 30vh;
}

.section-name-background {
    position: absolute;
    top: 0;
    left: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 10vw;
    font-weight: 700;
    line-height: 0.85;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.04);
    /* Made very subtle */
    z-index: 0;
    /* Lower z-index */
    pointer-events: none;
}

.section-name-background span {
    display: block;
}

.name-part-bottom {
    transform: translateX(2vw);
}

.personal-statement-minimal {
    position: relative;
    z-index: 5;
    padding-top: 15vh;
    margin-left: 50%;
    max-width: 600px;
    font-family: var(--font-family-main);
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-color-dark);
}

.name-statement-section {
    position: relative;
    padding-bottom: 100px;
    min-height: 30vh;
}

.section-name-background {
    position: absolute;
    top: 0;
    left: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 10vw;
    font-weight: 700;
    line-height: 0.85;
    text-transform: uppercase;
    color: #eeeeee;
    z-index: 1;
    pointer-events: none;
}

.section-name-background span {
    display: block;
}

.name-part-bottom {
    transform: translateX(2vw);
}

.personal-statement-minimal {
    position: relative;
    z-index: 5;
    padding-top: 15vh;
    margin-left: 50%;
    max-width: 600px;
    font-family: var(--font-family-main);
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-color-dark);
}

/* --- UPDATED: Skills Section Styling --- */
.skills-section {
    padding: 100px 40px;
    background-color: var(--resume-bg-color);
    display: flex;
    justify-content: flex-end;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 800px;
}

/* Glassmorphism for Skill Boxes */
.skill-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.skill-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .skill-box {
    background: rgba(40, 40, 40, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .skill-box:hover {
    background: rgba(60, 60, 60, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.details-grid-section {
    max-width: 1200px;
    margin: 0 auto;
    margin-left: 50%;
    padding: 50px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Widened slightly */
    gap: 30px;
}

/* Glassmorphism for Details/Project Cards */
.detail-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.detail-section:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

body.dark-mode .detail-section {
    background: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .detail-section:hover {
    background: rgba(45, 45, 45, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.detail-section h3 {
    font-family: var(--font-family-main);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-color-dark);
}

.detail-section p {
    font-family: var(--font-family-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--text-color-blue-content);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.detail-section p strong {
    color: var(--text-color-blue-content);
    font-weight: 500;
}

.project-statement-minimal p {
    font-family: var(--font-family-main);
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-color-muted);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.github-button-container {
    padding: 40px 0;
    display: flex;
    justify-content: center;
}

.neumorphic-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: #f1f0ee;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    box-shadow:
        -6px -6px 12px rgba(255, 255, 255, 0.8),
        6px 6px 12px rgba(0, 0, 0, 0.2);
}

.neumorphic-button svg {
    fill: #555555;
    transition: fill 0.2s ease-in-out;
}

.neumorphic-button:active {
    box-shadow:
        inset -6px -6px 12px rgba(255, 255, 255, 0.8),
        inset 6px 6px 12px rgba(0, 0, 0, 0.2);
}

.neumorphic-button:active svg {
    fill: #1a2a4a;
}

.button-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 999;
}

hr {
    border: none;
    height: 1px;
    background-color: #eeeeee;
    margin: 100px 0;
}

/* Cursor Fix */
.bottom-categories {
    display: inline-flex !important;
    /* Force inline flex to keep content together */
    align-items: baseline;
    /* Align text and cursor */
    white-space: nowrap;
    /* Prevent wrapping */
}

.bottom-categories span {
    display: inline;
    /* Ensure text is inline */
}

/* Behance Placeholders */
.behance-placeholder {
    width: 100%;
    height: 316px;
    /* Match height of previous embeds */
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.behance-embed-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* Center them */
    max-width: 1200px;
    margin: 0 auto;
    margin-left: 50%;
    padding: 50px 0;
    gap: 40px;
}

/* Contact Section Fix */
.contact-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
    margin-top: 50px;
}

/* Specific centering for Contact Section */
/* Specific centering for Contact Section */
.section-name-background.contact-bg {
    position: relative !important;
    /* Stack normally */
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    width: 100%;
    text-align: left;
    /* User requested Left Side */
    padding-left: 20px;
    /* Slight offset from edge */
    margin-bottom: 20px;
    /* Space between header and content */
}


@media (max-width: 992px) {
    .freelance-container {
        grid-template-columns: 1fr;
    }

    .freelance-title {
        position: relative;
        top: 0;
        margin-bottom: 40px;
        font-size: 15vw;
        text-align: center;
    }

    .freelance-embeds {
        justify-content: right;
    }
}

.name-statement-section {
    position: relative;
    padding-bottom: 50px;
    min-height: 30vh;
}

.contact-info {
    text-align: center;
    margin: 0 auto;
    padding-top: 20px;
    /* Simple padding since header is relative now */
    font-family: var(--font-family-mono);
    font-size: 1.1rem;
    /* Larger font */
    line-height: 1.6;
    color: var(--text-color-dark);
    z-index: 5;
    position: relative;
    max-width: 800px;
}

.contact-info a {
    color: var(--text-color-dark);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}



@media (max-width: 1200px) {

    .personal-statement-minimal,
    .details-grid-section {
        margin-left: 40%;
    }

    .section-name-background {
        font-size: 12vw;
    }
}

@media (max-width: 992px) {

    .personal-statement-minimal,
    .details-grid-section {
        margin-left: 0;
    }

    .name-statement-section {
        padding-bottom: 50px;
    }

    .contact-info {
        padding-top: 50px;
        text-align: center;
    }

    .personal-statement-minimal {
        padding-top: 25vh;
        max-width: 100%;
    }

    .details-grid-section {
        padding-top: 0;
    }

    .section-name-background {
        font-size: 15vw;
        left: 20px;
    }
}

@media (max-width: 768px) {
    .resume-page {
        padding: 60px 20px;
    }

    .blurred-text,
    .my-name,
    .bottom-categories {
        display: none;
    }

    .personal-statement-minimal {
        padding-top: 20px;
        /* Reduced from 28vh to remove blank space */
        font-size: 1rem;
    }

    .details-grid-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-section {
        margin-top: 60px;
    }

    .contact-info {
        padding-top: 50px;
        text-align: center;
    }

    hr {
        margin: 30px 0;
        /* Reduced from 100px */
    }

    .name-statement-section,
    .contact-section {
        padding-bottom: 20px;
        /* Reduced padding */
        min-height: auto;
        /* Remove large min-heights */
        margin-top: 20px;
    }
}

.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    /* Moved down as requested */
    left: 20px;
    z-index: 1000;
}

.dark-mode-toggle input {
    display: none;
}

.toggle-label {
    cursor: pointer;
    font-size: 1.5rem;
}

body.dark-mode {
    background-color: #1e1e1e;
    color: #f5f5f5;
}

body.dark-mode .resume-page,
body.dark-mode .skills-section,
body.dark-mode .contact-section {
    background-color: #2c2c2c;
}

body.dark-mode .detail-section h3,
body.dark-mode .skill-box span,
body.dark-mode .project-statement-minimal p,
body.dark-mode .contact-info,
body.dark-mode .personal-statement-minimal {
    color: #f5f5f5;
}

body.dark-mode .skill-box {
    background-color: #3a3a3a;
    border: 1px solid #555;
}

body.dark-mode .neumorphic-button {
    background-color: #2c2c2c;
    box-shadow:
        -6px -6px 12px rgba(60, 60, 60, 0.6),
        6px 6px 12px rgba(0, 0, 0, 0.5);
}

body.dark-mode .neumorphic-button svg {
    fill: #f5f5f5;
}

body.dark-mode a {
    color: #aaccff;
}

.contact-section {
    max-width: 1200px;
    margin: 100px auto 0;
    padding-top: 50px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.contact-info {
    text-align: center;
    font-family: var(--font-family-mono);
    font-size: 0.7rem;
    line-height: 2;
    color: var(--text-color-dark);
    margin-top: 80px;
}

body.dark-mode .blurred-text {
    color: rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* Fix for Dark Mode text overlap */
body.dark-mode .section-name-background {
    color: rgba(255, 255, 255, 0.8) !important;
    /* White-ish and visible */
    opacity: 1 !important;
}

body.dark-mode .my-name,
body.dark-mode .bottom-categories {
    color: #ffffff;
}

/* --- Added Optimizations (Mobile & Animations) --- */

/* Animations */
.skill-box,
.detail-section,
.neumorphic-button {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

.skill-box:hover,
.detail-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Restored Skill Box Styles */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.skill-box {
    background-color: var(--resume-bg-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: -10px -10px 20px rgba(255, 255, 255, 0.8),
        10px 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.skill-box img {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    object-fit: contain;
}

.skill-box span {
    font-family: var(--font-family-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color-dark);
    text-transform: uppercase;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* Responsive Overrides */
@media (max-width: 992px) {

    .personal-statement-minimal,
    .details-grid-section,
    .behance-embed-container {
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        max-width: 800px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .personal-statement-minimal {
        padding-top: 50px;
        text-align: center;
    }

    .details-grid-section {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
        gap: 40px;
    }

    .behance-embed-container {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .intro-container {
        /* Keep relative positioning for absolute children */
        display: block;
        /* Ensure it's not flex column */
        height: 100vh;
        width: 100%;
        overflow: hidden;
    }

    .blurred-text {
        display: none;
        /* Keep hidden to avoid overlap clutter */
    }

    .section-name-background {
        display: block !important;
        position: relative !important;
        font-size: 4rem !important;
        color: rgba(0, 0, 0, 0.15) !important;
        /* Visible gray in light mode */
        opacity: 1 !important;
        /* Managed via rgba */
        text-align: center;
        margin-bottom: 10px;
        left: 0 !important;
        width: 100%;
        font-family: 'Oswald', sans-serif;
    }

    .name-part-bottom {
        transform: none !important;
    }

    /* MINI-DESKTOP LAYOUT FOR MOBILE */
    .my-name {
        display: block !important;
        position: absolute !important;
        top: 40% !important;
        /* Vertically centered-ish */
        right: 5vw !important;
        /* Right aligned like desktop */
        width: auto !important;
        /* Let it size to content */
        text-align: right !important;
        margin: 0 !important;
        transform: translateY(-50%) !important;
        font-size: 1.8rem;
        /* Increased from 1.2rem */
        font-weight: 700;
        /* Bolder */
        z-index: 100;
        opacity: 1 !important;
        color: var(--text-color-dark);
    }

    .bottom-categories span {
        font-size: 1.1rem;
        /* Slightly smaller on mobile but still visible */
        white-space: normal;
        /* Allow wrapping if needed */
        text-align: right;
    }

    body.dark-mode .my-name {
        color: #ffffff !important;
    }

    .bottom-categories {
        display: flex !important;
        position: absolute !important;
        bottom: 110px !important;
        /* Moved further up for safety */
        right: 5vw !important;
        left: auto !important;
        /* Unset left */
        width: auto !important;
        /* Allow wrapping naturally */
        justify-content: flex-end;
        /* Align to right */
        flex-direction: row !important;
        /* Keep text and cursor on same line */
        align-items: center;
        padding: 0;
        text-align: right;
        z-index: 100;
        font-size: 0.7rem;
        /* Smaller font for categories */
    }

    /* Fix Skills Grid Overflow */
    .skills-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        /* Force 3 columns on mobile */
        gap: 15px !important;
        justify-content: center;
        width: 100%;
        max-width: 100%;
    }

    /* Adjust Skill Icons for smaller grid */
    .skill-box {
        padding: 15px !important;
    }
}

/* Body Overflow Fix */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

/* Button Positioning Fix */
.button-container {
    right: 20px !important;
    /* Move closer to edge but visible */
    bottom: 20px !important;
}

/* Restrict Max Widths */
/* Restrict Max Widths */
.resume-page,
.skills-section,
.personal-statement-minimal {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Personal Skills Icons */
.personal-skills-list p {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Space between icon and text */
    margin-bottom: 15px;
}

.personal-skills-list i {
    width: 25px;
    /* Fixed width for alignment */
    text-align: center;
    color: var(--text-color-blue-content);
    /* Use theme color */
    font-size: 1.2rem;
}