/* ============================================
   Peter Hill — IBM z/OS Storage Consultant
   Dark Technical Theme
   ============================================ */

:root {
    --bg-primary: #0a0a12;
    --bg-secondary: #10101c;
    --bg-card: #161625;
    --bg-card-hover: #1c1c30;
    --text-primary: #e8e8f0;
    --text-secondary: #9a9ab0;
    --text-muted: #6a6a80;
    --accent: #4fc3f7;
    --accent-dim: #2a7fa8;
    --accent-glow: rgba(79, 195, 247, 0.15);
    --border: #2a2a3d;
    --border-light: #3a3a50;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    --max-width: 1100px;
    --header-height: 64px;
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: #80d8ff;
}

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

/* ---- Header / Navigation ---- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(10, 10, 18, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background 0.3s;
}

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

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

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

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 4px 0;
    position: relative;
    transition: color 0.2s;
}

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

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

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

/* Hamburger menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Hero ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background:
        linear-gradient(rgba(10, 10, 18, 0.65), rgba(10, 10, 18, 0.82)),
        url('https://images.unsplash.com/photo-1680992046626-418f7e910589?w=1920&q=80&fit=crop')
        center / cover no-repeat;
}

.hero-content {
    max-width: 680px;
}

.hero-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.hero-subtitle strong {
    color: var(--accent);
    font-weight: 600;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

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

.stat-number {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* Button */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: #80d8ff;
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 195, 247, 0.25);
}

/* ---- Sections ---- */
.section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 48px;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin-top: 12px;
    border-radius: 2px;
}

/* ---- About ---- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

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

.about-content p:last-child {
    margin-bottom: 0;
}

.about-image {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
    object-fit: cover;
    max-height: 400px;
}

/* ---- Services ---- */
.services-banner {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid var(--border);
}

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    transition: border-color 0.3s, background 0.3s, transform 0.3s;
}

.service-card:hover {
    border-color: var(--accent-dim);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
}

.service-icon {
    font-size: 1.8rem;
    margin-bottom: 16px;
    filter: grayscale(0.3);
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

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

/* ---- Expertise ---- */
.section-expertise {
    background:
        linear-gradient(rgba(10, 10, 18, 0.92), rgba(10, 10, 18, 0.92)),
        url('https://images.unsplash.com/photo-1680992046617-e2e35451bcdb?w=1920&q=80&fit=crop')
        center / cover no-repeat;
    background-attachment: fixed;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.expertise-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
    transition: border-color 0.3s;
}

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

.expertise-category h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.tech-list {
    list-style: none;
}

.tech-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    transition: color 0.2s;
}

.tech-list li:last-child {
    border-bottom: none;
}

.tech-list li:hover {
    color: var(--text-primary);
}

/* ---- Contact ---- */
.contact-content {
    max-width: 560px;
}

.contact-content > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 60px;
}

.contact-item a {
    font-size: 1.05rem;
}

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

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

.footer-credit {
    margin-top: 8px;
    font-size: 0.75rem !important;
}

.footer-credit a {
    color: var(--text-muted);
}

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

/* ---- Fade-in Animation ---- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        flex-direction: column;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border);
        padding: 80px 32px 32px;
        gap: 24px;
        transition: right 0.3s ease;
    }

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

    .nav-links a {
        font-size: 1rem;
    }

    .hero-stats {
        gap: 24px;
        flex-wrap: wrap;
    }

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

    .about-image {
        max-height: 300px;
    }

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

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

    .section-expertise {
        background-attachment: scroll;
    }

    .section {
        padding: 72px 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

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

    .hero-stats {
        gap: 20px;
    }

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