:root {
    --bg: #fcfcfc;
    --sidebar-bg: #0d2b2d;
    --sidebar-text: #e0f2f1;
    --accent: #ff6b35; /* Unified to the Amber used in your later styles */
    --accent-orange: #ff6b35; /* Kept for the original burnt orange highlights */
    --text-main: #1a1a1a;
    --text-muted: #666;
    --border: #eef2f2;
    --font-sans: 'Inter', sans-serif;
    --font-serif: "Georgia", serif;
}

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

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

/* --- LAYOUT --- */
.mobile-header {
    display: none;
    background: var(--sidebar-bg);
    color: var(--accent);
    padding: 1rem 1.5rem;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

#menu-toggle {
    background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; gap: 5px;
}
.bar { width: 22px; height: 2px; background: white; transition: 0.3s; }

.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    width: 300px;
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    padding: 3rem 2rem;
    z-index: 999;
}

.sidebar-content {
    display: flex; flex-direction: column; height: 100%;
}

.content {
    margin-left: 300px;
    padding: 6rem;
    min-height: 100vh;
}

#detail-view {
    background-color: #f9f9f9;
    min-height: 100vh;
}

/* --- NAVIGATION --- */
#main-nav {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-group-link {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--sidebar-text);
    text-align: left;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
    position: relative;
    overflow: hidden;
}

.nav-group-link:hover {
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 1.25rem;
    color: #fff;
}

.nav-group-link.active {
    opacity: 1;
    color: #fff;
    background: rgba(255, 107, 53, 0.1);
}

.nav-group-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--accent-orange);
    border-radius: 0 4px 4px 0;
}

/* --- HERO SECTION --- */
.hero-content { max-width: 800px; animation: fadeIn 0.5s ease-out; }

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
    margin-bottom: 2rem;
    font-family: var(--font-serif);
    font-style: italic;
    min-height: 2.4em;
    display: block;
}

.highlight {
    display: block;
    color: var(--accent);
    font-style: normal;
    line-height: 1; 
    margin-top: 0.2em; 
}

.type-tag { 
    color: var(--accent-orange); 
    font-weight: 800; 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    display: block; 
    margin-bottom: 1rem; 
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 2rem;
}

.hero-description strong {
    color: var(--sidebar-bg);
    font-weight: 600;
}

/* --- PROJECT INDEX & CARDS --- */
.project-index {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Update these in your style.css */

.project-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease-in-out; /* Smooth but fast transition */
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    /* Instead of lifting the card, we change the border and background slightly */
    border-color: var(--sidebar-bg); 
    background: #fcfdfd;
    box-shadow: 0 4px 12px rgba(13, 43, 45, 0.05);
}

/* Add a subtle accent bar that appears on hover */
.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.project-card:hover::before {
    transform: scaleY(1);
}

.open-file-btn {
    margin-top: 2rem;
    display: inline-block;
    font-weight: 800;
    font-size: 0.7rem;
    color: var(--sidebar-bg);
    letter-spacing: 0.1em;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    width: fit-content;
    transition: opacity 0.2s;
}

.project-card:not(:hover) .open-file-btn {
    opacity: 0.7;
}

.project-card .card-type {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: var(--accent-orange);
}

.project-card h4 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin: 1rem 0;
    line-height: 1.2;
}

/* --- PROJECT DETAIL VIEW --- */
.project-detail { max-width: 800px; animation: fadeIn 0.5s ease-out; }

