/* ============================================================
   Jason Harkins — résumé site
   Dark-first glassmorphic theme with light mode + print styles
   ============================================================ */

:root {
    --bg: #070b14;
    --bg-soft: #0c1220;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #e7ecf5;
    --text-dim: #9aa7bd;
    --accent-1: #6366f1;   /* indigo */
    --accent-2: #22d3ee;   /* cyan   */
    --accent-3: #a855f7;   /* violet */
    --grad: linear-gradient(120deg, var(--accent-2), var(--accent-1) 55%, var(--accent-3));
    --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.55);
    --nav-bg: rgba(7, 11, 20, 0.65);
    --radius: 18px;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    color-scheme: dark;
}

[data-theme="light"] {
    --bg: #f4f6fb;
    --bg-soft: #ffffff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --border: rgba(15, 23, 42, 0.1);
    --border-strong: rgba(15, 23, 42, 0.18);
    --text: #101828;
    --text-dim: #526077;
    --shadow: 0 18px 45px -20px rgba(30, 41, 82, 0.28);
    --nav-bg: rgba(244, 246, 251, 0.7);
    --accent-2: #0891b2; /* darker cyan for contrast on light bg */
    color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-top: env(safe-area-inset-top);
}

::selection { background: rgba(99, 102, 241, 0.45); color: #fff; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; }

/* ============ Background: aurora + grain ============ */

.aurora {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.38;
    will-change: transform;
    animation: drift 26s ease-in-out infinite alternate;
}

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

.blob-1 {
    width: 55vw; height: 55vw;
    top: -22vw; left: -12vw;
    background: radial-gradient(circle at 30% 30%, var(--accent-1), transparent 65%);
}

.blob-2 {
    width: 48vw; height: 48vw;
    top: 44vh; right: -18vw;
    background: radial-gradient(circle at 60% 40%, var(--accent-2), transparent 65%);
    animation-delay: -8s;
    animation-duration: 32s;
}

.blob-3 {
    width: 42vw; height: 42vw;
    bottom: -18vw; left: 22vw;
    background: radial-gradient(circle at 50% 50%, var(--accent-3), transparent 65%);
    animation-delay: -16s;
    animation-duration: 38s;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(6vw, 4vh, 0) scale(1.15); }
}

.grain {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ Nav ============ */

.nav-wrap {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    padding: 10px clamp(14px, 4vw, 32px);
    padding-top: calc(10px + env(safe-area-inset-top));
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-wrap.scrolled {
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 8px 30px -18px rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid var(--border);
}

.nav {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.brand-dot { color: var(--accent-2); }

.nav-links {
    display: flex;
    gap: clamp(10px, 2.5vw, 26px);
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover { border-color: var(--border-strong); transform: translateY(-1px); }

.icon-sun { display: none; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ============ Buttons ============ */

.btn {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.btn-small { padding: 8px 16px; font-size: 13px; }

.btn-primary {
    background: var(--grad);
    background-origin: border-box;
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.6);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -10px rgba(99, 102, 241, 0.75);
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.btn-ghost:hover { border-color: var(--border-strong); transform: translateY(-2px); }

/* ============ Hero ============ */

.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px clamp(18px, 5vw, 40px) 60px;
    position: relative;
}

.hero-inner { max-width: 860px; }

.hero-photo-wrap {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
}

.photo-ring {
    position: absolute;
    top: -8px;
    width: 216px; height: 216px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent-2), var(--accent-1), var(--accent-3), var(--accent-2));
    animation: spin 9s linear infinite;
    filter: blur(0.5px);
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero-photo {
    position: relative;
    width: 200px; height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--bg);
    box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.65);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: -16px;
    padding: 7px 15px;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 2;
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-kicker {
    font-family: var(--font-mono);
    font-size: clamp(12px, 1.6vw, 14px);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent-2);
    margin: 0 0 10px;
}

.hero-name {
    font-size: clamp(46px, 9vw, 92px);
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 18px;
}

.grad-text {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-sub {
    font-size: clamp(15.5px, 2vw, 18.5px);
    color: var(--text-dim);
    max-width: 640px;
    margin: 0 auto 32px;
}

.hero-sub strong { color: var(--text); }

.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 44px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 680px;
    margin: 0 auto;
    padding: 0;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 10px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.stat dt {
    font-family: var(--font-display);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat dd { margin: 4px 0 0; font-size: 12.5px; color: var(--text-dim); }

.scroll-hint {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px; height: 42px;
    border: 2px solid var(--border-strong);
    border-radius: 14px;
    display: flex;
    justify-content: center;
}

.scroll-hint span {
    width: 4px; height: 9px;
    border-radius: 3px;
    background: var(--text-dim);
    margin-top: 7px;
    animation: scrollNudge 1.8s ease-in-out infinite;
}

@keyframes scrollNudge {
    0%, 100% { transform: translateY(0); opacity: 1; }
    60% { transform: translateY(12px); opacity: 0.2; }
}

/* ============ Sections ============ */

.section {
    max-width: 1060px;
    margin: 0 auto;
    padding: clamp(60px, 9vw, 110px) clamp(18px, 5vw, 40px) 0;
    scroll-margin-top: 80px;
}

.section-head { margin-bottom: clamp(30px, 5vw, 48px); }

.section-kicker {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--accent-2);
    margin: 0 0 6px;
}

.section-head h2 {
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 700;
    letter-spacing: -1px;
}

/* ============ Cards (shared) ============ */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

/* ============ Timeline / Experience ============ */

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

.timeline::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-2), var(--accent-1), var(--accent-3));
    opacity: 0.55;
    border-radius: 2px;
}

