/* Basic Styles & Color Palette (from Vesper theme) */
html {
    height: 100%;
}

body {
    background-color: #303030;
    color: #FFFFFF;
    font-family: 'Roboto Mono', monospace;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

a {
    color: #99FFE4;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #35DFB1;
}

.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 60px;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background-color: #101010;
    border-bottom: 1px solid #99FFE4;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
}

.logo a {
    color: #FFFFFF;
}

/* Terminal blinking cursor animation - iOS Safari optimized */
.terminal-cursor {
    color: #99FFE4;
    font-weight: bold; /* Made bolder as requested */
    font-size: 1.1em; /* Slightly larger for better visibility */
    margin-left: 3px;
    
    /* iOS Safari specific fixes */
    -webkit-animation: terminal-blink 1.2s infinite ease-in-out;
    -webkit-animation-fill-mode: both;
    -webkit-animation-play-state: running;
    animation-play-state: running;
    
    /* Cross-browser support */
    -moz-animation: terminal-blink 1.2s infinite ease-in-out;
    -o-animation: terminal-blink 1.2s infinite ease-in-out;
    animation: terminal-blink 1.2s infinite ease-in-out;
    animation-fill-mode: both;
    
    /* Enhanced hardware acceleration for iOS */
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    will-change: opacity;
    
    /* Ensure proper display on iOS */
    display: inline-block;
    vertical-align: baseline;
}

/* iOS Safari optimized keyframe animations */
@-webkit-keyframes terminal-blink {
    0% { 
        opacity: 1; 
        -webkit-transform: translate3d(0, 0, 0);
    }
    50% { 
        opacity: 1; 
        -webkit-transform: translate3d(0, 0, 0);
    }
    51% { 
        opacity: 0; 
        -webkit-transform: translate3d(0, 0, 0);
    }
    100% { 
        opacity: 0; 
        -webkit-transform: translate3d(0, 0, 0);
    }
}

@-moz-keyframes terminal-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@-o-keyframes terminal-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes terminal-blink {
    0% { opacity: 1; transform: translate3d(0, 0, 0); }
    50% { opacity: 1; transform: translate3d(0, 0, 0); }
    51% { opacity: 0; transform: translate3d(0, 0, 0); }
    100% { opacity: 0; transform: translate3d(0, 0, 0); }
}

/* iOS Safari specific optimizations */
@media (max-width: 768px) {
    .terminal-cursor {
        /* iOS Safari specific fixes */
        -webkit-animation-duration: 1.2s;
        -webkit-animation-iteration-count: infinite;
        -webkit-animation-timing-function: ease-in-out;
        -webkit-animation-name: terminal-blink;
        animation-duration: 1.2s;
        animation-iteration-count: infinite;
        animation-timing-function: ease-in-out;
        animation-name: terminal-blink;
        
        /* Enhanced mobile performance */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000px;
        perspective: 1000px;
        
        /* Force layer creation on iOS */
        -webkit-transform: translateZ(0) scale(1);
        transform: translateZ(0) scale(1);
        
        /* Ensure visibility on mobile */
        display: inline-block;
        vertical-align: baseline;
        position: relative;
        z-index: 1;
    }
}

/* Additional iOS Safari fallback using transition */
@supports (-webkit-appearance: none) {
    .terminal-cursor {
        transition: opacity 0.6s ease-in-out;
    }
}

/* Force animation on iOS Safari */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
    .terminal-cursor {
        -webkit-animation-delay: 0s;
        animation-delay: 0s;
        -webkit-animation-fill-mode: forwards;
        animation-fill-mode: forwards;
    }
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

nav li {
    margin-left: 20px;
}

nav a {
    font-size: 1.1em;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #FFC799;
}

.desktop-nav .nav-search svg {
    fill: #FFFFFF;
    transition: fill 0.3s ease;
}

/* Make nav icons slightly larger and better aligned */
.desktop-nav .nav-search a,
.desktop-nav .nav-contact a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.desktop-nav .nav-search svg,
.desktop-nav .nav-contact svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Nudge contact icon 1px down to match text baseline */
.desktop-nav .nav-contact svg {
    transform: translateY(1px);
}

