:root {
    --bg-color: #0f0f11;
    --text-color: #e0e0e0;
    --accent-color: #00ff88;
    --secondary-bg: #1a1a1e;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--accent-color);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    flex: 1;
}

/* Hero / Animation Section */
.hero {
    height: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.logo-container {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: clamp(1.5rem, 9vw, 4rem);
    font-weight: 800;
    position: relative;
    height: 1.5em;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
}

.lang-btn {
    position: absolute;
    top: 0;
    right: 0;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: monospace;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 10;
    margin: 0;
}

.lang-btn:hover {
    background: var(--accent-color);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.letter {
    position: absolute;
    transition: all 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: inline-block;
    text-transform: lowercase;
    transform-origin: center;
}

/* Content Sections */
section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
    animation-delay: 1.8s;
}

section:nth-child(3) { animation-delay: 2.0s; }
section:nth-child(4) { animation-delay: 2.2s; }
section:nth-child(5) { animation-delay: 2.4s; }

h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--secondary-bg);
    padding-bottom: 0.5rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

p {
    margin-bottom: 1rem;
    font-weight: 300;
    color: #ccc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--secondary-bg);
    padding: 2rem;
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -10px rgba(0, 255, 136, 0.1);
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.project-link {
    margin-top: 1rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.links-list a {
    font-size: 1.1rem;
    border-bottom: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.links-list a i {
    font-size: 1.3rem;
}

.links-list a:hover {
    border-bottom-color: var(--accent-color);
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    opacity: 0.8;
}

.skill-list {
    list-style: none;
}

.skill-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 6px;
    transition: background 0.3s;
}

.skill-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.skill-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    object-fit: contain;
    /* Convert to grayscale then tint to green (approx 100-110deg for #00ff88) */
    filter: grayscale(100%) brightness(0.9) sepia(1) hue-rotate(100deg) saturate(4);
    transition: all 0.3s ease;
}

@media (hover: hover) {
    .skill-item:hover .skill-icon {
        transform: scale(1.1);
        /* Show original colors on hover with a glow */
        filter: drop-shadow(0 0 5px white);
    }

    .skill-item:hover .skill-icon-masked {
        transform: scale(1.1);
        background-color: #fff;
        filter: drop-shadow(0 0 8px white);
    }
}

.skill-icon-masked {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background-color: var(--accent-color);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.react-icon {
    filter: grayscale(100%) brightness(0.9) sepia(1) hue-rotate(100deg) saturate(4);
}

@media (hover: hover) {
    .skill-item:hover .react-icon {
        filter: drop-shadow(0 0 5px white);
    }
}

.skill-info h4 {
    color: #eee;
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.skill-info p {
    font-size: 0.85rem;
    margin-bottom: 0;
    line-height: 1.4;
    color: #aaa;
}

.ai-note {
    margin-top: 2rem;
    padding: 1rem;
    border-left: 3px solid var(--accent-color);
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.05) 0%, transparent 100%);
    font-size: 0.9rem;
    color: #ddd;
}

.info-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(15, 15, 17, 0.85);
    backdrop-filter: blur(12px);
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    font-family: monospace;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.divider {
    width: 1px;
    height: 15px;
    background: rgba(255,255,255,0.2);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .container {
        padding-top: 6rem;
    }

    .info-widget {
        position: absolute;
        bottom: auto;
        top: 1rem;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 2rem);
        margin-top: 0;
        justify-content: center;
        border-radius: 50px;
        z-index: 1000;
        background: rgba(15, 15, 17, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero {
        height: 25vh;
        margin-top: 0;
    }
    .skill-icon, .skill-icon-masked {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
}

/* Project Showcase Specifics */
.project-header {
    margin-bottom: 3rem;
    animation: fadeIn 0.8s forwards;
}

.project-header h1 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.project-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.placeholder-img {
    background: var(--secondary-bg);
    border: 1px dashed rgba(255,255,255,0.2);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.placeholder-img:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.project-content {
    max-width: 800px;
}

.tech-tag {
    display: inline-block;
    background: rgba(0, 255, 136, 0.1);
    color: var(--accent-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.back-link:hover {
    opacity: 1;
}