/* Meyer's Reset + Josh W Comeau's CSS Reset */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section { display: block; }
body { line-height: 1; }
ol,ul { list-style: none; }
blockquote,q { quotes: none; }
blockquote:before,blockquote:after,q:before,q:after { content: ''; content: none; }
table { border-collapse: collapse; border-spacing: 0; }
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
body { -webkit-font-smoothing: antialiased; }
img,picture,video,canvas,svg { display: block; max-width: 100%; }
input,button,textarea,select { font: inherit; }
p,h1,h2,h3,h4,h5,h6 { overflow-wrap: break-word; }
#root,#__next { isolation: isolate; }

/* Global Variables and Styles */
:root {
    --black: #121212;
    --white: #fff;
    --font: 'Raleway', sans-serif;
}

body, html {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    background: var(--black);
    color: var(--white);
    font-family: var(--font);
    overflow-x: hidden;
    width: 100%;
}

*::selection {
    color: black;
    background-color: white;
}

/* Common Styles */
.hidden-text {
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}
.hidden-text:focus {
    clip: auto;
    height: auto;
    overflow: auto;
    position: absolute;
    width: auto;
}
.playful {
    transition: all 0.4s cubic-bezier(0.15, 0.75, 0.45, 0.95) 0s;
    animation: 10s ease 0s infinite alternate none running rainbow;
}
.playful-hover {
    transition: all 0.4s cubic-bezier(0.15, 0.75, 0.45, 0.95) 0s;
}
.playful-hover:hover, .playful-hover:focus {
    animation: 10s ease 0s infinite alternate none running rainbow;
}

@keyframes rainbow {
    0% { color: rgb(240, 77, 255); }
    25% { color: rgb(255, 77, 77); }
    50% { color: rgb(255, 197, 77); }
    75% { color: rgb(106, 237, 118); }
    100% { color: rgb(0, 153, 255); }
}

/* Intro Overlay */
.intro-overlay {
    background: var(--white);
    position: fixed;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    z-index: 3;
}
.intro-overlay .ball {
    position: absolute;
    top: -50vh;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    background: var(--black);
    margin: 0 auto;
}

/* Header */
.nav {
    display: flex;
    align-items: center;
    height: 10vh;
    width: 90%;
    max-width: 1536px;
    margin: 0 auto;
    font-weight: 700;
    z-index: 2;
}
.nav .space-between {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav .logo {
    color: var(--white);
    cursor: pointer;
    font-size: 1.2rem;
    text-decoration: none;
    user-select: none;
    flex-shrink: 0;
}
.nav .nav-list {
    margin: 0;
    padding: 0;
    list-style-type: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem; /* Base gap for mobile */
}
.nav .nav-list li {
    display: flex;
    justify-content: center;
    align-items: center;
}
.nav .nav-list li a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    text-underline-offset: 0.25rem;
    transition: color 0.2s; /* Added for smooth transition */
}
.nav .nav-list li a:hover, .nav .nav-list li a:focus {
    text-decoration: underline;
}
.nav .nav-list li a svg {
    width: 1.4rem; 
    height: 1.4rem;
    flex-shrink: 0;
}

/* Hero Section */
.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 90%;
    max-width: 1536px;
    margin: 3rem auto;
}
.hero .cta {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 2.5rem;
    margin-bottom: 1.25rem;
}
.hero .title {
    font-size: 2.2rem;
    font-weight: bold;
}
.hero .portrait-container {
    width: 100%;
    max-width: 150px;
}
.hero .portrait {
    position: relative;
    width: 100%;
    object-fit: contain;
    height: 100%;
    border-radius: 2rem;
    box-shadow: 1rem 1rem white;
    filter: grayscale(100%) contrast(110%);
    clip-path: circle(100%);
    transition: box-shadow 0.3s ease, clip-path 0.3s ease, filter 0.3s ease;
}
@media (prefers-reduced-motion: no-preference) {
    .hero .portrait-container:hover .portrait {
        box-shadow: 0px 0px white;
        clip-path: circle(50%);
        filter: none;
        animation: bounceImage 600ms cubic-bezier(0.33, 1, 0.68, 1) infinite alternate;
    }
}
.hero .job-title {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
}

@keyframes bounceImage {
    from { transform: translateY(0px) rotateX(20deg); }
    to { transform: translateY(-30px) rotateX(0deg); }
}