/* Active navigation link (current page) */
nav a.active {
    color: #FFC799;
}

/* Page transition (fade-out) */
body.page-fade-out { opacity: 0; }

/* Smooth fade-in on load: default visible; pages may add 'page-hidden' to hide */
body { opacity: 1; transition: opacity 0.45s ease; }
body.page-visible { opacity: 1; }
body.page-hidden { opacity: 0; }

/* CSS Loader - Inspired by css-loaders.com shape #1 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #303030;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 40px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #f03355;
    clip-path: polygon(0 0,100% 0,100% 100%,0 100%);
    animation: l1 2s infinite cubic-bezier(0.3,1,0,1);
}

@keyframes l1 {
    33% {
        border-radius: 0;
        background: #514b82;
        clip-path: polygon(0 0,100% 0,100% 100%,0 100%);
    }
    66% {
        border-radius: 0;
        background: #ffa516;
        clip-path: polygon(50% 0,50% 0,100% 100%,0 100%);
    }
}

/* Accessibility widget styles */
#accessibility-widget {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 1100;
    font-family: inherit;
}

#accessibility-widget .accessibility-toggle {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #101010;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#accessibility-widget .accessibility-toggle svg {
    width: 22px; height: 22px; display:block;
}

#accessibility-widget .accessibility-panel {
    width: 260px;
    background: #101010;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    padding: 12px;
    margin-bottom: 8px;
    display: none;
}

#accessibility-widget.open .accessibility-panel {
    display: block;
}

