/* Base styles and variables */
:root {
    /* Color palette - using modern, subtle tech colors */
    --primary-dark: #2d3748;
    /* Deep blue-grey for main text */
    --accent-blue: #4299e1;
    /* Soft blue for accents */
    --subtle-grey: #edf2f7;
    /* Light grey for backgrounds */
    --highlight: #9ae6b4;
    /* Soft mint green for highlights */
    --text-primary: #ffffff;
    /* Dark grey for body text */
    --text-secondary: #4a5568;
    /* Medium grey for secondary text */
}

/* Base typography and spacing */
body {
    font-family: 'PT Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #ffffff;
    line-height: 1.6;
    padding-top: 50px;
    background: linear-gradient(45deg, #211f2e, #1a162b, #3f344f) fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Source Code Pro', monospace;
    /*    color: var(--primary-dark); */
    color: rgb(119, 99, 251);
    font-weight: 500;
    font-optical-sizing: auto;
    font-style: normal;
}

/* Typographic hierarchy improvements */
h1.main-headline {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(45deg, rgb(119, 99, 251), #d77ce3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2 {
    font-weight: 700;
    font-size: 1.8rem;
}

.highlight {
    color: #72F1B8; 
}

.slider-text {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.2rem;
    font-weight: 500;
    color: #FF7EDB;
}

/* Creativity control styling */
.creativity-control {
    position: relative;
    padding: 0.5rem 0;
}

.creativity-label {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.8rem;
    color: rgba(114, 241, 184, 0.7);
    font-weight: 500;
}

/* Custom range input styling */
.creativity-control input[type="range"] {
    height: 6px;
    border-radius: 5px;
    background: linear-gradient(90deg, rgba(114, 241, 184, 0.2), rgba(255, 126, 219, 0.4));
    cursor: pointer;
}

.creativity-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #72F1B8;
    box-shadow: 0 0 8px rgba(114, 241, 184, 0.6);
    transition: all 0.2s ease;
}

.creativity-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(114, 241, 184, 0.8);
}

.creativity-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: #72F1B8;
    box-shadow: 0 0 8px rgba(114, 241, 184, 0.6);
    transition: all 0.2s ease;
}

.creativity-control input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(114, 241, 184, 0.8);
}

label.highlight {
    font-family: 'Source Code Pro', monospace;
    font-size: 1.1rem;
}


/* Styled navigation */
.navbar {
/*    background-color:#262335;  */
    backdrop-filter: blur(10px);
    font-family: 'Source Code Pro', monospace;
}

.navbar-brand {
    font-family: 'Source Code Pro', serif;
    font-weight: 500;
    font-size: 1.2rem;
    color: #72F1B8;
}

.nav-link {
   /* color: var(--text-secondary) !important; */
    color: #72F1B8;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--accent-blue) !important;
}

/* Section styling */
section {
    padding: 55px 0;
/*    border-bottom: 1px solid #4a5568 */
}

/* Profile image */
#about img:hover {
    transform: translateY(-5px);
}

#experience img {
    padding: 20px 0;
    border-radius: 50%;
    box-shadow: none;
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
    max-width: 250px;
    filter: 
    grayscale(1) /* remove natural colors */
    sepia(1)             /* add warmth */
    hue-rotate(248deg)   /* shift hue toward purples */
    saturate(1)          /* intensify the effect */
    brightness(0.9);     /* tweak overall brightness */
}

#experience {
    font-family: 'PT Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
}

#experience p {
/*    max-width: 65ch; */
    margin-left: 0; /* Align text block to the left */
    margin-right: auto; /* Allow it to not stretch if max-width is hit */
}

.card {
    background-color: #1a162b;
}

/* Experience timeline styling */
.timeline .card {
    transition: transform 0.2s ease;
}

.timeline .card:hover {
    transform: translateX(5px);
}

/* Portfolio project cards */
.tinkerings-item {
    border: 1px solid rgba(114, 241, 184, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #1a1a2e;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tinkerings-item .card-body {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Force white text in tinkerings items */
#tinkerings .tinkerings-item,
#tinkerings .tinkerings-item p,
#tinkerings .tinkerings-item .card-body,
#tinkerings .tinkerings-item .card-body p,
#tinkerings .tinkerings-item .card-body .tinkerings-item-text,
#tinkerings .tinkerings-item .tinkerings-item-text,
#tinkerings .tinkerings-item .card-text,
#tinkerings .tinkerings-item p,
#tinkerings .tinkerings-item div,
#tinkerings .tinkerings-item span,
#tinkerings .tinkerings-item *:not(h4):not(a) {
    color: #ffffff !important;
}

.tinkerings-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(114, 241, 184, 0.2);
    border-color: rgba(114, 241, 184, 0.3);
}

