/* ==========================================
   CSS Variables & Reset
   ========================================== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #00d4ff;
    --accent-secondary: #0066ff;
    --accent-gradient: linear-gradient(135deg, #00d4ff, #0066ff);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(18, 18, 26, 0.8);
    --nav-height: 70px;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Site-wide background neural network */
#background-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}


/* ==========================================
   Typography
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

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

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

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

/* ==========================================
   Layout
   ========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
    background: transparent;
}

.section-title {
    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;
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background var(--transition-medium);
}

.nav-container {
    max-width: 1200px;
    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: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: width var(--transition-medium);
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: default;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    padding: 0 24px;
    pointer-events: none; /* Allow mouse events to pass through to canvas */
}

.hero-content a,
.hero-content button {
    pointer-events: auto; /* Re-enable for interactive elements */
}

.hero-text-container {
    height: clamp(60px, 12vw, 120px);
    margin-bottom: 24px;
    position: relative;
}

.hero-title {
    /* Text is rendered by particles - keep invisible but accessible */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero-role {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 400;
    opacity: 0; /* Starts hidden, JS reveals it */
}

.hero-credential {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: 0.05em;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0; /* Starts hidden, JS reveals it */
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-medium);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    color: var(--bg-primary);
}

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

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

/* ==========================================
   About Section
   ========================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-intro {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.about-text p {
    margin-bottom: 16px;
}

/* Card-level Particle Canvas */
.has-particle-stats {
    position: relative;
}

.particle-card-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    border-radius: inherit;
}

/* Impact Stats */
.impact-stats {
    display: flex;
    gap: 24px;
    margin: 20px 0;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
}

.impact-stat {
    text-align: center;
    padding: 16px 20px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    transition: all var(--transition-medium);
    min-width: 120px;
    position: relative;
}

.impact-stat:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.15);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.stat-value.visible {
    opacity: 1;
}

.impact-label {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Project Impact Stats */
.project-impact {
    margin-top: 12px;
    margin-bottom: 16px;
    padding-top: 0;
    position: relative;
    z-index: 5;
}

.project-stat-small {
    padding: 12px 16px;
    min-width: 100px;
}

.project-stat-small .stat-value {
    font-size: 1.5rem;
}

/* Tech Stack */
.tech-stack {
    margin-top: 48px;
}

.tech-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.tech-item:hover {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
}

.tech-icon {
    font-size: 1.1rem;
}

/* ==========================================
   Education Section
   ========================================== */
.education {
    background: transparent;
}

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

.education-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-medium);
}

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

.education-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.education-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--bg-primary);
    flex-shrink: 0;
}

.education-info h3 {
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 1.1rem;
}

.education-degree {
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 4px;
}

.education-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.education-description {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

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

/* Simplified Education Details */
.education-details {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.education-focus {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0;
    margin-bottom: 8px;
}

.education-awards {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: 0;
}

/* ==========================================
   Tags
   ========================================== */
.tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

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

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

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

.timeline-marker {
    position: absolute;
    left: -6px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 3px var(--accent);
}

.timeline-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-medium);
    overflow: hidden;
}

.timeline-content:hover {
    border-color: var(--accent);
}

.timeline-header {
    margin-bottom: 16px;
}

.timeline-header h3 {
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-company {
    display: block;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 4px;
}

.timeline-location {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.timeline-achievements li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-achievements li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

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

/* ==========================================
   Experience Section - Compact Format
   ========================================== */
.experience-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.experience-item {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-medium);
}

.experience-item:hover {
    border-color: var(--accent);
}

.experience-header {
    margin-bottom: 16px;
}

.experience-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.experience-title-row h3 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin: 0;
}

.experience-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.experience-company {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.95rem;
    margin-top: 4px;
}

.experience-metrics {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.metric {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
}

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

.experience-bullets li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.experience-bullets li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.experience-bullets li:last-child {
    margin-bottom: 0;
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   Projects Section
   ========================================== */
.projects {
    background: transparent;
}

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

/* Featured Projects - larger cards */
.projects-featured {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

/* Secondary Projects - smaller uniform cards */
.projects-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.project-card-featured {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-medium);
}

.project-card-featured:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(0, 212, 255, 0.08);
}

.project-card-featured .project-content {
    padding: 28px;
}

.project-card-featured .project-links {
    justify-content: center;
}

.project-card-featured .pdf-thumbnail {
    justify-content: center;
    max-width: 200px;
    margin: 0 auto;
}

.project-card-small {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-medium);
}

