/* ============================================
   Ian P Stokes - Portfolio Styles
   Modern, Technical, Professional
   ============================================ */

/* CSS Variables */
:root {
    /* Colors - Technical/Engineering aesthetic */
    --bg-primary: #0a0d12;
    --bg-secondary: #111820;
    --bg-card: #161d27;
    --bg-card-hover: #1a222e;

    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent: #00b4d8;
    --accent-light: #48cae4;
    --accent-dark: #0077b6;
    --accent-glow: rgba(0, 180, 216, 0.3);

    --success: #10b981;
    --border: #1e293b;
    --border-light: #334155;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Grid */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 180, 216, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 180, 216, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 13, 18, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

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

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

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-base);
}

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

.nav-links a:hover::after {
    width: 100%;
}

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

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

.nav-cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: background var(--transition-base), color var(--transition-base);
    white-space: nowrap;
}

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

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 13, 18, 0.98);
    backdrop-filter: blur(20px);
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
    border-bottom: 1px solid var(--border);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 24px 60px;
    position: relative;
}

.hero-content {
    max-width: var(--container-width);
    margin: 0 auto;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.3);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    color: var(--accent);
    margin-bottom: 32px;
    max-width: 100%;
    text-align: center;
    line-height: 1.4;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-line {
    display: block;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--accent-glow);
}

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

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

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.stat-number::after {
    content: '+';
    color: var(--accent);
}

.stat-item:last-child .stat-number::after {
    content: '';
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
    40% { transform: rotate(45deg) translateY(8px); }
    60% { transform: rotate(45deg) translateY(4px); }
}

/* Sections */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 60px;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-light) 0%, transparent 100%);
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 48px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-content p.lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.about-content strong {
    color: var(--accent);
}

.about-image {
    position: sticky;
    top: 120px;
}

.image-frame {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.frame-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
}

.frame-corner.tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.frame-corner.tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.frame-corner.bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.frame-corner.br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.about-credentials {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.credential {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.credential-icon {
    font-size: 1.2rem;
}

.btn-cv-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 9px 16px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    transition: all var(--transition-base);
    letter-spacing: 0.02em;
}

.btn-cv-download:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 180, 216, 0.06);
}

/* Experience Section */
.experience {
    background: var(--bg-secondary);
}

.exp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    transition: all var(--transition-base);
}

.exp-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 60px var(--accent-glow);
}

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

.exp-company {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent);
}

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

.exp-role {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.exp-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.exp-clients {
    margin-bottom: 24px;
}

.client-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 12px;
}

.client-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.client-tag {
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.2);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--accent);
}

.exp-achievements h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exp-achievements ul {
    list-style: none;
}

.exp-achievements li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

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

.experience-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    transition: all var(--transition-base);
}

.summary-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.summary-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.summary-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

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

/* Expertise Section */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.expertise-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    transition: all var(--transition-base);
}

.expertise-category:hover {
    border-color: var(--border-light);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    margin-bottom: 24px;
}

.category-icon {
    font-size: 1.4rem;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-name {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-name::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

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

/* Image overlay for hobby cards with background photos */
.project-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 13, 18, 0.97) 0%,
        rgba(10, 13, 18, 0.78) 45%,
        rgba(10, 13, 18, 0.45) 100%
    );
    border-radius: 12px;
}

/* Ensure card content sits above overlay */
.project-card > *:not(.project-img-overlay) {
    position: relative;
    z-index: 1;
}

.project-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.project-type {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: gap var(--transition-base);
}

.project-link:hover {
    gap: 12px;
}

.project-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.spec {
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.personal-note {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1) 0%, rgba(0, 119, 182, 0.1) 100%);
    border: 1px solid rgba(0, 180, 216, 0.2);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

.note-content h4 {
    color: var(--accent);
    margin-bottom: 12px;
}

.note-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.interests-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.interest {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

a.contact-method:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.method-icon {
    font-size: 1.2rem;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

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

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

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0;
}

.footer-content {
    text-align: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.footer-tagline {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-base);
}

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

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

/* About Positioning Note */
.about-positioning {
    margin-top: 24px;
    padding: 20px 24px;
    background: rgba(0, 180, 216, 0.06);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ============================================
   Engineering Organisations Strip
   ============================================ */
.orgs-strip {
    padding: 52px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}

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

.orgs-label {
    text-align: center;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 36px;
}

.orgs-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 28px 56px;
}

.org-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
}