/* iOS-like switches (exact iOS design proportions) */
.ios-switch { 
    position: relative; 
    width: 51px; 
    height: 31px; 
    display: inline-block; 
}
.ios-switch input { 
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.ios-switch .track {
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    border-radius: 16px;
    background: #34C759; /* iOS green when checked */
    transition: background-color 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}
.ios-switch .thumb {
    position: absolute; 
    top: 2px; 
    left: 2px; 
    width: 27px; 
    height: 27px;
    border-radius: 50%; 
    background: #ffffff; 
    box-shadow: 0 3px 8px 0 rgba(0,0,0,0.15), 0 3px 1px 0 rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
    cursor: pointer;
}
/* Unchecked state */
.ios-switch input:not(:checked) + .track { 
    background: #39393D; /* iOS dark gray when unchecked */
}
.ios-switch input:not(:checked) + .track .thumb { 
    transform: translateX(0); 
}
/* Checked state */
.ios-switch input:checked + .track { 
    background: #99FFE4; /* Turquoise navigation color */
}
.ios-switch input:checked + .track .thumb { 
    transform: translateX(20px); 
}
/* Unchecked state - subtle gray */
.ios-switch input:not(:checked) + .track { 
    background: #39393D; /* Subtle dark gray when unchecked */
}

/* Reduce animations */
body.reduce-animations * {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
}

/* Hide loader when animations are disabled */
body.reduce-animations .page-loader {
    display: none !important;
}

/* Accessibility widget pop animation (respects reduce-animations) */
.accessibility-panel.pop {
    animation: popIn 0.28s ease;
}
@keyframes popIn {
    0% { transform: translateY(8px) scale(0.98); opacity: 0 }
    60% { transform: translateY(-6px) scale(1.02); opacity: 1 }
    100% { transform: translateY(0) scale(1); opacity: 1 }
}

/* Light mode overrides - Softer, easier on the eyes */
body.light-mode {
    background-color: #f8f9fa;
    color: #2c3e50;
}
body.light-mode header { 
    background-color: #ffffff; 
    border-bottom-color: #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
body.light-mode .content-section { 
    background-color: #ffffff; 
    color: #2c3e50; 
    border-bottom-color: #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
body.light-mode .skills-list li { 
    background-color: #e9ecef; 
    color: #495057;
}
body.light-mode .skill-bar { 
    background-color: #f8f9fa; 
    border-color: #dee2e6;
}
body.light-mode footer { 
    background-color: #ffffff; 
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}
body.light-mode footer a { 
    color: #495057;
}
body.light-mode .post-excerpt, 
body.light-mode .blog-post-content { 
    color: #495057;
}
/* Light mode - make bright elements darker */
body.light-mode a {
    color: #0066cc; /* Darker blue for links */
}
body.light-mode a:hover {
    color: #004499; /* Even darker on hover */
}
body.light-mode .terminal-cursor {
    color: #0066cc; /* Darker turquoise for cursor */
}
body.light-mode nav a:hover {
    color: #0066cc; /* Consistent link hover color */
}
body.light-mode .hero h1 {
    color: #2c3e50; /* Dark text for main heading */
}
body.light-mode .hero p {
    color: #6c757d; /* Softer gray for subtitle */
}
body.light-mode .content-section h2 {
    color: #495057; /* Darker headings */
}
body.light-mode .logo a {
    color: #2c3e50; /* Dark logo text */
}
/* Light mode - fix navigation icons */
body.light-mode .desktop-nav .nav-search svg,
body.light-mode .desktop-nav .nav-contact svg {
    fill: #2c3e50; /* Dark icons for light mode */
}
body.light-mode .desktop-nav .nav-search a:hover svg {
    fill: #0066cc; /* Darker blue on hover */
}
/* Light mode - fix mobile navigation icons */
body.light-mode .mobile-nav-links svg {
    stroke: #2c3e50; /* Dark stroke for mobile nav icons */
    fill: #2c3e50; /* Dark fill for mobile nav icons */
}
/* Light mode - fix back to top button */
body.light-mode .back-to-top {
    background-color: #2c3e50; /* Dark background */
}
body.light-mode .back-to-top:hover {
    background-color: #495057; /* Darker on hover */
}
body.light-mode .back-to-top svg {
    fill: #ffffff; /* White icon on dark background */
}

.desktop-nav .nav-search a:hover svg {
    fill: #FFC799;
}

.desktop-nav {
    position: relative;
    display: flex;
    align-items: center;
}

.desktop-search-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    transition: width 0.35s ease-in-out, opacity 0.2s ease-in-out;
    pointer-events: none;
}

.desktop-search-field {
    background-color: #363636;
    color: #FFFFFF;
    border: 1px solid #99FFE4;
    padding: 8px 15px;
    border-radius: 5px;
    font-family: inherit;
    caret-color: #FFC799;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
}

.desktop-nav.search-active .desktop-search-container {
    width: 250px; /* Or any width you prefer */
    opacity: 1;
    pointer-events: auto;
}

.desktop-nav.search-active ul {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

/* Full-screen canvas for animation */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    margin: 10px 0 30px;
}

/* Hero Section */
.hero {
    height: calc(100vh - 80px); /* Full height minus header */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero h1 {
    font-size: 4em;
    margin: 0;
    color: #FFFFFF;
}

.hero p {
    font-size: 1.5em;
    color: #A0A0A0;
    margin: 10px 0 30px;
}

.cta-button {
    background-color: #FFC799;
    color: #101010;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
    background-color: #E6B99D;
    color: #101010;
    transform: translateY(-2px);
}

/* Content Sections */
.content-section {
    padding: 60px 60px;
    background-color: #101010;
    border-bottom: 1px solid #101010;
    /*border-radius: 20px;*/
    box-shadow: 1px 1px 13px 0 rgb(99, 99, 99);
}

.content-section h2 {
    font-size: 2.5em;
    color: #ACA1CE;
    text-align: left;
    margin-bottom: 40px;
}

.content-section p {
    line-height: 1.3;
}

/* About Section */
.about-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.about-text {
    flex: 2;
}

.skills-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-list li {
    background-color: #8FB99F;
    color: #101010;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
}

/* Updated Skills Section */
.skills {
    flex: 1;
    min-width: 300px;
}

.skill {
    margin-bottom: 15px;
}

.skill p {
    margin: 0 0 10px;
    display: flex;
    justify-content: space-between;
}

.skill-bar {
    background-color: #101010;
    border-radius: 10px;
    padding: 3px;
    border: 1px solid #8FB99F;
}

.skill-level {
    background-color: #8FB99F;
    height: 10px;
    border-radius: 5px;
}

/* Contact Form */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

#contact-form input,
#contact-form textarea {
    background-color: #101010;
    color: #FFFFFF;
    border: 1px solid #99FFE4;
    padding: 15px;
    border-radius: 5px;
    font-family: inherit;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: #35DFB1;
}

#contact-form .honeypot {
    display: none;
}

#contact-form button {
    background-color: #FFC799;
    color: #101010;
    padding: 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#contact-form button:hover {
    background-color: #E6B99D;
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #101010;
    color: #A0A0A0;
    flex-shrink: 0;
}

