/* --- Variables & Global Reset --- */
:root {
    --primary-bg: #0b0f1a;    /* Deep Dark Blue/Black */
    --secondary-bg: #161b2a;  /* Lighter Dark Blue */
    --accent: #3b82f6;        /* Electric Blue */
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-main: #f1f5f9;     /* Off White */
    --text-muted: #94a3b8;    /* Slate Gray */
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.7;
    background-color: var(--primary-bg);
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Navigation (Glassmorphism) --- */
nav {
    padding: 20px 0;
    background: rgba(11, 15, 26, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(15px);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-main);
}

.logo span { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

/* --- Hero Section --- */
.hero {
    padding: 120px 0;
    background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 50px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-text {
    animation: fadeInUp 1s ease-out;
}

.badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--accent);
    display: inline-block;
    margin-bottom: 20px;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(to bottom, #fff 30%, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.summary {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 35px;
    max-width: 550px;
}

/* --- Buttons --- */
.btn {
    padding: 14px 35px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    display: inline-block;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: white;
    margin-left: 10px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

/* --- Profile Picture --- */
.hero-img-container {
    position: relative;
    animation: fadeInUp 1.2s ease-out;
}

.profile-pic {
    width: 100%;
    border-radius: 30px;
    filter: grayscale(20%);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.hero-img-container::after {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid var(--accent);
    border-radius: 35px;
    z-index: -1;
    opacity: 0.3;
    transition: var(--transition);
}

.hero-img-container:hover::after {
    inset: -20px;
    opacity: 0.1;
}

/* --- Sections --- */
section { padding: 100px 0; }
.bg-light { background: var(--secondary-bg); }

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #fff;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--accent);
}

/* Education Cards */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.edu-box {
    background: var(--glass);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.edu-box:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--accent);
}

.edu-box h3 {
    margin-bottom: 12px;
    color: var(--accent);
}

/* Skill Cards */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.skill-card {
    background: var(--secondary-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.skill-card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.skill-card h3 {
    margin-bottom: 10px;
    color: #fff;
}

/* Project Cards */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(59, 130, 246, 0.1);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: #3b82f6;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 700;
    transition: 0.3s;
}

.project-card:hover h3 {
    color: #60a5fa;
}

.project-card p {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.project-card ol {
    color: #cbd5e1;
    margin-left: 20px;
    margin-bottom: 10px;
}

.tags {
    margin-bottom: 20px;
}

.tags span {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    margin-right: 8px;
    margin-bottom: 8px;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-weight: 500;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.project-card a.project-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.project-card a.project-link:hover {
    color: #ffffff;
    text-decoration: none;
}

/* --- Footer --- */
footer {
    background: #05070a;
    border-top: 1px solid var(--glass-border);
    padding: 80px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 50px;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 1rem;
}

.contact-info i {
    color: var(--accent);
    font-size: 1.2rem;
    width: 20px;
}

.social-links {
    display: flex;
    gap: 25px;
}

.social-links a {
    color: white;
    font-size: 1.8rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.8rem; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .summary { margin: 0 auto 30px; }
    .nav-links { display: none; }
    .footer-content { flex-direction: column; text-align: center; justify-content: center; }
    .contact-info p { justify-content: center; }
    .social-links { justify-content: center; margin-top: 20px; }
}

/* ===================== ADMIN PANEL ===================== */
.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-overlay.open {
    display: flex;
}

.admin-panel {
    background: var(--secondary-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--glass-border);
}

.admin-header h2 {
    font-size: 1.3rem;
    color: #fff;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    padding: 15px 25px 0;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--glass-border);
}

.admin-tab {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    margin-bottom: -1px;
    transition: var(--transition);
}

.admin-tab.active {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.08);
}

.admin-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.admin-section.hidden {
    display: none;
}

.admin-section label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 14px 0 6px;
}

.admin-section input[type="text"],
.admin-section input[type="password"],
.admin-section textarea {
    width: 100%;
    background: var(--primary-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 12px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

.admin-section input:focus,
.admin-section textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.admin-section h3 {
    color: #fff;
    margin-top: 10px;
    font-size: 1.05rem;
}

.admin-section hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 25px 0 10px;
}

.hint {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.admin-footer {
    padding: 18px 25px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Repeating item cards inside admin (education / skills / projects) */
.admin-item {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    background: rgba(255,255,255,0.02);
    position: relative;
}

.admin-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.admin-item-header strong {
    color: #fff;
    font-size: 0.9rem;
}

.admin-item .remove-btn {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
}

.admin-item .remove-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.tag-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.extra-link-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.extra-link-row input {
    flex: 1;
}

.small-remove {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    border-radius: 6px;
    padding: 0 10px;
    cursor: pointer;
    font-family: inherit;
}