.org-logo {
    height: 34px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.7);
    transition: filter 0.25s ease;
}

.org-logo:hover {
    filter: brightness(0) invert(1) opacity(1);
}

.org-logo-ge {
    height: 46px;
}

.org-text {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.25s ease;
    white-space: nowrap;
    font-family: var(--font-sans);
}

.org-text:hover {
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
    .orgs-strip {
        padding: 40px 0;
    }

    .orgs-grid {
        gap: 22px 40px;
    }

    .org-logo {
        height: 26px;
    }

    .org-logo-ge {
        height: 36px;
    }

    .org-text {
        font-size: 0.875rem;
    }
}

/* Career Impact Section */
.impact {
    background: var(--bg-primary);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.impact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s;
}

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

.impact-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.impact-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.impact-card-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--bg-card);
}

.impact-icon {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.impact-label-lg {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.impact-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.impact-context {
    font-size: 0.75rem;
    color: var(--text-muted, #4a5568);
    line-height: 1.45;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
}

/* Current Focus Strip */
.current-focus-strip {
    background: linear-gradient(135deg, rgba(0,180,216,0.06) 0%, rgba(0,180,216,0.02) 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 4rem 0;
}

.focus-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.focus-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.focus-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.focus-body {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.75rem;
}

.focus-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.focus-tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.85rem;
    border: 1px solid var(--accent);
    border-radius: 20px;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 1024px) {
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .impact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .impact-number {
        font-size: 1.8rem;
    }
}

/* Story Section */
.story {
    background: var(--bg-secondary);
}

.story-block {
    margin-bottom: 80px;
}

.story-block:last-child {
    margin-bottom: 0;
}

.story-subtitle {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 28px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.story-intro {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 780px;
    margin-bottom: 36px;
    line-height: 1.75;
}

.philosophy-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
    max-width: 820px;
}

.philosophy-close {
    font-style: italic;
    color: var(--accent) !important;
    font-size: 1.1rem !important;
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    margin-top: 32px !important;
}

/* Engineering DNA Grid */
.dna-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dna-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.dna-card:hover {
    border-color: var(--border-light);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.dna-bg-glyph {
    position: absolute;
    top: -4px;
    right: 12px;
    font-size: 4.5rem;
    font-family: var(--font-mono);
    color: var(--accent);
    opacity: 0.07;
    line-height: 1;
    user-select: none;
    pointer-events: none;
    font-weight: 700;
    transition: opacity var(--transition-base);
}

.dna-card:hover .dna-bg-glyph {
    opacity: 0.12;
}

.dna-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 80%);
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: 12px 12px 0 0;
}

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

.dna-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    position: relative;
}

.dna-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.dna-card ul li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: 14px;
    position: relative;
    line-height: 1.5;
}

.dna-card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 0.8rem;
}

.dna-card.dna-core {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.1) 0%, rgba(0, 119, 182, 0.06) 100%);
    animation: dna-glow 3s ease-in-out infinite;
}

.dna-card.dna-core::after {
    display: none;
}

@keyframes dna-glow {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(0, 180, 216, 0.1); }
    50%       { box-shadow: 0 0 30px rgba(0, 180, 216, 0.4), 0 0 80px rgba(0, 180, 216, 0.15); }
}

.dna-card.dna-core h4 {
    color: var(--accent);
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.dna-card.dna-core .dna-bg-glyph {
    opacity: 0.07;
    font-size: 5rem;
}

.dna-core-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 8px;
    margin-bottom: 20px;
    position: relative;
}

.dna-industries {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    position: relative;
}

.dna-industry-tag {
    background: rgba(0, 180, 216, 0.12);
    border: 1px solid rgba(0, 180, 216, 0.25);
    color: var(--accent-light);
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: var(--font-mono);
}

.dna-project-highlight {
    margin-top: 20px;
    padding: 10px 14px;
    background: rgba(0, 180, 216, 0.07);
    border-left: 2px solid var(--accent);
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    line-height: 1.55;
    position: relative;
    transition: background var(--transition-base);
}