.project-card-small:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.project-card-small .project-image {
    aspect-ratio: 16/10;
}

.project-card-small .project-content {
    padding: 20px;
}

.project-card-small .project-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.project-card-small .project-description {
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.project-card-small .project-tags {
    margin-bottom: 0;
}

.project-card-small .tag {
    font-size: 0.75rem;
    padding: 4px 10px;
}

/* Project Meta (tech stack inline) */
.project-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-medium);
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(0, 212, 255, 0.08);
}

.project-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    font-size: 3rem;
}

.project-gradient-1 {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(138, 43, 226, 0.15));
}

.project-gradient-2 {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(255, 193, 7, 0.15));
}

.project-gradient-3 {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 212, 255, 0.15));
}

.project-gradient-4 {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.15), rgba(255, 0, 128, 0.15));
}

.project-gradient-5 {
    background: linear-gradient(135deg, rgba(255, 159, 64, 0.15), rgba(255, 99, 132, 0.15));
}

.project-gradient-6 {
    background: linear-gradient(135deg, rgba(54, 162, 235, 0.15), rgba(75, 192, 192, 0.15));
}

.project-content {
    padding: 24px;
}

.project-title {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.project-description {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    position: relative;
    z-index: 5;
}

.project-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 5;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.project-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
}

.project-link svg {
    flex-shrink: 0;
}

/* PDF Thumbnail */
.pdf-thumbnail {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-medium);
    width: 100%;
}

.pdf-thumbnail:hover {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
}

.pdf-thumbnail:hover .pdf-thumbnail-preview {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.15);
}

.pdf-thumbnail:hover .pdf-thumbnail-text {
    color: var(--accent);
}

.pdf-thumbnail-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color);
    border-radius: 4px;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    color: var(--text-muted);
}

.pdf-thumbnail-preview svg {
    opacity: 0.6;
}

.pdf-thumbnail-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.pdf-thumbnail-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.pdf-thumbnail-img {
    width: 48px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.pdf-thumbnail:hover .pdf-thumbnail-img {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.15);
}

/* Compact PDF thumbnail for secondary projects */
.pdf-thumbnail-compact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-medium);
    width: auto;
}

.pdf-thumbnail-compact:hover {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
}

.pdf-thumbnail-compact svg {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.pdf-thumbnail-compact:hover svg {
    color: var(--accent);
}

.project-metric-callout {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

/* Secondary project metric row - icon left, stat right */
.project-metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 5;
}

.project-metric-row .impact-stat {
    margin: 0;
    flex: 1;
}

.project-metric-row .project-stat-small {
    padding: 10px 14px;
    min-width: auto;
}

/* Icon-only PDF thumbnail - matches metric callout height */
.pdf-thumbnail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-medium);
    flex-shrink: 0;
}

.pdf-thumbnail-icon:hover {
    border-color: var(--accent);
    background: rgba(0, 212, 255, 0.05);
}

.pdf-thumbnail-icon svg {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.pdf-thumbnail-icon:hover svg {
    color: var(--accent);
}

/* Education Logo Styles */
.education-logo {
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.education-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* PDF Modal */
.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-medium), visibility var(--transition-medium);
}

.pdf-modal.active {
    opacity: 1;
    visibility: visible;
}

.pdf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.pdf-modal-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 85vh;
    background: var(--bg-primary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-medium);
}

.pdf-modal.active .pdf-modal-container {
    transform: scale(1);
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.pdf-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pdf-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-modal-download,
.pdf-modal-newtab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.pdf-modal-download:hover,
.pdf-modal-newtab:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.pdf-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pdf-modal-close:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.pdf-modal-content {
    flex: 1;
    overflow: hidden;
}

.pdf-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #525659;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.contact-location {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.contact-availability {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 32px;
    font-weight: 500;
}

