:root {
    --bg-dark: #050505;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --accent: #d4af37;
    --accent-light: #f1c40f;
    --text-primary: #ffffff;
    --text-secondary: #e4e4e7;
    --border: rgba(255, 255, 255, 0.1);
    --gold-glow: 0 0 30px rgba(212, 175, 55, 0.3);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

a,
button,
.project-card,
.cert-card,
.contact-item {
    cursor: pointer;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    letter-spacing: normal;
}

h1,
h2,
h3,
.logo {
    font-family: 'Montserrat', sans-serif;
    letter-spacing: -0.02em;
    text-transform: none;
    /* Resetting the futuristic uppercase */
}

.logo {
    letter-spacing: 0.05em;
    font-weight: 800;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Profile Styles */
.hero-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.profile-container {
    position: relative;
    width: 450px;
    height: 450px;
    max-width: 100%;
    /* Ensure it doesn't overflow container */
    max-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-frame {
    width: 100%;
    height: 100%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    overflow: hidden;
    position: relative;
    z-index: 2;
    border: 1px solid var(--border);
    background: var(--bg-card);
    animation: morph 8s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

.profile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%) contrast(110%);
    transition: var(--transition);
}

.profile-frame:hover img {
    filter: grayscale(0%) contrast(100%);
    transform: scale(1.05);
}

/* About Section New Layout */
.lead-text {
    font-size: 1.25rem;
    max-width: 900px;
    margin: 0 auto 4rem auto;
    text-align: center;
    color: var(--text-secondary);
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    /* Reduced from 300px for better mobile fit */
    gap: 2rem;
}

.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 20px;
    transition: var(--transition);
    text-align: left;
    height: 100%;
}

.about-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    background: var(--bg-card-hover);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.profile-accent-1 {
    position: absolute;
    top: -5%;
    right: -5%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite reverse;
    opacity: 0.3;
}

.profile-accent-2 {
    position: absolute;
    bottom: -5%;
    left: -5%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    opacity: 0.2;
}

.profile-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, transparent 50%);
    z-index: 1;
    pointer-events: none;
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}


/* Background Canvas */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    background: #000;
    cursor: auto !important;
}

/* Mobile Navigation Toggle */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
}

#navbar.scrolled {
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

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

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a.btn-primary {
    color: #000 !important;
    padding: 0.8rem 1.8rem;
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    /* Changed from height to min-height */
    display: flex;
    align-items: center;
    position: relative;
    padding: 8rem 0 4rem 0;
    /* Add padding to prevent navbar overlap */
    /* Removed overflow: hidden to allow content to flow naturally */
}

.hero-kicker {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wave {
    animation: wave 2s infinite;
    display: inline-block;
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(20deg);
    }

    75% {
        transform: rotate(-10deg);
    }
}

.hero-name {
    font-size: 4.5rem;
    /* Reduced from 5rem */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-roles {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-roles .dot {
    color: var(--accent);
    margin: 0 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
    font-weight: 400;
    line-height: 1.8;
}

.highlight {
    color: var(--text-primary);
    font-weight: 700;
    background: linear-gradient(120deg, transparent 0%, transparent 6px, rgba(212, 175, 55, 0.2) 6px, rgba(212, 175, 55, 0.2) 100%);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-separator {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: var(--gold-glow);
}

.btn-secondary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid var(--border);
    margin-left: 1.5rem;
    transition: var(--transition);
}

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

/* Section Spacing - Standardized for consistent rhythm */
.about,
.projects,
.experience,
.skills,
.education,
.certifications {
    padding: 6rem 0;
}

.contact {
    padding: 6rem 0 2rem 0;
}

/* Projects */
.section-tag {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 700;
    display: block;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 3.5rem;
    margin-bottom: 4rem;
}

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

.project-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    overflow: hidden;
    height: 400px;
    position: relative;
    transition: var(--transition);
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(212, 175, 55, 0.06), transparent 40%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-15px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-image {
    height: 100%;
    width: 100%;
    background: linear-gradient(45deg, #111 0%, #222 100%);
    position: relative;
}

.project-overlay {
    position: absolute;
    inset: 0;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
}

.project-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.project-overlay p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

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

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
    /* Push to bottom if flex column */
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--accent);
    border-radius: 8px;
    transition: var(--transition);
    background: rgba(212, 175, 55, 0.1);
    align-self: flex-start;
}

.project-link:hover {
    background: var(--accent);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.project-link i {
    width: 16px;
    height: 16px;
}

.project-tags span {
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(212, 175, 55, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Skills Enhanced Styles */
.skills-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 24px;
    transition: var(--transition);
}

.skill-category:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.skill-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.skill-icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--accent);
    transition: var(--transition);
}

.skill-category:hover .skill-icon-wrapper {
    background: var(--accent);
    color: #000;
    transform: scale(1.1) rotate(10deg);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    list-style: none !important;
    padding: 0 !important;
}

.skill-tags li {
    padding: 0.4rem 1rem !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.skill-tags li::before {
    display: none !important;
}

.skill-tags li:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(212, 175, 55, 0.05);
}

/* Certifications Styles */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Reduced from 320px */
    gap: 2rem;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2.5rem;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cert-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(212, 175, 55, 0.02));
    opacity: 0;
    transition: var(--transition);
}

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