.dna-card:hover .dna-project-highlight {
    background: rgba(0, 180, 216, 0.12);
}

.dna-project-highlight::before {
    content: '// ';
    color: var(--accent);
    font-weight: 600;
}

/* DNA Achievement Stats Bar */
.dna-stats-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 28px;
}

.achievement-stat {
    background: var(--bg-card);
    padding: 28px 18px;
    text-align: center;
    transition: background var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.achievement-stat:hover {
    background: var(--bg-card-hover);
}

.ach-number {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-mono);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -0.03em;
}

.ach-label {
    font-size: 0.775rem;
    color: var(--text-muted);
    line-height: 1.45;
    max-width: 140px;
}

/* Leadership Principles Grid */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

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

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

.principle-number {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 12px;
    opacity: 0.7;
}

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

.principle-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Career Section */
.career {
    background: var(--bg-primary);
}

.timeline-header {
    margin: 60px 0 48px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.timeline-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 640px;
}

.career-timeline {
    position: relative;
    padding-left: 32px;
}

.career-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--border) 100%);
}

.timeline-phase {
    position: relative;
    margin-bottom: 48px;
    padding-left: 28px;
}

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

.phase-dot {
    position: absolute;
    left: -32px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    z-index: 1;
}

.timeline-phase:first-child .phase-dot {
    background: var(--accent);
}

.phase-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 32px;
    transition: border-color var(--transition-base);
}

.phase-content:hover {
    border-color: var(--border-light);
}

.phase-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.phase-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 20px;
}

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

.phase-tag {
    background: rgba(0, 180, 216, 0.08);
    border: 1px solid rgba(0, 180, 216, 0.2);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--accent);
    font-family: var(--font-mono);
}

/* Expertise 3-column override */
.expertise-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* 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: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-image {
        position: static;
        max-width: 300px;
        margin: 0 auto;
    }

    .experience-summary {
        grid-template-columns: 1fr;
    }

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

    .expertise-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .dna-layout {
        grid-template-columns: repeat(2, 1fr);
    }

    .principles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dna-stats-bar {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-cv-btn {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 100px 20px 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

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

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-line {
        width: 60px;
    }

    .exp-card {
        padding: 24px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 16px;
    }

    .scroll-indicator {
        display: none;
    }

    .dna-layout {
        grid-template-columns: 1fr;
    }

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

    .dna-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .achievement-stat:last-child {
        grid-column: 1 / -1;
    }

    .expertise-grid-3 {
        grid-template-columns: 1fr;
    }

    .career-timeline {
        padding-left: 24px;
    }

    .timeline-phase {
        padding-left: 20px;
    }

    .phase-content {
        padding: 20px;
    }

    .phase-dot {
        left: -24px;
    }

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

    .story-subtitle {
        font-size: 1.2rem;
    }
}

/* ============================================
   Showcase Section
   ============================================ */

.showcase {
    padding: var(--section-padding) 0;
    background: var(--bg-primary);
}

.showcase .section-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 24px;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    gap: 16px;
    padding: 0 24px;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* All cards share base styles */
.showcase-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    cursor: default;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Full-width feature card spans all 3 columns */
.showcase-card.showcase-full {
    grid-column: 1 / -1;
}

/* Image strip at top of each card */
.showcase-card-img {
    height: 160px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    filter: grayscale(80%);
    transition: filter 0.35s ease;
    position: relative;
}

.showcase-card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(to bottom, transparent, var(--bg-card));
}

.showcase-full .showcase-card-img {
    height: 220px;
}

.showcase-card:hover .showcase-card-img {
    filter: grayscale(40%);
}

.showcase-full .showcase-content h3 {
    font-size: 1.4rem;
    margin-bottom: 14px;
}

/* Gradient overlay — bottom-up for standard cards */
.showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 13, 18, 0.95) 0%,
        rgba(10, 13, 18, 0.6) 45%,
        rgba(10, 13, 18, 0.15) 100%
    );
    transition: background var(--transition-base);
}

.showcase-card:hover .showcase-overlay {
    background: linear-gradient(
        to top,
        rgba(10, 13, 18, 0.98) 0%,
        rgba(10, 13, 18, 0.7) 45%,
        rgba(10, 13, 18, 0.2) 100%
    );
}

