/* =========================================================
   Elvijs Strads — Portfolio
   Theme: Engineered Cinematic (cyan + amber on deep charcoal)
   ========================================================= */

:root {
    --bg-primary: #0a0a0f;
    --bg-primary-rgb: 10, 10, 15;
    --bg-secondary: #111118;
    --bg-card: rgba(255,255,255,0.03);
    --text-primary: #f0f0f5;
    --text-secondary: #a8a8b8;
    --text-muted: #8a8a9a;
    --accent-cyan: #00d4ff;
    --accent-amber: #d4a853;
    --accent-gradient: linear-gradient(135deg, #00d4ff, #d4a853);
    --border-subtle: rgba(255,255,255,0.06);
    --border-glow: rgba(0,212,255,0.15);
    --nav-bg: rgba(10,10,15,0.85);
    --mobile-nav-bg: rgba(10,10,15,0.98);
    --toast-bg: rgba(17,17,24,0.95);
    --hero-name-from: #ffffff;
    --hero-name-to: #a0a0b0;
    --ease-cinematic: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
    --bg-primary: #f4f1ec;
    --bg-primary-rgb: 244, 241, 236;
    --bg-secondary: #e8e4dc;
    --bg-card: rgba(0,0,0,0.025);
    --text-primary: #1a1a20;
    --text-secondary: #4a4a55;
    --text-muted: #5f5f6d;
    --accent-cyan: #00788f;
    --accent-amber: #8a5e15;
    --accent-gradient: linear-gradient(135deg, #00788f, #8a5e15);
    --border-subtle: rgba(0,0,0,0.08);
    --border-glow: rgba(0,120,143,0.25);
    --nav-bg: rgba(244,241,236,0.85);
    --mobile-nav-bg: rgba(244,241,236,0.98);
    --toast-bg: rgba(255,255,255,0.95);
    --hero-name-from: #1a1a20;
    --hero-name-to: #4a4a55;
}

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

html { scroll-behavior: auto; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s var(--ease-cinematic), color 0.5s var(--ease-cinematic);
}

::selection {
    background: rgba(0,212,255,0.2);
    color: var(--text-primary);
}

/* ===== BACKGROUND ===== */
.bg-noise {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0,212,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* ===== NAVIGATION ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.4s ease, border-color 0.4s ease;
}

nav.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 1px;
}

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

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

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    position: relative;
}

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-cv {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.nav-cv:hover {
    color: var(--accent-cyan);
    border-color: var(--border-glow);
    background: rgba(0,212,255,0.05);
}

.nav-theme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.nav-theme:hover {
    color: var(--accent-cyan);
    border-color: var(--border-glow);
    background: rgba(0,212,255,0.05);
}
.nav-theme svg { display: block; }
.nav-theme .icon-sun { display: none; }
.nav-theme .icon-moon { display: block; }
[data-theme="light"] .nav-theme .icon-sun { display: block; }
[data-theme="light"] .nav-theme .icon-moon { display: none; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.mobile-toggle[aria-expanded="true"] { transform: rotate(90deg); }

/* ===== PROGRESS BAR ===== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    z-index: 1001;
    transform: scaleX(0);
    transform-origin: left;
    will-change: transform;
}

/* ===== SECTIONS ===== */
section {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* ===== HERO ===== */
#hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 5rem;
    padding-bottom: 4rem;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-left { min-width: 0; }

.hero-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-photo-frame {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 3/4;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,255,0.05);
    position: relative;
}

.hero-photo-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.3);
    pointer-events: none;
}

.hero-photo-frame picture,
.hero-photo-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-side-skills {
    width: 100%;
    max-width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
}

.hero-side-skills-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.hero-side-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.hero-side-pill {
    padding: 0.25rem 0.7rem;
    background: rgba(0,212,255,0.05);
    border: 1px solid rgba(0,212,255,0.1);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-label::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 1px;
    background: var(--accent-cyan);
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, var(--hero-name-from) 0%, var(--hero-name-to) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 700px;
    line-height: 1.5;
}

