/* Preserve the monochrome identity with stable responsive layout. */
:root { color-scheme: dark; --header-height: 88px; }
html { scroll-padding-top: calc(var(--header-height) + 24px); }
body { overflow-x: clip; }
header { height: var(--header-height); padding: 16px 28px; background: #080808f5; backdrop-filter: none; gap: 24px; }
header .logo { font-size: clamp(1.5rem, 2.5vw, 2.5rem); white-space: nowrap; }
header nav { width: auto; max-width: none; margin: 0 0 0 auto; padding: 0; gap: 12px; background: none; backdrop-filter: none; }
header nav a { font-size: .75rem; letter-spacing: .035em; padding: 12px 2px; }
header .btn-emailme { display: none !important; }
.container { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 16px; min-height: min(880px, 95svh); max-width: 1440px; padding: calc(var(--header-height) + 32px) 5% 48px; overflow: visible; }
main { min-width: 0; min-height: 0; padding: 0; }
.content { margin: 0; max-width: 100%; }
.content h1 { font-size: clamp(2rem, 3.4vw, 3.25rem); letter-spacing: .025em; line-height: 1.18; margin: 28px 0 20px; text-wrap: balance; }
.description { position: static; max-width: 38rem; font-size: 1.1rem; line-height: 1.65; color: #aaa; }
.buttons { flex-wrap: wrap; margin-top: 28px; gap: 12px; }
.btn-expertise, .btn-contact { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; font-size: .9rem; line-height: 1.4; }
.tag-box { width: 180px; animation: none; background: #444; }
.greywolf { display: none; }
/* A width-aware canvas leaves room for the robot's waving hands. */
spline-viewer.robot-3d, spline-viewer.robot-3d:not(:defined) { position: relative; inset: auto; width: 100%; height: auto; aspect-ratio: 1.1; max-height: 560px; scale: 1; transform: none; opacity: 1; min-width: 0; }
spline-viewer.robot-3d:not(:defined)::before { left: 0; width: 100%; text-align: center; }
.image-gradient { max-width: 100%; height: auto; pointer-events: none; }
.layer-blur { display: none; }
section { min-height: 0; padding: 64px 20px; scroll-margin-top: 0; }
section h2 { font-size: clamp(1.65rem, 3.5vw, 2.6rem); }
.card { width: min(100%, 820px); padding: clamp(20px, 3vw, 32px); opacity: 1; transform: none; animation: none; transition: transform 180ms ease; background: #242424; border: 1px solid #3b3b3b; box-shadow: 0 4px 18px #0005; }
.card::before { display: none; }
.card:hover { transform: none; box-shadow: 0 4px 18px #0005; }
.card p, section p { overflow-wrap: anywhere; }
.card ul { padding-left: 1.25rem; }
.card li + li { margin-top: 8px; }
.card-image { display: block; height: auto; }
#gallery { padding-top: 64px; scroll-margin-top: 0; }
.gallery-container { width: min(100%, 1200px); padding: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery-image { box-shadow: none; transition: transform 180ms ease; }
.gallery-image:hover { transform: none; box-shadow: none; }
.gallery-video { height: auto; aspect-ratio: 16/9; }
.go-top-btn { display: flex; width: 48px; height: 48px; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px); transition: opacity 180ms ease, transform 180ms ease, visibility 180ms; }
.go-top-btn.show { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
:where(a, button):focus-visible { outline: 2px solid #ddd; outline-offset: 5px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 10000; padding: 12px 20px; color: #111; background: white; border-radius: 8px; }
.skip-link:focus { top: 12px; }
header .hamburger { display: none !important; }
@media (hover: hover) and (pointer: fine) {
    .card:hover { transform: translateY(-3px); }
    .gallery-image:hover { transform: scale(1.025); }
}
@media (max-width: 1200px) {
    header .hamburger { display: inline-flex !important; align-items: center; justify-content: center; width: 48px; height: 48px; margin-left: auto; padding: 10px; background: #1d1d1d; color: #eee; border: 1px solid #444; border-radius: 10px; cursor: pointer; }
    .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
    .menu-icon { position: relative; }
    .menu-icon::before, .menu-icon::after { content: ''; position: absolute; left: 0; }
    .menu-icon::before { top: -6px; } .menu-icon::after { top: 6px; }
    .active .menu-icon { background: transparent; }
    .active .menu-icon::before { top: 0; transform: rotate(45deg); }
    .active .menu-icon::after { top: 0; transform: rotate(-45deg); }
    header nav { display: none; position: absolute; top: 100%; left: auto; right: 16px; width: min(320px, calc(100vw - 32px)); max-height: calc(100svh - var(--header-height) - 16px); overflow-y: auto; overscroll-behavior: contain; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; border: 1px solid #444; border-radius: 12px; background: #151515; }
    header.nav-open nav { display: flex; }
    header nav a { min-height: 44px; font-size: .95rem; text-align: left; padding: 12px; width: 100%; }
    header nav a:hover { background: #252525; border-radius: 6px; }
}
@media (max-width: 768px) {
    :root { --header-height: 76px; }
    header { left: 0; padding: 12px 20px; }
    .container { grid-template-columns: minmax(0, 1fr); padding: var(--header-height) 24px 48px; gap: 8px; min-height: 0; }
    .container main { grid-row: 2; }
    spline-viewer.robot-3d, spline-viewer.robot-3d:not(:defined) { grid-row: 1; height: auto; max-height: 360px; }
    .content h1 { font-size: clamp(1.85rem, 7.5vw, 2.65rem); line-height: 1.2; margin-top: 24px; }
    .description { font-size: 1rem; }
    section { padding: 40px 20px; }
    .card h3 { font-size: 1.25rem; }
    .gallery-container { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .gallery-image { height: 180px; max-height: 180px; }
    .go-top-btn { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (max-width: 380px) { .gallery-container { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .card:hover, .gallery-image:hover { transform: none; }
}


/* Keep the full name readable alongside navigation and on small screens. */
header .logo { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; font-size: clamp(1rem, 1.8vw, 1.5rem); line-height: 1.2; white-space: normal; }
header .logo .greeting { font-size: .72em; }
header .logo .full-name { display: block; }
header .hamburger { flex-shrink: 0; }

/* A restrained, CV-style record with clear date and award hierarchy. */
.robotics-awards .awards-eyebrow { margin: 0 0 10px; color: #b8b8b8; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.robotics-awards h3 { margin-bottom: 24px; }
.robotics-awards .awards-list { list-style: none; padding: 0; margin: 0; }
.robotics-awards .award-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 24px; margin: 0; padding: 21px 0; border-top: 1px solid #ffffff24; }
.award-year { color: #bdbdbd; font-size: .9rem; font-variant-numeric: tabular-nums; line-height: 1.6; }
.award-row h4 { color: #f1f1f1; font-size: 1.05rem; font-weight: 600; line-height: 1.5; margin: 0 0 5px; }
.robotics-awards .award-event { color: #d0d0d0; margin: 0; font-size: .95rem; }
.robotics-awards .award-detail { color: #aaa; margin: 5px 0 0; font-size: .88rem; line-height: 1.6; }
.science-box-image { border-radius: 12px; }
@media (max-width: 480px) {
  .robotics-awards .award-row { grid-template-columns: 42px minmax(0, 1fr); gap: 14px; padding: 18px 0; }
  .award-row h4 { font-size: 1rem; }
}

.robotics-awards, .robotics-awards p { text-align: left; }

/* Readable resource links that wrap on small screens. */
.resource-links { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 16px 0; }
.resource-links a { display: inline-block; font-size: .92rem; line-height: 1.5; text-underline-offset: 4px; padding: 5px 0; }
