:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: rgba(18, 18, 18, 0.95);
    --section-bg: #151515;
    --border-color: #262626;
    --character-bg: #1a1a1a;
    --character-border: #333;
    --muted-text: #a4b0be;
    --nav-link-color: #b2bec3;
    --nav-hover-color: #a8ff04;
    --gradient-color: #4c7400; /* Fixed typo from --gradiant-color */
    --logo-color: #6f99e7;
}

body.light-mode {
    --bg-color: #fcf9f2;         
    --text-color: #3b302a;       
    --header-bg: rgba(252, 249, 242, 0.95);
    --section-bg: #fffcf5;       
    --border-color: #e6dfd1;     
    --character-bg: #f5eedb;     
    --character-border: #d4c8b0;
    --muted-text: #78685e;       
    --nav-link-color: #78685e;
    --nav-hover-color: #0984e3;
    --gradient-color: #0652dd; /* Fixed typo here as well */
    --logo-color: #71ad00;
}

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

/* Force clean 10px scrollbar and eliminate track/arrows across all engines */
html {
    overflow-y: scroll; 
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent !important;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted-text);
}

::-webkit-scrollbar-button,
::-webkit-scrollbar-corner {
    display: none !important;
    width: 0;
    height: 0;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

html, body {
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
body::-webkit-scrollbar {
    display: none; 
}

/* Custom Scrollbar Track/Bar UI */
#custom-scrollbar {
    position: fixed;
    top: 0;
    right: 0;
    width: 10px;
    height: 100vh;
    background: transparent;
    z-index: 9999;
    pointer-events: none; 
}

#custom-scrollbar-thumb {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    background: var(--muted-text); 
    border-radius: 5px;
    cursor: pointer;
    pointer-events: auto; 
    opacity: 0; 
    transition: background 0.2s ease, opacity 0.2s ease;
}

#custom-scrollbar-thumb:hover {
    opacity: 1 !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    pointer-events: none;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

header nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--logo-color);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

header .logo img {
    display: block;
    height: 44px; 
    width: auto;
    object-fit: contain;
}

.logo-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0 , 0.2); 
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.logo-icon-wrapper:hover {
    background-color: rgba(128, 128, 128, 0.35); 
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

header nav a {
    color: var(--nav-link-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

header nav a:hover {
    color: var(--nav-hover-color);
}

#theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 32px;
    height: 32px;
}

.theme-icon {
    position: absolute;
    height: 22px;
    width: auto;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.moon-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

body.light-mode .sun-icon {
    opacity: 0;
    transform: rotate(90deg);
}

body.light-mode .moon-icon {
    opacity: 1;
    transform: rotate(0deg);
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

section {
    width: 90%;
    max-width: 1200px;
    min-height: 70vh;
    padding: 80px 40px;
    margin: 40px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: none;
}

.intro-section {
    margin-top: 120px;
}

.intro-layout {
    display: flex;
    gap: 40px;
    width: 100%;
    align-items: center;
}

.character-seat {
    flex: 1;
    height: 350px;
    background: var(--character-bg);
    border: 2px dashed var(--character-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.intro-content {
    flex: 1;
    height: 350px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-content h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.intro-content p {
    color: var(--muted-text);
    line-height: 1.6;
    transition: color 0.3s ease;
}

.stuff-section, .intro-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    will-change: opacity, transform;
}

.stuff-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    text-align: center;
}

.projects-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.project-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 0;
    background: transparent;
    border: none;
    opacity: 0; 
    gap: 40px; 
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.project-row.slide-from-left {
    transform: translateX(-80px);
}

.project-row.slide-from-right {
    transform: translateX(80px);
}

.project-row.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.project-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-row.slide-from-left .project-text {
    align-items: flex-start;
    text-align: left;
}

.project-row.slide-from-right .project-text {
    align-items: flex-end;
    text-align: right;
}

.project-text h3 {
    font-size: 2rem;
    color: var(--text-color);
    width: 100%;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
    display: block;
}

.project-text p {
    color: var(--muted-text);
    font-size: 1.1rem;
    line-height: 1.5;
    width: 100%;
}

.project-text p a {
    color: var(--nav-hover-color); 
    text-decoration: none;         
    font-weight: 500;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.project-text p a:hover {
    text-decoration: underline;    
    filter: brightness(1.2);       
}

.project-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--character-bg);
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    height: 15rem; 
    width: auto;
}

.project-image:not(:has(img)) {
    height: 15rem; 
    width: 20rem; 
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--character-bg);
    border: 2px dashed var(--character-border); 
    border-radius: 12px;
    flex-shrink: 0;
}

.project-image span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: auto;
}

.project-image img {
    height: 100% !important; 
    width: auto !important;  
    max-width: none !important;
    object-fit: contain;
    display: block;
}

.project-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    background: transparent;
    border: none;
}

.project-row.slide-from-left .project-status {
    justify-content: flex-start;
}

.project-row.slide-from-right .project-status {
    justify-content: flex-end;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-text {
    color: var(--muted-text);
    font-size: 0.95rem;
    font-weight: 500;
}

.projects-more {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.projects-more span {
    color: var(--muted-text);
    font-size: 1rem;
}

.project-more-img {
    height: 6rem; 
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

.project-more-img {
    content: url('images/valprojectsd.png');
}

body.light-mode .project-more-img {
    content: url('images/valprojectsl.png');
}

.more-btn {
    padding: 12px 24px;
    border: none; 
    border-radius: 6px;
    background: linear-gradient(135deg, var(--nav-hover-color), var(--gradient-color)); 
    color: #000000; 
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

body.light-mode .more-btn {
    background: linear-gradient(135deg, var(--nav-hover-color), var(--gradient-color));
    color: #ffffff; 
}

.more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #000000; 
}

.stuff-section {
    width: 100%;
    padding: 60px 20px;
    box-sizing: border-box;
}

.about-skills-layout {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: stretch; 
    gap: 40px;
    text-align: left;
    position: relative;
}

.about-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.about-column h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 10px;
}

.about-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-column .about-paragraph {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--muted-text);
    text-align: left;
    display: block;
    margin: 0;
}

.about-column .about-paragraph span {
    display: inline-block;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    will-change: opacity, transform;
}

.section-divider {
    width: 2px;
    background-color: var(--border-color);
    align-self: stretch;
}

/* Right Column: My Skills */
.skills-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px; /* Removed space-between since the button is extracted */
}



.skills-column h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.skills-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.skills-tabs.locked {
    pointer-events: none;
    opacity: 0.5;
}

/* --- Colorful Rounded-Square Tab Button States --- */
.skill-tab {
    position: relative;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--muted-text);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 1;
    overflow: hidden;
    transition: color 0.25s ease-in-out, border-color 0.25s ease-in-out, transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
}

