:root {
    /* Colors */
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-primary: #FF6B00;
    /* Orange */
    --accent-secondary: #FFFFFF;
    /* White */
    --surface-color: #111111;

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
}

.mouse-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(800px circle at var(--x, 50%) var(--y, 50%), rgba(255, 107, 0, 0.08), transparent 80%);
    transition: opacity 0.3s ease;
}

/* Typography */
h1,
h2,
h3,
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: var(--spacing-md);
}

p {
    font-size: 1.125rem;
    color: #cccccc;
    max-width: 100%;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    opacity: 0.8;
}

.highlight {
    color: var(--accent-secondary);
    font-weight: 500;
}

.mono {
    font-family: monospace;
    color: var(--accent-primary);
    margin-top: var(--spacing-sm);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

header {
    padding: 0.5rem 0;
    /* Reduced padding for pill shape */
    position: fixed;
    top: 1.5rem;
    /* Float from top */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    z-index: 100;

    /* Liquid Glass Effect */
    background: rgba(17, 17, 17, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    /* Pill shape */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.contact-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 500;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.contact-link:hover,
.contact-link.active {
    opacity: 1;
    color: var(--accent-primary);
}

.contact-link.active {
    background: rgba(255, 107, 0, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 107, 0, 0.2);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.2);
}

/* Remove underline for active pill */
.contact-link::after {
    display: none;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md);
    position: relative;
}

.hero-visual {
    margin-top: var(--spacing-lg);
    width: 100%;
    /* height removed to let image dictate height */
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    /* For 3D floating effect */
}

.hero-image {
    max-width: 100%;
    width: 400px;
    /* Base width */
    height: auto;
    filter: drop-shadow(0 0 50px rgba(255, 107, 0, 0.4));
    animation: float 6s ease-in-out infinite;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(2deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

/* Portfolio Section & Page */
#portfolio,
#portfolio-page {
    padding: var(--spacing-xl) 0;
    position: relative;
    z-index: 10;
}

#portfolio-page h1 {
    font-size: clamp(2.5rem, 5vw, 5rem);
    margin-bottom: 0.5rem;
}

#portfolio-page .subtitle {
    margin-bottom: var(--spacing-lg);
    font-size: 1.25rem;
    color: #888;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: var(--spacing-md);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

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

.project-card p {
    font-size: 1rem;
    color: #888;
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-secondary);
    margin-left: 8px;
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 107, 0, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

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

/* --- Design System Components --- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    background: transparent;
    border: none;
    color: var(--text-color);
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.4);
    border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
    background: #FF8533;
    box-shadow: 0 0 30px rgba(255, 107, 0, 0.6);
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-outline-success {
    border: 1px solid #00ff66;
    color: #00ff66;
}

.btn-outline-success:hover {
    background: rgba(0, 255, 102, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.2);
    transform: translateY(-2px);
}

.btn-outline-info {
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
}

.btn-outline-info:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-outline-warning {
    border: 1px solid #ffb300;
    color: #ffb300;
}

.btn-outline-warning:hover {
    background: rgba(255, 179, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 179, 0, 0.2);
    transform: translateY(-2px);
}

.btn-outline-error {
    border: 1px solid #ff3333;
    color: #ff3333;
}

.btn-outline-error:hover {
    background: rgba(255, 51, 51, 0.1);
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.2);
    transform: translateY(-2px);
}

.btn-ghost {
    color: #888;
}

.btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Inputs */
.input-group {
    margin-bottom: var(--spacing-md);
    position: relative;
}

.input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-secondary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid;
    background: rgba(255, 255, 255, 0.03);
}

.alert-info {
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.alert-warning {
    border-color: #ff9800;
    color: #ff9800;
}

.alert-error {
    border-color: #ff3d00;
    color: #ff3d00;
}

#about {
    padding: var(--spacing-xl) 0;
    background-color: var(--surface-color);
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#about .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#about p {
    font-size: 1.25rem;
    line-height: 1.8;
}

