/* ========== CSS VARIABLES ========== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);

    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --accent-cyan: #00d4ff;
    --accent-purple: #7c3aed;
    --accent-gradient: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow-cyan: 0 0 20px rgba(0, 212, 255, 0.15);
    --shadow-glow-purple: 0 0 20px rgba(124, 58, 237, 0.15);

    --nav-height: 72px;
    --container-max: 1200px;
    --section-padding: 100px;
}

/* ========== RESET & BASE ========== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a:hover {
    color: #33dfff;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

main,
.footer {
    position: relative;
    z-index: 1;
}

.section {
    padding: var(--section-padding) 0;
}

/* ========== GLASS MORPHISM ========== */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-card);
}

/* ========== SECTION TITLE ========== */
.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

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

.subsection-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    margin: 60px 0 32px;
}

/* ========== TAG / PILL BADGES ========== */
.tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.08);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 212, 255, 0.15);
    white-space: nowrap;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #0a0a0f;
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow-cyan), var(--shadow-glow-purple);
    transform: translateY(-2px);
    color: #0a0a0f;
}

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

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    transform: translateY(-2px);
}

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

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

.nav-resume {
    padding: 6px 14px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 999px;
    color: var(--accent-cyan);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-resume:hover {
    background: rgba(0, 212, 255, 0.08);
    border-color: var(--accent-cyan);
}

.nav-resume::after {
    display: none;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.hamburger .bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== HERO ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Reserve the fixed navbar's strip (plus clearance) so hero content centres
       in the visible area below it. Without this, tall content or a short
       viewport centres against the full 100vh and slides under the navbar. */
    padding-top: calc(var(--nav-height) + 32px);
    padding-bottom: 40px;
}

.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px;
    max-width: 800px;
}

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

.hero-name {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    min-height: 2em;
}

.typewriter-text {
    color: var(--text-primary);
    font-weight: 600;
}

.typewriter-cursor {
    color: var(--accent-cyan);
    animation: blink 1s step-end infinite;
}

.hero-summary {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.hero-context {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    font-style: italic;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.hero-socials {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero-socials a {
    color: var(--text-muted);
    transition: color 0.3s ease, transform 0.3s ease;
}

.hero-socials a:hover {
    color: var(--accent-cyan);
    transform: translateY(-3px);
}

/* ========== ABOUT ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    align-items: center;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1.05rem;
    line-height: 1.75;
}

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

.about-highlights {
    display: flex;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.highlight-item {
    text-align: center;
    flex: 1 1 120px;
    min-width: 120px;
}

.highlight-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img-wrapper {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    padding: 3px;
    background: var(--accent-gradient);
    box-shadow: var(--shadow-glow-cyan), var(--shadow-glow-purple);
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ========== SKILLS ========== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skills-grid .skill-card:nth-child(4),
.skills-grid .skill-card:nth-child(5) {
    /* Center the last two cards */
}

.skill-card {
    padding: 32px;
    text-align: center;
}

.skill-icon {
    color: var(--accent-cyan);
    margin-bottom: 16px;
}

.skill-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* ========== EXPERIENCE / TIMELINE ========== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}

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

.timeline-marker {
    position: absolute;
    left: -33px;
    top: 24px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-purple);
    border: 3px solid var(--bg-primary);
    z-index: 1;
}

.timeline-marker.current {
    background: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

.pulse-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-cyan);
    animation: pulse 2s ease-out infinite;
}

.timeline-content {
    padding: 28px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.timeline-role {
    font-size: 1.2rem;
    font-weight: 700;
}

.timeline-company {
    font-size: 0.95rem;
    color: var(--accent-cyan);
    font-weight: 500;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.timeline-subgroup {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent-cyan);
    margin: 6px 0 8px;
}

.timeline-subgroup:first-of-type {
    margin-top: 0;
}

.timeline-bullets {
    list-style: none;
    margin-bottom: 16px;
}

.timeline-bullets + .timeline-subgroup {
    margin-top: 4px;
}

.timeline-bullets li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.timeline-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
}

.timeline-bullets li strong {
    color: var(--text-primary);
}

.timeline-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========== PROJECTS ========== */
.featured-projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.project-card.featured {
    min-height: 380px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.project-icon {
    color: var(--accent-cyan);
}

.project-links a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.project-links a:hover {
    color: var(--accent-cyan);
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.project-subtitle {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    font-weight: 500;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 16px;
    flex: 1;
}

.project-metric {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-cyan);
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Other Projects Grid */
.other-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project-card.small {
    padding: 24px;
}

.project-title-sm {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-desc-sm {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 14px;
}

.project-link-sm {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-cyan);
    transition: gap 0.3s ease;
}

.project-link-sm:hover {
    letter-spacing: 0.5px;
}

/* ========== EDUCATION ========== */
.education-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 36px;
    display: flex;
    gap: 24px;
    align-items: center;
}

.education-icon {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.education-details h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.education-school {
    color: var(--accent-cyan);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.education-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.education-gpa,
.education-year {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ========== CONTACT ========== */
.contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 550px;
    margin: -40px auto 48px;
    font-size: 1.05rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 16px;
}

.contact-email-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent-cyan);
    transition: transform 0.3s ease;
}

.contact-email-link:hover {
    transform: translateX(4px);
    color: #33dfff;
}

.contact-socials {
    display: flex;
    gap: 20px;
}

.contact-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.contact-social-link:hover {
    color: var(--accent-cyan);
}

/* Contact Form */
.contact-form {
    padding: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
}

/* ========== FOOTER ========== */
.footer {
    padding: 32px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

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

/* ========== SELECTION STYLES ========== */
::selection {
    background: rgba(0, 212, 255, 0.2);
    color: var(--text-primary);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}