/* About Section */
.about-container {
    position: relative;
    width: 90%;
    margin: 5rem auto;
    max-width: 1536px;
    z-index: 10;
}
.about-container h2 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}
.about-container p {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 65ch;
}

/* Skills & Tools Section */
.my-skills {
    position: relative;
    width: 90%;
    margin: 5rem auto;
    max-width: 1536px;
    z-index: 10;
}
.my-skills h2 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 2.5rem;
    text-align: center;
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 1rem;
    justify-content: center;
}
.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: #1a1a1a;
    border-radius: 1rem;
    border: 1px solid #333;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.skill-item:hover {
    transform: translateY(-8px);
    border-color: var(--white);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}
.skill-item svg {
    width: 35px;
    height: 35px;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.skill-item:hover svg {
    transform: translateY(-5px) rotate(-10deg);
}
.skill-item p {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ccc;
    transition: color 0.3s ease;
}
.skill-item:hover p {
    color: var(--white);
}

/* Projects Section */
.project-container {
    position: relative;
    margin-top: 5rem;
}
.project-title-container {
    width: 90%;
    max-width: 1536px;
    margin: 0 auto;
}
.project-container h2 {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 2.5rem;
}
.project-listings-container {
    display: grid;
    gap: 5rem;
    width: 90%;
    max-width: 1536px;
    margin: 0 auto;
}
.project-listing {
    position: relative;
    width: 100%;
}
.project-item-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1.5rem;
}
.project-info {
    text-align: left;
    width: 100%;
}
.project-info a {
    display: block;
    color: var(--white);
    text-decoration: none;
}
.project-info h2 {
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}
.project-info p {
    margin-top: 1rem;
    line-height: 1.5;
    font-size: 0.875rem;
    font-weight: 300;
}
.project-info p:last-of-type {
    margin-bottom: 1.5rem;
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}
.project-btns {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}
.project-btns .project-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    height: 45px;
    border-radius: 12px;
    border: none;
    outline: none;
    background: white;
    color: var(--black);
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0 20px;
    width: auto;
    transition: 150ms transform ease;
    will-change: transform;
}
.project-btn:hover, .project-btn:focus {
    transform: scale(1.05);
}
.project-btn:active {
    transform: scale(0.95);
}
.project-listing a {
    display: block;
    width: 100%;
}
.project-image {
    display: block;
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.project-image:hover, .project-image:focus {
    box-shadow: 0 0 0 3px var(--black), 0 0 0 6px white;
}

/* Footer */
footer {
    min-height: 80vh;
    min-height: 80dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 2rem 0;
}
footer h2 {
    color: var(--white);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-align: center;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style-type: none;
}
.footer-links li {
    padding: 0 8px;
}
.footer-links li a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    text-underline-offset: 0.25rem;
}
.footer-links li a:hover, .footer-links li a:focus {
    text-decoration: underline;
}
.footer-links li a svg {
    font-size: 1.5rem;
}

/* --- Media Queries for Smaller Screens (FIX for navigation) --- */
@media (max-width: 420px) {
    .nav .nav-list {
        gap: 0.8rem; /* Add more space between icons */
    }
    .nav .nav-list li a {
        font-size: 0; /* This hides the text label */
        gap: 0; /* Remove gap since there's no text */
    }
}

