/* ===== CSS Variables & Reset ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fb;
    --bg-card: #ffffff;
    --bg-card-hover: #f4f6f9;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-muted: #8888a0;
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --accent-dark: #1d4ed8;
    --accent-bg: #eff6ff;
    --accent-border: #bfdbfe;
    --accent-2: #0891b2;
    --accent-2-bg: #ecfeff;
    --green: #059669;
    --green-bg: #ecfdf5;
    --amber: #d97706;
    --amber-bg: #fffbeb;
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.10);
    --error-border: rgba(239, 68, 68, 0.25);
    --amber-border: #fde68a;
    --text-on-accent: #ffffff;
    --cert-border: #a7f3d0;
    --accent-2-border: #a5f3fc;
    --border: #e5e7eb;
    --border-light: #f0f0f5;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
    --transition: 0.25s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --nav-height: 64px;
    --max-width: 1440px;
    --gutter: clamp(16px, 4vw, 48px);
}

/* ===== Dark Mode Variables ===== */
[data-theme="dark"] {
    --bg-primary: #0f1117;
    --bg-secondary: #161b27;
    --bg-card: #1a2032;
    --bg-card-hover: #1f2840;
    --text-primary: #e8eaf6;
    --text-secondary: #9ba3c0;
    --text-muted: #5a6380;
    --accent: #60a5fa;
    --accent-light: #93c5fd;
    --accent-dark: #3b82f6;
    --accent-bg: #1e3a5f;
    --accent-border: #2d5a8e;
    --accent-2: #22d3ee;
    --accent-2-bg: #0c3040;
    --green: #34d399;
    --green-bg: #0a2e20;
    --amber: #fbbf24;
    --amber-bg: #2d1f07;
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.10);
    --error-border: rgba(248, 113, 113, 0.25);
    --amber-border: #b45309;
    --cert-border: #065f46;
    --accent-2-border: #164e63;
    --border: #2a3150;
    --border-light: #1f2840;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

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

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

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

body.menu-open {
    overflow: hidden;
}

/* ===== Skip Link ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 3000;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--text-on-accent);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 8px;
}

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

a:hover {
    color: var(--accent-dark);
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

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

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), box-shadow var(--transition);
}

[data-theme="dark"] .nav {
    background: rgba(15, 17, 23, 0.92);
}

.nav.scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

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

.nav-logo {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-border);
    flex-shrink: 0;
}

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

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

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.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); }

/* ===== Theme Toggle Button ===== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent-border);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ===== LinkedIn Nav Button ===== */
.linkedin-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    flex-shrink: 0;
}

.linkedin-nav-btn:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent-border);
}

.nav-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-toggle:focus-visible,
.theme-toggle:focus-visible,
.linkedin-nav-btn:focus-visible,
.nav-links a:focus-visible,
.btn:focus-visible,
.contact-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

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

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: calc(var(--nav-height) + 48px) 0 32px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 40%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 40%, black 20%, transparent 100%);
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-photo-outer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.otw-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    background: var(--green-bg);
    border: 1px solid var(--cert-border);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--green);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.hero-photo-wrap {
    width: clamp(160px, 22vw, 220px);
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 6px;
    display: grid;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(8, 145, 178, 0.16));
    box-shadow: var(--shadow-lg);
}

.hero-photo {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center 18%;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: var(--bg-card);
}

.hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 28px;
}