/* Side-weighted overlay for full-width card */
.showcase-overlay-side {
    background: linear-gradient(
        to right,
        rgba(10, 13, 18, 0.97) 0%,
        rgba(10, 13, 18, 0.75) 40%,
        rgba(10, 13, 18, 0.15) 100%
    );
}

.showcase-card:hover .showcase-overlay-side {
    background: linear-gradient(
        to right,
        rgba(10, 13, 18, 0.99) 0%,
        rgba(10, 13, 18, 0.82) 40%,
        rgba(10, 13, 18, 0.2) 100%
    );
}

/* Content — sits on top of overlay */
.showcase-content {
    position: relative;
    z-index: 1;
    padding: 28px;
    width: 100%;
}

/* Side-anchored content for full-width feature card */
.showcase-content-side {
    max-width: 520px;
    padding: 48px;
    align-self: center;
}

.showcase-domain {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(0, 180, 216, 0.12);
    border: 1px solid rgba(0, 180, 216, 0.25);
    border-radius: 4px;
    padding: 4px 10px;
    margin-bottom: 12px;
}

.showcase-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.showcase-content-side h3 {
    font-size: 1.6rem;
    margin-bottom: 14px;
}

.showcase-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.showcase-content-side p {
    font-size: 0.95rem;
    -webkit-line-clamp: unset;
    overflow: visible;
}

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

.showcase-tags span {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 3px 8px;
    white-space: nowrap;
}

/* Accent border on hover */
.showcase-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: border-color var(--transition-base);
    pointer-events: none;
    z-index: 2;
}

.showcase-card:hover::after {
    border-color: rgba(0, 180, 216, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase-card.showcase-full {
        grid-column: 1 / -1;
    }

    .showcase-full .showcase-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    .showcase-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .showcase-card-img {
        height: 130px;
    }

    .showcase-full .showcase-card-img {
        height: 170px;
    }
}

/* ============================================
   Career Global Footprint Map
   ============================================ */

.career-map-wrap {
    margin-top: 72px;
    padding-top: 56px;
    border-top: 1px solid var(--border);
}

.career-map-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.career-map-title .map-glyph {
    font-family: var(--font-mono);
    color: var(--accent);
}

.career-map-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.career-map-hint {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-top: 12px;
    text-align: center;
    letter-spacing: 0.04em;
}

#career-map {
    height: 400px;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-secondary);
}

/* Leaflet dark theme overrides */
.leaflet-container {
    background: #0a0d12;
    font-family: var(--font-main);
}

/* Invert OSM tiles to dark mode */
.leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) brightness(90%) saturate(0.6);
}

.leaflet-control-attribution {
    background: rgba(10, 13, 18, 0.75) !important;
    color: var(--text-muted) !important;
    font-size: 0.6rem !important;
    padding: 2px 6px !important;
}

.leaflet-control-attribution a {
    color: var(--text-muted) !important;
}

.leaflet-control-zoom a {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover {
    background: var(--bg-card-hover) !important;
    color: var(--accent) !important;
}

/* Map tooltip */
.map-tooltip {
    background: rgba(10, 13, 18, 0.95) !important;
    border: 1px solid rgba(0, 180, 216, 0.4) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-mono);
    font-size: 0.72rem !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
    white-space: nowrap;
}

.map-tooltip::before {
    border-top-color: rgba(0, 180, 216, 0.4) !important;
}

.map-tooltip strong {
    color: var(--accent) !important;
    display: block;
    font-size: 0.78rem;
    margin-bottom: 2px;
}

/* Map markers */
.map-marker-wrap {
    background: transparent !important;
    border: none !important;
}

.map-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.map-dot-current {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border: 2px solid #fff;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.3);
}

.map-dot-current::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: map-ping 2s ease-out infinite;
}

@keyframes map-ping {
    0%   { transform: scale(0.7); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* Map legend */
.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: opacity 0.2s, filter 0.2s;
    user-select: none;
}

.legend-pill:hover {
    filter: brightness(1.15);
}

.legend-pill.off {
    opacity: 0.35;
    filter: grayscale(0.6);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    #career-map {
        height: 300px;
    }
}

/* Selection */
::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

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

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

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

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