.hero-title .accent {
    color: var(--accent-cyan);
    font-weight: 600;
}

.hero-summary {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

@keyframes heroPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,255,0.0); }
    50% { box-shadow: 0 0 0 8px rgba(0,212,255,0.08); }
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    background: transparent;
    border: 1px solid var(--border-glow);
    border-radius: 4px;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease,
                transform 0.4s var(--ease-spring);
    cursor: pointer;
    will-change: transform;
}

.btn-primary:not(.cert-back-btn) {
    animation: heroPulse 3s ease-in-out 1.5s 3;
}

.btn-primary:hover {
    background: rgba(0,212,255,0.08);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0,212,255,0.1);
}

.btn-primary > span,
.btn-primary > svg {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.4s var(--ease-spring);
    will-change: transform;
}

.btn-secondary:hover { color: var(--text-primary); }

.btn-secondary > span,
.btn-secondary > svg {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    opacity: 0.5;
    z-index: 1;
}

.scroll-hint span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-cyan), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ===== SECTION HEADERS ===== */
.section-header {
    margin-bottom: 3.5rem;
    padding-top: 6rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-divider {
    width: 60px;
    height: 2px;
    background: var(--accent-gradient);
    margin-top: 1.5rem;
    opacity: 0.6;
}

/* ===== ABOUT ===== */
.about-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 3rem;
    align-items: start;
}

.about-content { min-width: 0; }

.about-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

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

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.metric-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 1.2rem;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.metric-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.metric-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-cyan);
    line-height: 1;
    margin-bottom: 0.4rem;
    min-height: 1.6rem;
    font-variant-numeric: tabular-nums;
    transition: color 0.5s var(--ease-cinematic);
}

.metric-value.is-counting,
.metric-value.is-complete { color: var(--accent-cyan); }

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

.skills-section { margin-top: 2rem; }

.skills-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-pill {
    padding: 0.4rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.skill-pill:hover {
    border-color: var(--border-glow);
    color: var(--accent-cyan);
    background: rgba(0,212,255,0.05);
    transform: translateY(-2px);
}

.skills-group { margin-bottom: 1.2rem; }

.skills-group-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--accent-cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

/* ===== STATUS PANEL ===== */
.status-panel {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    overflow: hidden;
}

.status-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gradient);
    opacity: 0.7;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}

.status-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.status-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.status-key {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.status-val {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-primary);
    text-align: right;
}

.status-val--mono {
    font-variant-numeric: tabular-nums;
    color: var(--accent-cyan);
    letter-spacing: 0.5px;
}

.status-val--live { color: #22c55e; }

.status-foot {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.status-foot-label {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.status-foot-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== AVAILABILITY ===== */
.availability {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.2rem;
    background: rgba(0,212,255,0.04);
    border: 1px solid rgba(0,212,255,0.12);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.availability-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,0.6);
    animation: pulse-dot 2s ease-in-out infinite;
    flex-shrink: 0;
}

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

/* ===== EXPERIENCE ===== */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.exp-item {
    position: relative;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 4px;
}

.exp-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 2px;
    height: 0;
    background: var(--accent-gradient);
    transition: height 0.4s ease;
    opacity: 0;
    z-index: 2;
}

.exp-item:hover::before {
    height: 100%;
    opacity: 1;
}

.exp-item:first-child { padding-top: 0; }

.exp-item:hover {
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.02), transparent);
    margin: 0 -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

.exp-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.exp-content {
    position: relative;
    z-index: 1;
}

.exp-content h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.exp-company {
    font-size: 0.95rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
    font-weight: 500;
}

.exp-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.exp-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.exp-tag {
    padding: 0.25rem 0.7rem;
    background: rgba(0,212,255,0.05);
    border: 1px solid rgba(0,212,255,0.1);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-cyan);
}

/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.8rem;
    transition: all 0.4s ease;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

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

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

.project-header,
.project-desc,
.project-footer {
    position: relative;
    z-index: 1;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.project-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
}

.project-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.project-stars {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.lang-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.project-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-cyan);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.project-link:hover { opacity: 1; }

