/* Modern Design System - Portfolio Revamp */

:root {
    /* Light Mode Variables - Slate & Violet */
    --bg-primary: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-secondary-rgb: 241, 245, 249;
    /* Slate-100 */
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-primary-rgb: 15, 23, 42;
    /* Slate-900 */
    --text-secondary: #475569;
    /* Slate-600 */
    --accent-primary: #7c3aed;
    /* Violet-600 */
    --accent-secondary: #8b5cf6;
    /* Violet-500 */
    --border-color: #e2e8f0;
    /* Slate-200 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 70px;
}

[data-theme="dark"] {
    /* Dark Mode Variables - Slate & Violet */
    --bg-primary: #0f172a;
    /* Slate-900 */
    --bg-secondary: #1e293b;
    --bg-secondary-rgb: 30, 41, 59;
    /* Slate-800 */
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-primary-rgb: 248, 250, 252;
    /* Slate-50 */
    --text-secondary: #94a3b8;
    /* Slate-400 */
    --accent-primary: #a78bfa;
    /* Violet-400 */
    --accent-secondary: #7c3aed;
    /* Violet-600 */
    --border-color: #334155;
    /* Slate-700 */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    /* Default Ocean gradient for dark mode */
    --card-gradient: linear-gradient(-45deg, rgba(3, 25, 38, 0.9), rgba(0, 119, 182, 0.3), rgba(72, 202, 228, 0.2), rgba(3, 25, 38, 0.9));
}

/* Theme A: Ocean (Cool Blue/Cyan) */
[data-aesthetic="pastel"] {
    --theme-primary: #0077B6;
    --theme-secondary: #00B4D8;
    --theme-accent: #F0F8FF;
    --theme-text: #1A1A1A;
    --theme-border-radius: 12px;
    --theme-shadow-strength: 0.1;
}

/* Theme B: Sunset (Warm Orange/Yellow) */
[data-aesthetic="gradient"] {
    --theme-primary: #FF5400;
    --theme-secondary: #FF9E00;
    --theme-accent: #FFF8E1;
    --theme-text: #1A1A1A;
    --theme-border-radius: 12px;
    --theme-shadow-strength: 0.1;
}

/* Apply theme colors to accent variables */
[data-aesthetic="pastel"] {
    --accent-primary: #0077B6;
    --accent-secondary: #00B4D8;
}

[data-aesthetic="gradient"] {
    --accent-primary: #FF5400;
    --accent-secondary: #FF9E00;
}

/* Theme-specific adjustments for dark mode */
/* Theme-specific adjustments for dark mode */
/* Theme-specific adjustments for dark mode */
[data-theme="dark"][data-aesthetic="pastel"] {
    --accent-primary: #48CAE4;
    --accent-secondary: #90E0EF;
    --bg-primary: #021017;
    --bg-secondary: #031926;
    --bg-secondary-rgb: 3, 25, 38;
    --text-primary: #CAF0F8;
    --text-primary-rgb: 202, 240, 248;
    /* Ocean Dark: Deep blue to cyan wave */
    --card-gradient: linear-gradient(-45deg, rgba(3, 25, 38, 0.9), rgba(0, 119, 182, 0.3), rgba(72, 202, 228, 0.2), rgba(3, 25, 38, 0.9));
}

[data-theme="dark"][data-aesthetic="gradient"] {
    --accent-primary: #FF9E00;
    --accent-secondary: #FFB700;
    --bg-primary: #1A0F00;
    --bg-secondary: #2E1A00;
    --bg-secondary-rgb: 46, 26, 0;
    --text-primary: #FFF8E1;
    --text-primary-rgb: 255, 248, 225;
    /* Sunset Dark: Deep orange/brown to bright fire */
    --card-gradient: linear-gradient(-45deg, rgba(46, 26, 0, 0.9), rgba(255, 84, 0, 0.3), rgba(255, 158, 0, 0.2), rgba(46, 26, 0, 0.9));
}

/* Theme-specific adjustments for light mode */
[data-theme="light"][data-aesthetic="pastel"] {
    --accent-primary: #0077B6;
    --accent-secondary: #00B4D8;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F0F8FF;
    --bg-secondary-rgb: 240, 248, 255;
    /* AliceBlue tint for cards */
    --text-primary: #1A1A1A;
    --text-primary-rgb: 26, 26, 26;
}

