/* styles.css — Aiden Weatherbee Portfolio */

/* ===== Design Tokens ===== */
:root {
    --bg-deep: #05020f;
    --bg-mid: #0d0824;
    --panel: rgba(18, 10, 45, 0.85);
    --panel-solid: #0c0820;
    --accent: #a78bfa;
    --accent-bright: #c4b5fd;
    --accent-dim: #7c3aed;
    --accent-glow: rgba(167, 139, 250, 0.22);
    --text: #ede8ff;
    --text-muted: #9d8ec4;
    --border: rgba(167, 139, 250, 0.2);
    --border-subtle: rgba(167, 139, 250, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 0 1px rgba(167, 139, 250, 0.28), 0 8px 32px rgba(167, 139, 250, 0.18);
    --shadow-glow-strong: 0 0 0 1px rgba(167, 139, 250, 0.5), 0 12px 48px rgba(167, 139, 250, 0.3);
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 40px;
}

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

/* ===== Body & Background ===== */
body {
    font-family: 'Inter', Arial, sans-serif;
    /* Deep space with a faint violet nebula undertone */
    background-color: #05020f;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 58, 237, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 85% 70%, rgba(109, 40, 217, 0.1) 0%, transparent 55%),
        radial-gradient(ellipse 40% 35% at 10% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        linear-gradient(175deg, #05020f 0%, #0d0824 45%, #08051a 75%, #04010c 100%);
    background-attachment: fixed;
    color: var(--text);
    text-align: center;
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ===== Typography ===== */
h1, h2, h3 {
    font-family: 'Space Grotesk', 'Inter', Arial, sans-serif;
    color: var(--accent);
    letter-spacing: 0.01em;
}

a {
    color: var(--accent);
}

p {
    color: var(--text);
}

/* Long unbroken tokens (URLs, identifiers) must not overflow on narrow screens */
p, li, td, dd, figcaption, blockquote {
    overflow-wrap: break-word;
}

ul, ol {
    margin-left: 1.5rem;
    color: var(--text);
}

section {
    margin-bottom: 2rem;
}

/* ===== Navbar ===== */
.navbar {
    background: rgba(5, 2, 15, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 12px 28px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-brand {
    font-family: 'Space Grotesk', 'Inter', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.08em;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s ease-out;
    white-space: nowrap;
}

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

.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.navbar ul li {
    display: inline;
}

.navbar ul li a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 7px 16px;
    display: inline-block;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.93em;
    letter-spacing: 0.02em;
    transition: background 0.2s ease-out, color 0.2s ease-out;
}

.navbar ul li a:hover {
    background: var(--accent);
    color: var(--bg-deep);
}

.navbar ul li a.nav-active {
    background: rgba(167, 139, 250, 0.1);
    color: var(--accent);
    border: 1px solid var(--border);
}

/* ===== Hero Section (landing page) ===== */
.hero-section {
    padding: 72px 24px 60px;
    text-align: center;
    color: var(--text);
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

/* Nebula-glow halo behind hero content */
.hero-section::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(124, 58, 237, 0.12) 0%, transparent 68%);
    pointer-events: none;
    z-index: 0;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.profile-image-container {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.profile-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-glow);
}

.hero-kicker {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid var(--border);
    background: rgba(167, 139, 250, 0.07);
    padding: 5px 16px;
    border-radius: 999px;
    margin-bottom: 22px;
}

.hero-section h1 {
    font-size: clamp(2.6em, 6vw, 4em);
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 0 2px 30px rgba(167, 139, 250, 0.25);
    line-height: 1.1;
}

.hero-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1em, 2.5vw, 1.25em);
    color: var(--accent-bright);
    font-weight: 500;
    margin-bottom: 26px;
}

.hero-bio {
    max-width: 700px;
    margin: 0 auto 32px;
    font-size: 1.05em;
    line-height: 1.8;
    color: var(--text-muted);
    text-align: left;
}

.hero-bio strong {
    color: var(--text);
    font-weight: 600;
}

.hero-cta-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0;
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: var(--bg-deep);
    text-decoration: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.97em;
    letter-spacing: 0.01em;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s ease-out;
}

.btn-primary:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-strong);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: var(--accent);
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.97em;
    border: 1px solid var(--border);
    transition: transform 0.18s ease-out, background 0.18s ease-out, color 0.18s ease-out, border-color 0.18s ease-out;
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--bg-deep);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ===== Button links (generic) ===== */
.button-link {
    display: inline-block;
    padding: 10px 22px;
    margin: 10px 6px;
    color: var(--bg-deep);
    background: var(--accent);
    text-decoration: none;
    border-radius: 999px;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s ease-out;
}

