/* ===== Modern Portfolio Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
        --primary: #6C63FF;
        --primary-glow: rgba(108, 99, 255, 0.15);
        --accent: #00D4AA;
        --bg-dark: #0a0a0f;
        --bg-card: #12121a;
        --bg-card-hover: #1a1a2e;
        --text-primary: #e4e4e7;
        --text-secondary: #a1a1aa;
        --text-muted: #71717a;
        --border: #27272a;
        --gradient-1: linear-gradient(135deg, #6C63FF, #00D4AA);
        --gradient-2: linear-gradient(135deg, #6C63FF 0%, #a855f7 100%);
}

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

html {
        scroll-behavior: smooth;
        scroll-padding-top: 80px;
}

body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        background-color: var(--bg-dark);
        color: var(--text-primary);
        line-height: 1.7;
        overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent); }

/* ===== Navigation ===== */
.profile-subpage main {
        max-width: 1200px;
        margin: 0 auto;
        padding: 6rem 1.5rem 2rem;
        min-height: calc(100vh - 90px);
}

.profile-subpage nav {
        justify-content: center;
        padding: 1rem;
}

.profile-subpage nav > ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
        list-style: none;
}

/* These small pages use visible links at every width, with no collapsed menu. */
.profile-subpage .hamburger { display: none; }

header {
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 1000;
        background: rgba(10, 10, 15, 0.85);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        transition: all 0.3s;
}

nav {
        max-width: 1200px;
        margin: 0 auto;
        padding: 1rem 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
}

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

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

.nav-links a {
        color: var(--text-secondary);
        font-weight: 500;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: color 0.3s;
        position: relative;
}

.nav-links a::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--gradient-1);
        transition: width 0.3s;
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.bar { width: 25px; height: 2px; background: var(--text-primary); transition: 0.3s; border-radius: 2px; }

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

.hero-content { flex: 1; max-width: 600px; }

.hero-greeting {
        color: var(--accent);
        font-size: 1.1rem;
        font-weight: 500;
        margin-bottom: 0.5rem;
        letter-spacing: 2px;
        text-transform: uppercase;
}

.hero-name {
        font-size: 4rem;
        font-weight: 800;
        line-height: 1.1;
        margin-bottom: 0.5rem;
        background: var(--gradient-1);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
}

.hero-title {
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 1.5rem;
}

.hero-title .accent {
        color: var(--accent);
        -webkit-text-fill-color: var(--accent);
}

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

.hero-buttons {
        display: flex;
        gap: 1rem;
        margin-bottom: 2rem;
        flex-wrap: wrap;
}

.btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.8rem 1.8rem;
        border-radius: 10px;
        font-weight: 600;
        font-size: 0.95rem;
        transition: all 0.3s;
        cursor: pointer;
}

.btn-primary {
        background: var(--gradient-1);
        color: #fff;
        border: none;
}

.btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px var(--primary-glow);
        color: #fff;
}

.btn-outline {
        border: 2px solid var(--border);
        color: var(--text-primary);
        background: transparent;
}

.btn-outline:hover {
        border-color: var(--primary);
        color: var(--primary);
        transform: translateY(-2px);
}

.hero-socials {
        display: flex;
        gap: 1.2rem;
}

.hero-socials a {
        width: 45px;
        height: 45px;
        border-radius: 12px;
        border: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        font-size: 1.2rem;
        transition: all 0.3s;
}

.hero-socials a:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: var(--primary-glow);
        transform: translateY(-3px);
}

/* Code Block Visual */
.hero-visual { flex: 1; max-width: 500px; }

