/* ===== Base Styles & Variables ===== */
:root {
    --bg-color: #0f172a;        /* Deep Charcoal bg */
    --text-primary: #f8fafc;    /* White/Off-white */
    --text-secondary: #94a3b8;  /* Muted text */
    --accent-color: #00f0ff;    /* Neon Blue */
    --accent-hover: #00d3e0;
    --glass-bg: rgba(255, 255, 255, 0.05); /* very subtle white */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-main: 'Inter', sans-serif;
    --transition-fast: 0.3s ease;
    --transition-med: 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--glass-bg);
    border-radius: 5px;
    border: 1px solid var(--glass-border);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: float 10s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
    bottom: 20%;
    right: -150px;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.1); }
}

/* ===== Typography & Utilities ===== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.highlight {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* Fade In Animation Class (used by JS) */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-med), transform var(--transition-med);
}

.fade-in.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism System */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    bottom: -10px;
    left: 25%;
    background: var(--accent-color);
    border-radius: 2px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.primary-btn {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.primary-btn:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
}

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

.secondary-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}


/* ===== Navigation ===== */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

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

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

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


/* ===== Hero Section ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.hero-text h2 {
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 400;
    min-height: 43px; /* prevents jumping during typing animation */
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.hero-cta {
    display: flex;
    gap: 15px;
}

.hero-image-container {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    padding: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform var(--transition-med);
}

.hero-image-container:hover .hero-img {
    transform: scale(1.05);
}


/* ===== About Section ===== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-card {
    padding: 40px;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.about-card p {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.about-card p:last-child {
    margin-bottom: 0;
}


/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.skill-card {
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.skill-icon {
    font-size: 3rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.2);
}

/* Icon specific hover colors */
.skill-card:hover .html-icon { color: #e34f26; }
.skill-card:hover .css-icon { color: #1572b6; }
.skill-card:hover .js-icon { color: #f7df1e; }
.skill-card:hover .dev-icon { color: #00f0ff; }
.skill-card:hover .cyber-icon { color: #ff003c; }
.skill-card:hover .hardware-icon { color: #00ff66; }

.skill-card span {
    font-weight: 600;
    font-size: 1.1rem;
}


/* ===== Experience Section ===== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

/* The line */
.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--glass-border);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 40px;
}

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

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent-color);
    border-radius: 50%;
    left: 13px; /* 20 - 8 + 1 for exact center */
    top: 5px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.timeline-content {
    padding: 30px;
}

.timeline-date {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: 400;
}

.timeline-content p {
    color: var(--text-secondary);
}


/* ===== Certifications Section ===== */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cert-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.premium-cert {
    border: 1px solid rgba(0, 240, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.premium-cert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.cert-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.cert-info .issuer {
    font-size: 1rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.cert-info .desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.cert-qr {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--accent-color);
    border-radius: 10px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.qr-placeholder:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-color);
}

.qr-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.qr-placeholder span {
    font-size: 0.8rem;
    font-weight: 500;
}


/* ===== Contact Section ===== */
.contact-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 50px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.contact-item:hover .icon-wrapper {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-details .label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.contact-details .value {
    font-size: 1.1rem;
    font-weight: 600;
}


/* ===== Footer ===== */
.glass-footer {
    text-align: center;
    padding: 30px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}


/* ===== Responsive Design ===== */
@media screen and (max-width: 900px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 100px; /* offset for fixed nav */
    }

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

    .section-title {
        font-size: 2rem;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        display: none; /* In a real app, you'd add a hamburger menu */
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-text h2 {
        font-size: 1.4rem;
    }

    .hero-image-container {
        width: 250px;
        height: 250px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 30px;
    }
}