.hero-title + .hero-badge {
    margin-top: 0;
    margin-bottom: 8px;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.hero-org {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 auto 8px;
    max-width: 580px;
    text-align: center;
    line-height: 1.45;
    letter-spacing: 0.01em;
}

.hero-org-at {
    color: var(--accent);
    font-weight: 700;
}

.hero-org-link {
    color: inherit;
    text-decoration: none;
    transition: opacity var(--transition);
}

.hero-org-link:hover {
    opacity: 0.7;
}

.gradient-text {
    color: var(--accent);
}

.hero-subtitle {
    max-width: 580px;
    margin: 0 auto 28px;
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.hero-tagline {
    margin: 4px auto 12px;
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.hero-skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 720px;
    margin: 0 auto 28px;
}

.hero-certs {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hero-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.cert-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    cursor: default;
    background: var(--green-bg);
    border: 1px solid var(--cert-border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--green);
}

.cert-badge svg {
    color: var(--green);
    flex-shrink: 0;
}

.cert-badge-img {
    display: inline-block;
    width: 20px;
    height: 20px;
    max-width: 20px;
    max-height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 2px;
}

a.cert-badge {
    cursor: pointer;
    transition: opacity var(--transition);
}

a.cert-badge:hover {
    opacity: 0.75;
}

.cert-badge--location {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    color: var(--accent);
}

.cert-badge--location svg {
    color: var(--accent);
}

.open-to-work-dot {
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    flex-shrink: 0;
    animation: otw-pulse 2s ease-in-out infinite;
}

@keyframes otw-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.75); }
}

.hero-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 22px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    font-family: var(--font);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-on-accent);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
    color: var(--text-on-accent);
}

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
    transform: translateY(-1px);
}

.btn-tutorials {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-tutorials:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
    transform: translateY(-1px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 560px;
    margin: 0 auto;
}

.stat { text-align: center; }

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-plus, .stat-unit {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ===== Sections ===== */
.section {
    padding: 40px 0;
}

/* Improve first render by skipping below-the-fold layout/paint until needed */
.section {
    content-visibility: auto;
    contain-intrinsic-size: 700px;
}

/* Alternating section backgrounds after the hero */
#skills         { background: var(--bg-secondary); }
#experience     { background: var(--bg-primary); }
#projects       { background: var(--bg-secondary); }
#certifications { background: var(--bg-primary); }
#education      { background: var(--bg-secondary); }
#awards         { background: var(--bg-primary); }
#contact        { background: var(--bg-secondary); }

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 56px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

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

/* ===== About Section ===== */
/* ===== Skills ===== */
.skill-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.skill-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.skill-card:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow);
}
.skill-card-wide {
    grid-column: 1 / -1;
}
.skill-card-accent {
    background: linear-gradient(135deg, var(--accent-bg), var(--bg-card) 70%);
    border-color: var(--accent-border);
}
.skill-card-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.skill-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--accent);
    background: var(--accent-bg);
}
.skill-card-accent .skill-card-icon {
    color: var(--text-on-accent);
    background: var(--accent);
}
.skill-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.skill-card-head p {
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.skill-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
@media (max-width: 700px) {
    .skill-cards {
        grid-template-columns: 1fr;
    }
}

.tag.tag-accent {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    color: var(--accent-dark);
}


.tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.open-role-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    justify-content: center;
    width: 100%;
    margin-top: 18px;
    margin-bottom: 18px;
}

.open-role-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-right: 4px;
}

.open-role-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}

.open-role-tags-contact {
    margin: -20px auto 24px;
    max-width: 540px;
}

.tag-open-role {
    background: var(--green-bg);
    border-color: color-mix(in srgb, var(--green) 30%, var(--border));
    color: var(--green);
    font-weight: 500;
    font-family: var(--font);
    font-size: 0.72rem;
    padding: 3px 10px;
}

[data-theme="dark"] .tag-open-role {
    border-color: color-mix(in srgb, var(--green) 40%, var(--border));
}

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

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

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

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

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

.timeline-item:first-child .timeline-marker {
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-bg);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
}

.timeline-content:hover {
    box-shadow: var(--shadow);
}

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

.timeline-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

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

.timeline-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.date {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.duration {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.location {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.project-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-2);
    padding: 3px 10px;
    background: var(--accent-2-bg);
    border: 1px solid var(--accent-2-border);
    border-radius: 100px;
    margin-bottom: 10px;
}

.project-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 8px;
}

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

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.tech-stack span {
    padding: 4px 10px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    font-family: var(--font-mono);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.module {
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.module strong {
    font-size: 0.8rem;
    display: block;
    margin-bottom: 3px;
    color: var(--text-primary);
}

.module p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.timeline-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.timeline-details li {
    position: relative;
    padding-left: 18px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.timeline-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

.timeline-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===== Education ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: var(--transition);
}

.edu-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--accent-border);
}