.code-block {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.code-header {
        padding: 12px 16px;
        display: flex;
        gap: 8px;
        background: rgba(255,255,255,0.03);
        border-bottom: 1px solid var(--border);
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-block pre {
        padding: 1.5rem;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.85rem;
        line-height: 1.8;
        overflow-x: auto;
        color: var(--text-secondary);
}

.code-keyword { color: #c792ea; }
.code-class { color: #ffcb6b; }
.code-func { color: #82aaff; }
.code-string { color: #c3e88d; }

/* ===== Sections ===== */
.section {
        max-width: 1200px;
        margin: 0 auto;
        padding: 5rem 2rem;
}

.section-title {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 3rem;
        text-align: center;
        position: relative;
}

.section-title::after {
        content: '';
        display: block;
        width: 60px;
        height: 4px;
        background: var(--gradient-1);
        margin: 0.8rem auto 0;
        border-radius: 2px;
}

/* ===== About ===== */
.about-grid {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        gap: 3rem;
        align-items: start;
}

.about-text p {
        color: var(--text-secondary);
        margin-bottom: 1.2rem;
        font-size: 1.05rem;
}

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

.about-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
}

.stat-card {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 1.5rem;
        text-align: center;
        transition: all 0.3s;
}

.stat-card:hover {
        border-color: var(--primary);
        transform: translateY(-4px);
        box-shadow: 0 10px 30px var(--primary-glow);
}

.stat-number {
        display: block;
        font-size: 1.8rem;
        font-weight: 800;
        background: var(--gradient-1);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 0.3rem;
}

.stat-label {
        color: var(--text-muted);
        font-size: 0.85rem;
        font-weight: 500;
}

/* ===== Experience / Timeline ===== */
.timeline {
        position: relative;
        padding-left: 2rem;
}

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

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

.timeline-dot {
        position: absolute;
        left: -2.55rem;
        top: 0.5rem;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: var(--primary);
        border: 3px solid var(--bg-dark);
        box-shadow: 0 0 0 3px var(--primary);
}

.timeline-content {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 1.5rem 2rem;
        transition: all 0.3s;
}

.timeline-content:hover {
        border-color: var(--primary);
        box-shadow: 0 5px 20px var(--primary-glow);
}

.timeline-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 0.3rem;
}

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

.timeline-date {
        color: var(--accent);
        font-size: 0.85rem;
        font-weight: 600;
        background: rgba(0, 212, 170, 0.1);
        padding: 0.2rem 0.8rem;
        border-radius: 20px;
}

.timeline-content h4 {
        color: var(--text-muted);
        font-size: 0.95rem;
        font-weight: 500;
        margin-bottom: 0.8rem;
}

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

.timeline-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
}

.timeline-tags span {
        background: var(--primary-glow);
        color: var(--primary);
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 500;
}

/* ===== Certifications ===== */
.cert-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
}

.cert-card {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 1.5rem 2rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        transition: all 0.3s;
}

.cert-card:hover {
        border-color: var(--primary);
        transform: translateY(-3px);
}

.cert-card i {
        font-size: 1.5rem;
        color: var(--accent);
}

.cert-card h4 {
        font-size: 1rem;
        color: var(--text-primary);
        margin-bottom: 0.2rem;
}

.cert-card p {
        color: var(--text-muted);
        font-size: 0.85rem;
}

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

.skill-category {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 2rem;
        transition: all 0.3s;
}

.skill-category:hover {
        border-color: var(--primary);
        transform: translateY(-4px);
        box-shadow: 0 10px 30px var(--primary-glow);
}

.skill-category h3 {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.6rem;
}

.skill-category h3 i {
        color: var(--accent);
        font-size: 1.2rem;
}

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

.skill-tags span {
        background: rgba(108, 99, 255, 0.08);
        border: 1px solid rgba(108, 99, 255, 0.2);
        color: var(--text-secondary);
        padding: 0.4rem 1rem;
        border-radius: 25px;
        font-size: 0.85rem;
        font-weight: 500;
        transition: all 0.3s;
}

.skill-tags span:hover {
        background: var(--primary-glow);
        color: var(--primary);
        border-color: var(--primary);
        transform: translateY(-2px);
}

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

.project-card {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 2rem;
        transition: all 0.3s;
        display: flex;
        flex-direction: column;
}

.project-card:hover {
        border-color: var(--primary);
        transform: translateY(-5px);
        box-shadow: 0 15px 40px var(--primary-glow);
}

.project-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
        background: var(--primary-glow);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1.2rem;
}

.project-icon i {
        font-size: 1.3rem;
        color: var(--primary);
}

.project-card h3 {
        font-size: 1.15rem;
        font-weight: 700;
        margin-bottom: 0.8rem;
        color: var(--text-primary);
}

.project-card p {
        color: var(--text-secondary);
        font-size: 0.92rem;
        flex: 1;
        margin-bottom: 1.2rem;
}

.project-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.2rem;
}