footer p {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

footer a {
    color: #A0A0A0;
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #99FFE4;
}

footer a svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* === CORRECTED RESPONSIVE AND MOBILE NAVIGATION STYLES === */

.mobile-nav-header {
    position: relative; /* Crucial for positioning the search container */
    padding: 15px 20px;
    border-bottom: 1px solid #363636;
    overflow: hidden;
}

.mobile-nav-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.mobile-nav-title-text {
    flex-grow: 1;
    text-align: center;
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #ACA1CE;
    white-space: nowrap;
    transition: opacity 0.2s ease-in-out;
}

.mobile-nav-search-toggle,
.mobile-nav-close {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease-in-out;
}

.mobile-nav-search-container {
    position: absolute;
    left: 20px;
    top: 15px; /* Align with header padding */
    height: calc(100% - 30px); /* Align with header padding */
    width: 0;
    opacity: 0;
    transition: width 0.35s ease-in-out, opacity 0.2s ease-in-out;
    pointer-events: none;
}

.mobile-nav-search-field {
    background-color: #101010;
    color: #FFFFFF;
    border: 1px solid #99FFE4;
    padding: 0 15px; /* Vertical padding handled by container height */
    border-radius: 5px;
    font-family: inherit;
    caret-color: #FFC799;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
}

/* --- Search Active State --- */
.mobile-nav-header.search-active .mobile-nav-title-text,
.mobile-nav-header.search-active .mobile-nav-search-toggle,
.mobile-nav-header.search-active .mobile-nav-close {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-header.search-active .mobile-nav-search-container {
    width: calc(100% - 40px); /* Full width minus side padding */
    opacity: 1;
    pointer-events: auto;
}

/* --- Page Blur Effect --- */
.mobile-menu-is-open > header,
.mobile-menu-is-open > main,
.mobile-menu-is-open > footer,
.mobile-menu-is-open > #particle-canvas {
    transition: filter 0.35s ease-in-out;
    filter: blur(4px) brightness(0.7);
}

/* Mobile Nav from Bottom (Structure & Panel Styles) */
.mobile-nav-trigger {
    display: none; /* Hidden on desktop by default */
    align-items: center;
    gap: 10px;
	background-color: #101010;
    border: 1px solid #99FFE4;
	padding: 10px 20px;
	border-radius: 28px;
	box-shadow: 0 2px 20px -5px #101010;
	color: #FFFFFF;
	font-size: 16px;
	white-space: nowrap;
	position: fixed;
	bottom: 30px;
	left: 50%;
	transform: translateX(-50%);
	cursor: pointer;
	z-index: 105;
	transition: .3s ease-in-out;
}

.mobile-nav-trigger.hidden {
    transform: translate(-50%, 200%);
}

.mobile-nav-trigger:hover {
    background-color: #202020;
}

.mobile-nav-overlay {
    width: 100%;
    height: 100%;
    background: rgba(16, 16, 16, .7);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: opacity .3s ease-in-out;
}

.mobile-nav-overlay[hidden] {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-container {
	display: block;
	width: 100%;
	background: #202020;
	padding-bottom: 15px;
	border-top-left-radius: 20px;
	border-top-right-radius: 20px;
	box-shadow: 0px -9px 50px -30px black;
	position: fixed;
	bottom: 0;
    left: 0;
	z-index: 105;
	transform: translateY(0);
	transition: .2s cubic-bezier(.33,1,.53,1);
}

.mobile-nav-container[hidden] {
    transform: translateY(110%);
}

.mobile-nav-links {
	display: flex;
    overflow-x: auto;
    /* Hide scrollbar for a cleaner look */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
	padding: 15px 20px;
	font-weight: bold;
    gap: 20px; /* Spacing between links */
}
/* Hide scrollbar for Chrome, Safari and Opera */
.mobile-nav-links::-webkit-scrollbar {
    display: none;
}

.mobile-nav-links a {
    flex: 0 0 auto; /* Prevent links from shrinking */
    padding: 10px 15px;
    color: #FFC799; /* Updated Color */
    text-decoration: none;
    text-align: center;
    font-size: 1.2em; /* Adjusted size for horizontal layout */
    border-bottom: none;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
}

.mobile-nav-links a:last-child {
    border-bottom: none;
}

.mobile-nav-links a:hover {
    color: #101010;
    background-color: #99FFE4;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .desktop-nav {
        display: none;
    }

    .mobile-nav-trigger {
        display: flex;
    }

    .hero h1 {
        font-size: 3em;
    }

    .hero p {
        font-size: 1.2em;
    }

    .about-content {
        flex-direction: column;
    }

    .skills {
        width: 100%;
    }

    footer p {
        flex-direction: column;
        gap: 10px;
    }

    /* Reduce container padding on smaller screens to avoid large borders */
    .container {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1em;
    }
}

/* --- Blog Page Styles --- */
.blog-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.blog-main-content {
    flex: 3;
}

.sidebar {
    flex: 1;
    min-width: 220px;
    margin-top: 6rem;
}

.blog-title {
    font-size: 2.5em;
    color: #ACA1CE;
    margin-bottom: 40px;
    border-bottom: 1px solid #99FFE4;
    padding-bottom: 20px;
}

.blog-post-summary {
    background-color: #101010;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #8FB99F;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.post-title {
    margin-top: 0;
    font-size: 1.8em;
}

.post-title a {
    color: #FFFFFF;
}

.post-meta {
    font-size: 0.9em;
    color: #A0A0A0;
    margin-bottom: 15px;
}

.post-excerpt {
    color: #FFFFFF;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin-top: 20px;
    color: #FFC799;
    font-weight: bold;
}

.read-more:hover {
    color: #E6B99D;
}

.sidebar-widget {
    background-color: #101010;
    padding: 20px;
    border-radius: 8px;
}

.widget-title {
    margin-top: 0;
    color: #ACA1CE;
    border-bottom: 1px solid #363636;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-list li a {
    display: block;
    padding: 8px 0;
    color: #A0A0A0;
    border-bottom: 1px solid #363636;
    transition: color 0.3s ease;
}

.widget-list li:last-child a {
    border-bottom: none;
}

.widget-list li a:hover {
    color: #FFFFFF;
}

.widget-list .active {
    color: #FFFFFF;
    font-weight: bold;
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #FFC799;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #E6B99D;
    transform: translateY(-2px);
}

.back-to-top svg {
    fill: #101010;
}

/* --- Single Blog Post Styles --- */
.blog-post-full {
    background-color: #101010;
    padding: 40px;
    border-radius: 8px;
}

.blog-post-header {
    text-align: center;
    border-bottom: 1px solid #363636;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post-title-full {
    font-size: 2.2em;
    color: #FFFFFF;
    margin: 0 0 10px;
}

.post-meta-full {
    color: #A0A0A0;
    font-size: 0.9em;
    margin-bottom: 20px;
    order: 1;
}

.breadcrumbs {
    font-size: 0.8em;
    color: #A0A0A0;
    margin-top: 10px;
}

.breadcrumbs a {
    color: #FFC799;
}

.blog-post-content {
    line-height: 1.8;
    color: #A0A0A0;
    overflow-wrap: break-word; /* Prevents long strings from overflowing */
    word-wrap: break-word;
}

.blog-post-content h3 {
    font-size: 1.6em;
    color: #ACA1CE;
    margin-top: 40px;
    margin-bottom: 20px;
}

.blog-post-content img.blog-post-image {
    max-width: 100%;
    width: 100% !important;
    height: auto;
    display: block;
    margin: 1.5em auto; /* Center the image and add vertical space */
    border-radius: 8px;
    cursor: pointer;
}

.blog-post-content p {
    margin: 0 0 1.5em;
}

.blog-post-content img,
.blog-post-content figure,
.blog-post-content a {
    max-width: 100%;
    height: auto;
    display: block;
}

.blog-post-content img {
    margin: 1.5em 0;
    border-radius: 8px;
    cursor: pointer;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.blog-post-content li {
    margin-bottom: 10px;
}

.blog-post-content a {
    color: #FFC799;
}

.blog-post-content a:hover {
    text-decoration: underline;
}

.blog-post-content strong {
    color: #99FFE4;
}

.blog-post-content em {
    font-style: italic;
    color: #A0A0A0;
}

/* --- Blog Filtering Animation Styles --- */
.blog-post-summary.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: none;
    overflow: hidden;
}

.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    /* background-color is now set by JS */
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    transition: transform 2s cubic-bezier(0.17, 0.84, 0.44, 1), opacity 2s ease-out, background-color 2s ease-in-out;
}