.system-meta {
    font-family: monospace;
    font-size: 0.65rem;
    color: #bbb;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.headline-main {
    font-size: 3rem;
    font-family: var(--font-serif);
    font-style: italic;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.project-subtitle {
    font-size: 1.25rem;
    color: var(--accent-orange);
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 4rem;
    /* margin-top: 3rem; */
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.overview-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    color: var(--text-main);
}

.actions-list {
    list-style: none;
    margin-top: 1rem;
}

.actions-list li {
    padding: 1.2rem;
    background: #f8fbfb;
    border-left: 3px solid var(--sidebar-bg);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    transition: transform 0.2s;
}

.actions-list li:hover {
    transform: translateX(5px);
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* --- FIX 3: STABLE TECH PILLS --- */
.tech-pill {
    background: #1a1a1a;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-family: monospace; 
    font-weight: 600;
    color: var(--accent);
    margin: 0 6px 8px 0;
    display: inline-block;
    border-left: 3px solid var(--accent-orange);
    
    /* Strictly transition colors only to prevent layout recalculation */
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    text-transform: lowercase;
    
    /* Forces the browser to treat the size as fixed */
    white-space: nowrap; 
    backface-visibility: hidden;
}

.tech-pill:hover {
    background: var(--accent);
    color: #000;
    border-left-color: #fff; /* Optional: high contrast edge on hover */
    /* Use a glow that doesn't expand the box dimensions */
    box-shadow: 0 0 10px rgba(255, 191, 0, 0.3);
}

.terminal-link {
    display: inline-block;
    color: var(--sidebar-bg);
    text-decoration: none;
    font-weight: 800;
    font-family: monospace;
    font-size: 0.8rem;
    border: 1px solid var(--sidebar-bg);
    padding: 8px 16px;
    transition: all 0.2s;
}

.terminal-link:hover {
    background: var(--sidebar-bg);
    color: #fff;
}

.terminal-back-btn {
    background: none; border: none; color: var(--accent-orange);
    cursor: pointer; font-family: monospace; font-weight: 800;
    font-size: 0.75rem; margin-bottom: 2rem; padding: 0; transition: all 0.2s;
}

/* --- CURSOR SYSTEM --- */
.terminal-cursor::after {
    content: '█';
    margin-left: 8px;
    color: var(--accent);
    animation: blink 1s infinite;
}

.terminal-cursor:has(span)::after { display: none !important; }

#type-base:not(:empty):last-child::after,
#type-highlight:not(:empty)::after {
    content: '█';
    margin-left: 8px;
    color: var(--accent);
    animation: blink 1s infinite;
}

#type-base:has(+ #type-highlight:not(:empty))::after { display: none; }

#cursor-follower {
    width: 30px; height: 30px; position: fixed; pointer-events: none; z-index: 9999;
    transition: transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0; display: flex; align-items: center; justify-content: center;
    will-change: transform;
}
#cursor-follower::before, #cursor-follower::after {
    content: ''; position: absolute; background: rgba(255, 191, 0, 0.4);
}
#cursor-follower::before { width: 100%; height: 1px; }
#cursor-follower::after { width: 1px; height: 100%; }
.cursor-dot { width: 4px; height: 4px; background: var(--accent-orange); border-radius: 50%; z-index: 10000; }

/* --- SIDEBAR FOOTER & FORMS --- */
.sidebar-footer { margin-top: auto; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }

.contact-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    white-space: nowrap; width: 100%; padding: 12px 15px;
    background: var(--accent-orange); color: #fff; border: none;
    font-family: monospace; font-weight: 800; font-size: 0.85rem;
    cursor: pointer; transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.contact-btn:hover { filter: brightness(1.1); transform: translateY(-2px); gap: 15px; }

.contact-form input, .contact-form textarea {
    width: 100%; background: #fafafa; border: 1px solid var(--border);
    border-left: 3px solid var(--sidebar-bg); padding: 1rem; margin-bottom: 1rem;
    font-family: 'Courier New', monospace; font-size: 0.9rem; transition: all 0.2s;
}

.contact-form button[type="submit"] {
    background: var(--sidebar-bg); color: var(--accent); border: none;
    padding: 1rem 2.5rem; font-family: monospace; font-weight: 800;
    cursor: pointer; transition: all 0.2s; letter-spacing: 0.1em;
}

/* --- ANIMATIONS & RESPONSIVE --- */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.animate-in { animation: fadeIn 0.8s ease forwards; opacity: 0; }

@media (max-width: 1023px) {
    .mobile-header { display: flex; }
    .sidebar { left: -100%; transition: 0.4s cubic-bezier(0.7, 0, 0.3, 1); width: 280px; }
    .sidebar.open { left: 0; box-shadow: 20px 0 50px rgba(0,0,0,0.2); }
    .content { margin-left: 0; padding: 3rem 1.5rem; }
    .project-grid { grid-template-columns: 1fr; gap: 2rem; }
    .menu-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-active .bar:nth-child(2) { opacity: 0; }
    .menu-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    #cursor-follower { display: none; }
}