.edu-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-bg);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    color: var(--accent);
}

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

.edu-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.edu-school {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.edu-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.edu-score {
    color: var(--green);
    font-weight: 600;
}

/* ===== Awards ===== */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.award-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.award-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--amber-border);
}

.award-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--amber-bg);
    border-radius: var(--radius-sm);
    color: var(--amber);
}

.award-icon svg {
    width: 20px;
    height: 20px;
}

.award-card h4 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 1px;
    color: var(--text-primary);
}

.award-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ===== Contact ===== */
.contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 480px;
    margin: -28px auto 40px;
    font-size: 0.95rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 720px;
    margin: 0 auto 28px;
}

.contact-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 500;
}

.contact-card span {
    overflow-wrap: anywhere;
}

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

.contact-card svg {
    color: var(--accent);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.contact-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.contact-location svg {
    width: 16px;
    height: 16px;
}

/* ===== Contact Form ===== */
.contact-form-wrap {
    max-width: 520px;
    margin: 40px auto 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 36px 32px;
    box-shadow: var(--shadow);
    animation: slideUp 0.4s ease both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.contact-form-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 24px;
    color: var(--accent);
}

.contact-form-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin: 0;
}

/* ── Form groups ── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-group label svg { color: var(--accent); flex-shrink: 0; }

.form-group input,
.form-group textarea {
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    width: 100%;
    resize: vertical;
    outline: none;
}

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

/* focus */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

/* valid */
.form-group.is-valid input,
.form-group.is-valid textarea {
    border-color: var(--green);
}

/* error */
.form-group.has-error input,
.form-group.has-error textarea {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.field-error {
    font-size: 0.78rem;
    color: var(--error);
    min-height: 1em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.field-error:not(:empty)::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--error);
    flex-shrink: 0;
}

/* ── Textarea + counter ── */
.textarea-wrap { position: relative; width: 100%; display: block; }

.char-counter {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 0.72rem;
    color: var(--text-muted);
    pointer-events: none;
    user-select: none;
    transition: color var(--transition);
}

.char-counter.counter-warn { color: var(--amber); }

.form-group textarea { padding-bottom: 28px; }

/* ── Submit button ── */
.form-submit {
    width: 100%;
    margin-top: 10px;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--text-on-accent);
    font-family: var(--font);
    font-size: 0.92rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}

.form-submit:hover:not(:disabled) {
    background: var(--accent-dark);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
    transform: translateY(-1px);
}

.form-submit:active:not(:disabled) { transform: translateY(0); }

.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-icon-send { flex-shrink: 0; transition: transform var(--transition); }
.form-submit:hover:not(:disabled) .btn-icon-send { transform: translateX(2px) translateY(-1px); }

.form-submit-spinner {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.30);
    border-top-color: var(--text-on-accent);
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
    flex-shrink: 0;
}

.form-submit.loading .form-submit-spinner { display: block; }
.form-submit.loading .btn-icon-send { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Inline error banner ── */
.form-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error-border);
    animation: fadeIn 0.2s ease;
}

.form-error[hidden] { display: none; }
.form-error svg { flex-shrink: 0; margin-top: 1px; }
.form-error a { color: inherit; text-decoration: underline; }

/* ── Success state ── */
.form-success-state[hidden] { display: none; }
.form-success-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 16px 0 8px;
    animation: fadeIn 0.35s ease;
}

.form-success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--green-bg);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    border: 2px solid rgba(16, 185, 129, 0.30);
}

.form-success-state h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.form-success-state p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    max-width: 280px;
}

.form-send-another {
    margin-top: 8px;
    padding: 8px 20px;
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent-border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.form-send-another:hover {
    background: var(--accent-bg);
    border-color: var(--accent);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .contact-form-wrap { padding: 24px 18px 20px; }
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-lg);
    max-width: 320px;
    min-width: 240px;
    overflow: hidden;
    /* hidden by default — no class applied */
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
}

.toast--show {
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: auto;
}