.button-link:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.button-link.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border);
}

.button-link.btn-outline:hover {
    background: var(--accent);
    color: var(--bg-deep);
}

/* ===== Stats Bar ===== */
.stats-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 44px auto 0;
    max-width: 920px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: rgba(18, 10, 45, 0.7);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.stat-item {
    flex: 1;
    min-width: 155px;
    padding: 18px 20px;
    border-right: 1px solid var(--border);
    text-align: center;
}

.stat-item:last-child {
    border-right: none;
}

.stat-value {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4em;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 0.73em;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
}

/* ===== Skills Strip ===== */
.skills-strip {
    padding: 48px 24px 0;
    text-align: center;
}

.skills-strip .strip-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72em;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 600;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 900px;
    margin: 0 auto;
}

.skill-tag {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.82em;
    color: var(--text-muted);
    background: rgba(167, 139, 250, 0.05);
    letter-spacing: 0.02em;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(167, 139, 250, 0.1);
}

/* ===== Section Label ===== */
.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 44px 0 20px;
    text-align: left;
}

.section-label-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7em;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    white-space: nowrap;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ===== Science Page Hero ===== */
.science-hero {
    padding: 56px 24px 46px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
}

.science-hero h1 {
    font-size: clamp(1.9em, 5vw, 2.8em);
    color: #fff;
    font-weight: 700;
    margin-bottom: 12px;
}

.science-hero p {
    max-width: 620px;
    margin: 0 auto;
    font-size: 1.05em;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== Gallery (Astronomy Art page) ===== */
.gallery {
    padding: 40px 24px;
    background: transparent;
    flex: 1;
}

.gallery h1 {
    margin-bottom: 10px;
    font-size: 2.2em;
    color: #fff;
}

.gallery .gallery-subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
    font-size: 1em;
}

.images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
    max-width: 1400px;
    margin: 28px auto 0;
}

.image-container {
    text-align: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}

.image-container:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent);
}

.images img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    display: block;
    transition: transform 0.3s ease-out;
}

.image-container:hover img {
    transform: scale(1.04);
}

.images p {
    margin-top: 8px;
    color: var(--text);
    font-size: 0.95em;
}

/* ===== Image View ===== */
.image-view {
    padding: 30px 20px;
    background: transparent;
    flex: 1;
}

.image-view h1 {
    margin-bottom: 20px;
}

.image-view img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}

.image-view a {
    display: inline-block;
    padding: 10px 22px;
    background: var(--accent);
    color: var(--bg-deep);
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s ease-out;
}

.image-view a:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Zoom Container */
.zoom-container {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.zoom-container img {
    transition: transform 0.2s ease-out, transform-origin 0.2s ease-out;
}

.zoom-container:hover img {
    cursor: zoom-in;
}

.zoomed {
    cursor: zoom-out !important;
}

/* Overlay Creator */
.overlay-creator {
    padding: 20px;
    background: transparent;
    color: var(--text);
    text-align: center;
}

.overlay-creator h1 { margin-bottom: 20px; }
.filter-selection { margin-bottom: 20px; }
.filter { margin-bottom: 10px; }

#overlayResult canvas {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 20px;
}

/* ===== Resume ===== */
.resume {
    padding: 30px;
    background: var(--panel);
    color: var(--text);
    max-width: 1150px;
    width: 92%;
    margin: 32px auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    text-align: left;
    flex: 1;
}

#pdfViewerContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#pdfViewerContainer .pdf-page {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.resume-intro {
    margin-bottom: 24px;
    text-align: center;
}