[data-theme="light"][data-aesthetic="gradient"] {
    --accent-primary: #FF5400;
    --accent-secondary: #FF9E00;
    --bg-primary: #FFFFFF;
    --bg-secondary: #FFF8E1;
    --bg-secondary-rgb: 255, 248, 225;
    /* Warm tint for cards */
    --text-primary: #1A1A1A;
    --text-primary-rgb: 26, 26, 26;
}

/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Switzer", -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Smooth transitions for theme-aware elements */
.btn,
.project-card,
.tag,
.navbar,
.theme-toggle,
.aesthetic-toggle,
a,
.nav-link,
.project-thumbnail {
    transition: all 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.text-accent {
    color: var(--accent-primary);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.btn-primary {
    background-color: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: rgba(var(--accent-primary), 0.1);
    transform: translateY(-2px);
}

[data-theme="light"] .btn-primary:hover {
    background-color: rgba(var(--accent-primary), 0.1);
}

.btn-fill {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-fill:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(var(--bg-primary-rgb), 0.85);
    /* Needs RGB conversion for real glassmorphism, simulating with opacity */
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    /* Ensure vertical centering */
    padding-top: 2px;
    /* Push text slightly down for optical alignment */
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 18px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    /* transform: translateY(-1px); Removed for better alignment */
}

.theme-toggle:hover {
    color: var(--accent-primary);
    background-color: transparent;
}

/* Ensure SVG has no background fill that conflicts */
#theme-toggle svg {
    background: none;
    fill: none;
    width: 18px;
    height: 18px;
    display: block;
    /* Removes extra space below SVG */
}

#theme-toggle svg g,
#theme-toggle svg path,
#theme-toggle svg circle,
#theme-toggle svg line {
    stroke: currentColor;
}

/* Aesthetic Toggle Button */
/* Aesthetic Toggle Button */
.aesthetic-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    /* transform: translateY(-1px); Removed for better alignment */
}

.aesthetic-toggle:hover {
    opacity: 0.7;
}

.aesthetic-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    transition: stroke 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding-top: var(--nav-height);
}

.hero-content {
    max-width: 1000px;
}

.hero-subtitle {
    font-family: "Switzer", -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.hero-description {
    max-width: 600px;
    font-size: 1.2rem;
    margin-bottom: 50px;
}

/* Flow Text Animation */
.flow-text {
    display: inline-block;
    background: linear-gradient(120deg, var(--accent-primary), #3b82f6, var(--accent-secondary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 300% 300%;
    animation: flowGradient 4s ease-in-out infinite;
    font-weight: 800;
}

@keyframes flowGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* About Section */
.about-grid {
    display: block;
    /* Changed from grid to block since we only have text now */
    max-width: 800px;
    /* Limit width for readability */
    margin: 0 auto;
}

.about-img-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img-wrapper img {
    width: 100%;
    transition: var(--transition);
    filter: grayscale(100%);
}

.about-img-wrapper:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Skills */
/* Skills Section Revamp */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.skill-category {
    background-color: var(--bg-secondary);
    /* Simple solid background */
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(var(--text-primary-rgb), 0.1);
    /* Subtle border based on text color */
}

/* Animated gradients ONLY for dark mode */
[data-theme="dark"] .skill-category {
    background: var(--card-gradient);
    background-size: 400% 400%;
    /* Enable gradient movement */
    animation: gradientAnim 15s ease infinite;
    /* Smooth continuous animation */
    backdrop-filter: blur(12px);
    /* Glass blur effect */
    -webkit-backdrop-filter: blur(12px);
    /* Safari support */
}

@keyframes gradientAnim {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.skill-category h3 {
    color: var(--accent-primary);
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    font-family: "Zodiak", Georgia, serif;
}

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

.skill-category-list li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-family: "Switzer", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
}

.skill-category-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: bold;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
}

/* Spotlight Effect */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y),
            rgba(255, 255, 255, 0.06),
            transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 2;
}

.project-card:hover::before {
    opacity: 1;
}