.toast--hide {
    animation: toastOut 0.25s ease forwards;
    pointer-events: none;
}

@keyframes toastIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(12px); }
}

.toast-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--green-bg);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.toast-body strong {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.toast-body span {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color var(--transition), background var(--transition);
}

.toast-close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: var(--green);
    transform-origin: left;
    border-radius: 0 0 var(--radius) var(--radius);
}

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

@media (max-width: 480px) {
    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
    }
}

/* ===== Footer ===== */
.footer {
    padding: 28px 0;
    border-top: 1px solid var(--border);
    text-align: center;
    background: var(--bg-primary);
}

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

.visitor-count {
    margin-top: 6px;
}

/* ===== Animations ===== */
.animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.7s ease forwards;
}

.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }
.delay-4 { animation-delay: 0.48s; }
.delay-5 { animation-delay: 0.60s; }

/* fadeIn keyframes defined above (contact form section) */

html.js .fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    html.js .fade-up {
        opacity: 1;
        transform: none;
    }
}

/* ===== Mobile nav backdrop ===== */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-backdrop { display: block; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(280px, 80vw);
        height: 100dvh;
        flex-direction: column;
        background: var(--bg-primary);
        border-left: 1px solid var(--border);
        padding: calc(var(--nav-height) + 16px) 20px 32px;
        gap: 2px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -12px 0 40px rgba(0,0,0,0.12);
        z-index: 1000;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .nav-links.open { right: 0; }

    .nav-links a {
        font-size: 1rem;
        font-weight: 500;
        padding: 13px 14px;
        border-radius: var(--radius-sm);
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

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

    .timeline {
        padding-left: 24px;
    }

    .timeline-marker {
        left: -24px;
        width: 12px;
        height: 12px;
    }

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

    .timeline-header {
        flex-direction: column;
    }

    .timeline-meta {
        align-items: flex-start;
        flex-direction: row;
        gap: 10px;
        flex-wrap: wrap;
    }

    .timeline-content { padding: 20px 18px; }
    .modules-grid { grid-template-columns: 1fr; }
    .section { padding: 40px 0; }
    .section-title { font-size: 1.5rem; margin-bottom: 40px; }
    .awards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero { padding-top: calc(var(--nav-height) + 24px); }
    .hero-photo-outer { margin-bottom: 20px; }
    .hero-photo-wrap { width: min(180px, 56vw); margin-bottom: 0; }
    .hero-certs { flex-direction: column; align-items: center; }
    .education-grid { grid-template-columns: 1fr; }
    .stat-number { font-size: 1.5rem; }
    .contact-card { padding: 14px 12px; font-size: 0.8rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .timeline { padding-left: 18px; }
    .timeline-marker { left: -18px; }
    .timeline::before { left: 3px; }
    .timeline-content { padding: 16px 14px; }
    .section { padding: 32px 0; }
    .section-title { font-size: 1.35rem; margin-bottom: 32px; }
}

/* ===== Print ===== */
/* ===== On this page (right-side table of contents) ===== */
.page-toc {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 990;
}
.toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font: 600 0.85rem var(--font);
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition);
}
.toc-toggle:hover,
.toc-toggle[aria-expanded="true"] {
    color: var(--accent);
    border-color: var(--accent-border);
}
.toc-panel {
    display: none;
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: 250px;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    padding: 16px 12px 16px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.page-toc.open .toc-panel {
    display: block;
}
.toc-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.toc-list,
.toc-list ol {
    list-style: none;
}
.toc-list {
    border-left: 2px solid var(--border);
}
.toc-list a {
    display: block;
    margin-left: -2px;
    padding: 5px 0 5px 12px;
    border-left: 2px solid transparent;
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition), border-color var(--transition);
}
.toc-list ol a {
    padding-left: 24px;
    font-size: 0.8rem;
}
.toc-list a:hover {
    color: var(--text-primary);
}
.toc-list a.active {
    color: var(--accent);
    font-weight: 600;
    border-left-color: var(--accent);
}
.toc-list a.active-parent {
    color: var(--text-primary);
    font-weight: 600;
}
@media (min-width: 1960px) {
    .page-toc {
        top: calc(var(--nav-height) + 40px);
        bottom: auto;
        right: max(24px, calc((100vw - var(--max-width)) / 2 - 260px));
        width: 210px;
    }
    .toc-toggle {
        display: none;
    }
    .toc-panel {
        display: block;
        position: static;
        width: auto;
        max-height: calc(100vh - var(--nav-height) - 80px);
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
    }
}
@media (max-width: 480px) {
    .page-toc {
        right: 16px;
        bottom: 16px;
    }
    .toc-toggle span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .toc-toggle {
        padding: 12px;
    }
}
@media print {
    .page-toc {
        display: none;
    }
}

