/* ============================================
   George Denton — Portfolio
   Dark infrastructure theme, cyan accents
   ============================================ */

:root {
    --bg-deep: #06060b;
    --bg-primary: #0a0a0f;
    --bg-surface: #10101a;
    --bg-card: #141420;
    --bg-elevated: #1a1a2e;
    --accent: #00d4ff;
    --accent-dim: #0099bb;
    --accent-glow: rgba(0, 212, 255, 0.15);
    --accent-glow-strong: rgba(0, 212, 255, 0.3);
    --text-primary: #e8eaf0;
    --text-secondary: #7a8295;
    --text-dim: #4a5068;
    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(0, 212, 255, 0.2);
    --font-display: 'Syne', sans-serif;
    --font-body: 'Barlow', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --nav-height: 64px;
}

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

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

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-primary);
    background-color: var(--bg-deep);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.018) 1px, transparent 1px);
    background-size: 60px 60px;
}

::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
    position: relative;
}

.section__heading {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.4rem;
    letter-spacing: -0.02em;
    margin-bottom: 56px;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section__heading::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 12px var(--accent-glow-strong);
}

/* ---- Navigation ---- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: background 0.3s, box-shadow 0.3s;
}

.nav--scrolled {
    background: rgba(6, 6, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--border);
}

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

.nav__logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--accent);
    letter-spacing: 0.05em;
}

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

.nav__link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.25s;
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.25s;
}

.nav__link:hover,
.nav__link--active {
    color: var(--accent);
}

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

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

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

.nav__toggle--open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__toggle--open span:nth-child(2) {
    opacity: 0;
}

.nav__toggle--open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 30%, rgba(0, 212, 255, 0.06) 0%, transparent 60%),
                var(--bg-deep);
}

.hero__particles {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
}

.hero__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 16px;
    animation: fadeUp 0.8s ease-out both;
}

.hero__role {
    font-family: var(--font-mono);
    font-size: clamp(0.9rem, 2vw, 1.15rem);
    font-weight: 400;
    color: var(--accent);
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    animation: fadeUp 0.8s ease-out 0.15s both;
}

.hero__tagline {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeUp 0.8s ease-out 0.3s both;
}

.hero__buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeUp 0.8s ease-out 0.45s both;
}

.hero__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    transition: all 0.3s;
    background: rgba(0, 212, 255, 0.04);
}

.hero__btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.15), inset 0 0 24px rgba(0, 212, 255, 0.05);
    transform: translateY(-2px);
}

.hero__btn svg {
    flex-shrink: 0;
}

.hero__scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeUp 0.8s ease-out 0.6s both;
}

.hero__scroll svg {
    animation: scrollBounce 2s ease-in-out infinite;
}

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

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


.about__facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.fact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.fact-card:hover {
    border-color: var(--border-accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.fact-card__value {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2rem;
    color: var(--accent);
    line-height: 1.2;
}

.fact-card__icon {
    display: block;
    font-size: 1.6rem;
    line-height: 1.4;
}

.fact-card__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    margin-top: 6px;
    line-height: 1.4;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--text-dim) 5%,
        var(--text-dim) 38%,
        var(--accent-dim) 45%,
        var(--accent) 55%,
        var(--accent) 95%,
        transparent
    );
    transform: translateX(-50%);
}

.timeline__item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 48px;
    width: 50%;
}

.timeline__item:nth-child(odd) {
    padding-right: 48px;
    justify-content: flex-end;
    text-align: right;
    align-self: flex-start;
}

.timeline__item:nth-child(even) {
    padding-left: 48px;
    margin-left: 50%;
}

.timeline__node {
    position: absolute;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-deep);
    box-shadow: 0 0 12px var(--accent-glow-strong), 0 0 4px var(--accent);
    z-index: 2;
}

.timeline__item:nth-child(odd) .timeline__node {
    right: -7px;
}

.timeline__item:nth-child(even) .timeline__node {
    left: -7px;
}

/* Pre-IT dimmer styles */
.timeline__item--pre .timeline__node {
    background: var(--text-dim);
    box-shadow: 0 0 8px rgba(74, 80, 104, 0.3);
}

.timeline__item--pre .timeline__card {
    opacity: 0.65;
}

.timeline__item--pre .timeline__date {
    color: var(--text-dim);
    border-color: rgba(74, 80, 104, 0.3);
}

/* Current role emphasis */
.timeline__node--current {
    width: 18px;
    height: 18px;
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow-strong), 0 0 8px var(--accent);
}

.timeline__item--current:nth-child(odd) .timeline__node {
    right: -9px;
}