.tinkerings-item h4 {
    color: #72F1B8;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.tinkerings-item .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.tinkerings-item video.card-img-top {
    height: auto;
}

.tinkerings-item .btn-primary {
    background-color: #72F1B8;
    color: #0a192f;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.tinkerings-item .btn-primary:hover {
    background-color: #5ad1a0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(114, 241, 184, 0.3);
}

/* Portfolio card images */
.card-img-top {
    height: 400px;
    max-height: 400px; 
    width: 100%;
    object-fit: contain;
    object-position: center;
    padding: 1rem;
}

/* Custom button styling */
.btn-primary {
    background-color: #9650a0;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1.25rem;
    font-family: 'Source Code Pro', monospace;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #d77ce3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.2);
}

/* Footer styling */
footer {
    color: #FF7EDB;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection highlight */
::selection {
    background: var(--highlight);
    color: var(--primary-dark);
}

/* Model selector styling */
.model-selector {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 400px;
}

.model-btn {
    flex: 1;
    background-color: #1a1a2e;
    border: 1px solid rgba(114, 241, 184, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    color: #72F1B8;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.model-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #72F1B8, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(114, 241, 184, 0.6);
    box-shadow: 0 3px 10px rgba(114, 241, 184, 0.15);
}

.model-btn:hover::before {
    opacity: 1;
}

.model-btn.active {
    background-color: rgba(114, 241, 184, 0.15);
    border-color: #72F1B8;
    box-shadow: 0 0 10px rgba(114, 241, 184, 0.3);
    text-shadow: 0 0 8px rgba(114, 241, 184, 0.5);
}

.navbar-toggler {
    border-color: #72F1B8; /* Optional: Change border color */
  }
  
  /* Change the color of the hamburger icon */
  .navbar-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%2372F1B8' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  }

/* Editor page styling */
.assistant-card {
    background-color: #1a1a2e;
    border: 1px solid rgba(114, 241, 184, 0.1);
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.assistant-card:hover {
    box-shadow: 0 6px 25px rgba(114, 241, 184, 0.1);
    border-color: rgba(114, 241, 184, 0.2);
}

/* Restore original tinkerings card styling */
.tinkerings-item {
    background-color: #1a1a2e;
    border: 1px solid rgba(114, 241, 184, 0.2);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.tinkerings-item .card-body {
    background-color: #1a1a2e;
    padding: 1.5rem;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.tinkerings-item .card-img-top {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Create a wrapper for the media to maintain consistent height */
.tinkerings-item .media-wrapper {
    height: 360px;
    overflow: hidden;
    background-color: #0f0f1a;
}

.tinkerings-item h4 {
    color: #72F1B8;
    font-family: 'Source Code Pro', monospace;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.tinkerings-item-text {
    flex-grow: 1;
    margin-bottom: 1rem;
}

#editedText {
    white-space: pre-wrap;
    min-height: 150px;
    color: #ffffff;
    background-color: rgba(26, 26, 46, 0.8);
    border-radius: 8px;
    padding: 20px;
    font-family: 'PT Sans', sans-serif;
    font-size: 1.0rem;
    border: 1px solid rgba(114, 241, 184, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#instructions,
#userText {
    overflow-y: scroll;
    overflow-x: hidden;
    background-color: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(114, 241, 184, 0.2);
    color: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'PT Sans', sans-serif;
}

#instructions:focus,
#userText:focus {
    border-color: rgba(114, 241, 184, 0.6);
    box-shadow: 0 0 0 0.25rem rgba(114, 241, 184, 0.25);
    outline: none;
}

.btn-success-glow {
    background-color: #198754; /* Bootstrap success green */
    border-color: #198754;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(25, 135, 84, 0.7);
    transition: all 0.3s ease-in-out;
}

/* Custom scrollbar styles for the #instructions and #userText textareas */
#instructions::-webkit-scrollbar,
#userText::-webkit-scrollbar {
    width: 10px;
}

#instructions::-webkit-scrollbar-track,
#userText::-webkit-scrollbar-track {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 0 8px 8px 0;
}

#instructions::-webkit-scrollbar-thumb,
#userText::-webkit-scrollbar-thumb {
    background: #FF7EDB;
    border-radius: 5px;
}

#instructions::-webkit-scrollbar-thumb:hover,
#userText::-webkit-scrollbar-thumb:hover {
    background: #d77ce3;
}

#instructions {
    resize: vertical;
}

/* For Firefox */
#instructions,
#userText {
    scrollbar-width: thin;
    scrollbar-color: #FF7EDB rgba(26, 26, 46, 0.8);
}

/* 404 error page styling */
.card-body p {
    color: #FF7EDB;  /* Using your existing pink accent color */
    font-family: 'PT Sans', sans-serif;
    font-size: 1.1rem;
}