/* ===== Company logos (experience) ===== */
.role-head {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.company-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 56px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.company-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
@media (max-width: 600px) {
    .role-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .company-logo {
        width: 104px;
        height: 48px;
    }
}

/* ===== Personal Projects ===== */
.perfyo-intro {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 28px;
    background: linear-gradient(135deg, var(--accent-bg), var(--accent-2-bg));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
}
.perfyo-mark {
    width: 64px;
    height: 64px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}
.perfyo-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}
.perfyo-intro-text h3 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.perfyo-intro-text > p:not(.perfyo-eyebrow) {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 560px;
}
.perfyo-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    list-style: none;
    margin-top: 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.perfyo-stats strong {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-right: 2px;
}
.perfyo-cta {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.projects-subhead {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.projects-subhead::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.platform-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.platform-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.platform-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-border);
    transform: translateY(-3px);
}
.platform-shot {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}
.platform-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
    transition: transform 0.4s ease;
}
.platform-card:hover .platform-shot img {
    transform: scale(1.03);
}
.platform-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 22px;
}
.platform-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.platform-head > div {
    flex: 1;
    min-width: 0;
}
.platform-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
.platform-head h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.platform-host {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent);
    text-decoration: none;
}
.platform-host:hover {
    text-decoration: underline;
}
.platform-lede {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.platform-features {
    list-style: none;
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}
.platform-features li {
    display: flex;
    gap: 8px;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.platform-features svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--green);
}
.platform-body .tech-stack {
    margin-bottom: 16px;
}
.platform-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.platform-link:hover {
    text-decoration: underline;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 100px;
    white-space: nowrap;
}
.status-live {
    color: var(--green);
    background: var(--green-bg);
    border: 1px solid var(--cert-border);
}
.status-dev {
    color: var(--amber);
    background: var(--amber-bg);
    border: 1px solid var(--amber-border);
}
.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent);
}
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.app-tile {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.app-tile:hover,
.app-tile:focus-visible {
    border-color: var(--accent-border);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.app-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}
.app-tile-text {
    min-width: 0;
}
.app-tile-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-bottom: 4px;
}
.app-tile-head h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}
.app-tile p {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.app-tile-tech {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}
@media (max-width: 768px) {
    .perfyo-intro {
        grid-template-columns: auto 1fr;
        padding: 22px;
    }
    .perfyo-cta {
        grid-column: 1 / -1;
        justify-self: start;
    }
    .platform-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .perfyo-intro {
        grid-template-columns: 1fr;
    }
    .app-grid {
        grid-template-columns: 1fr;
    }
}
@media (prefers-reduced-motion: reduce) {
    .platform-card:hover,
    .app-tile:hover,
    .app-tile:focus-visible,
    .platform-card:hover .platform-shot img {
        transform: none;
    }
}

@media print {
    .nav, .nav-backdrop, .hero-actions, .hero-bg-grid,
    .toast, .contact-form-wrap, .skip-link, .footer .visitor-count { display: none; }
    .hero { min-height: auto; padding: 16px 0; }
    .section { padding: 20px 0; }
    .timeline-content, .skill-card, .edu-card, .award-card, .contact-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    body { font-size: 12pt; line-height: 1.5; color: #000; background: #fff; }
    a { color: #000; text-decoration: underline; }
    .container { max-width: 100%; }
}