.projects-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.projects-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.projects-empty a {
    color: var(--accent-cyan);
    text-decoration: none;
}

/* ===== CERTIFICATIONS (cross-fade, no 3D) ===== */
.certs-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cert-flip {
    cursor: pointer;
    outline: none;
    border-radius: 12px;
    position: relative;
}

.cert-flip-inner { position: relative; }

.cert-flip-face {
    border-radius: 12px;
    transition: opacity 0.5s var(--ease-cinematic),
                transform 0.5s var(--ease-cinematic);
}

.cert-flip-front {
    position: relative;
    z-index: 2;
    opacity: 1;
    transform: scale(1);
}

.cert-flip[aria-pressed="true"] .cert-flip-front {
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
}

.cert-flip-back {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.97);
    pointer-events: none;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.8rem;
}

.cert-flip[aria-pressed="true"] .cert-flip-back {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    border-color: var(--border-glow);
}

.cert-back-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 1rem;
    width: 100%;
    max-width: 100%;
}

.cert-back-inner h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    max-width: 34ch;
    margin: 0 auto;
    text-wrap: balance;
}

.cert-back-issuer {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-amber);
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.cert-back-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
    animation: none;
}

.cert-flip-hint {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: block;
}

.cert-card {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1.5rem;
    align-items: start;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.8rem;
    transition: border-color 0.3s ease;
    position: relative;
}

.cert-flip:not([aria-pressed="true"]):hover .cert-card {
    border-color: var(--border-glow);
}

.cert-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--accent-cyan);
    position: relative;
    z-index: 1;
}

.cert-content {
    position: relative;
    z-index: 1;
}

.cert-content h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.cert-issuer {
    font-size: 0.9rem;
    color: var(--accent-amber);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.cert-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.cert-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cert-skill {
    padding: 0.2rem 0.6rem;
    background: rgba(212,168,83,0.08);
    border: 1px solid rgba(212,168,83,0.15);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-amber);
}

.cert-meta {
    text-align: right;
    min-width: 120px;
    position: relative;
    z-index: 1;
}

.cert-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cert-status.completed {
    background: rgba(0,212,255,0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(0,212,255,0.2);
}

.cert-status.in-progress {
    background: rgba(212,168,83,0.1);
    color: var(--accent-amber);
    border: 1px solid rgba(212,168,83,0.2);
}

.cert-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
footer {
    margin-top: 6rem;
    padding: 4rem 2.5rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a,
.footer-link-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease, background-size 0.35s var(--ease-cinematic);
    background-color: transparent;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    border: 0;
    cursor: pointer;
    padding: 0 0 2px 0;
    margin: 0;
    position: relative;
    line-height: 1.6;
}

.footer-links a:hover,
.footer-link-btn:hover {
    color: var(--accent-cyan);
    background-size: 100% 1px;
}

.footer-link-btn:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 4px;
    border-radius: 2px;
}

.footer-copy {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== REVEAL ===== */
.reveal {
    opacity: 0;
    will-change: opacity, transform;
}
.reveal.visible { opacity: 1; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero-layout { grid-template-columns: 1fr; }
    .hero-right { display: none; }
    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .status-panel { max-width: 100%; }
    .metrics-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .exp-item { grid-template-columns: 1fr; gap: 0.5rem; }
    .exp-item::before { display: none; }
    .cert-card { grid-template-columns: 1fr; gap: 1rem; }
    .cert-meta { text-align: left; }
}

@media (max-width: 960px) {
    .hero-name { white-space: normal; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--mobile-nav-bg);
        flex-direction: column;
        padding: 1.5rem 2.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border-subtle);
    }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: block; }
    .nav-cv span { display: none; }
    section { padding: 0 1.5rem; }
    .hero-cta { flex-direction: column; align-items: flex-start; }

    .bg-noise,
    .bg-grid { display: none; }
    .aurora { animation: none; opacity: 0.7; }
    .hero-canvas { opacity: 0.35; }
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 3px;
    border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 2000;
    padding: 0.8rem 1.2rem;
    background: var(--accent-cyan);
    color: #04121a;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* =========================================================
   TIER 1 — Cinematic layer
   ========================================================= */