.project-img {
    height: 200px;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img img {
    transform: scale(1.1);
}

.project-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.project-desc {
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link-icon {
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: var(--transition);
}

.project-link-icon:hover {
    color: var(--accent-primary);
}

/* Contact Section */
.contact-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-title {
    font-size: 3rem;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.social-icon {
    font-size: 1.5rem;
    color: var(--text-primary);
    /* Changed from text-secondary to text-primary for better contrast */
    transition: var(--transition);
}

.social-icon:hover {
    color: var(--accent-primary);
    transform: translateY(-3px);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
        /* Mobile menu to be implemented if needed, for now hiding */
    }

    .hero-title {
        font-size: 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 0;
    }
}

/* Legacy Support for Project Pages */
#breadcrumbs-header {
    padding: 20px;
    background-color: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

#breadcrumb a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.breadcrumb-img {
    display: none;
    /* Hide the image to fix "photo flash" */
}

.project-header {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--bg-primary);
}

.project-icon {
    width: 60px;
    margin: 0 auto 20px auto;
    display: block;
}

.tag-container {
    margin: 20px 0;
}

.tag {
    display: inline-block;
    padding: 5px 15px;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 0 5px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.project-image {
    max-width: 80%;
    border-radius: 8px;
    margin: 20px auto;
    /* Center the image */
    display: block;
    /* Ensure it's a block element for margin: auto to work */
    box-shadow: var(--shadow-md);
}

.content-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 20px auto;
    max-width: 800px;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
}

/* Ensure dark mode works for legacy pages which use body.dark-mode */
body.dark-mode {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

body.dark-mode .tag {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Navbar adjustments for project pages */
.navbar .back-link {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* List Styles */
.content-section ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.content-section ul li {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.carousel-slide {
    display: none;
    text-align: center;
}

.carousel-slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-slide img {
    width: 100%;
    display: block;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.carousel-btn {
    background-color: var(--accent-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.carousel-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}


@keyframes fadeIn {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 1;
    }
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.fade-in.active {
    opacity: 1;
}

/* Slide Up Animation */
.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* 3D Card Flip Animation */
.card-3d {
    opacity: 0;
    transform: perspective(1000px) rotateX(-10deg) translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d.active {
    opacity: 1;
    transform: perspective(1000px) rotateX(0) translateY(0);
}

/* Stagger Delay for Multiple Elements */
.scroll-animate:nth-child(1) {
    transition-delay: 0s;
}

.scroll-animate:nth-child(2) {
    transition-delay: 0.1s;
}

.scroll-animate:nth-child(3) {
    transition-delay: 0.2s;
}

.scroll-animate:nth-child(4) {
    transition-delay: 0.3s;
}

.scroll-animate:nth-child(5) {
    transition-delay: 0.4s;
}

.scroll-animate:nth-child(6) {
    transition-delay: 0.5s;
}

.slide-up:nth-child(1) {
    transition-delay: 0s;
}

.slide-up:nth-child(2) {
    transition-delay: 0.15s;
}

.slide-up:nth-child(3) {
    transition-delay: 0.3s;
}

.card-3d:nth-child(1) {
    transition-delay: 0s;
}

.card-3d:nth-child(2) {
    transition-delay: 0.1s;
}

.card-3d:nth-child(3) {
    transition-delay: 0.2s;
}

.card-3d:nth-child(4) {
    transition-delay: 0.3s;
}

.card-3d:nth-child(5) {
    transition-delay: 0.4s;
}

.card-3d:nth-child(6) {
    transition-delay: 0.5s;
}


/* 3D Tilt Effect */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.tilt-content {
    transform: translateZ(20px);
}

.breadcrumb-nav {
    justify-content: space-between;
}

.breadcrumb-links {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

.breadcrumb-links a {
    color: var(--text-secondary);
}

.breadcrumb-links a:hover {
    color: var(--accent-primary);
}

.breadcrumb-links .separator {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.breadcrumb-links .current-page {
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer Consistency */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 40px;
    border-top: 1px solid var(--border-color);
}

/* Game Start Button */
#start-game-btn {
    color: var(--text-primary);
    font-size: 18px;
    padding: 6px;
    display: none;
    /* Controlled by JS */
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    cursor: pointer;
    background: none;
    border: none;
}

#start-game-btn:hover {
    color: var(--accent-primary);
    transform: scale(1.1);
}