.cert-card:hover::after {
    opacity: 1;
}

.cert-issuer {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    display: block;
}

.cert-info h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

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

.cert-card i {
    color: var(--accent);
    width: 30px;
    height: 30px;
    opacity: 0.5;
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin-top: 4rem;
}

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

.timeline-item {
    margin-bottom: 4rem;
    padding-left: 3rem;
    position: relative;
}

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

.date {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

/* Education Section Styles */
.education-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.edu-smart-node {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.edu-smart-node::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent) 0%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.edu-smart-node:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.edu-smart-node:hover::before {
    opacity: 1;
}

.node-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.node-identity {
    flex: 1;
}

.node-scifi-label {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    font-family: 'Courier New', monospace;
}

.node-identity h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.node-field {
    display: block;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.node-context {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
    text-align: right;
}

.node-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.node-school {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.node-body {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

.node-body p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.code-prefix {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    margin-right: 0.5rem;
    font-weight: 700;
}

/* Contact */

.contact-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border);
    padding: 6rem;
    border-radius: 48px;
    text-align: center;
}

.contact-box h2 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.contact-box p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-inline: auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-card);
    padding: 1rem 2rem;
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.contact-item:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

/* Timeline Journey Styles */
.timeline-journey {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    padding: 4rem 0;
}

.timeline-journey::before {
    content: '';
    position: absolute;
    top: 5.5rem;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border) 10%, var(--border) 90%, transparent 100%);
    z-index: 0;
}

.journey-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.journey-year {
    font-size: 0.85rem;
    color: var(--accent);
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin: 0 auto 1.5rem auto;
    border: 1px solid var(--accent);
    border-radius: 50%;
    font-weight: 600;
}

.journey-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.journey-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.highlight-journey .journey-year {
    background: var(--accent);
    color: #000;
}

.highlight-journey .journey-content h3 {
    color: var(--accent);
}