.aurora {
    position: fixed;
    inset: -25%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 20% 30%, rgba(0,212,255,0.10), transparent 60%),
        radial-gradient(ellipse 55% 45% at 80% 70%, rgba(212,168,83,0.08), transparent 60%),
        radial-gradient(ellipse 70% 60% at 50% 100%, rgba(0,212,255,0.05), transparent 65%);
    animation: aurora-drift 48s ease-in-out infinite alternate;
    will-change: transform;
    transition: opacity 0.5s var(--ease-cinematic);
}

[data-theme="light"] .aurora { opacity: 0.55; }

@keyframes aurora-drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(-3%, 2%, 0) scale(1.06); }
    100% { transform: translate3d(2%, -3%, 0) scale(1.02); }
}

.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    mask-image: radial-gradient(ellipse at 60% 50%, black 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse at 60% 50%, black 30%, transparent 78%);
    transition: opacity 0.5s var(--ease-cinematic);
}

[data-theme="light"] .hero-canvas { opacity: 0.4; }

#heroRole {
    display: inline-block;
    transition: filter 0.55s var(--ease-cinematic),
                opacity 0.55s var(--ease-cinematic),
                transform 0.55s var(--ease-cinematic);
    will-change: filter, opacity, transform;
}
#heroRole.is-swapping {
    filter: blur(10px);
    opacity: 0;
    transform: translateY(-6px);
}

.section-header .section-number,
.section-header .section-title,
.section-header .section-divider {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s var(--ease-cinematic),
                transform 0.9s var(--ease-cinematic);
}
.section-header.is-visible .section-number { opacity: 1; transform: none; }
.section-header.is-visible .section-title  { opacity: 1; transform: none; transition-delay: 0.08s; }
.section-header.is-visible .section-divider{ opacity: 0.6; transform: none; transition-delay: 0.16s; }

html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* =========================================================
   TIER 2 — Craft layer
   ========================================================= */

.cert-link,
.projects-empty a,
.project-link {
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: color 0.3s ease, background-size 0.35s var(--ease-cinematic);
    padding-bottom: 2px;
}
.cert-link:hover,
.projects-empty a:hover,
.project-link:hover {
    background-size: 100% 1px;
}

[data-glow] {
    --gx: 50%;
    --gy: 50%;
    --glow-alpha: 0;
}
[data-glow]::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(
        340px circle at var(--gx) var(--gy),
        rgba(0,212,255,0.10),
        rgba(0,212,255,0.03) 40%,
        transparent 70%
    );
    opacity: var(--glow-alpha);
    transition: opacity 0.35s var(--ease-cinematic);
    z-index: 0;
}
[data-glow]:hover {
    --glow-alpha: 1;
}
[data-glow] > * {
    position: relative;
    z-index: 1;
}

[data-magnetic] { will-change: transform; }

.toast {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translate(-50%, 24px);
    padding: 0.85rem 1.5rem;
    background: var(--toast-bg);
    border: 1px solid var(--border-glow);
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    z-index: 3000;
    transition: opacity 0.35s var(--ease-cinematic),
                transform 0.35s var(--ease-cinematic);
}
.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
.toast::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    margin-right: 0.6rem;
    vertical-align: middle;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
    .btn-primary { animation: none; }
    .scroll-line { animation: none; opacity: 0.5; }
    .availability-dot,
    .status-dot { animation: none; }
    .aurora { animation: none; }
    #heroRole,
    .section-header .section-number,
    .section-header .section-title,
    .section-header .section-divider {
        transition: none;
        opacity: 1;
        transform: none;
        filter: none;
    }
    .cert-flip-face { transition: none; }
    .cert-flip[aria-pressed="true"] .cert-flip-front { opacity: 0; }
    .cert-flip[aria-pressed="true"] .cert-flip-back { opacity: 1; transform: none; }
}