/* Use a pseudo-element for the gradient background to fade opacity smoothly instead of breaking the gradient interpolation */
.skill-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--nav-hover-color), var(--gradient-color));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.25s ease-in-out;
}

/* Hover & Active hover state */
.skill-tab:hover::before, 
.skill-tab.active:hover::before {
    opacity: 1;
}

.skill-tab:hover, 
.skill-tab.active:hover {
    border-color: transparent;
    color: #000000; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body.light-mode .skill-tab:hover, 
body.light-mode .skill-tab.active:hover {
    color: #ffffff; 
}

/* Selected/Active state (when not actively hovered) */
.skill-tab.active {
    background: transparent;
    border: 2px solid var(--nav-hover-color);
    color: var(--nav-hover-color);
    transform: none;
    box-shadow: none;
}

.skill-tab.active::before {
    opacity: 0;
}

.skills-list-wrapper {
    min-height: 260px; 
    display: flex;
    flex-direction: column;
}

.skills-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.skill-item.hidden-skill {
    display: none !important;
}

.skill-item.reveal-skill {
    opacity: 1;
    transform: translateY(0);
}

.skill-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.skill-level {
    font-size: 0.85rem;
    color: var(--muted-text);
}

.skill-logo-box {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-logo-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Skills More Container (Matching Projects CTA) */
.skills-more-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.skills-more-container span {
    color: var(--muted-text);
    font-size: 1rem;
}

.skills-more-img {
    height: 6rem; 
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

/* Default dark mode asset for skills more */
.skills-more-img {
    content: url('images/valskillsd.png');
}

/* Light mode asset swap for skills more */
body.light-mode .skills-more-img {
    content: url('images/valskillsl.png');
}

.stuff-section.is-visible, .intro-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-item.hidden-category {
    display: none !important;
}

.stuff-section h2 {
    font-size: 2rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

footer {
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    position: relative;
    z-index: 10;
    transition: background 0.3s ease, border-color 0.3s ease;
}

footer .footer-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}

footer p {
    color: var(--muted-text);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.pocket-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
    cursor: pointer;
    user-select: none;
}

.pocket-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.pocket-back {
    z-index: 1;
}

.lighter-item {
    z-index: 2;
    transform: translateY(-30%) scale(0.7);
    transform-origin: bottom center;
    transition: transform 0.3s ease;
}

.pocket-front {
    z-index: 3;
}

.pocket-wrapper:hover .lighter-item {
    transform: translateY(-60%) scale(0.7);
}

body.custom-cursor {
    cursor: url('images/lighter.svg') 12 12, auto;
}

body.custom-cursor a,
body.custom-cursor button,
body.custom-cursor #lighter-container {
    cursor: url('images/lighter.svg') 12 12, auto;
}