/* Custom Styles for Iesar Ahmed Portfolio */

/* Utilities */
.glass-panel {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.gradient-border-card {
    position: relative;
    background: #FFFFFF;
    border-radius: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #E2E8F0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #F8FAFC; 
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8; 
}

/* Micro-Animations & Glow Effects */
.card-hover-glow {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card-hover-glow:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1);
    border-color: #CBD5E1;
}

/* Text Gradient Utilities that might be tricky inline */
.text-gradient {
    background: linear-gradient(135deg, #0F172A 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animations for Intersection Observer */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
    visibility: visible;
}

/* Background blob animation for hero */
.blob {
    animation: blob-bounce 10s infinite alternate;
}

@keyframes blob-bounce {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

/* Floating Code Background Elements */
.float-code {
    position: absolute;
    color: #0F172A;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    pointer-events: none;
    user-select: none;
    opacity: 0;
    animation: floatUp linear infinite;
    z-index: -15;
}

@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.04; }
    90% { opacity: 0.04; }
    100% { transform: translateY(-20vh) rotate(180deg); opacity: 0; }
}

.float-delay-1 { animation-duration: 20s; animation-delay: 0s; left: 10%; font-size: 3rem; }
.float-delay-2 { animation-duration: 25s; animation-delay: -5s; left: 35%; font-size: 4rem; }
.float-delay-3 { animation-duration: 18s; animation-delay: -12s; left: 60%; font-size: 2.5rem; }
.float-delay-4 { animation-duration: 22s; animation-delay: -8s; left: 80%; font-size: 3.5rem; }
.float-delay-5 { animation-duration: 30s; animation-delay: -15s; left: 50%; font-size: 5rem; }
.float-delay-6 { animation-duration: 24s; animation-delay: -3s; left: 85%; font-size: 2rem; }
.float-delay-7 { animation-duration: 28s; animation-delay: -10s; left: 20%; font-size: 4.5rem; }
.float-delay-8 { animation-duration: 19s; animation-delay: -2s; left: 70%; font-size: 3rem; }

/* ============================================================
   BLOG ARTICLE TYPOGRAPHY (replaces @tailwindcss/typography)
   ============================================================ */

/* Base article container */
article.prose {
    color: #334155;
    font-size: 1.125rem;
    line-height: 1.85;
    max-width: 65ch;
}

/* --- Headings ------------------------------------------------ */
article.prose h2 {
    color: #0F172A;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #E2E8F0;
    letter-spacing: -0.02em;
}

article.prose h3 {
    color: #0F172A;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

article.prose h4 {
    color: #0F172A;
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* --- Paragraphs ---------------------------------------------- */
article.prose p {
    margin-bottom: 1.25rem;
    color: #475569;
}

article.prose p.lead {
    font-size: 1.25rem;
    color: #0F172A;
    font-weight: 500;
    line-height: 1.7;
    border-left: 4px solid #0F172A;
    padding-left: 1.25rem;
    margin-bottom: 2rem;
}

/* --- Links --------------------------------------------------- */
article.prose a {
    color: #2563EB;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s;
}
article.prose a:hover {
    color: #1D4ED8;
}

/* --- Lists --------------------------------------------------- */
article.prose ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

article.prose ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: #475569;
    line-height: 1.75;
}

article.prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 8px;
    height: 8px;
    background: #0F172A;
    border-radius: 2px;
    transform: rotate(45deg);
}

article.prose ol {
    list-style: none;
    padding-left: 0;
    counter-reset: article-ol;
    margin-bottom: 1.5rem;
}

article.prose ol li {
    position: relative;
    padding-left: 2.25rem;
    margin-bottom: 0.75rem;
    color: #475569;
    counter-increment: article-ol;
}

article.prose ol li::before {
    content: counter(article-ol);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 1.5rem;
    height: 1.5rem;
    background: #0F172A;
    color: #FFFFFF;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

article.prose li strong {
    color: #0F172A;
    font-weight: 700;
}

/* --- Blockquotes --------------------------------------------- */
article.prose blockquote {
    position: relative;
    margin: 2.5rem 0;
    padding: 1.75rem 2rem 1.75rem 2.5rem;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-left: 4px solid #0F172A;
    border-radius: 0 1rem 1rem 0;
    font-style: italic;
    color: #334155;
    font-size: 1.1rem;
    line-height: 1.8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

article.prose blockquote::before {
    content: '\201C';
    position: absolute;
    top: -0.5rem;
    left: 0.75rem;
    font-size: 4rem;
    color: #CBD5E1;
    font-family: Georgia, serif;
    line-height: 1;
}

article.prose blockquote p {
    margin-bottom: 0;
    color: #334155;
}

/* --- Code Blocks --------------------------------------------- */
article.prose pre {
    background: #0F172A;
    color: #E2E8F0;
    padding: 1.5rem;
    border-radius: 1rem;
    overflow-x: auto;
    margin: 2rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    border: 1px solid #1E293B;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

article.prose pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    color: #E2E8F0;
    font-size: 0.875rem;
}

/* Inline code */
article.prose code {
    background: #F1F5F9;
    color: #0F172A;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875em;
    font-weight: 500;
    border: 1px solid #E2E8F0;
}

/* --- Strong / Bold ------------------------------------------- */
article.prose strong {
    color: #0F172A;
    font-weight: 700;
}

/* --- Horizontal Rules ---------------------------------------- */
article.prose hr {
    border: none;
    border-top: 2px solid #E2E8F0;
    margin: 2.5rem 0;
}

/* --- Images inside articles ---------------------------------- */
article.prose img {
    border-radius: 1rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- Tables -------------------------------------------------- */
article.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

article.prose thead th {
    background: #0F172A;
    color: #FFFFFF;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

article.prose thead th:first-child { border-radius: 0.5rem 0 0 0; }
article.prose thead th:last-child  { border-radius: 0 0.5rem 0 0; }

article.prose tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #E2E8F0;
    color: #475569;
}

article.prose tbody tr:hover {
    background: #F8FAFC;
}

/* --- Spacing between first heading and lead ------------------- */
article.prose > *:first-child {
    margin-top: 0;
}