@media (max-width: 768px) {
    .blog-container {
        flex-direction: column;
    }

    .sidebar {
        margin-top: 2rem;
        width: 100%;
    }
}

/* --- Media Queries --- */
@media (max-width: 1200px) {
    .desktop-nav {
        display: none;
    }

    .mobile-nav-trigger {
        display: flex;
    }

    .hero h1 {
        font-size: 3em;
    }

    .hero p {
        font-size: 1.2em;
    }

    .about-content {
        flex-direction: column;
    }

    .skills {
        width: 100%;
    }

    footer p {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1em;
    }
}

/* --- Tools Page Styles --- */
.calc-textarea {
    width: 100%; min-height: 220px; padding: 14px; border-radius: 8px;
    background: #0f0f0f; border: 1px solid #2a2a2a; color: #fff; box-sizing: border-box;
}
.calc-select {
    width: 100%; padding: 10px; background: #0f0f0f; border: 1px solid #2a2a2a; color: #fff; border-radius: 6px; box-sizing: border-box;
}
.calc-button {
    margin-top: 14px; background: #FFC799; color: #101010; border-radius: 8px; padding: 10px 16px; border: none; cursor: pointer;
}
.calc-button:hover { background: #E6B99D; }

/* Tokenizer display styles */
.tokenized-display {
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-family: 'Roboto Mono', monospace;
    line-height: 1.6;
}

.token {
    display: inline-block;
    /* padding: 2px 4px; */
    margin: 1px 1px;
    /* border-radius: 6px; */
    font-size: 0.95em;
    line-height: 1.9;
}

/* 4-color rotation */
.token.t0 { background: rgba(255, 211, 170, 0.25); color: #f5e7d3; }
.token.t1 { background: rgba(188, 227, 199, 0.25); color: #e6ffef; }
.token.t2 { background: rgba(197, 190, 233, 0.25); color: #efeaff; }
.token.t3 { background: rgba(241, 179, 186, 0.25); color: #ffe9ec; }

/* Token stats bar */
.token-stats {
    display: flex;
    gap: 40px;
    padding: 20px;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.token-stat-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: #99FFE4;
}

.stat-label {
    color: #A0A0A0;
    font-size: 1.1em;
}

/* Two-column tokenizer grid */
.tokenizer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 22px 16px; /* more row-gap to avoid overlap with select */
    margin-bottom: 22px;
}
.tokenizer-grid .model-row {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 4px;
}
.tokenizer-label { font-weight: 800; color: #c7bff0; display: block; margin-bottom: 12px; font-size: 1.05rem; }
.tokenizer-box { height: 300px; min-height: 300px; box-sizing: border-box; }
.model-select { width: 280px; height: auto; }

@media (max-width: 900px) {
    .tokenizer-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
}

/* Cost display */
.cost-display {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
}

.cost-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #1a1a1a;
}

.cost-item label {
    color: #A0A0A0;
}

.cost-item span {
    font-weight: 600;
    color: #FFFFFF;
}

.cost-item.total {
    grid-column: 1 / -1;
    border-bottom: none;
    border-bottom: 1px solid #1a1a1a;
    margin-top: 10px;
    padding-top: 15px;
}

.cost-item.total span {
    color: #FFC799;
    font-size: 1.2em;
}

/* Light mode adjustments */
body.light-mode .tokenized-display {
    background: #ffffff;
    border-color: #e9ecef;
}

body.light-mode .token.t0 { background: rgba(255, 211, 170, 0.6); color: #3b3b3b; }
body.light-mode .token.t1 { background: rgba(188, 227, 199, 0.6); color: #2f3a2f; }
body.light-mode .token.t2 { background: rgba(197, 190, 233, 0.6); color: #2e2b3d; }
body.light-mode .token.t3 { background: rgba(241, 179, 186, 0.6); color: #3d2b2e; }

body.light-mode .token-stats {
    background: #ffffff;
    border-color: #e9ecef;
}

body.light-mode .stat-value {
    color: #0066cc;
}

body.light-mode .cost-display {
    background: #ffffff;
    border-color: #e9ecef;
}

body.light-mode .cost-item {
    border-bottom-color: #f0f0f0;
}

body.light-mode .cost-item.total {
    border-top-color: #e9ecef;
}

/* Responsive design for tokenizer */
@media (max-width: 768px) {
    .token-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
    
    .cost-grid {
        grid-template-columns: 1fr;
    }
    
    .cost-item.total {
        grid-column: 1;
    }
}
.calc-table {
    width: 100%;
    border-collapse: collapse;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
}
.calc-table th, .calc-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #2a2a2a;
    text-align: left;
}
.calc-table thead th {
    background: #151515;
    color: #ACA1CE;
    position: sticky;
    top: 0;
    z-index: 1;
}
.calc-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

/* Light mode adjustments for calc table */
body.light-mode .calc-table { background: #ffffff; border-color: #e9ecef; }
body.light-mode .calc-table th, body.light-mode .calc-table td { border-color: #e9ecef; color: #2c3e50 }
body.light-mode .calc-table thead th { background: #f8f9fa; color: #495057 }
body.light-mode .calc-table tbody tr:hover { background: #f3f4f6 }
.tools-content {
    max-width: 1024px;
    margin: 0 auto;
}

.tools-intro {
    font-size: 1.1em;
    color: #A0A0A0;
    margin-bottom: 3rem;
    text-align: left;
    line-height: 1.6;
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tool-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tool-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.tool-item h3 {
    color: #99FFE4;
    font-size: 1.5em;
    margin-bottom: 1rem;
    font-weight: 700;
}

.tool-item p {
    color: #A0A0A0;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #FFC799;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 199, 153, 0.1);
    border: 1px solid rgba(255, 199, 153, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tool-link:hover {
    background: rgba(255, 199, 153, 0.2);
    border-color: rgba(255, 199, 153, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 199, 153, 0.2);
}

.tool-link svg {
    transition: transform 0.3s ease;
}

.tool-link:hover svg {
    transform: translateX(2px);
}

.coming-soon {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.coming-soon h3 {
    color: #808080;
}

.coming-soon p {
    color: #666666;
    font-style: italic;
}

/* Responsive adjustments for tools page */
@media (max-width: 768px) {
    .tools-content {
        padding: 0 1rem;
    }
    
    .tool-item {
        padding: 1.5rem;
    }
    
    .tool-item h3 {
        font-size: 1.3em;
    }
} 