.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 30px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent-1);
    box-shadow: 0 0 14px rgba(99, 102, 241, 0.7);
}

.timeline-item:first-child .timeline-marker { border-color: var(--accent-2); box-shadow: 0 0 14px rgba(34, 211, 238, 0.7); }

.exp-card { padding: clamp(20px, 3.5vw, 30px); }

.exp-head {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.exp-logo {
    width: 52px; height: 52px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: #fff;
}

.exp-head h3 { font-size: clamp(17px, 2.4vw, 20px); font-weight: 600; }

.exp-meta { margin: 3px 0 0; color: var(--text-dim); font-size: 14px; }

.date-chip {
    margin-left: auto;
    padding: 5px 13px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
    border: 1px solid var(--border);
    background: var(--surface);
    white-space: nowrap;
}

.date-chip.current {
    color: #fff;
    background: var(--grad);
    background-origin: border-box;
    border-color: transparent;
    font-weight: 500;
}

.exp-points {
    margin: 0 0 16px;
    padding-left: 20px;
    color: var(--text-dim);
    font-size: 14.5px;
}

.exp-points li { margin-bottom: 7px; }
.exp-points li::marker { color: var(--accent-2); }

/* ============ Tags ============ */

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

.tag {
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text);
    background: var(--surface-strong);
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.tag:hover { border-color: var(--accent-1); transform: translateY(-1px); }

.tag-row.big .tag { padding: 7px 16px; font-size: 13.5px; }

/* ============ Education ============ */

.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.edu-card { padding: 24px; }

.edu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.edu-logo {
    width: 50px; height: 50px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: #fff;
}

.edu-card h3 { font-size: 17.5px; font-weight: 600; margin-bottom: 4px; }

.edu-school { margin: 0 0 10px; color: var(--accent-2); font-size: 14px; font-weight: 500; }

.edu-note { margin: 0; color: var(--text-dim); font-size: 13.5px; }

/* ============ Skills ============ */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

@media (max-width: 640px) {
    .skills-grid { grid-template-columns: 1fr; }
}

.skill-card { padding: 24px; }

.skill-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-icon {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    font-size: 16px;
}

/* ============ Contact ============ */

.contact-section { padding-bottom: 20px; }

.contact-card {
    text-align: center;
    padding: clamp(40px, 7vw, 70px) clamp(20px, 5vw, 60px);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 50% 120%, rgba(99, 102, 241, 0.25), transparent 60%);
    pointer-events: none;
}

.contact-card h2 {
    font-size: clamp(28px, 5vw, 42px);
    letter-spacing: -1px;
    margin-bottom: 12px;
    position: relative;
}

.contact-card p {
    color: var(--text-dim);
    margin: 0 0 28px;
    position: relative;
}

.contact-card .hero-cta { margin-bottom: 0; position: relative; }

/* ============ Footer ============ */

.footer {
    text-align: center;
    padding: 46px 20px calc(30px + env(safe-area-inset-bottom));
    color: var(--text-dim);
    font-size: 13.5px;
}

.footer p { margin: 0; }

/* ============ Toast (share feedback) ============ */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom));
    transform: translate(-50%, 20px);
    z-index: 120;
    padding: 11px 20px;
    border-radius: 999px;
    background: var(--surface-strong);
    border: 1px solid var(--border-strong);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: var(--shadow);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
    .toast { transition: opacity 0.25s ease; transform: translate(-50%, 0); }
}

/* ============ Reveal animation ============ */

.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .aurora-blob, .photo-ring, .status-dot, .scroll-hint span { animation: none; }
}

/* ============ Responsive ============ */

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

    .hero { padding-top: 100px; }

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

    .timeline { padding-left: 26px; }
    .timeline::before { left: 6px; }
    .timeline-marker { left: -26px; width: 13px; height: 13px; }

    .exp-head { align-items: flex-start; }
    .date-chip { margin-left: 0; }

    .scroll-hint { display: none; }
}

/* ============ Print — clean one-page résumé ============ */

@media print {
    :root, [data-theme="light"] {
        --bg: #fff;
        --text: #111;
        --text-dim: #444;
        --surface: #fff;
        --surface-strong: #fff;
        --border: #ccc;
        --border-strong: #aaa;
    }

    body { background: #fff; color: #111; font-size: 12px; }

    .aurora, .grain, .nav-wrap, .scroll-hint, .status-badge, .photo-ring,
    .hero-cta, .contact-section, .footer, .theme-toggle, .toast { display: none !important; }

    .hero { min-height: 0; padding: 0 0 14px; }
    .hero-photo { width: 90px; height: 90px; border: none; box-shadow: none; }
    .hero-name { font-size: 30px; letter-spacing: -0.5px; }
    .grad-text, .stat dt { -webkit-text-fill-color: initial; background: none; color: #111; }
    .hero-sub { margin-bottom: 10px; }
    .hero-stats { display: none; }

    .section { padding: 10px 0 0; max-width: 100%; }
    .section-head { margin-bottom: 10px; }
    .section-head h2 { font-size: 20px; }
    .section-kicker { display: none; }

    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    .card:hover { transform: none; }
    .exp-card, .edu-card, .skill-card { padding: 12px 16px; }
    .timeline { padding-left: 0; }
    .timeline::before, .timeline-marker { display: none; }
    .timeline-item { margin-bottom: 10px; }
    .date-chip.current { background: none; color: #111; border: 1px solid #aaa; }

    .edu-grid, .skills-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

    .reveal { opacity: 1 !important; transform: none !important; }

    a { color: #111; text-decoration: none; }
}