.contact-form {
    text-align: left;
    margin-bottom: 40px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

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

.btn-submit {
    width: 100%;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 24px;
    min-width: 120px;
    background: var(--bg-secondary);
    border-radius: 12px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-medium);
}

.contact-link span {
    font-size: 0.85rem;
    font-weight: 500;
}

.contact-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.08);
}

.contact-link-icon {
    width: 56px;
    height: 56px;
    padding: 0;
    flex-direction: row;
}

.contact-link-icon svg {
    flex-shrink: 0;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    z-index: 1;
    background: transparent;
}

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

/* ==========================================
   Animations
   ========================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 24px;
        gap: 0;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-medium);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 16px 0;
    }

    .nav-toggle {
        display: flex;
    }

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

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

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

    .section {
        padding: 80px 0;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .about-highlights {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .highlight {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .education-grid {
        grid-template-columns: 1fr;
    }

    .education-header {
        flex-direction: column;
        text-align: center;
    }

    .education-icon {
        margin: 0 auto;
    }

    .timeline::before {
        left: 6px;
    }

    .timeline-item {
        padding-left: 32px;
    }

    .timeline-marker {
        left: 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .projects-featured {
        grid-template-columns: 1fr;
    }

    .projects-secondary {
        grid-template-columns: 1fr;
    }

    .experience-title-row {
        flex-direction: column;
        gap: 4px;
    }

    .experience-date {
        order: -1;
        font-size: 0.85rem;
    }

    .experience-metrics {
        gap: 8px;
    }

    .metric {
        font-size: 0.8rem;
        padding: 5px 12px;
    }

    .experience-item {
        padding: 20px;
    }

    .hero-role {
        font-size: 1rem;
    }

    .hero-credential {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .project-metric-row {
        flex-direction: row;
        gap: 8px;
    }

    .project-metric-row .project-stat-small {
        padding: 8px 12px;
    }

    .project-metric-row .stat-value {
        font-size: 1.2rem;
    }

    .project-metric-row .impact-label {
        font-size: 0.65rem;
    }

    .pdf-thumbnail-icon {
        width: 32px;
        height: 32px;
    }

    .pdf-thumbnail-icon svg {
        width: 16px;
        height: 16px;
    }

    .scroll-indicator {
        display: none;
    }

    .impact-stats {
        gap: 12px;
    }

    .impact-stat {
        flex: 1;
        min-width: 90px;
        padding: 12px 14px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .impact-label {
        font-size: 0.65rem;
    }

    .project-stat-small .stat-value {
        font-size: 1.2rem;
    }

    .project-links {
        flex-direction: column;
        gap: 8px;
    }

    .project-link {
        justify-content: center;
    }

    .pdf-thumbnail {
        padding: 12px;
    }

    .pdf-thumbnail-preview {
        width: 40px;
        height: 50px;
    }

    .pdf-thumbnail-preview svg {
        width: 24px;
        height: 24px;
    }

    .pdf-thumbnail-text {
        font-size: 0.85rem;
    }

    /* PDF Modal Mobile */
    .pdf-modal-container {
        width: 95%;
        height: 90vh;
        border-radius: 12px;
    }

    .pdf-modal-header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .pdf-modal-title {
        font-size: 1rem;
        width: 100%;
        order: 1;
    }

    .pdf-modal-actions {
        width: 100%;
        order: 2;
        justify-content: space-between;
    }

    .pdf-modal-download,
    .pdf-modal-newtab {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .pdf-modal-close {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 16px;
    }

    .education-card,
    .timeline-content,
    .project-content {
        padding: 20px;
    }

    .contact-links {
        gap: 16px;
    }

    .contact-link-icon {
        width: 48px;
        height: 48px;
    }

    .contact-link-icon svg {
        width: 24px;
        height: 24px;
    }

    .hero-text-container {
        margin-bottom: 16px;
    }

    .hero-role {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .hero-tagline {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .hero-credential {
        font-size: 0.75rem;
        margin-bottom: 24px;
    }

    .about-intro {
        font-size: 1rem;
        line-height: 1.6;
    }

    .education-awards {
        font-size: 0.8rem;
    }
}

/* ==========================================
   Selection & Scrollbar
   ========================================== */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--text-primary);
}

::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