/* Blog styling */
.blog-post-link {
    color: #72F1B8;  /* Same green color as your other highlights */
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-post-link:hover {
    color: var(--accent-blue) !important;
}

.blog-date {
    color: #637d70;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    text-shadow: none;
}

.date-icon {
    width: 1.1em;
    height: 1.1em;
    stroke-width: 2.5;
}

/* Blog post content styling */
.blog-post .card-body {
    color: #ffffff !important;
    font-family: 'PT Sans', sans-serif;
}

.blog-post .card-body p {
    color: #ffffff !important;
}

.blog-post .card-body h4 {
    color: rgb(119, 99, 251);  
}

.blog-post .card-body a {
    color: #FF7EDB;
}

/* Blog post image styling */
.blog-post .card-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal styling */
.modal-content {
    background-color: transparent;
    border: none;
}

.modal-body {
    padding: 0;
}

.modal-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.btn-close {
    background-color: #ffffff;
    opacity: 0.8;
    border-radius: 50%;
    padding: 0.5rem;
}

.btn-close:hover {
    opacity: 1;
}

/* --- Terminal-inspired Blog Styles (Open Layout) --- */
.blog-terminal-container {
    max-width: 700px;
    margin: 3rem auto 2rem auto;
    padding: 0 1rem;
    background: none;
    border: none;
    box-shadow: none;
}

.terminal-header {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: #72F1B8;
    letter-spacing: 0.05em;
    margin-bottom: 2.5rem;
    font-family: 'Source Code Pro', monospace;
    text-shadow: 0 0 5px #72F1B8, 0 0 1px #00ffae;
    padding-left: 1.2rem;
}

.terminal-arrow {
    font-size: 1.6rem;
    margin: 0 0.5rem;
    color: #72F1B8;
    text-shadow: 0 0 8px #72F1B8;
}

.terminal-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.blinking-cursor {
    margin-left: 0.5rem;
    color: #72F1B8;
    animation: blink 1.1s steps(1) infinite;
    font-size: 1.5rem;
}

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

@keyframes glow-pulse {
    0% { box-shadow: 0 0 5px rgba(114, 241, 184, 0.5); }
    50% { box-shadow: 0 0 15px rgba(114, 241, 184, 0.8); }
    100% { box-shadow: 0 0 5px rgba(114, 241, 184, 0.5); }
}

.btn-glow {
    background-color: transparent;
    color: rgba(114, 241, 184, 0.7);
    border: 1px solid rgba(114, 241, 184, 0.3);
    padding: 0.5rem 1.5rem;
    font-family: 'Source Code Pro', monospace;
    font-weight: 500;
    letter-spacing: 0.03em;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: none;
}

.btn-glow:hover, .btn-glow:focus {
    background-color: rgba(114, 241, 184, 0.15);
    color: #72F1B8;
    transform: translateY(-1px);
    box-shadow: 0 0 15px rgba(114, 241, 184, 0.5);
}

.btn-glow:active {
    transform: translateY(1px);
    box-shadow: 0 0 10px rgba(114, 241, 184, 0.4);
}

.btn-outline-secondary {
    border-color: rgba(114, 241, 184, 0.3);
    color: rgba(114, 241, 184, 0.7);
    background-color: transparent;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: rgba(114, 241, 184, 0.1);
    border-color: rgba(114, 241, 184, 0.5);
    color: #72F1B8;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.blog-post-preview {
    padding: 0 0 0 1.2rem;
    border-left: 2px solid #72F1B8;
    background: none;
    border-radius: 0;
    box-shadow: none;
    transition: border-color 0.2s;
}

.blog-post-preview:hover {
    border-color: #c9ffec;
}

.blog-post-meta {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.blog-date {
    color: #637d70;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    text-shadow: none;
}

.date-icon {
    width: 1.1em;
    height: 1.1em;
    stroke-width: 2.5;
}

.blog-post-title {
    font-size: 1.3rem;
    font-family: 'Source Code Pro', monospace;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #72F1B8;
    text-shadow: 0 0 6px #72F1B860;
}

.blog-post-link {
    color: #72F1B8;
    text-decoration: none;
    transition: color 0.2s, text-shadow 0.2s;
}

.blog-post-link:hover {
    color: #c9ffec;
    text-shadow: 0 0 10px #c9ffec;
    text-decoration: none;
}

.blog-post-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin: 0.2rem 0 0 0;
    font-family: 'PT Sans', sans-serif;
    opacity: 0.92;
    max-width: 60ch;
}

@media (max-width: 800px) {
    .blog-terminal-container {
        padding: 1.2rem 0.5rem;
    }
    .blog-post-preview {
        padding: 1rem 0.5rem;
    }
}