.timeline__pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: pulse 2s ease-out infinite;
}

.timeline__card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: border-color 0.3s, box-shadow 0.3s;
    position: relative;
}

.timeline__card:hover {
    border-color: var(--border-accent);
    box-shadow: 0 4px 24px var(--accent-glow);
}

.timeline__card--current {
    border-color: var(--border-accent);
    background: linear-gradient(135deg, var(--bg-card), rgba(0, 212, 255, 0.04));
    box-shadow: 0 0 30px var(--accent-glow);
}

.timeline__badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid var(--border-accent);
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.timeline__date {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    padding: 2px 8px;
    border: 1px solid var(--border-accent);
    border-radius: 4px;
}

.timeline__role {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.timeline__company {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 10px;
}

.timeline__desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* The Pivot divider */
.timeline__pivot {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 24px 0 48px;
    position: relative;
    z-index: 3;
}

.timeline__pivot-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
}

.timeline__pivot-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    white-space: nowrap;
    padding: 6px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--border-accent);
    border-radius: 4px;
}

/* ---- Skills ---- */
.skills__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.skills__category-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: 0.01em;
}

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

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 400;
    color: var(--text-secondary);
    transition: all 0.25s;
    white-space: nowrap;
}

.chip:hover {
    border-color: var(--border-accent);
    color: var(--accent);
    box-shadow: 0 0 16px var(--accent-glow);
    transform: translateY(-1px);
}

.chip__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ---- Projects ---- */
.projects__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: all 0.35s;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, var(--accent) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.35s;
}

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

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px var(--accent-glow);
}

.project-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: var(--text-dim);
}

.project-card__link {
    transition: color 0.25s;
}

.project-card:hover .project-card__link {
    color: var(--accent);
}

.project-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.project-card__desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

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

.tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-dim);
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.12);
}

/* ---- Certifications ---- */
.certs__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.cert-card:hover {
    border-color: var(--border-accent);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.cert-card__logo {
    width: 28px;
    height: 28px;
    color: var(--accent-dim);
}

.cert-card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.cert-card__issuer {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

/* ---- Contact ---- */
.contact {
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(0, 212, 255, 0.02));
}

.contact__text {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

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

.contact__btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    border: 1px solid var(--border-accent);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    background: rgba(0, 212, 255, 0.04);
    transition: all 0.3s;
}

.contact__btn:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 32px rgba(0, 212, 255, 0.2), inset 0 0 32px rgba(0, 212, 255, 0.05);
    transform: translateY(-2px);
}

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

.footer p {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

/* ---- Scroll Reveal Animations ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger delays for skills chips */
.skills__category .chip {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, border-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.skills__category.active .chip {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Keyframes ---- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

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

    .about__facts {
        grid-template-columns: repeat(4, 1fr);
    }

    .skills__grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

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

@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }

    .section {
        padding: 80px 0;
    }

    .section__heading {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }

    /* Mobile nav */
    .nav__toggle {
        display: flex;
        z-index: 1001;
    }

    .nav__links {
        position: fixed;
        top: 0;
        right: 0;
        width: 260px;
        height: 100vh;
        background: rgba(6, 6, 11, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        flex-direction: column;
        padding: 80px 32px 32px;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--border);
    }

    .nav__links--open {
        transform: translateX(0);
    }

    .nav__link {
        display: block;
        padding: 16px 0;
        font-size: 0.85rem;
        border-bottom: 1px solid var(--border);
    }

    /* Mobile timeline */
    .timeline::before {
        left: 16px;
    }

    .timeline__item,
    .timeline__item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding-left: 48px;
        padding-right: 0;
        text-align: left;
    }

    .timeline__item:nth-child(odd) {
        padding-right: 0;
        padding-left: 48px;
        justify-content: flex-start;
        text-align: left;
    }

    .timeline__item:nth-child(odd) .timeline__node,
    .timeline__item:nth-child(even) .timeline__node {
        left: 10px;
        right: auto;
    }

    .timeline__item--current:nth-child(odd) .timeline__node {
        left: 7px;
        right: auto;
    }

    .timeline__pivot {
        margin-left: 48px;
    }

    /* Mobile about facts */
    .about__facts {
        grid-template-columns: 1fr 1fr;
    }

    /* Fix reveal directions on mobile */
    .reveal-left,
    .reveal-right {
        transform: translateY(30px);
    }

    .reveal-left.active,
    .reveal-right.active {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

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

    .hero__btn {
        width: 200px;
        justify-content: center;
    }

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

    .contact__btn {
        width: 220px;
        justify-content: center;
    }

    .about__facts {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .fact-card {
        padding: 14px 10px;
    }
}