/* Footer */
/* Footer */
/* Footer */
footer {
    padding: var(--spacing-xl) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--bg-color);
    margin-top: var(--spacing-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-col h4 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.footer-col p {
    color: #888;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    max-width: 300px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: flex-start;
}

.footer-link {
    font-family: var(--font-heading);
    color: #888;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--accent-primary);
    /* Orange */
    transform: translateX(4px);
}

.footer-copyright p {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    margin-top: var(--spacing-lg);
}

/* --- Advanced Components --- */

/* Social Card */
.social-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    backdrop-filter: blur(10px);
}

.sc-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.sc-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #000;
    margin-right: 1rem;
}

.sc-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sc-name {
    font-weight: 700;
    color: #fff;
}

.sc-handle {
    font-size: 0.875rem;
    color: #888;
}

.btn-icon {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sc-content p {
    color: #ddd;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.5;
}

.sc-image-placeholder {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.sc-actions {
    display: flex;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.sc-action {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.sc-action:hover {
    color: var(--accent-secondary);
}

/* Advanced Forms */
.form-group {
    margin-bottom: 1.5rem;
}

/* Custom Checkbox & Radio */
.custom-checkbox,
.custom-radio {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 2rem;
    cursor: pointer;
    user-select: none;
    color: #ccc;
}

.custom-checkbox input,
.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark,
.radiomark {
    position: absolute;
    top: 0;
    left: 0;
    height: 1.25rem;
    width: 1.25rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.checkmark {
    border-radius: 4px;
}

.radiomark {
    border-radius: 50%;
}

.custom-checkbox:hover input~.checkmark,
.custom-radio:hover input~.radiomark {
    background-color: rgba(255, 255, 255, 0.2);
}

.custom-checkbox input:checked~.checkmark,
.custom-radio input:checked~.radiomark {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.checkmark:after,
.radiomark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked~.checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-radio input:checked~.radiomark:after {
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.custom-checkbox input:checked~.checkmark:after,
.custom-radio input:checked~.radiomark:after {
    display: block;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
    color: #ccc;
}

.toggle-switch input {
    display: none;
}

.slider {
    position: relative;
    width: 50px;
    height: 26px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 34px;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--accent-secondary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Custom Select */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #888;
}

/* Badges & Chips */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.chip-success .dot {
    background: #00ff66;
    box-shadow: 0 0 5px #00ff66;
}

.chip-warning .dot {
    background: #ffaa00;
    box-shadow: 0 0 5px #ffaa00;
}

.chip-error .dot {
    background: #ff3333;
    box-shadow: 0 0 5px #ff3333;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid var(--bg-color);
}

/* --- Navigation & Layout --- */

/* Dropdowns */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #ccc;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.tab-link {
    background: transparent;
    border: none;
    color: #888;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s;
}

.tab-link:hover {
    color: #fff;
}

.tab-link.active {
    color: var(--accent-secondary);
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-secondary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.ninjacats-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.ninjacats-table th,
.ninjacats-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ninjacats-table th {
    background: rgba(255, 255, 255, 0.03);
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.ninjacats-table tr:last-child td {
    border-bottom: none;
}

.ninjacats-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Progress Bar Modifiers */
.progress-bar.lg {
    height: 12px;
    border-radius: 6px;
}

.progress-bar.lg .progress-fill {
    border-radius: 6px;
}

.progress-fill.striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-fill.animated {
    animation: progress-stripes 1s linear infinite;
}

@keyframes progress-stripes {
    0% {
        background-position: 1rem 0;
    }

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

@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Flexbox Columns System */
/* Flexbox Columns System */
.columns {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    margin-bottom: 1rem;
}

.column {
    flex-basis: 0;
    flex-grow: 1;
    flex-shrink: 1;
    padding: 0.75rem;
}

.column.is-half {
    flex: none;
    width: 50%;
}

.column.is-one-third {
    flex: none;
    width: 33.3333%;
}

.column.is-two-thirds {
    flex: none;
    width: 66.6666%;
}

.column.is-one-quarter {
    flex: none;
    width: 25%;
}

.column.is-three-quarters {
    flex: none;
    width: 75%;
}

.column.is-full {
    flex: none;
    width: 100%;
}

.column.is-four-fifths {
    flex: none;
    width: 80%;
}

.column.is-one-fifth {
    flex: none;
    width: 20%;
}

@media (max-width: 768px) {

    .column.is-half,
    .column.is-one-third,
    .column.is-two-thirds,
    .column.is-one-quarter,
    .column.is-three-quarters,
    .column.is-four-fifths,
    .column.is-one-fifth {
        width: 100%;
    }
}

/* Avatar Stack */
.avatar-stack {
    display: flex;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    border: 2px solid var(--bg-color);
    margin-left: -10px;
}

.avatar-sm:first-child {
    margin-left: 0;
}

/* Grid Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* --- New Components --- */

/* App Sidebar */
.app-sidebar-container {
    display: flex;
    height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.app-sidebar {
    width: 250px;
    background: #000;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
}

.app-sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.collapsed .sidebar-logo {
    display: none;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: #888;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-link.active {
    color: var(--accent-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link i {
    font-size: 1.25rem;
}

.collapsed .sidebar-link span {
    display: none;
}

.collapsed .sidebar-link {
    justify-content: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* App Main Content Preview */
.app-main {
    flex: 1;
    background: var(--bg-color);
    padding: 2rem;
    overflow-y: auto;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    transform: translateY(20px);
    transition: transform 0.3s;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-footer {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1100;
}

.toast {
    background: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--accent-primary);
}

.toast.success {
    border-left-color: #00ff66;
}

.toast.error {
    border-left-color: #ff3333;
}

.toast.info {
    border-left-color: var(--accent-secondary);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast.success .toast-icon {
    color: #00ff66;
}

.toast.error .toast-icon {
    color: #ff3333;
}

.toast.info .toast-icon {
    color: var(--accent-secondary);
}

.toast.warning {
    border-left-color: #ffb300;
}

.toast.warning .toast-icon {
    color: #ffb300;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.toast-message {
    color: #888;
    font-size: 0.875rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Pagination */
.pagination {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #888;
    text-decoration: none;
    transition: all 0.2s;
}

.page-item .page-link:hover,
.page-item.active .page-link {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    list-style: none;
    color: #888;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.breadcrumb-item a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--accent-secondary);
}

.breadcrumb-item+.breadcrumb-item::before {
    content: '/';
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.2);
}

.breadcrumb-item.active {
    color: #fff;
}

/* Additional Badges */
.chip-purple .dot {
    background: #FF6B00;
    box-shadow: 0 0 5px #FF6B00;
}

.chip-blue .dot {
    background: #FF8533;
    box-shadow: 0 0 5px #FF8533;
}

.chip-indigo .dot {
    background: #CC5500;
    box-shadow: 0 0 5px #CC5500;
}

/* Animation */
@keyframes pulse {
    0% {
        transform: scale(0.8) rotate(0deg);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.1) rotate(10deg);
        opacity: 0.8;
    }
}

.cursor-glow {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.15), transparent 70%);
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    z-index: -1;
    transition: left 0.1s ease, top 0.1s ease;
}




/* --- Tree View Component --- */
.tree-view {
    list-style: none;
    padding-left: 0;
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #ccc;
}

.tree-view ul {
    list-style: none;
    padding-left: 1.25rem;
    margin: 0;
    display: none;
    /* Hidden by default */
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.tree-view li {
    margin: 0.25rem 0;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    gap: 0.5rem;
}

.tree-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.tree-item.selected {
    background: rgba(255, 107, 0, 0.15);
    /* Brand purple hint */
    color: #fff;
    border-left: 2px solid var(--accent-primary);
}

.tree-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    color: #666;
    transition: transform 0.2s ease;
}

.tree-caret:hover {
    color: #fff;
}

/* Rotate caret when open */
.tree-group.open>.tree-item .tree-caret {
    transform: rotate(90deg);
}

/* Show children when open */
.tree-group.open>ul {
    display: block;
    animation: slideDown 0.2s ease;
}

.tree-icon {
    font-size: 1.1rem;
    color: #888;
}

.tree-item:hover .tree-icon {
    color: #aaa;
}

/* Folder colors */
.ph-folder,
.ph-folder-open {
    color: #ffd700;
    /* Gold/Folder yellow */
    opacity: 0.8;
}

.ph-file-code {
    color: #00e676;
}

.ph-file-css {
    color: #2979ff;
}

.ph-image {
    color: #ff0055;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

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

/* Fix for content links */
.content a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-decoration-color: rgba(255, 107, 0, 0.3);
    transition: all 0.2s ease;
}

.content a:hover {
    color: #FF8533;
    text-decoration-color: var(--accent-primary);
}

/* ========================================
   Blog Tags & Tag Filter
   ======================================== */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.blog-tag {
    text-decoration: none;
    color: #ccc;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.blog-tag:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.1);
}

.tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    padding: 0.3rem 0.9rem;
    border-radius: 16px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-filter-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.tag-filter-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.blog-article {
    transition: opacity 0.3s ease;
}

.blog-article.hidden-by-filter {
    display: none;
}

/* ========================================
   Hamburger Menu Button
   ======================================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Responsive: Mobile (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
    /* Header & Navigation */
    header {
        width: 95%;
        top: 0.75rem;
        border-radius: 16px;
    }

    header nav.container {
        padding: 0 1rem;
    }

    .hamburger {
        display: flex;
    }

    .logo {
        font-size: 1.1rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(17, 17, 17, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 16px;
        padding: 1rem;
        gap: 0.25rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links .contact-link {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        text-align: center;
    }

    .nav-links .contact-link:hover,
    .nav-links .contact-link.active {
        background: rgba(255, 107, 0, 0.1);
    }

    /* Hero Section */
    #hero {
        min-height: auto;
        padding-top: 5rem !important;
        padding-bottom: 2rem;
    }

    #hero .columns {
        flex-direction: column;
    }

    #hero .column.is-half {
        text-align: center !important;
    }

    #hero .column.is-half:last-child {
        order: -1;
    }

    #hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-image {
        width: 250px !important;
    }

    #hero div[style*="display: flex"][style*="gap: 1rem"] {
        justify-content: center;
    }

    /* About Section */
    #about .columns {
        flex-direction: column;
    }

    #about .column.is-half {
        text-align: center !important;
    }

    #about .column.is-half:first-child {
        order: -1;
    }

    #about .hero-image {
        max-width: 60% !important;
        margin: 0 auto;
    }

    #about div[style*="text-align: justify"] {
        text-align: left !important;
    }

    /* Section Spacing */
    section {
        padding: 3rem 0 !important;
    }

    .container {
        padding: 0 1rem;
    }

    /* Footer */
    footer {
        padding: var(--spacing-lg) 0;
        margin-top: var(--spacing-lg);
    }

    .footer-col p {
        max-width: 100%;
    }

    /* Buttons */
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }

    /* Typography */
    p {
        font-size: 1rem;
    }

    h2 {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    /* Project Grid */
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Responsive: Small Mobile (max-width: 480px)
   ======================================== */
@media (max-width: 480px) {
    header {
        width: 96%;
        top: 0.5rem;
    }

    .logo {
        font-size: 1rem;
    }

    #hero h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem !important;
    }

    .hero-image {
        width: 200px !important;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

/* ========================================
   Responsive: Tablet (max-width: 1024px)
   ======================================== */
@media (max-width: 1024px) and (min-width: 769px) {
    header {
        width: 95%;
    }

    .nav-links {
        gap: 1rem;
    }

    .contact-link {
        font-size: 0.9rem;
    }

    #hero .columns {
        align-items: center;
    }

    .hero-image {
        width: 300px !important;
    }
}