@media (max-width: 992px) {
    .timeline-journey {
        flex-direction: column;
        gap: 3rem;
        padding-left: 0;
    }

    .timeline-journey::before {
        width: 1px;
        height: 100%;
        top: 0;
        left: 24.5px;
    }

    .journey-item {
        text-align: left;
        display: flex;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .journey-year {
        margin-bottom: 0;
        min-width: 50px;
        text-align: center;
        margin-top: 0;
    }

    .journey-content {
        padding-top: 0.5rem;
    }

    /* Tablet optimizations */
    .about-cards {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }

    .skills-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .cert-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}



@media (max-width: 768px) {

    /* Container Padding */
    .container {
        padding: 0 1.5rem;
    }

    /* Hero Section Mobile */
    .hero {
        padding: 6rem 0 3rem 0;
        min-height: auto;
    }

    .hero-content-wrapper {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }

    .hero-text {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-kicker {
        font-size: 1rem;
        justify-content: center;
    }

    .hero-name {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero-roles {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

    .hero-roles .dot {
        display: none;
    }

    .subtitle {
        font-size: 1rem;
        line-height: 1.6;
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        width: 100%;
        max-width: 300px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
        margin-left: 0;
        padding: 1rem 2rem;
        font-size: 0.95rem;
    }

    .hero-stats {
        margin-top: 2rem;
        gap: 1.5rem;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        padding-top: 1.5rem;
    }

    .stat-separator {
        display: none;
    }

    .stat-item {
        align-items: center;
        min-width: 90px;
    }

    .stat-num {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .profile-container {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }

    /* Hide decorative elements on mobile for compactness */
    .profile-accent-1,
    .profile-accent-2 {
        display: none;
    }

    /* Mobile Navigation */
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: 0;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        overflow: hidden;
        transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-bottom: 1px solid var(--border);
        z-index: 999;
    }

    .nav-links.active {
        height: 100vh;
        padding-bottom: 5rem;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger animation for links */
    .nav-links.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-links.active li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(6) {
        transition-delay: 0.35s;
    }

    .nav-links.active li:nth-child(7) {
        transition-delay: 0.4s;
    }

    .nav-links.active li:nth-child(8) {
        transition-delay: 0.45s;
    }

    .nav-links a {
        display: block;
        padding: 1.5rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }

    .nav-links a.btn-primary {
        display: inline-block;
        margin-top: 2rem;
        width: auto;
        padding: 0.8rem 1.8rem;
    }

    /* Section Headers */
    .section-header {
        text-align: center;
        width: 100%;
    }

    .section-tag {
        font-size: 0.75rem;
        letter-spacing: 2px;
        display: block;
        /* Ensure it takes full width for centering */
        margin-bottom: 0.5rem;
    }

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

    /* About Section */
    .lead-text {
        font-size: 1.05rem;
        margin-bottom: 2.5rem;
        text-align: center;
    }

    .about-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-card {
        padding: 2rem;
    }

    .about-card h3 {
        font-size: 1.3rem;
    }

    .about-card p {
        font-size: 0.9rem;
    }

    /* Project Grid */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        height: auto;
        min-height: 320px;
    }

    .project-overlay {
        padding: 2rem;
    }

    .project-overlay h3 {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .project-overlay p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

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

    .project-tags span {
        font-size: 0.7rem;
        padding: 0.25rem 0.7rem;
    }

    .project-link {
        padding: 0.7rem 1.3rem;
        font-size: 0.85rem;
    }

    /* Skills */
    .skills-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .skill-category {
        padding: 2rem;
    }

    .skill-category h3 {
        font-size: 1.3rem;
    }

    .skill-desc {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .skill-icon-wrapper {
        width: 50px;
        height: 50px;
        margin-bottom: 1.5rem;
    }

    .skill-category {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .skill-tags {
        justify-content: center;
    }

    .skill-tags li {
        padding: 0.35rem 0.85rem !important;
        font-size: 0.8rem;
    }

    /* Certifications */
    .cert-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cert-card {
        padding: 2rem;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }

    .cert-icon {
        align-self: center;
    }

    .cert-info h3 {
        font-size: 1.2rem;
    }

    .cert-info p {
        font-size: 0.85rem;
    }

    .cert-issuer {
        font-size: 0.75rem;
    }

    /* Education */
    .education-grid {
        gap: 1.5rem;
    }

    .edu-smart-node {
        padding: 2rem 1.5rem;
    }

    .node-header-row {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .node-identity h3 {
        font-size: 1.3rem;
    }

    .node-field {
        font-size: 0.85rem;
    }

    .node-scifi-label {
        font-size: 0.7rem;
    }

    .node-context {
        text-align: left;
        align-items: flex-start;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 1rem;
    }

    .node-school {
        font-size: 0.85rem;
    }

    .node-body {
        padding-top: 1.5rem;
    }

    .node-body p {
        font-size: 0.9rem;
    }

    /* Contact */
    .contact-box {
        padding: 3rem 2rem;
        border-radius: 24px;
        text-align: center;
    }

    .contact-box h2 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .contact-box p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .contact-item {
        width: 100%;
        justify-content: center;
        padding: 1.2rem 2rem;
    }

    /* Adjust section spacing for mobile */
    .about,
    .projects,
    .experience,
    .skills,
    .education,
    .certifications {
        padding: 3.5rem 0;
    }

    .contact {
        padding: 3.5rem 0 2rem 0;
    }

    /* Footer */
    footer {
        padding: 1.5rem 0;
    }

    footer p {
        font-size: 0.85rem;
    }
}

/* Medium Phones: 640px and below */
@media (max-width: 640px) {
    .hero-name {
        font-size: 2.3rem;
    }

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

    .profile-container {
        width: 230px;
        height: 230px;
    }

    .hero {
        padding: 5rem 0 3rem 0;
    }

    .container {
        padding: 0 1.25rem;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 4.5rem 0 2.5rem 0;
    }

    .hero-name {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .hero-roles {
        font-size: 0.85rem;
        margin-bottom: 1.2rem;
    }

    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .profile-container {
        width: 200px;
        height: 200px;
    }

    .about-card,
    .skill-category,
    .cert-card,
    .edu-smart-node {
        padding: 1.5rem;
    }

    .contact-box {
        padding: 2.5rem 1.5rem;
    }

    .contact-box h2 {
        font-size: 1.8rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }

    .project-overlay {
        padding: 1.5rem;
    }

    .project-overlay h3 {
        font-size: 1.3rem;
    }

    .hero-stats {
        gap: 1rem;
        margin-top: 1.5rem;
        padding-top: 1.2rem;
    }

    .stat-num {
        font-size: 1.5rem;
    }

    .hero-actions {
        gap: 0.8rem;
    }

    /* Reduce section spacing further */
    .about,
    .projects,
    .experience,
    .skills,
    .education,
    .certifications {
        padding: 2.5rem 0;
    }

    .contact {
        padding: 2.5rem 0 1.5rem 0;
    }
}

/* Ultra Small Devices (Budget Android phones) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.875rem;
    }

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

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

    .profile-container {
        width: 180px;
        height: 180px;
    }

    .about-card,
    .skill-category,
    .cert-card,
    .edu-smart-node {
        padding: 1.25rem;
    }

    .contact-box {
        padding: 2rem 1.25rem;
    }

    .contact-box h2 {
        font-size: 1.5rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.8rem 1.25rem;
        font-size: 0.85rem;
    }
}

/* Landscape Mode Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 3rem 0 2rem 0;
    }

    .profile-container {
        width: 180px;
        height: 180px;
    }

    .hero-stats {
        margin-top: 1rem;
        padding-top: 1rem;
    }

    .about,
    .projects,
    .experience,
    .skills,
    .education,
    .certifications {
        padding: 2rem 0;
    }

    .section-header h2 {
        margin-bottom: 1.5rem;
    }
}