/* --- CSS Variables & Theming --- */
:root {
    --bg-dark: #07090f;
    --bg-accent: #0f1322;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-main: #00d2ff;
    --accent-hover: #3a7bd5;

    /* Glassmorphism settings */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- Global Reset & Basics --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* --- Typographical Utilities --- */
.glow-text {
    background: linear-gradient(to right, var(--accent-main), #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.text-sm {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

.w-100 {
    width: 100%;
}

/* --- Background Cinematic Light --- */
.bg-glow {
    position: fixed;
    top: -20vh;
    left: -20vw;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

/* --- Glassmorphism UI Defaults --- */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    padding: 2rem;
    transition: var(--transition);
}

.glass-panel:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: 'Outfit', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-main), var(--accent-hover));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
    background: linear-gradient(135deg, var(--accent-hover), #1e5ba9);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent-main);
    color: var(--accent-main);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 5%;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(7, 9, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 5%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-logo span {
    color: var(--accent-main);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-main);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 999;
    transition: var(--transition);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu a {
    font-size: 1.5rem;
    font-weight: 600;
}

/* --- Shared Layout Classes --- */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
}

.section-header p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.page-header {
    margin-top: 100px;
    text-align: center;
    padding: 3rem 1rem;
}

.page-header h1 {
    font-size: 3rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-greeting {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.hero-name {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero-role {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.image-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--accent-main);
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.2;
    z-index: -1;
}

.hero-img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    object-fit: cover;
    aspect-ratio: 4/5;
}

/* --- Stats Section --- */
.stats-section {
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 0 5%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
}

.stat-card h3 {
    font-size: 3rem;
    color: var(--accent-main);
    font-weight: 800;
    line-height: 1;
}

.stat-card p {
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* --- About Section --- */
.about-section {
    max-width: 800px;
    margin: 5rem auto;
    padding: 0 5%;
}

.about-content {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.about-content strong {
    color: var(--text-primary);
}

/* --- Skills Section --- */
.skills-section {
    max-width: 1200px;
    margin: 5rem auto;
    padding: 0 5%;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.skill-category h3 i {
    color: var(--accent-main);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.skill-tags span:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-main);
    color: var(--accent-main);
    transform: translateY(-2px);
}

/* --- Featured Projects Section & Grid --- */
.featured-section {
    max-width: 1200px;
    margin: 5rem auto;
    padding: 0 5%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.extensive-grid {
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 0 5%;
}

.project-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-img-wrap {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-bottom: 1px solid var(--glass-border);
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-stack span {
    font-size: 0.8rem;
    color: var(--accent-main);
    background: rgba(0, 210, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.card-actions {
    display: flex;
    gap: 0.8rem;
}

/* --- Qualifications Specific Rules --- */
.qualifications-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 5%;
}

.qual-section {
    margin-bottom: 4rem;
}

.timeline {
    position: relative;
    padding: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    left: 2.5rem;
    width: 2px;
    background: var(--glass-border);
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-main);
    box-shadow: 0 0 10px var(--accent-main);
    transform: translateX(-50%);
}

.timeline-content h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.timeline-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-main);
    margin: 0.5rem 0 1rem;
    background: rgba(0, 210, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.qual-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- Contact Page Specifics --- */
.contact-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 5%;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

.info-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-main);
    background: rgba(0, 210, 255, 0.1);
    padding: 1rem;
    border-radius: 50%;
}

.info-item h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.info-item p,
.info-item a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-social {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-main);
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.2);
}

/* --- CTA Section --- */
.cta-section {
    max-width: 800px;
    margin: 5rem auto;
    padding: 0 5%;
    text-align: center;
}

.cta-box h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cta-box p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 5% 1.5rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-left h3 {
    font-size: 1.5rem;
}

.footer-left p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--accent-main);
    border-color: var(--accent-main);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.slide-down {
    opacity: 0;
    animation: slideDown 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-anim {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.scroll-anim.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero-section {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 100px;
    }

    .hero-name {
        font-size: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .timeline::before {
        left: 1rem;
    }

    .timeline-item {
        padding-left: 2.5rem;
    }

    .timeline-marker {
        left: 1rem;
        transform: translateX(-50%);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}