/* --- 1. Core Setup & Variables --- */
:root {
    --bg: #030712;
    --card: #111827;
    --border: #1f2937;
    --accent: #60a5fa;
    --accent-glow: rgba(96, 165, 250, 0.15);
    --text-main: #f3f4f6;
    --text-dim: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- 2. Layout Containers --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- 3. Home Page Two-Column Grid --- */
.home-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Creates the two-column layout */
    gap: 60px;
    margin-top: 20px;
    align-items: flex-start;
}

.home-column h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
    background: linear-gradient(to right, #ffffff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.vertical-card-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* --- 4. Navigation (Sticky & Modern) --- */
nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 25px;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 10px;
}

nav a {
    color: var(--text-dim);
    text-decoration: none; 
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
}

nav a:hover {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

nav a.active {
    color: #fff;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
}

/* --- 5. Header (Name & Glow) --- */
header {
    text-align: center;
    padding: 0px 20px 0px; 
    position: relative;
    margin-top: -20px;
}

header h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: -1;
    filter: blur(50px);
}

/* --- Header Meta & Social Links --- */
.header-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 0px;
}

.social-links {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.social-links img {
    filter: brightness(0) invert(1); /* Turns the black SVG into white */
    width: 18px;
    height: 18px;
}

/* Hover State */
.social-links a:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.social-links a:hover img {
    opacity: 1;
}

/* --- 6. Cards (Home Page Style) --- */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Card image for home page thumbnails */
/* Horizontal project card with a square image */
.project-card.vertical {
    display: flex;
    flex-direction: row; /* Puts image and text side-by-side */
    height: 180px; /* Standardized height for the whole card */
    align-items: stretch;
}

.project-card.vertical .card-image {
    width: 180px; /* Match the height to create a perfect square */
    height: 180px;
    flex-shrink: 0; /* Prevents the image from being squashed */
    background-size: cover;
    background-position: center;
    border-right: 1px solid var(--border);
    border-bottom: none; /* Remove the bottom border from the old vertical style */
}

.project-card.vertical .card-content h3 {
    color: #ffffff; /* Explicitly set to white to ensure visibility */
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
    /* Prevent long titles from breaking the card height */
    display: -webkit-box;
    -webkit-line-clamp: 1; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Specific styling for the project brief text */
.project-card.vertical .card-content p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit description to 3 lines to fit the 180px card */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-content {
    padding: 25px;
}

.experience-card {
    border-left: 4px solid var(--accent);
}

/* Specifically target the company name in experience cards */
.experience-card .card-content span {
    color: var(--accent); /* Uses your bright blue accent color */
    font-family: 'JetBrains Mono', monospace; /* Professional tech look */
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-block; /* Allows for the margin below */
    margin-top: 2px;
}

/* Ensure the role title stays white and bold */
.experience-card .card-content strong {
    color: #ffffff;
    display: block; /* Ensures the company name moves to the next line */
    font-size: 1.1rem;
    margin-bottom: 2px;
}

/* --- 7. Standardized Experience Visuals --- */
.experience-detail {
    display: flex;
    gap: 50px;
    margin-bottom: 20px;
    align-items: flex-start;
}


.exp-visuals {
    flex: 0 0 280px; /* Forces all job images to the same width */
    max-width: 280px;
    width: 100%;
}

.exp-summary-callout {
    margin-bottom: 6px;
}

.exp-img, .project-hero-img {
    width: 100%;
    height: auto; /* Proportional scaling */
    border-radius: 16px;
    border: 1px solid var(--border);
    object-fit: cover;
    margin-bottom: 15px;
}

.exp-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* --- 8. Project Details Gallery --- */
.project-detail {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.project-gallery {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Enforce the smaller size on the images themselves */
.project-hero-img {
    width: 100%;           /* Fills the 350px container */
    max-width: 350px;      /* Ensures it never exceeds this width */
    height: auto;          /* Maintains original aspect ratio */
    border-radius: 12px;
    border: 1px solid var(--border);
    object-fit: cover;     /* Keeps the image crisp */
    transition: transform 0.3s ease;
}

/* --- 9. Typography & Accents --- */
.project-header h2, .exp-header h2 {
    line-height: 1.1;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(to bottom right, #ffffff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    
}

.project-brief-meta, .exp-header h3 {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 7px;
}

.description, .details-text {
    line-height: 1.8;
    color: var(--text-dim);
    font-size: 1.1rem;
}

.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
    margin: 40px 0;
}

/* --- 10. Responsive Fixes --- */
@media (max-width: 1024px) {
    .home-split-grid {
        grid-template-columns: 1fr; /* Stacks columns on mobile */
        gap: 40px;
    }
    
    .project-detail, .experience-detail {
        flex-direction: column;
    }
    
    .exp-visuals, .project-gallery {
        max-width: 100%;
        flex: none;
    }
    
    .container {
        padding: 0 20px;
    }
}

/* --- 8. ADMIN DASHBOARD (PRECISION STYLING) --- */

/* Form Group Layout */
.admin-split { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    margin-top: 30px; 
}

/* Card Overrides for Admin Forms */
.admin-form {
    background: var(--card);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--border);
}

/* Input Fields - Forcing high contrast */
.admin-form input, 
.admin-form textarea {
    width: 100%; 
    background: #000000 !important; 
    border: 1px solid var(--border) !important;
    color: #ffffff !important; 
    padding: 14px; 
    border-radius: 12px; 
    margin-bottom: 15px;
    font-family: inherit;
}

/* Edit Mode Visual Cue */
.edit-mode { 
    border-color: var(--accent) !important; 
    box-shadow: 0 0 30px var(--accent-glow) !important; 
}

/* List Management Buttons (Edit/Delete) */
.item-list-card {
    background: #1a1a1a;
    border: 1px solid var(--border);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Admin Checkbox Styling --- */

/* Container to align checkbox and text horizontally */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0 20px;
    cursor: pointer;
}

/* Custom styling for the actual checkbox */
.admin-form input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    cursor: pointer;
    accent-color: var(--accent); /* Colors the checkmark blue to match your theme */
    background: #000 !important;
    border: 1px solid var(--border) !important;
    appearance: auto; /* Uses modern browser accent-color for ease */
}

.checkbox-group label {
    font-size: 0.95rem;
    color: var(--text-main);
    user-select: none;
    cursor: pointer;
}

/* Target Buttons specifically within the admin sections */
#admin-projects-list button, 
#admin-experience-list button {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
    margin-left: 5px;
}

#admin-projects-list button:hover, 
#admin-experience-list button:hover {
    background: var(--accent);
    color: #000000;
}

.delete-btn {
    border: 1px solid #ffffff !important; /* Clean white border */
    color: #ffffff !important;           /* Clean white text */
    opacity: 1;                        /* Subdued until hovered */
}

.delete-btn:hover {
    opacity: 1 !important;
    background: rgba(239, 68, 68, 0.15) !important; /* Subtle red glow on hover */
    border-color: #ef4444 !important;               /* Warns the user */
    color: #ef4444 !important;                      /* Matches the hover border */
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
}

/* Main Submission Button */
.admin-form button[type="submit"] {
    background: var(--accent);
    color: #000000;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    width: 100%;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- 12. Premium "View More" Shimmer Buttons --- */
.view-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    padding: 16px 45px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: #f8fafc;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}

.view-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: 0.6s;
}

.view-more:hover::before { left: 100%; }

.view-more:hover {
    background: rgba(96, 165, 250, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.3);
}

footer {
    margin-top: 20px;
    padding: 60px 0;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

.footer-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.footer-info p {
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.separator {
    color: var(--border);
    user-select: none;
}

.copyright {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-top: 20px;
    opacity: 0.6;
}