/* ================================================================
   JARED MORTON — personal site
   Dark precision: a developer's site that looks like it was built
   by someone who cares about the details.
   ================================================================ */

:root {
    --bg:          #0A0D14;
    --bg-raised:   #111620;
    --bg-hover:    #171D2A;
    --border:      #1C2333;
    --border-lit:  #2A3348;

    --text:        #E2E6F0;
    --text-sub:    #8892AB;
    --text-faint:  #515B72;

    --accent:      #6C8AFF;
    --accent-dim:  #4A65CC;
    --accent-soft: rgba(108,138,255, 0.10);
    --accent-glow: rgba(108,138,255, 0.18);
    --green:       #4ADE80;

    --sans:  "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --max-w: 56rem;
    --radius: 12px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    font-family: var(--sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

::selection { background: var(--accent-glow); color: #fff; }

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

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}


/* ─── NAV ──────────────────────────────────────────── */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 13, 20, 0.82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    height: 3.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text);
    letter-spacing: -0.01em;
    transition: color 0.2s;
}
.nav-brand:hover { color: var(--accent); }

.nav-chevron { color: var(--accent); font-weight: 600; }
.nav-slash   { color: var(--text-faint); }

.nav-links { display: flex; gap: 0.25rem; }

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-sub);
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover  { color: var(--text); background: var(--bg-raised); }
.nav-link.active { color: var(--accent); background: var(--accent-soft); }


/* ─── HERO ─────────────────────────────────────────── */

.hero {
    position: relative;
    overflow: hidden;
    padding: 5rem 2rem 3.5rem;
}

.hero--short { padding: 3.5rem 2rem 2.5rem; }

/* Signature element: soft radial glow behind the name */
.hero-glow {
    position: absolute;
    top: -6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 44rem;
    height: 26rem;
    background: radial-gradient(
        ellipse at center,
        rgba(108,138,255, 0.12) 0%,
        rgba(74,101,204, 0.06) 40%,
        transparent 72%
    );
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--max-w);
    margin: 0 auto;
}

.hero-name {
    font-family: var(--sans);
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: #fff;
}

.hero-name--sm {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

.hero-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.hero-role {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-sub);
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.hero-summary {
    margin-top: 1.5rem;
    max-width: 36rem;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-sub);
}

.hero-contact {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.hero-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-faint);
    transition: color 0.2s;
}
a.hero-contact-item:hover { color: var(--accent); }
.hero-contact-item svg { flex-shrink: 0; opacity: 0.6; }


/* ─── STATS ────────────────────────────────────────── */

.stats-row {
    position: relative;
    z-index: 1;
    max-width: var(--max-w);
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.stat {
    background: var(--bg-raised);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-number {
    font-family: var(--sans);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-faint);
    letter-spacing: 0.01em;
}


/* ─── CONTENT SECTIONS ─────────────────────────────── */

.content-section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 3.5rem 2rem;
    border-top: 1px solid var(--border);
}

.section-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    margin-bottom: 2rem;
}


/* ─── TIMELINE ─────────────────────────────────────── */

.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tl-entry {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 2.5rem;
    position: relative;
}
.tl-entry:last-child { padding-bottom: 0; }

.tl-marker {
    flex-shrink: 0;
    width: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.4rem;
}

.tl-marker::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--bg);
    flex-shrink: 0;
    z-index: 1;
}

.tl-marker::after {
    content: "";
    flex: 1;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-dim), var(--border));
    margin-top: 0.5rem;
}

.tl-entry:last-child .tl-marker::after { display: none; }

.tl-body { flex: 1; min-width: 0; }

.tl-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.tl-role {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.tl-company {
    font-size: 0.9rem;
    color: var(--text-sub);
    margin-top: 0.15rem;
}

.tl-loc { color: var(--text-faint); }

.tl-period {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--text-faint);
    white-space: nowrap;
    padding-top: 0.2rem;
}

.tl-highlights {
    margin-top: 0.85rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.tl-highlights li {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.6;
    padding-left: 1.1rem;
    position: relative;
}

.tl-highlights li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-faint);
}


/* ─── SKILLS ───────────────────────────────────────── */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 2rem;
}

.skill-cat {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.7rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.skill-tag {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-sub);
    background: var(--bg-raised);
    border: 1px solid var(--border);
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.skill-tag:hover {
    border-color: var(--accent-dim);
    color: var(--accent);
    background: var(--accent-soft);
}


/* ─── EDUCATION ────────────────────────────────────── */

.edu-card {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.edu-note {
    font-size: 0.85rem;
    color: var(--text-faint);
    font-style: italic;
    margin-top: 0.5rem;
}


/* ─── TOOLS ────────────────────────────────────────── */

.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.tool-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color 0.25s, box-shadow 0.25s;
}

.tool-card:hover {
    border-color: var(--accent-dim);
    box-shadow: 0 0 24px var(--accent-glow);
    color: var(--text);
}

.tool-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 10px;
}

.tool-body { flex: 1; min-width: 0; }

.tool-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.tool-desc {
    font-size: 0.875rem;
    color: var(--text-sub);
    margin-top: 0.3rem;
    line-height: 1.55;
}

.tool-tag-row { display: flex; gap: 0.4rem; margin-top: 0.7rem; }

.tool-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-faint);
    border: 1px solid var(--border);
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
}

.tool-go {
    flex-shrink: 0;
    color: var(--text-faint);
    padding-top: 0.15rem;
    transition: color 0.2s, transform 0.2s;
}

.tool-card:hover .tool-go {
    color: var(--accent);
    transform: translateX(4px);
}


/* ─── TOOL FRAME ───────────────────────────────────── */

.frame-header {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2.5rem 2rem 1.25rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-sub);
    transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

.frame-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    margin-top: 0.6rem;
}

.frame-container {
    max-width: var(--max-w);
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.frame-embed {
    display: block;
    width: 100%;
    height: calc(100vh - 14rem);
    min-height: 600px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}


/* ─── FOOTER ───────────────────────────────────────── */

.footer {
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 1.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-faint);
}

.footer-links {
    font-size: 0.8rem;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

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

.footer-sep { color: var(--border-lit); }


/* ─── RESPONSIVE ───────────────────────────────────── */

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

@media (max-width: 600px) {
    .nav-inner { padding: 0 1.25rem; }
    .hero { padding: 3.5rem 1.25rem 2.5rem; }
    .hero--short { padding: 2.5rem 1.25rem 2rem; }
    .content-section { padding: 2.5rem 1.25rem; }
    .frame-header { padding: 2rem 1.25rem 1rem; }
    .frame-container { padding: 0 1.25rem; }
    .footer-inner { padding: 1.5rem 1.25rem; }

    .hero-name { font-size: 2rem; }
    .hero-glow { width: 24rem; height: 16rem; top: -3rem; }

    .hero-roles { gap: 0.35rem; }
    .hero-contact { flex-direction: column; gap: 0.6rem; }

    .stats-row { grid-template-columns: 1fr 1fr; }
    .stat { padding: 1rem 1.25rem; }
    .stat-number { font-size: 1.4rem; }

    .tl-head { flex-direction: column; gap: 0.2rem; }
    .tl-marker { display: none; }
    .tl-entry { gap: 0; padding-left: 1rem; border-left: 2px solid var(--border); }
    .tl-entry:first-child { border-image: linear-gradient(to bottom, var(--accent), var(--border)) 1; }

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

    .tool-card { flex-direction: column; gap: 0.85rem; }
    .tool-go { display: none; }

    .footer-inner { flex-direction: column; text-align: center; }
}
