/* --- CORE VARIABLES --- */
:root {
    --bg-body: #050507;
    --bg-card: #0F1218;
    --bg-card-hover: #161B24;
    --primary: #3B82F6;
    --primary-gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    --text-main: #FFFFFF;
    --text-muted: #94A3B8;
    --border: #1E293B;
    --success: #10B981;
}

/* --- RESET & TYPOGRAPHY --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- LAYOUT UTILITIES --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 100px 0;
}

/* --- HEADER & NAV --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 5, 7, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    transition: all 0.3s ease;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    margin-left: 32px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

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

.nav-links a.active {
    color: var(--text-main);
}

/* Social Icons in Nav */
.social-nav-icon {
    color: #94A3B8;
    font-size: 1.2rem;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.social-nav-icon:hover {
    color: var(--primary);
}

/* --- HERO SECTION WITH ANIMATION --- */
.hero {
    padding-top: 180px;
    padding-bottom: 120px;
    text-align: center;
    background: radial-gradient(circle at 50% 10%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
}

/* 1. Define Animation */
@keyframes flicker-in {
    0% { opacity: 0; transform: scale(0.98); }
    10% { opacity: 0.5; }
    20% { opacity: 0.1; }
    40% { opacity: 1; transform: scale(1.01); }
    60% { opacity: 0.8; }
    100% { opacity: 1; transform: scale(1); }
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
    
    /* 2. Apply Animation */
    animation: flicker-in 1s ease-out forwards;
    opacity: 0; /* Start hidden */
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(59, 130, 246, 0.5);
}

/* --- CARDS & GRIDS --- */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: 0.3s;
}

.card:hover {
    border-color: #3B82F6;
    transform: translateY(-5px);
    background: var(--bg-card-hover);
}

.card-icon {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.card h3 {
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.skill-list li {
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.skill-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-right: 12px;
}

/* --- FORMS & TOOLS --- */
.tool-wrapper {
    background: #0B0E14;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
    text-align: left;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Added textarea here */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    background: #151921;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: 0.3s;
}

.form-group textarea {
    resize: vertical; /* Allows vertical resizing only */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.full-width {
    grid-column: 1 / -1;
}

.result-box {
    background: #11141C;
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-top: 30px;
    position: relative;
    word-break: break-all;
}

.generated-url {
    color: var(--success);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1rem;
    padding-right: 40px;
}

.copy-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.copy-btn:hover {
    background: rgba(16, 185, 129, 0.2);
}

/* --- EXTRAS FOR AI TOOLS & RESOURCES PAGES --- */

/* Filter Buttons */
.filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.filter-btn {
    background: #151921; border: 1px solid #334155; color: #94A3B8;
    padding: 8px 16px; border-radius: 20px; cursor: pointer; transition: all 0.3s;
}
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Search Bar */
.search-container { max-width: 500px; margin: 0 auto 40px; position: relative; }
.search-input {
    width: 100%; padding: 12px 20px; padding-left: 45px;
    background: #0F1218; border: 1px solid #334155; border-radius: 30px;
    color: white; outline: none; font-size: 1rem;
}
.search-input:focus { border-color: var(--primary); }
.search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94A3B8; }

/* Tool Cards & Links */
.tool-card, .resource-card { display: flex; flex-direction: column; height: 100%; }
.tool-category {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
    color: var(--primary); font-weight: 700; margin-bottom: 10px;
}
.tool-link, .resource-link {
    margin-top: auto; color: white; text-decoration: none;
    background: #1e293b; padding: 10px; text-align: center; border-radius: 6px;
    transition: background 0.3s; border: 1px solid #334155;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.tool-link:hover, .resource-link:hover { background: var(--primary); border-color: var(--primary); }
.resource-link { background: transparent; border: none; color: #60a5fa; font-weight: 600; padding: 0; justify-content: flex-start; }
.resource-link:hover { background: transparent; text-decoration: underline; color: var(--primary); }

/* Comment System */
.comments-section { max-width: 800px; margin: 60px auto 0; padding: 30px; background: #0F1218; border: 1px solid #1E293B; border-radius: 12px; }
.comment-form input, .comment-form textarea {
    width: 100%; padding: 12px; margin-bottom: 15px;
    background: #151921; border: 1px solid #334155; border-radius: 6px; color: white;
}
.comment-list { margin-top: 30px; }
.single-comment { border-bottom: 1px solid #1E293B; padding: 15px 0; }
.comment-header { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 0.9rem; color: #60a5fa; }
.comment-body { color: #cbd5e1; }

/* --- CONTACT PAGE SPECIFIC --- */
.contact-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 60px;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin-top: 15px;
    }

    .nav-links a {
        margin-left: 0;
        margin: 0 8px;
        font-size: 0.9rem;
    }

    .hero {
        padding-top: 160px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tool-wrapper {
        padding: 25px;
    }
    
    .nav-links div[style*="border-left"] {
        display: none;
    }
}