/* --- Media Queries for Larger Screens --- */

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    /* Header */
    .nav { width: 75%; }
    .nav .logo { font-size: 1.4rem; }
    .nav .nav-list { gap: 1rem; }
    .nav .nav-list li { padding: 0 16px; }
    .nav .nav-list li:last-child { padding: 0 0 0 16px; }
    .nav .nav-list li a { font-size: 1rem; }
    .nav .nav-list li a svg { font-size: 1.75rem; width: auto; height: auto; }

    /* Hero */
    .hero { width: 75%; margin: 8rem auto; }
    .hero .cta { flex-direction: row; align-items: center; gap: 4rem; }
    .hero .title { font-size: 4rem; }
    .hero .portrait-container { max-width: 200px; }
    .hero .portrait { box-shadow: 1.5rem 1.5rem white; }
    .hero .job-title { font-size: 1.2rem; }

    /* About, Skills, Tools Sections */
    .about-container, .my-skills { width: 75%; margin: 8rem auto; }
    .about-container h2, .my-skills h2, .project-container h2 { font-size: 3rem; margin-bottom: 3rem; }
    .about-container p { font-size: 1.2rem; }
    .skills-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 2rem; }
    .skill-item svg { width: 40px; height: 40px; }
    .skill-item p { font-size: 0.875rem; }
    
    /* Projects */
    .project-title-container, .project-listings-container { width: 75%; }
    .project-listings-container { gap: 8rem; }
    .project-item-container { flex-direction: row; gap: 2.5rem; }
    .project-info { max-width: 350px; }
    .project-info h2 { font-size: 2rem; }
    .project-info p { font-size: 1rem; line-height: 1.6; }
    .project-btns { justify-content: flex-start; }
    .project-btn { font-size: 1rem; height: 50px; }
    .project-image { border-radius: 20px; }
    
    /* Footer */
    footer { min-height: 100vh; min-height: 100dvh; }
    footer h2 { font-size: 4rem; }
    .footer-links { flex-wrap: nowrap; }
    .footer-links li { padding: 0 32px; }
    .footer-links li a { font-size: 1.5rem; }
    .footer-links li a svg { font-size: 2rem; }
}

/* Large devices (desktops, 1280px and up) */
@media (min-width: 1280px) {
    .hero .title { font-size: 6rem; margin-right: 2rem; }
    .hero .portrait-container { max-width: 300px; }
}

/* Extra large devices (large desktops, 1536px and up) */
@media (min-width: 1536px) {
    .hero .title { font-size: 7.5rem; margin-right: 3rem; }
    .hero .portrait-container { max-width: 400px; }
    .hero .job-title { font-size: 1.4rem; }
}

/* Blog Post Specific Styles (already responsive) */
.post-container { min-height: 100vh; }
.post-main { width: 90%; margin: 4rem auto 8rem; max-width: 65ch; }
.text-content { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.text-content h1 { font-size: 2rem; font-weight: bold; margin: 2rem 0; line-height: 1.2; }
.text-content h2 { font-size: 1.5rem; font-weight: bold; margin-top: 2rem; margin-bottom: 0.5rem; line-height: 1.3; }
.text-content p { max-width: 65ch; line-height: 1.7; font-size: 1rem; margin: 1rem 0; width: 100%; }
.text-content a { color: silver; text-decoration: underline; }
.text-content img { border-radius: 8px; margin: 1rem 0; }
.text-content figure { margin: 1.5rem 0; }
.text-content figcaption { font-size: 0.875rem; font-style: italic; color: silver; max-width: 65ch; }
.text-content ul { list-style-type: disc; padding-left: 1.5rem; line-height: 1.7; max-width: 65ch; }
.text-content li { margin-bottom: 0.5rem; }
.text-content em { font-style: italic; }
.text-content pre { background-color: rgb(40, 44, 52); overflow-x: auto; border-radius: 8px; padding: 1rem; width: 100%; margin: 1rem 0; }
.text-content code { font-family: monospace; font-size: 0.875rem; line-height: 1.5; color: #abb2bf; }

@media (min-width: 768px) {
    .post-main { width: 75%; }
    .text-content h1 { font-size: 3rem; }
    .text-content h2 { font-size: 2rem; }
    .text-content p { font-size: 1.125rem; }
}

/* /portfolio.css */

/* ... existing styles ... */

.project-btn:active {
    transform: scale(0.95);
}

/* --- Add these new styles for the language bars --- */

.project-btn:active {
    transform: scale(0.95);
}

/* --- Add these new styles for the language bars --- */

.project-languages {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.project-languages h3 {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.language-name {
    font-size: 0.8rem;
    width: 80px; /* Aligns the bars */
    flex-shrink: 0;
    color: #ccc;
}

.language-bar-container {
    flex-grow: 1;
    height: 8px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden; /* Ensures inner bar respects the radius */
}

.language-bar {
    height: 100%;
    background-color: var(--white); /* Fallback color */
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

/* --- Language Specific Colors (NEW) --- */
.language-bar.lang-javascript {
    background-color: yellow;
}

.language-bar.lang-html {
    background-color: orange;
}

.language-bar.lang-css {
    background-color: purple;
}
/* --- End of new styles --- */


.project-listing a {
    display: block;
    width: 100%;
}

/* ... rest of your css ... */