.resume-intro h2 { margin: 0 0 6px; border: 0; padding: 0; }
.resume-intro p { margin-bottom: 16px; }

.resume-open-link,
.resume-download-link {
    display: inline-block;
    padding: 10px 20px;
    margin: 4px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}

.resume .resume-open-link {
    color: var(--bg-deep);
    background: var(--accent);
}

.resume .resume-open-link:hover {
    background: var(--accent-bright);
    box-shadow: var(--shadow-glow);
}

.resume-download-link {
    color: var(--text);
    border: 1px solid var(--border);
}

.resume-download-link:hover {
    color: var(--accent-bright);
    border-color: var(--accent);
}

@media (max-width: 900px) {
    .resume { width: 96%; padding: 16px; }
}

.resume h1 { font-size: 2.3em; margin-bottom: 20px; }
.resume p { font-size: 1.05em; line-height: 1.7; color: var(--text); }
.resume a { color: var(--accent); text-decoration: none; transition: color 0.2s ease-out; }
.resume a:hover { color: var(--accent-bright); }
.resume h2 {
    font-size: 1.7em;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
    display: inline-block;
}
.timeline .entry { margin-bottom: 20px; }
.timeline .entry h3 { margin: 0; }

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 26px 20px;
    background: var(--panel-solid);
    color: var(--text-muted);
    width: 100%;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.site-footer { font-size: 0.95em; }
.site-footer p { margin: 5px 0; }

.site-footer .footer-links a {
    color: var(--accent);
    text-decoration: none;
    margin: 0 8px;
    font-weight: 500;
    transition: color 0.2s ease-out;
}

.site-footer .footer-links a:hover {
    color: var(--accent-bright);
    text-decoration: underline;
}

.site-footer .footer-note { font-size: 0.85em; opacity: 0.8; }

/* ===== Content panels (project/article pages) ===== */
.content {
    padding: 2.2rem;
    background: var(--panel);
    border: 1px solid var(--border);
    margin: 2.5rem auto;
    max-width: 850px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    text-align: left;
    flex: 1;
}

.content > h1:first-child {
    text-align: center;
    margin-bottom: 1.5rem;
}

h1, h2 {
    color: var(--accent);
}

iframe {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* Links inside content panels */
.content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(167, 139, 250, 0.35);
    transition: color 0.2s ease-out;
}

.content a:hover { color: var(--accent-bright); }

.content .button-link,
.content .button-link:hover {
    color: var(--bg-deep);
    text-decoration: none;
}

/* ===== Science / Projects Grid ===== */
.science-content {
    padding: 32px 24px 48px;
    max-width: 1340px;
    margin: 0 auto;
    flex: 1;
}

.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
}

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

.project-card {
    background-color: var(--panel);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius);
    text-align: center;
    transition: transform 0.22s ease-out, box-shadow 0.22s ease-out, border-color 0.22s ease-out;
    overflow: hidden;
    border: 1px solid var(--border);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent);
}

.project-image {
    display: block;
    height: 260px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease-out;
}

.project-image.show-full-image {
    background: var(--bg-deep);
}

.project-image.show-full-image img {
    object-fit: contain;
}

.project-card:hover .project-image img { transform: scale(1.04); }
.project-card:hover .project-image.show-full-image img { transform: none; }

.project-details {
    padding: 18px;
    text-align: left;
}

.project-details h2 {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 1.2em;
}

.project-details p {
    font-size: 0.92em;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.55;
}

.project-link {
    color: inherit;
    text-decoration: none;
    display: block;
    height: 100%;
}

.project-link:focus-visible {
    outline: 3px solid var(--accent-bright);
    outline-offset: 3px;
    border-radius: var(--radius);
}

/* ===== Resource Buttons ===== */
.resource-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
    gap: 10px;
}

