/* Personal portfolio: built on the existing blue/violet design system. */
/* Clip horizontal decorations without creating a scroll container for the sticky intro. */
body.personal-portfolio { overflow-x: clip; }
.brand-link { display: inline-flex; align-items: center; gap: 12px; }
.brand-color-defs { position: absolute; overflow: hidden; pointer-events: none; }
.brand-logo-frame { display: block; width: 220px; aspect-ratio: 1320 / 210; background: transparent; }
.brand-logo { display:block; width:100%; height:auto; color:var(--text-0); }
html.theme-switching *,html.theme-switching *::before,html.theme-switching *::after { transition:none !important; }
::view-transition-group(root) { animation-duration:.22s; animation-timing-function:cubic-bezier(.4,0,.2,1); }
::view-transition-old(root),::view-transition-new(root) { animation-duration:.22s; animation-timing-function:cubic-bezier(.4,0,.2,1); }
::view-transition { pointer-events:none; }
@media(prefers-reduced-motion:reduce) { ::view-transition-group(root),::view-transition-old(root),::view-transition-new(root) { animation:none; } }
#navbar { top: max(14px, env(safe-area-inset-top)); left: 50%; right: auto; width: min(620px, calc(100% - 40px)); height: auto; padding: 0; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--surface-1) 94%, transparent); backdrop-filter: blur(14px); box-shadow: 0 8px 30px rgba(0,0,0,.12); transform: translateX(-50%); transition: transform .3s ease, opacity .2s ease, background .25s ease; }
#navbar.scrolled, #navbar.menu-open { background: var(--surface-1); border: 0; box-shadow: 0 8px 30px rgba(0,0,0,.16); }
#navbar.nav-hidden { transform: translate(-50%, calc(-100% - 24px)); opacity: 0; pointer-events: none; }
#navbar > div { width: 100%; max-width: none; padding-inline: 12px; }
#navbar .nav-content { position: relative; height: 64px; min-height: 0; padding: 0; gap: 16px; }
#navbar .nav-brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
#navbar .nav-menu { position: static; display: block; padding: 0; height: 0; width: 100%; max-height: none; opacity: 0; visibility: visible; transform: none; background: none; backdrop-filter: none; border: 0; overflow: hidden; transition: none; }
#navbar .nav-menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 10px 0 12px; max-height: calc(100dvh - 112px); overflow-y: auto; overscroll-behavior: contain; }
#navbar .nav-group { min-width: 0; padding: 26px 18px 20px; background: var(--surface-2); border-radius: 6px; }
#navbar .nav-group:nth-child(2) { background: color-mix(in srgb, var(--accent-secondary) 6%, var(--surface-1)); }
#navbar .nav-group-title { color: var(--text-2); font: 9px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 22px; }
#navbar .nav-group-note { color: var(--text-2); font-size: 12px; line-height: 1.75; margin: 22px 8px 0; max-width: 180px; }
#navbar .nav-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-0); font-size: 21px; font-weight: 500; letter-spacing: -.035em; padding: 12px 8px; border-radius: 5px; transform: none; transition: color .3s ease, background .3s ease; }
#navbar .nav-link + .nav-link { margin-top: 8px; }
#navbar .nav-link > i { color: var(--text-2); font-size: 11px; transition: color .3s ease, transform .3s cubic-bezier(.625,.05,0,1); }
#navbar .nav-link:hover, #navbar .nav-link:focus-visible, #navbar .nav-link.active { color: var(--text-0); background: color-mix(in srgb, var(--accent-secondary) 18%, transparent); }
#navbar .nav-link:hover > i, #navbar .nav-link:focus-visible > i { color: var(--accent-secondary); transform: translate(2px, -2px); }
#navbar .nav-label { display: block; position: relative; height: 1.25em; line-height: 1.25; overflow: hidden; }
#navbar .nav-label > span { display: block; transition: transform .4s cubic-bezier(.625,.05,0,1); }
#navbar .nav-label > span:last-child { position: absolute; top: -100%; left: 0; color: var(--text-0); }
#navbar .nav-link:hover .nav-label > span, #navbar .nav-link:focus-visible .nav-label > span { transform: translateY(100%); }
#navbar .nav-actions { gap: 6px; }
#navbar .theme-toggle { width: 40px; height: 40px; padding: 8px; }
#navbar .mobile-menu-toggle { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 10px 0 6px; border-radius: 5px; color: var(--text-0); transition: background .25s ease, color .25s ease; }
#navbar .mobile-menu-toggle:hover, #navbar .mobile-menu-toggle:focus-visible { background: color-mix(in srgb, var(--accent-secondary) 15%, transparent); }
#navbar .menu-toggle-icon { position: relative; width: 26px; height: 26px; background: none; }
#navbar .menu-toggle-icon > span { position: absolute; left: 3px; top: 12px; width: 20px; height: 1px; opacity: 1; background: currentColor; transition: none; }
#navbar .menu-toggle-label { width: auto; height: auto; background: none; font-size: 12px; }
#navbar .mobile-menu-toggle > span { transform: none; opacity: 1; }
#navbar .nav-contact { display: inline-flex; align-items: center; gap: 10px; padding: 12px; border-radius: 5px; background: var(--text-0); color: var(--surface-0); text-decoration: none; font-size: 12px; transition: background .25s ease, box-shadow .25s ease; }
#navbar .nav-contact .nav-label { width: 54px; white-space: nowrap; }
#navbar .nav-contact .nav-label > span:last-child { color: inherit; }
#navbar .nav-contact i { font-size: 10px; }
#navbar .nav-contact:hover, #navbar .nav-contact:focus-visible { background: color-mix(in srgb, var(--text-0) 88%, var(--accent-primary)); box-shadow: 0 3px 12px rgba(0,0,0,.12); }
#navbar .nav-contact:hover .nav-label > span, #navbar .nav-contact:focus-visible .nav-label > span { transform: translateY(100%); }
#navbar .nav-contact:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 3px; }
.nav-backdrop { position: fixed; inset: 0; z-index: 999; background: color-mix(in srgb, var(--surface-0) 68%, transparent); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; }
.nav-backdrop.active { pointer-events: auto; }
#navbar .brand-link:focus-visible, #navbar .nav-link:focus-visible, #navbar button:focus-visible { outline: 2px solid var(--accent-secondary) !important; outline-offset: 3px; }
.section-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin-bottom: 16px; }
#home.hero-section { padding: 96px 0 40px; position: relative; isolation: isolate; overflow: hidden; }
#home.hero-section::before { content: none; }
#home .hero-shell { max-width: 1320px; margin-inline: auto; padding: 190px 36px 240px; }
#home .hero-content { min-height: 420px; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .85fr); gap: 64px; }
#home .hero-text { min-width: 0; padding: 34px; background: var(--surface-1); border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.06); }
#home .hero-text::before { content: ''; position: absolute; width: 6px; height: 6px; right: 22px; top: 16px; background: #0784ff; box-shadow:6px 6px 0 #8039ed; }
#home .hero-ambient { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#home .grid-band { left: 0; right: 0; pointer-events: none; filter: none; }
#home .grid-band[data-band="top"] { top: 12px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.3), #000 150px); }
#home .hero-intro { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-bottom: 28px; }
#home .availability-note { display: inline-flex; align-items: center; gap: 13px; color: var(--text-0); text-decoration: none; }
#home .availability-copy { display: flex; flex-direction: column; gap: 7px; }
#home .availability-label { color: var(--text-2); font: 9px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
#home .availability-roles { font-size: 12px; font-weight: 500; }
#home .availability-roles i { font-size: 9px; margin-left: 7px; color: var(--text-2); transition: color .2s ease; }
#home .availability-note:hover .availability-roles i { color: var(--accent-secondary); }
#home .availability-mark { display: grid; place-items: center; width: 34px; height: 36px; flex-shrink: 0; perspective: 180px; }
#home .availability-cube { display: block; width: 24px; height: 24px; transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(-28deg); }
/* Give the cubies one shared 3D space, overriding the legacy hero stacking rule. */
#home .availability-cube .cube-model, #home .availability-cube .cube-layer, #home .availability-cube .cube-piece, #home .availability-cube .cube-piece-face, #home .availability-cube .cube-sticker { position: absolute; z-index: auto !important; pointer-events: none !important; }
#home .cube-model { left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
#home .cube-layer, #home .cube-piece { left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
#home .cube-piece-face { left: -3.5px; top: -3.5px; width: 7px; height: 7px; background: #131325; backface-visibility: hidden; }
#home .cube-sticker { inset: .4px; border-radius: .5px; background: var(--cube-sticker); box-shadow: inset 0 .5px 0 rgba(255,255,255,.2); }
#home .hero-location { color: var(--text-2); font: 10px var(--font-mono); padding-left: 22px; border-left: 1px solid var(--border-strong); }
#home .hero-title { font-size: clamp(38px, 4.5vw, 64px); line-height: 1.1; letter-spacing: -.05em; margin-bottom: 24px; }
#home .hero-subtitle { display: block; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.25; margin-top: 22px; letter-spacing: -.035em; color: var(--text-0); }
#home .hero-quote { animation: fadeInUp 1s ease-out .5s both; margin: 0 0 20px; padding: 0 0 0 16px; border-left: 1px solid var(--border-strong); max-width: 540px; }
#home .hero-quote blockquote, #home .hero-quote p { margin: 0; }
#home .hero-quote blockquote { color: var(--text-0); font-family: inherit; font-size: clamp(16px, 1.35vw, 19px); font-weight: 400; font-style: italic; line-height: 1.45; letter-spacing: -.02em; text-wrap: pretty; }
#home .hero-quote em { color: var(--accent-secondary); font-weight: 500; font-style: inherit; white-space: nowrap; }
#home .hero-quote figcaption { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 10px; }
#home .hero-quote-credit-line { width: clamp(36px, 8vw, 80px); height: 1px; background: linear-gradient(to right, transparent, var(--border-strong)); }
#home .hero-quote cite { color: var(--text-1); font-size: 12px; font-style: normal; font-weight: 500; letter-spacing: .02em; }
#home .hero-description { color: var(--text-1); font-size: 17px; line-height: 1.8; max-width: 560px; }
#home .hero-title, #home .hero-subtitle, #home .hero-description { transform: none; will-change: auto; text-shadow: none; }
#home .hero-visual { justify-self: center; gap: 0; }
.hero-focus { display: flex; justify-content: center; gap: 16px; margin-top: 28px; font-family: var(--font-mono); font-size: 11px; color: var(--text-2); }
.hero-focus > span + span::before { content: '/'; margin-right: 16px; color: var(--accent-secondary); }
.hero-focus .hero-focus-ink { display:inline-block; white-space:pre; }
#home .hero-actions .btn { border-radius: 8px; min-height: 52px; isolation: isolate; transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease; }
#home .hero-actions .btn::before { inset: 0; left: 0; width: 100%; background: linear-gradient(100deg, transparent 15%, rgba(255,255,255,.2) 50%, transparent 85%); transform: translateX(-115%) skewX(-20deg); transition: transform .65s ease; pointer-events: none; }
#home .hero-actions .btn:hover::before, #home .hero-actions .btn:focus-visible::before { left: 0; transform: translateX(115%) skewX(-20deg); }
#home .hero-actions .btn-primary, #home .hero-actions .btn-primary:hover, #home .hero-actions .btn-primary:focus-visible { color: #fff; -webkit-text-fill-color: #fff; }
#home .hero-actions .btn-primary:hover, #home .hero-actions .btn-primary:focus-visible { box-shadow: 0 8px 26px rgba(102,83,235,.32), inset 0 1px 0 rgba(255,255,255,.25); transform: translateY(-2px); }
#home .hero-actions .btn-secondary { color: var(--text-0); background: color-mix(in srgb, var(--surface-1) 85%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--border-strong); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
#home .hero-actions .btn-secondary:hover, #home .hero-actions .btn-secondary:focus-visible { color: var(--text-0); background: color-mix(in srgb, var(--surface-2) 92%, var(--text-0) 8%); border-color: color-mix(in srgb, var(--border-strong) 70%, var(--text-0) 30%); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 8px 24px rgba(0,0,0,.12); transform: translateY(-2px); }
#home .hero-actions .btn i { color: inherit; transition: transform .25s ease; }
#home .hero-actions .btn-primary:hover i { transform: translateX(4px); }
#home .hero-actions .btn-secondary:hover i { transform: translateY(3px); }
#home .hero-actions .btn:active { transform: translateY(0); }
#home .hero-actions .btn:focus-visible, #home .availability-note:focus-visible { outline: 2px solid var(--accent-secondary); outline-offset: 5px; }
.signal-transition { position: relative; width: 100%; height: clamp(128px, 16vw, 176px); overflow: hidden; pointer-events: none; }
.signal-transition .grid-band { inset: 0; filter: none; }
.hero-line-break { display: none; }
.bridge-services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.experience-layout { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(0, 1.6fr); gap: 72px; align-items: start; }
.experience-intro { position: sticky; top: 100px; }
.experience-intro .section-title { text-align: left; font-size: clamp(30px, 3vw, 42px); line-height: 1.15; letter-spacing: -.04em; margin-bottom: 22px; }
.experience-intro > p:not(.section-eyebrow) { color: var(--text-1); line-height: 1.8; font-size: 16px; }
.experience-connect { display: inline-flex; gap: 12px; align-items: center; margin-top: 24px; font-size: 13px; color: var(--text-0); text-decoration: none; }
.experience-connect:hover { color: var(--accent-primary); }
.experience-timeline { list-style: none; padding: 0; margin: 0; }
.timeline-entry { display: grid; grid-template-columns: 90px 42px minmax(0, 1fr); gap: 18px; position: relative; padding-bottom: 24px; align-items: start; }
.timeline-entry::before { content: ''; position: absolute; left: 128px; top: 42px; bottom: 0; width: 1px; background: var(--border-strong); }
.timeline-entry:last-child::before { display: none; }
.timeline-period { display: flex; flex-direction: column; gap: 6px; padding-top: 3px; font-family: var(--font-mono); font-size: 12px; color: var(--text-2); text-align: right; }
.timeline-period span:last-child { color: var(--text-1); }
.timeline-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border-strong); background: var(--surface-1); color: #8e9bff; border-radius: 12px; z-index: 1; }
.timeline-icon { transition: color .3s ease, border-color .3s ease, background .3s ease; }
.timeline-entry.is-current .timeline-icon { color: var(--accent-secondary); border-color: color-mix(in srgb, var(--accent-secondary) 60%, var(--border)); background: color-mix(in srgb, var(--surface-1) 90%, var(--accent-secondary)); }
/* The shared pointer gradient is confined to each role heading. */
.timeline-card { position: relative; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-1); transition: border-color .2s ease; }
.timeline-card:hover, .timeline-card:focus-within { border-color: var(--border-strong); }
.timeline-card-heading { position: relative; isolation: isolate; border-radius: 12px 12px 0 0; padding: 28px 26px 22px; }
.timeline-card-heading > * { position: relative; z-index: 2; }
.timeline-kind { display: block; font: 10px/1.6 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 10px; }
.timeline-card h3 { color: var(--text-0); font-size: 22px; font-weight: 600; letter-spacing: -.025em; line-height: 1.3; margin: 0 0 7px; }
.timeline-role { display: block; color: var(--text-1); font-size: 16px; line-height: 1.65; }
.timeline-card-heading > p { color: var(--text-1); font-size: 16px; line-height: 1.75; margin: 14px 0 0; max-width: 60ch; }
.role-stack { margin: 0 26px 26px; }
.role-stack summary { position: relative; padding-bottom: 12px; list-style: none; cursor: pointer; border-radius: 10px; }
.role-stack summary::-webkit-details-marker { display: none; }
.role-stack summary::before, .role-stack summary::after { content: ''; position: absolute; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
.role-stack summary::before { inset: 8px 8px 6px; opacity: .65; }
.role-stack summary::after { inset: 16px 16px 0; opacity: .35; }
.role-stack[data-rows="1"] summary::after { display: none; }
.role-stack[open] summary { padding-bottom: 0; }
.role-stack[open] summary::before, .role-stack[open] summary::after { opacity: 0; transform: translateY(-8px) scale(.98); }
.role-stack-front { position: relative; z-index: 1; display: block; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-card); padding: 20px; }
.role-takeaway-label { display: block; font: 10px/1.6 var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin-bottom: 9px; }
.role-takeaway-title { display: block; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--text-0); margin-bottom: 8px; }
.role-takeaway-text { display: block; color: var(--text-1); font-size: 16px; line-height: 1.75; max-width: 60ch; }
.timeline-expand { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--text-0); font-size: 14px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.timeline-expand-label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.role-open-indicator { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--accent-secondary) 12%, var(--surface-card)); }
.disclosure-icon-motion { display: inline-flex; align-items: center; justify-content: center; }
.timeline-expand-label { transition: color .15s ease; }
.role-stack > summary:is(:hover, :focus-visible) .timeline-expand-label { color: var(--accent-secondary); }
.stack-label-open, .role-stack[open] .stack-label-closed { display: none; }
.role-stack[open] .stack-label-open { display: inline; }
.timeline-expand i { color: var(--accent-secondary); transition: transform .2s ease; }
.role-stack[open] .timeline-expand i { transform: rotate(90deg); }
.role-stack.is-animating .timeline-expand i { transition: none; }
.timeline-details-content { padding-top: 10px; }
.role-stack-rows { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.role-stack-row { display: block; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); transform-origin: top center; }
.role-stack-row h4 { color: var(--text-0); font-size: 16px; font-weight: 500; line-height: 1.5; margin: 0 0 6px; }
.role-stack-row p { color: var(--text-1); font-size: 16px; line-height: 1.75; margin: 0; max-width: 60ch; }
.learning-foundations { position: relative; isolation: isolate; display: flex; gap: 22px; align-items: start; border-top: 1px solid var(--border); padding-top: 26px; margin-top: 24px; }
.learning-foundations > i { color: var(--accent-secondary); margin-top: 5px; }
.learning-foundations h3 { font-size: 14px; color: var(--text-0); margin-bottom: 8px; }
.learning-foundations p { color: var(--text-2); font-size: 13px; line-height: 1.8; max-width: 770px; }
.notes-intro { max-width: 720px; margin-bottom: 36px; }
.notes-intro .section-title { text-align: left; }
.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.note-card { display: flex; flex-direction: column; gap: 20px; padding: 32px; background: var(--surface-1); border-radius: 12px; border: 1px solid var(--border); color: var(--text-0); text-decoration: none; transition: transform .25s ease, background .25s ease; }
.note-card:hover { transform: translateY(-4px); background: var(--surface-2); }
.note-category { font-family: var(--font-mono); font-size: 10px; color: var(--text-2); text-transform: uppercase; letter-spacing: .035em; }
.note-card h3 { font-size: 22px; letter-spacing: -.03em; line-height: 1.35; }
.note-card > p { color: var(--text-1); font-size: 14px; line-height: 1.8; }
.note-link { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-top: auto; padding-top: 15px; color: var(--text-0); }
.note-link i { color: var(--accent-secondary); }
.note-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.note-symbol { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent-secondary); background: color-mix(in srgb, var(--accent-secondary) 9%, transparent); border: 1px solid color-mix(in srgb, var(--accent-secondary) 22%, transparent); border-radius: 6px; transition: color .3s ease, background .3s ease; }
.note-symbol svg { width: 28px; height: 28px; }
.note-number { color: var(--text-2); font: 10px var(--font-mono); text-transform: uppercase; letter-spacing: .03em; }
.note-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.note-topics span { color: var(--text-2); font: 10px var(--font-mono); padding: 5px 8px; border: 1px solid var(--border); border-radius: 3px; }
.note-card .note-link { margin-top: 0; border-top: 1px solid var(--border); }
.note-card .note-link i { transition: transform .3s ease; }
.note-card:hover .note-symbol, .note-card:focus-visible .note-symbol { color: var(--card-accent); background: color-mix(in srgb, var(--card-accent) 15%, transparent); }
.note-card:hover .note-link i, .note-card:focus-visible .note-link i { transform: translate(2px, -2px); }
.working-note { display: flex; align-items: start; gap: 20px; margin-top: 30px; padding: 24px 0; border-top: 1px solid var(--border); }
.working-note > i { color: var(--accent-primary); margin-top: 5px; }
.working-note p { color: var(--text-2); font-size: 13px; line-height: 1.8; max-width: 820px; }
/* Keep the card movement without the hover outline or its decorative rim. */
#portfolio .portfolio-item, #portfolio .portfolio-card, #portfolio .card-body,
#portfolio .portfolio-item:hover, #portfolio .card-container:hover .card-body { border: 0; outline: 0; box-shadow: none; }
#portfolio .card-body::before, #portfolio .card-body::after { display: none; }
/* One clipping shape for the image and hover veil prevents bright corner slivers. */
#portfolio .portfolio-image { clip-path: inset(0 round 12px 12px 0 0); }
#portfolio .portfolio-image-link { border-radius: inherit; overflow: hidden; }
#portfolio .portfolio-image img, #portfolio .portfolio-overlay { border-radius: 0; }
#portfolio .portfolio-image img { display: block; }
/* The wrapper tracks the pointer; only the tilting card should paint a surface. */
#portfolio .portfolio-item, #portfolio .portfolio-item:hover { background: transparent; overflow: visible; }
#portfolio .portfolio-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border); }
#portfolio .portfolio-action-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; color: var(--text-0); font-size: 14px; font-weight: 500; line-height: 1.5; text-decoration: none; transition: color .18s ease; }
#portfolio .portfolio-action-secondary { color: var(--text-2); }
#portfolio .portfolio-action-link i { font-size: 12px; color: var(--accent-primary); transition: transform .18s ease; }
#portfolio .portfolio-action-link:hover { color: var(--accent-primary); }
#portfolio .portfolio-action-link:hover i { transform: translate(2px, -2px); }
@media (prefers-reduced-motion: reduce) { #portfolio .portfolio-action-link, #portfolio .portfolio-action-link i { transition: none; } }
.role-stack summary:focus-visible, .note-card:focus-visible, .experience-connect:focus-visible,
.brand-link:focus-visible, #portfolio a:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 5px; }
/* Grid items can shrink below their contents; touch cards use a flat, readable layout. */
#portfolio .portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
#portfolio .portfolio-item, #portfolio .portfolio-card, #portfolio .portfolio-content { min-width: 0; width: 100%; }
#portfolio .portfolio-title, #portfolio .portfolio-description, #portfolio .tag, #portfolio .portfolio-action-link { overflow-wrap: anywhere; }
#portfolio .card-item-title { flex-wrap: wrap; gap: 8px; }
#portfolio .project-year { margin-left: 0; }
#portfolio .tag { white-space: normal; }
.foundation-ambient { position: absolute; inset: 0 -24px; z-index: -1; overflow: hidden; pointer-events: none; opacity: .55; mask-image: linear-gradient(to right, transparent 60%, #000); }
.foundation-ambient .grid-band { top: 0; right: 0; }
.learning-foundations > div:not(.foundation-ambient) { position: relative; z-index: 1; }
.footer { position: relative; isolation: isolate; overflow: hidden; }
.footer-ambient { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .6; mask-image: linear-gradient(to bottom, transparent, #000 55%); }
.footer-ambient .grid-band { bottom: 0; left: 0; }
.footer > .max-w-7xl { position: relative; z-index: 1; }
@media (max-width: 768px), (hover: none), (pointer: coarse) {
  #portfolio .card-container, #portfolio .card-body, #portfolio .card-item { transform: none !important; transform-style: flat; perspective: none; }
}
@media (max-width: 1024px) {
  #home .hero-shell { padding: 185px 28px 255px; }
  #home .hero-content { gap: 35px; grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr); }
  .experience-layout { grid-template-columns: minmax(200px, .65fr) minmax(0, 1.5fr); gap: 32px; }
  .timeline-entry { grid-template-columns: 76px 38px minmax(0, 1fr); gap: 12px; }
  .timeline-icon { width: 38px; height: 38px; }
  .timeline-entry::before { left: 106px; top: 38px; }
  .timeline-card-heading { padding-inline: 20px; }
  .role-stack { margin-inline: 20px; }
  .note-card { padding: 24px; }
}
@media (max-width: 768px) {
  #navbar { width: calc(100% - 24px); height: auto; border-radius: 8px; }
  #navbar > div { padding-inline: 12px; }
  #navbar .nav-content { height: 58px; gap: 12px; }
  #navbar .brand-logo-frame { width: 176px; }
  #navbar .nav-menu-grid { grid-template-columns: 1fr; gap: 8px; }
  #navbar .nav-group { padding: 18px 16px; }
  #navbar .nav-group-title { margin-bottom: 8px; }
  #navbar .nav-link { padding: 12px 8px; font-size: 21px; }
  #navbar .nav-group-note { max-width: none; margin-top: 12px; }
  #home.hero-section { padding-top: 90px; }
  #home .hero-shell { padding: 40px 24px 115px; }
  #home .hero-content { grid-template-columns: 1fr; min-height: auto; text-align: left; gap: 40px; }
  #home .hero-text { order: 0; }
  #home .hero-visual { order: 1; }
  #home .hero-image-container, #home .hero-image { width: 200px; height: 200px; }
  #home .floating-elements { display: none; }
  #home .hero-title { font-size: clamp(36px, 7vw, 52px); }
  #home .hero-actions { justify-content: flex-start; }
  .experience-layout { grid-template-columns: 1fr; gap: 38px; }
  .experience-intro { position: static; max-width: 600px; }
  .bridge-services, .notes-grid { grid-template-columns: 1fr; }
  .note-card { gap: 14px; }
}
@media (max-width: 640px) {
  #navbar .nav-contact { display: none; }
  #navbar .brand-logo-frame { width: 158px; }
  .brand-logo-frame { width: 200px; }
  #home .hero-shell { padding: 24px 16px 100px; }
  #home .hero-content { gap: 34px; }
  #home .hero-text { padding: 22px 18px; }
  #home .hero-intro { gap: 16px; margin-bottom: 22px; }
  #home .hero-location { padding-left: 0; border: 0; }
  #home .hero-description { font-size: 15px; line-height: 1.8; }
  #home .hero-subtitle { font-size: 25px; }
  #home .hero-image-container, #home .hero-image { width: 180px; height: 180px; }
  .hero-focus { flex-wrap:wrap; gap:8px 16px; font-size:10px; }
  .hero-focus > span + span::before { display:none; }
  #portfolio > div { padding-inline: 16px; }
  #portfolio > div > div, #portfolio > div > div:hover { padding: 0; border: 0 !important; background: transparent !important; box-shadow: none; transform: none; }
  #portfolio > div > div::before, #portfolio > div > div::after { display: none; }
  #portfolio .section-header { margin-bottom: 32px; }
  #portfolio .portfolio-content { padding: 20px 16px; }
  #portfolio .portfolio-actions { gap: 10px; }
  #portfolio .portfolio-description { font-size: 15px; }
  #portfolio .tag { font-size: 11px; }
  .timeline-entry { grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; row-gap: 10px; }
  .timeline-period { grid-column: 2; flex-direction: row; gap: 8px; text-align: left; padding: 0; }
  .timeline-period span + span::before { content: '–'; margin-right: 8px; }
  .timeline-icon { grid-column: 1; grid-row: 2; }
  .timeline-card { grid-column: 2; grid-row: 2; }
  .timeline-entry::before { left: 18px; top: 66px; }
  .timeline-card-heading { padding: 22px 16px 18px; }
  .timeline-card h3 { font-size: 20px; }
  .role-stack { margin: 0 12px 22px; }
  .role-stack-front { padding: 16px; }
  .role-stack-row { padding: 16px; }
  .role-takeaway-title { font-size: 15px; }
}
@media (max-width: 359px) {
  #navbar .brand-logo-frame { width: 138px; }
  #home .hero-intro { gap: 12px; }
}
@media (max-width: 420px) {
  #navbar .menu-toggle-label { display: none; }
  #navbar .mobile-menu-toggle { width: 40px; padding: 0; }
}
@media (min-width: 769px) and (max-height: 760px) {
  .experience-intro { top: 72px; }
  .experience-intro .section-title { font-size: 30px; margin-bottom: 16px; }
  .experience-intro > p:not(.section-eyebrow) { font-size: 13px; line-height: 1.7; }
  .experience-connect { margin-top: 18px; }
}
@media (min-width: 769px) and (max-height: 640px) {
  .experience-intro { top: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html.scroll-smooth { scroll-behavior: auto; }
  #navbar { transition: none; }
  #navbar .nav-menu { transition: none; }
  #navbar .nav-label > span, #navbar .nav-link > i { transition: none; }
  #navbar .nav-link:hover .nav-label > span, #navbar .nav-link:focus-visible .nav-label > span, #navbar .nav-link:hover > i { transform: none; }
  #navbar .nav-contact:hover .nav-label > span, #navbar .nav-contact:focus-visible .nav-label > span { transform: none; }
  .note-symbol, .note-card .note-link i { transition: none; }
  .note-card:hover .note-link i, .note-card:focus-visible .note-link i { transform: none; }
  .note-card, .timeline-card, .timeline-expand i, .timeline-icon { transition: none; }
  .role-stack summary::before, .role-stack summary::after { transition: none; }
  .note-card:hover { transform: none; }
  #home .hero-content, #home .hero-content * { animation: none; }
  #home .hero-actions .btn, #home .hero-actions .btn::before, #home .hero-actions .btn i { transition: none; }
  #home .hero-actions .btn:hover, #home .hero-actions .btn:focus-visible, #home .hero-actions .btn:hover i { transform: none; }
  #home .hero-actions .btn::before { display: none; }
}

/* A small interior motif in the spare space beside the notes introduction. */
#notes > div { position: relative; }
.notes-ambient { position: absolute; right: 48px; top: -12px; width: 228px; height: 150px; overflow: hidden; pointer-events: none; opacity: .45; mask-image: linear-gradient(to bottom, #000 65%, transparent); }
.notes-ambient .grid-band { top: 0; }
@media (max-width: 1100px) { .notes-ambient { display: none; } }
/* Dark cubelets with restrained blue/violet rims, in the site's palette. */
#home .cube-piece-face { border-radius:1.1px; background:#11111a; }
#home .cube-sticker { border-radius:.9px; background:color-mix(in srgb,var(--cube-sticker) 48%,#17171f); border:.5px solid color-mix(in srgb,var(--cube-sticker) 82%,#17171f); box-shadow:inset 0 .7px 0 #ffffff30,inset 0 0 1px var(--cube-sticker); }

/* A brief full-name pixel field overlays the existing readable gradient. */
#home .hero-title { position: relative; }
#home .hero-name {
  background-image: var(--gradient-primary);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: 0% 50%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
#home .hero-name-pixel-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none !important;
  opacity: 0;
}
#home .hero-name-pixel-field[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  #home .hero-name-pixel-field { display: none; }
}
