:root {
  --bg: #262737;
  --surface: #303143;
  --text: #f5f3ee;
  --muted: #c1bfca;
  --faint: #888796;
  --line: rgba(224, 218, 205, 0.16);
  --line-bright: rgba(238, 228, 203, 0.34);
  --accent: #e9bd5a;
  --accent-strong: #f5d17a;
  --shell: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(52rem 34rem at 81% 11%, rgba(219, 163, 77, 0.22) 0%, transparent 62%), radial-gradient(46rem 38rem at 3% 52%, rgba(44, 64, 96, 0.52) 0%, transparent 66%), var(--bg);
  line-height: 1.55;
  letter-spacing: -0.012em;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.skip-link { position: absolute; top: -44px; left: 16px; z-index: 10; padding: 8px 12px; background: var(--text); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 14px; }
.shell { width: var(--shell); margin: 0; padding-inline: clamp(1rem, 3vw, 3rem); }
.site-header { position: sticky; top: 0; z-index: 5; backdrop-filter: blur(18px); background: rgba(38, 39, 55, 0.76); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { font-size: 0.98rem; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; opacity: 0; transition: opacity 120ms linear; }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.75rem 1.25rem; }
.site-nav a { color: var(--faint); font-size: 0.86rem; font-weight: 600; text-decoration: none; transition: color 160ms ease; }
.site-nav a:hover, .site-nav a:focus-visible, .wordmark:hover, .wordmark:focus-visible { color: var(--text); }
.hero { position: relative; isolation: isolate; min-height: min(690px, calc(100svh - 68px)); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(330px, 0.65fr); grid-template-rows: auto auto auto auto; column-gap: clamp(2rem, 7vw, 9rem); align-content: center; padding-block: clamp(4rem, 8vh, 7rem) clamp(3.5rem, 6vh, 5rem); overflow: hidden; opacity: calc(1 - var(--hero-exit, 0) * 0.82); filter: saturate(calc(1 - var(--hero-exit, 0) * 0.14)); transform: translateY(calc(var(--hero-exit, 0) * -6vh)) scale(calc(1 - var(--hero-exit, 0) * 0.035)); transform-origin: center top; will-change: opacity, filter, transform; }
.hero::before { content: ""; position: absolute; top: 9%; right: 13%; z-index: -1; width: min(32vw, 430px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 222, 141, 0.45), rgba(220, 168, 73, 0.16) 36%, transparent 69%); filter: blur(4px); opacity: 0.78; }
.eyebrow { margin: 0 0 1rem; color: var(--accent); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.hero h1, .section-heading h2 { margin: 0; font-weight: 700; letter-spacing: -0.055em; }
.hero-name-prefix { grid-column: 1; grid-row: 1; align-self: end; margin: 0 0 1rem 0.45rem; color: var(--text); font-size: clamp(1.45rem, 2vw, 2.1rem); font-weight: 600; letter-spacing: -0.04em; }
.hero h1 { grid-column: 1; grid-row: 2 / span 3; max-width: 9ch; font-size: clamp(3.5rem, 8.3vw, 7.7rem); line-height: 0.9; }
.hero h1::after { content: ""; display: block; width: 2.9rem; height: 0.34rem; margin-top: 1.7rem; background: var(--accent); }
.hero-name { transform: translate(var(--name-shift-x, 0), var(--name-shift-y, 0)) scale(var(--name-scale, 1)); transform-origin: top left; opacity: var(--name-opacity, 1); will-change: transform, opacity; }
.hero-summary { grid-column: 2; grid-row: 2; max-width: 30rem; margin: 0; font-size: clamp(1.65rem, 2.45vw, 2.5rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.045em; }
.hero-detail { grid-column: 2; grid-row: 3; max-width: 31rem; margin: 1.35rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 1.2vw, 1.25rem); }
.hero-actions { grid-column: 2; grid-row: 4; display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0.62rem 1rem; border: 1px solid var(--line-bright); border-radius: 999px; color: var(--text); text-decoration: none; font-size: 0.9rem; transition: background 160ms ease, color 160ms ease, transform 160ms ease; }
.button:hover, .button:focus-visible { transform: translateY(-1px); background: rgba(255, 255, 255, 0.09); }
.button-primary { background: var(--accent); border-color: var(--accent); color: #252637; font-weight: 700; }
.button-primary:hover, .button-primary:focus-visible { background: var(--accent-strong); }
.section { padding-block: clamp(4.5rem, 8vw, 6.5rem); border-top: 1px solid var(--line); }
#skills { padding-top: 3rem; }
.section-heading { max-width: 38rem; margin-bottom: 3rem; }
.section-heading h2 { font-size: clamp(2.25rem, 4vw, 3.8rem); line-height: 1; }
.section-heading p:last-child { max-width: 34rem; color: var(--muted); font-size: 1.05rem; }
.projects-grid { display: grid; }
.project-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 1.5rem; padding: 2.25rem 0; border-top: 1px solid var(--line); }
.project-card:first-child { border-top: 0; padding-top: 0; }
.project-card.has-compact-media { grid-template-columns: 64px minmax(0, 750px) minmax(280px, 1fr); }
.project-number { margin: 0.25rem 0 0; color: var(--faint); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.project-content { max-width: 750px; }
.project-content h3 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.45rem); line-height: 1.08; letter-spacing: -0.045em; }
.project-content h3 a { color: inherit; text-decoration: none; }
.project-content h3 a:hover, .project-content h3 a:focus-visible { color: var(--accent-strong); text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
.project-content > p { margin: 1rem 0 0; color: var(--muted); font-size: 1.03rem; }
.tech-list, .tag-list { display: flex; flex-wrap: wrap; gap: 0.42rem; margin: 1.1rem 0 1.45rem; padding: 0; list-style: none; }
.tech-list li, .tag-list li { padding: 0.24rem 0.52rem; border: 1px solid var(--line); border-radius: 999px; color: #c3d4e8; background: rgba(113, 163, 216, 0.07); font-size: 0.77rem; letter-spacing: 0; }
.project-links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.35rem; }
.inline-link, .contact-card a { color: var(--accent-strong); font-weight: 500; text-decoration-color: rgba(168, 215, 255, 0.42); text-underline-offset: 0.18em; }
.inline-link::after { content: " ↗"; }
.can-diagram { grid-column: 2; margin-top: 0.5rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.has-compact-media .can-diagram { grid-column: 2 / -1; }
.can-diagram-heading { max-width: 660px; }
.can-diagram-heading h4 { margin: 0; font-size: clamp(1.35rem, 2.3vw, 2rem); letter-spacing: -0.04em; line-height: 1.08; }
.can-diagram-heading > p:last-child { margin: 0.7rem 0 0; color: var(--muted); }
.can-diagram-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.7fr); gap: 1rem; margin-top: 1.2rem; }
.can-map { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.6rem; min-height: 250px; padding: 1rem; overflow: hidden; border: 1px solid var(--line-bright); border-radius: 15px; background: radial-gradient(circle at 50% 0%, rgba(233, 189, 90, 0.13), transparent 48%), radial-gradient(circle at 5% 100%, rgba(70, 75, 112, 0.4), transparent 44%), #212233; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035); }
.can-map::before { content: "PHYSICAL HIL BENCH / 500 KBPS CAN"; position: absolute; top: 12px; left: 16px; color: var(--accent); font-size: 0.63rem; font-weight: 700; letter-spacing: 0.1em; }
.can-node, .can-test { position: relative; z-index: 1; border: 1px solid color-mix(in srgb, var(--node-color, var(--test-color)) 52%, var(--line)); background: linear-gradient(150deg, color-mix(in srgb, var(--node-color, var(--test-color)) 15%, #303143), #242536); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease; }
.can-node { align-self: center; min-height: 110px; padding: 0.8rem; border-radius: 12px; font-size: 0.78rem; font-weight: 650; line-height: 1.2; }
.can-node span { display: block; margin-bottom: 0.5rem; color: var(--node-color); font-size: 0.66rem; letter-spacing: 0.08em; }
.can-node:hover, .can-node:focus-visible, .can-test:hover, .can-test:focus-visible { outline: none; transform: translateY(-3px); }
.can-node.is-active, .can-test.is-active { border-color: var(--node-color, var(--test-color)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--node-color, var(--test-color)) 20%, transparent), 0 8px 22px rgba(0, 0, 0, 0.26); }
.can-path { position: absolute; top: 50%; z-index: 0; height: 2px; background: linear-gradient(90deg, rgba(233, 189, 90, 0.2), rgba(233, 189, 90, 0.68)); }
.path-host { left: 14%; width: 7%; } .path-node1 { left: 30%; width: 7%; } .path-mcp { left: 46%; width: 7%; } .path-bus { left: 62%; width: 7%; } .path-node2 { left: 78%; width: 7%; }
.can-tests { position: absolute; z-index: 2; right: 1rem; bottom: 1rem; left: 1rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.can-test { padding: 0.38rem 0.55rem; border-radius: 999px; color: #eef5ff; font-size: 0.7rem; font-weight: 600; }
.can-test span { margin-right: 0.34rem; color: var(--test-color); font-size: 0.62rem; letter-spacing: 0.06em; }
.can-detail { min-height: 250px; padding: 1.2rem; border: 1px solid color-mix(in srgb, var(--detail-color, var(--accent)) 48%, var(--line)); border-radius: 15px; background: linear-gradient(155deg, color-mix(in srgb, var(--detail-color, var(--accent)) 10%, #363647), #262737); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035); transition: border-color 180ms ease, background 180ms ease; }
.can-detail-label { margin: 0; color: var(--detail-color, var(--accent)); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.7rem; overflow-wrap: anywhere; }
.can-detail h5 { margin: 1.1rem 0 0; font-size: 1.22rem; line-height: 1.12; letter-spacing: -0.03em; }
.can-detail > p:last-child { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.92rem; }
.project-media-grid { grid-column: 2; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.85rem; margin-top: 0.5rem; }
.project-media-grid.is-compact { width: min(100%, 410px); grid-template-columns: 1fr; }
.has-compact-media .project-media-grid { grid-column: 3; align-self: start; justify-self: center; margin-top: 0.25rem; }
.project-media { overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.project-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.has-compact-media .project-media img { display: block; height: auto; aspect-ratio: auto; object-fit: contain; }
.project-media figcaption { padding: 0.65rem 0.8rem; color: var(--muted); font-size: 0.8rem; }
.two-column { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr); gap: 4rem; align-items: start; }
#experience { display: block; }
.experience-list { display: grid; gap: 3rem; }
.experience-card { padding: 0.25rem 0 0; }
.experience-card h3, .skill-card h3, .contact-card h3 { margin: 0; font-size: 1.15rem; letter-spacing: -0.025em; }
.experience-meta { margin: 0.5rem 0 1.15rem; color: var(--accent); font-size: 0.88rem; }
.experience-card > p, .about-copy p, .contact-card p { color: var(--muted); font-size: 1.03rem; }
.experience-media { margin: 1.5rem 0 0; text-align: center; }
.experience-media img { display: inline-block; width: min(100%, 880px); height: auto; border: 1px solid var(--line-bright); border-radius: 14px; object-fit: contain; }
.experience-media figcaption { margin-top: 0.55rem; color: var(--muted); font-size: 0.82rem; }
.about-copy { max-width: 720px; }
.about-copy p { margin: 0 0 1.2rem; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.45; letter-spacing: -0.03em; }
.skills-grid, .contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.skill-card, .contact-card { min-height: 190px; padding: 1.4rem; background: rgba(6, 15, 27, 0.78); }
.tag-list { margin-top: 1rem; }
.contact-card { display: flex; flex-direction: column; }
.contact-card p { margin: 0.75rem 0; font-size: 0.94rem; }
.contact-card a { margin-top: auto; font-size: 0.88rem; overflow-wrap: anywhere; }
.contact-block { margin-top: 5.5rem; padding-top: 5.5rem; border-top: 1px solid var(--line); }
.contact-block .section-heading p:last-child { display: none; }
.site-footer { padding: 1.2rem 0 2.75rem; }
.footer-inner { border-top: 1px solid var(--line); padding-top: 1.15rem; color: var(--faint); font-size: 0.82rem; }
.system-map { padding-top: 2.7rem; border-top: 0; }
.system-map-heading { max-width: 590px; }
.system-map-heading h3 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.08; letter-spacing: -0.045em; }
.system-map-heading > p:last-child { margin: 0.8rem 0 0; color: var(--muted); }
.system-map-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.7fr); gap: 1.4rem; margin-top: 1.6rem; align-items: stretch; }
.architecture-map { position: relative; min-height: 430px; overflow: hidden; border: 1px solid var(--line-bright); border-radius: 16px; background-color: #07111e; background-image: linear-gradient(rgba(150, 195, 238, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(150, 195, 238, 0.06) 1px, transparent 1px), radial-gradient(circle at 70% 20%, rgba(42, 103, 166, 0.26), transparent 36%); background-size: 20px 20px, 20px 20px, auto; }
.architecture-map::before { content: "FPGA / ASIC DATAPATH"; position: absolute; top: 18px; right: 22px; color: rgba(168, 215, 255, 0.5); font-size: 0.67rem; font-weight: 600; letter-spacing: 0.12em; }
.architecture-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.architecture-wires path { fill: none; stroke: rgba(174, 207, 241, 0.36); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; transition: stroke 180ms ease, stroke-width 180ms ease; }
.architecture-wires path.is-active { stroke: var(--accent-strong); stroke-width: 3; filter: drop-shadow(0 0 4px rgba(104, 183, 255, 0.9)); }
.architecture-wires path::after { content: ""; }
.architecture-node { position: absolute; display: grid; gap: 0.35rem; min-width: 100px; padding: 0.75rem 0.85rem; border: 1px solid rgba(176, 207, 240, 0.4); border-radius: 10px; background: rgba(6, 15, 27, 0.94); color: var(--text); font: inherit; font-size: 0.78rem; font-weight: 600; line-height: 1.15; text-align: left; cursor: pointer; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22); transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.architecture-node:hover, .architecture-node:focus-visible { outline: none; transform: translateY(-3px); border-color: var(--accent); background: #0b1d31; }
.architecture-node.is-active { border-color: var(--accent-strong); background: #0e2943; box-shadow: 0 0 0 2px rgba(104, 183, 255, 0.17), 0 12px 28px rgba(0, 0, 0, 0.3); }
.node-index { color: var(--accent); font-size: 0.64rem; letter-spacing: 0.08em; }
.node-host { top: 34px; left: 3%; width: 17%; }
.node-config { top: 34px; left: 23%; width: 16%; }
.node-rgb-rx { top: 170px; left: 23%; width: 16%; }
.node-controller { top: 145px; left: 45.5%; width: 17%; min-height: 86px; align-content: center; }
.node-accelerator { top: 145px; left: 67.5%; width: 16%; min-height: 86px; align-content: center; }
.node-rgb-tx { top: 170px; left: 85.6%; width: 11%; }
.node-output { right: 3%; bottom: 28px; width: 27%; }
.module-detail { min-height: 290px; padding: 1.45rem; border: 1px solid var(--line-bright); border-radius: 16px; background: linear-gradient(155deg, rgba(12, 31, 52, 0.92), rgba(6, 15, 27, 0.9)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035); animation: detail-enter 250ms ease both; }
.module-file { margin: 0; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.72rem; letter-spacing: 0; }
.module-detail h4 { margin: 1.2rem 0 0; font-size: 1.35rem; line-height: 1.1; letter-spacing: -0.035em; }
.module-detail > p:last-child { margin: 1rem 0 0; color: var(--muted); font-size: 0.96rem; }
@keyframes detail-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1080px) { .system-map-layout { grid-template-columns: 1fr; } .module-detail { min-height: auto; } }
@media (max-width: 1050px) { .project-card.has-compact-media { grid-template-columns: 64px minmax(0, 1fr); } .has-compact-media .project-media-grid { grid-column: 2; justify-self: start; } .has-compact-media .can-diagram { grid-column: 2; } }
@media (max-width: 900px) { .can-diagram { grid-column: 1; } .can-diagram-layout { grid-template-columns: 1fr; } .can-detail { min-height: auto; } }
@media (max-width: 820px) {
  .two-column { grid-template-columns: 1fr; gap: 2rem; }
  .skills-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { display: flex; min-height: auto; padding-block: 5.5rem 4.5rem; }
  .hero::before { right: -8%; width: min(72vw, 390px); }
  .hero h1 { max-width: 9ch; }
  .hero-summary { margin-top: 2.5rem; }
}
@media (max-width: 680px) {
  .architecture-map { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; min-height: 0; padding: 3.2rem 0.75rem 0.75rem; }
  .architecture-map::before { top: 0.95rem; left: 0.9rem; right: auto; }
  .architecture-wires { display: none; }
  .architecture-node, .node-host, .node-config, .node-rgb-rx, .node-controller, .node-accelerator, .node-rgb-tx, .node-output { position: static; width: auto; min-width: 0; min-height: 0; padding: 0.7rem; }
  .node-output { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .header-inner { min-height: unset; padding: 0.9rem 0; align-items: flex-start; flex-direction: column; }
  .site-nav { justify-content: flex-start; gap: 0.55rem 0.85rem; }
  .wordmark { opacity: 1; }
  .hero { padding-block: 4.25rem 3.5rem; }
  .hero-name-prefix { margin-left: 0; font-size: 1.35rem; }
  .hero-name { transform: none !important; opacity: 1 !important; }
  .hero h1 { font-size: clamp(3.3rem, 18vw, 5.25rem); }
  .hero-summary { font-size: clamp(1.55rem, 8vw, 2rem); }
  .hero-detail { font-size: 1rem; }
  .project-card { grid-template-columns: 1fr; gap: 0.55rem; }
  .project-number { margin-top: 0; }
  .project-media-grid, .can-diagram, .has-compact-media .project-media-grid, .has-compact-media .can-diagram { grid-column: 1; }
  .has-compact-media .project-media-grid { width: 100%; justify-self: stretch; }
  .project-media-grid.is-compact { width: min(100%, 460px); }
  .can-map { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 430px; padding-top: 2.2rem; }
  .can-path { display: none; }
  .can-node { min-height: 88px; padding: 0.55rem; font-size: 0.69rem; }
  .can-tests { position: static; grid-column: 1 / -1; align-self: end; }
  .module-detail { padding: 1.1rem; }
  .contact-block { margin-top: 4rem; padding-top: 4rem; }
}
@media (max-width: 820px) and (max-height: 560px) {
  .hero { padding-block: 2.5rem 2rem; }
  .hero-summary { margin-top: 1.1rem; }
  .hero-detail { margin-top: 0.8rem; }
  .hero-actions { margin-top: 1rem; }
}
@media (max-width: 410px) {
  .site-nav { gap: 0.45rem 0.65rem; }
  .site-nav a { font-size: 0.8rem; }
  .hero-actions { gap: 0.55rem; }
  .button { min-height: 40px; padding-inline: 0.85rem; font-size: 0.84rem; }
  .section-heading { margin-bottom: 2.25rem; }
  .project-content h3 { font-size: 1.75rem; }
  .tech-list, .tag-list { gap: 0.35rem; }
  .can-map { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 520px; }
  .can-node { min-height: 76px; }
  .can-test { font-size: 0.64rem; }
  .architecture-map { grid-template-columns: 1fr; }
  .node-output { grid-column: auto; }
}
@media (max-height: 720px) and (min-width: 821px) {
  .hero { min-height: calc(100svh - 68px); padding-block: 2.75rem; }
  .hero h1 { font-size: clamp(3.75rem, 7.2vw, 6.2rem); }
  .hero-summary { font-size: clamp(1.45rem, 2.05vw, 2.05rem); }
  .hero-detail { margin-top: 0.9rem; }
  .hero-actions { margin-top: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .wordmark { opacity: 1; } .hero, main > .section { opacity: 1; filter: none; transform: none; } *, *::before, *::after { transition: none !important; } }