/* --- SIDEBAR HEADER RESTORATION --- */
.sidebar header {
    margin-bottom: 2rem;
    cursor: pointer;
}

.sidebar h1 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent); /* Amber */
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.sidebar .tagline {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--sidebar-text);
    opacity: 0.5;
    font-weight: 600;
}

/* Ensure the sidebar content keeps the header at the top */
.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#main-nav {
    margin-top: 2rem;
    flex-grow: 1;
}





.sidebar-title {
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.filter-link {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: var(--sidebar-text);
    text-align: left;
    font-family: monospace;
    font-size: 0.8rem;
    padding: 0.6rem 0;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.filter-link:hover, 
.filter-link.active {
    opacity: 1;
    color: var(--accent); /* This ensures the selected item stays orange */
    background: rgba(255, 255, 255, 0.05); /* Optional: subtle background shift */
}

.filter-link.active::before {
    content: ">";
    margin-right: 5px;
    color: var(--accent);
}

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 10px;
    opacity: 0;
}

.filter-link.active .status-dot {
    opacity: 1;
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}



/* --- 2. SUBDUED FOOTER --- */
.sidebar-footer footer p {
    font-family: monospace;
    font-size: 0.65rem;
    color: var(--sidebar-text);
    opacity: 0.4;
    letter-spacing: 0.1em;
    margin-top: 1.5rem;
}


/* --- 4. RESTRUCTURED ACTIONS & OUTCOMES --- */
.actions-list {
    list-style: none;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.actions-list li {
    padding: 1rem;
    background: #f8fbfb;
    border-left: 3px solid var(--sidebar-bg);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #333;
}

/* Outcomes styling - using a green tint for 'Success' */
.actions-list.outcomes li {
    background: rgba(46, 204, 113, 0.05);
    border-left: 3px solid #2ecc71;
}

/* Ensure mobile header logo works with the new click-to-home */
#mobile-logo, #go-home {
    cursor: pointer;
}


/* Section Icons */
.section-icon {
    font-size: 1rem;
    margin-right: 10px;
    color: var(--accent-orange);
    opacity: 0.8;
}

/* Restructured Outcomes List with Checkmarks */
.actions-list.outcomes li {
    background: rgba(46, 204, 113, 0.03); /* Very subtle green tint */
    border-left: 3px solid #2ecc71; /* Success green */
    position: relative;
    padding-left: 2.5rem; /* Make room for an inline icon if desired */
}

/* Optional: Add a subtle checkmark to every outcome item automatically */
.actions-list.outcomes li::before {
    content: '\f00c'; /* FontAwesome check icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 12px;
    color: #2ecc71;
    font-size: 0.8rem;
}


.open-file-btn {
    margin-top: 1.5rem;
    font-family: monospace;
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    font-weight: 800;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.project-card:hover .open-file-btn {
    opacity: 1;
}

.type-tag {
    background: var(--sidebar-bg);
    color: #fff;
    padding: 4px 8px;
    font-family: monospace;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: inline-block;
}


.honey { display: none !important; visibility: hidden; }

.form-status {
    margin-top: 1rem;
    font-family: monospace;
    font-size: 0.8rem;
    min-height: 1.2rem;
    letter-spacing: 0.05em;
}

#contact-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- CONTACT FORM STYLING --- */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

#contact-form input, 
#contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    background: #f8fbfb;
    border: 1px solid var(--border);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-main);
    transition: border-color 0.2s;
}

#contact-form input:focus, 
#contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

#contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    background: var(--sidebar-bg);
    color: #fff;
    border: none;
    padding: 1rem;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover:not(:disabled) {
    background: var(--accent);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status Message Area - Prevents layout jumping */
.form-status {
    margin-top: 1rem;
    font-family: monospace;
    font-size: 0.75rem;
    min-height: 1.2rem;
    letter-spacing: 0.05em;
    padding-left: 5px;
}