.resource-buttons a {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.9em;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.resource-buttons a:hover {
    background-color: var(--accent);
    color: var(--bg-deep);
    transform: translateY(-2px);
}

.resource-intro {
    color: var(--text-muted);
    text-align: center;
    font-size: 1em;
    margin-bottom: 10px;
}

/* ===== Results / Callout box ===== */
.results-highlight {
    background: rgba(167, 139, 250, 0.07);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin: 20px 0;
}

/* ===== Video Row ===== */
.video-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin: 16px 0;
}

/* ===== MINIX hero ===== */
.minix-hero {
    width: 100%;
    max-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.minix-hero img {
    width: 100%;
    display: block;
    object-fit: cover;
}
.minix-content { max-width: 1150px; }
.minix-meta { color: var(--text-muted); font-size: 1.05em; margin-bottom: 1.5rem; }
.poster-actions { margin: 10px 0 20px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #000;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.paper-frame iframe {
    width: 100%;
    height: 1000px;
    border: none;
    border-radius: var(--radius-sm);
    background: #fff;
}
.slide-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.slide-gallery a {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--panel-solid);
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}
.slide-gallery a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent);
}
.slide-gallery img { width: 100%; display: block; }

/* ===== Life whitepaper ===== */
.paper-content { max-width: 1150px; }
.paper-header { padding: 54px 0 26px; border-bottom: 1px solid var(--border); margin-bottom: 30px; }
.paper-kicker {
    color: var(--accent);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.paper-header h1 { margin-bottom: 14px; }
.paper-meta { color: var(--text-muted); font-size: 1.03em; line-height: 1.6; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 30px; }
.summary-panel {
    background: rgba(167, 139, 250, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 30px;
}
.summary-panel h2 { margin-top: 0; }
.paper-frame iframe {
    width: 100%;
    height: 1100px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
}
@media (max-width: 700px) {
    .paper-header { padding-top: 34px; }
    .paper-frame iframe { height: 720px; }
}

/* ===== RASC Talk ===== */
.video-link {
    display: block;
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}
.video-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent);
}
.video-link img { display: block; width: 100%; height: auto; }
.video-link .play-badge {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 76px; height: 76px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-link .play-badge::after {
    content: '';
    border-style: solid;
    border-width: 14px 0 14px 22px;
    border-color: transparent transparent transparent var(--accent);
    margin-left: 4px;
}

/* ===== Notebook display ===== */
.notebook-wrapper {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 24px 0;
    background: #fff;
}
.notebook-wrapper iframe {
    width: 100%;
    height: 900px;
    border: none;
    border-radius: 0;
    display: block;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .images img { max-width: 100%; }
    .gallery { padding: 24px 14px; }
    .image-view img { max-width: 100%; }
    .hero-section h1 { font-size: 2.1em; }
    .hero-bio { font-size: 0.98em; }
    .stats-bar { border-radius: var(--radius); }
    .stat-item { min-width: 130px; }
    .content { margin: 1.5rem 16px; padding: 1.5rem; }
    .projects { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .gallery h1 { font-size: 1.5em; }
    .stats-bar { flex-direction: column; }
    .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
    .stat-item:last-child { border-bottom: none; }
    .hero-cta-row { flex-direction: column; align-items: center; }
}

/* ===== Scrolling Satellites ===== */
#satellite-orbit-container {
    position: fixed;
    top: 50%;
    right: 4vw;
    transform: translateY(-50%);
    width: 220px;
    height: 220px;
    pointer-events: none;
    z-index: 50;
}

.orbit-center {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.05s linear;
}

.satellite {
    position: absolute;
    width: 90px;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(167, 139, 250, 0.4));
    transition: transform 0.05s linear;
}

.sat1 {
    top: -40px;
    left: 65px;
}

.sat2 {
    bottom: -40px;
    left: 65px;
}

/* Scale down satellites on smaller screens instead of hiding them */
@media (max-width: 1100px) {
    #satellite-orbit-container {
        transform: translateY(-50%) scale(0.65);
        right: 0vw;
        opacity: 0.85;
    }
}

@media (max-width: 600px) {
    #satellite-orbit-container {
        transform: translateY(-50%) scale(0.45);
        right: -30px;
        opacity: 0.6; /* Slight transparency so text underneath is readable */
    }
}