.project-tags span {
        background: rgba(0, 212, 170, 0.08);
        border: 1px solid rgba(0, 212, 170, 0.2);
        color: var(--accent);
        padding: 0.25rem 0.7rem;
        border-radius: 20px;
        font-size: 0.78rem;
        font-weight: 500;
}

.project-link {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--primary);
        font-weight: 600;
        font-size: 0.9rem;
        transition: all 0.3s;
}

.project-link:hover {
        color: var(--accent);
        gap: 0.8rem;
}

/* ===== Contact ===== */
.contact { text-align: center; }

.contact-subtitle {
        color: var(--text-secondary);
        font-size: 1.1rem;
        max-width: 650px;
        margin: -1rem auto 3rem;
}

.contact-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
        max-width: 900px;
        margin: 0 auto;
}

.contact-card {
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 2rem 1.5rem;
        text-align: center;
        transition: all 0.3s;
        display: block;
        color: inherit;
}

.contact-card:hover {
        border-color: var(--primary);
        transform: translateY(-5px);
        box-shadow: 0 10px 30px var(--primary-glow);
        color: inherit;
}

.contact-card i {
        font-size: 2rem;
        color: var(--primary);
        margin-bottom: 1rem;
        display: block;
}

.contact-card h4 {
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
}

.contact-card p {
        color: var(--text-muted);
        font-size: 0.88rem;
}

/* ===== Footer ===== */
footer {
        text-align: center;
        padding: 2rem;
        border-top: 1px solid var(--border);
        color: var(--text-muted);
        font-size: 0.85rem;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
        from { opacity: 0; transform: translateY(30px); }
        to { opacity: 1; transform: translateY(0); }
}

.fade-in {
        opacity: 0;
        transform: translateY(22px) scale(0.985);
        filter: blur(4px);
        transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                    filter 0.65s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: opacity, transform, filter;
}

.fade-in.visible {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
}

/* ===== Responsive ===== */
@media (max-width: 968px) {
        .hero {
                    flex-direction: column;
                    text-align: center;
                    padding-top: 6rem;
                    gap: 2rem;
        }
        .hero-content { max-width: 100%; }
        .hero-name { font-size: 3rem; }
        .hero-desc { margin: 0 auto 2rem; }
        .hero-buttons { justify-content: center; }
        .hero-socials { justify-content: center; }
        .hero-visual { max-width: 100%; width: 100%; }
        .about-grid { grid-template-columns: 1fr; }
        .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
        .nav-links {
                    position: fixed;
                    top: 0;
                    right: -100%;
                    width: 70%;
                    height: 100vh;
                    background: var(--bg-card);
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    transition: right 0.3s;
                    border-left: 1px solid var(--border);
        }
        .nav-links.active { right: 0; }
        .hamburger { display: flex; z-index: 1001; }
        .hero-name { font-size: 2.5rem; }
        .section { padding: 3rem 1.5rem; }
        .section-title { font-size: 1.6rem; }
        .skills-grid { grid-template-columns: 1fr; }
        .contact-grid { grid-template-columns: 1fr 1fr; }
        .timeline-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
        .profile-subpage .profile-container {
                    float: none;
                    position: relative;
                    top: 0;
                    margin: 0 auto 1.5rem;
                    max-width: 100%;
        }
        .hero-name { font-size: 2rem; }
        .hero-title { font-size: 1.2rem; }
        .contact-grid { grid-template-columns: 1fr; }
        .hero-buttons { flex-direction: column; align-items: center; }
}
