@charset "UTF-8";

/* Layout */
:root { --accent: #A7D3CF; --button-gradient: linear-gradient(to right, #A7D3CF, #C3C0E3, #D5C9E8, #A8D6D0); --button-shadow: 0 4px 15px rgba(195, 192, 227, .25); --background: #111111; --sidebar-width: 244px; --line: #292929; --muted: #929292; }
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--background); }
.portfolio-layout { min-height: 100vh; min-height: 100dvh; }
.main-content { min-height: 100vh; min-height: 100dvh; margin-left: var(--sidebar-width); padding: 30px 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 30; padding: 10px 16px; background: var(--accent); color: #111; border-radius: 6px; transform: translateY(-160%); }
.skip-link:focus { color: #111; transform: translateY(0); }

/* Sidebar */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 32px 20px 24px; background: var(--background); border-right: 1px solid var(--line); overflow-y: auto; }
.sidebar-header { flex-shrink: 0; padding: 0 4px 28px; border-bottom: 1px dashed var(--line); }
.profile { display: flex; align-items: center; gap: 12px; }
.profile-image { display: flex; flex-shrink: 0; align-items: center; justify-content: center; width: 44px; height: 44px; overflow: hidden; border: 1px solid #354542; border-radius: 8px; background: #1b2625; color: var(--accent); }
.profile-image img { width: 100%; height: 100%; object-fit: cover; }
.profile-image .profile-logo { width: 60%; height: auto; object-fit: contain; }
.profile-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-info strong { font-size: 16px; font-weight: 800; letter-spacing: .02em; }
.profile-info > span { font-size: 12px; color: var(--muted); }
.sidebar-menu { display: flex; flex: 1; flex-direction: column; }
.navigation { padding-top: 28px; }
.navigation ul { display: flex; flex-direction: column; gap: 8px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border: 1px solid transparent; border-radius: 7px; font-size: 14px;  transition: background .18s, color .18s, border-color .18s; }
.nav-link:link, .nav-link:visited { color: var(--muted); }
.nav-link svg { flex-shrink: 0; width: 18px; height: 18px; }
.nav-link:hover {background: #1b1b1b; color: #eee; }
.nav-link.is-active { border-color: #30423f; background: #1c2927; color: var(--accent); font-weight: 700; }
.nav-indicator { width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: currentColor; opacity: 0; }
.is-active .nav-indicator { opacity: 1; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 16px 2px 0; border-top: 1px dashed var(--line); }
.navigation + .sidebar-footer { margin-top: auto; }
.navigation { margin-bottom: 40px; }
.social-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 6px; }
.social-link:link, .social-link:visited, .social-link.is-unavailable { color: var(--muted); }
.social-link:hover, .social-link:focus-visible { background: #1c2927; color: var(--accent); }
.social-link svg { width: 19px; height: 19px; }
.is-unavailable { cursor: default; }
.tooltip { position: absolute; bottom: calc(100% + 10px); left: 0; z-index: 1; padding: 5px 9px; border: 1px solid #36403e; border-radius: 5px; background: #222927; color: #eee; font-size: 11px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(3px); }
.social-link:hover .tooltip, .social-link:focus-visible .tooltip { opacity: 1; transform: translateY(0); }
.social-link:hover .tooltip { transition: opacity .18s, transform .18s; }
.menu-toggle { display: none; }

/* Home */
.intro-actions{margin-top: 32px;}
.intro-actions, .about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px;  }
.intro-actions .project-button, .about-actions .project-button { margin-top: 0; }
.outline-button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 24px; border: 1px solid #455653; border-radius: 28px; color: var(--accent); font-size: 15px; font-weight: 800; transition: all .3s;}
.outline-button:hover { border-color: var(--accent); background: #1c2927; }
.main-content.home-content { padding-top: 0; padding-bottom: 0; }
.home-content > section { min-height: 100vh; min-height: 100dvh; margin-top: 0; padding-top: 30px; padding-bottom: 30px; }
.home-content > .intro { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.home-content > .intro > * { flex-shrink: 0; }

.intro { padding-bottom: 80px; border-bottom: 1px dashed var(--line); }
.intro-greeting { margin-bottom: 24px; color: #b5b9be; font-size: 18px; font-weight: 700; }
.intro-greeting strong { color: var(--accent); }
.intro-title { font-size: clamp(36px, 5.4vw, 75px); font-weight: 800; line-height: 1.3; letter-spacing: -.055em; }
.intro-title > span { display: block; }
.intro-title .accent { color: var(--accent); }
.intro-description { max-width: 800px; margin-top: 32px; color: #afb3b9; font-size: 17px; line-height: 1.9; width: 100%;}
.intro-description p + p { margin-top: 16px; }
.project-button, .project-button:link, .project-button:visited { display: inline-flex; align-items: center; justify-content: center; gap: 28px; min-height: 52px;  padding: 12px 24px; border: 1px solid transparent; border-radius: 28px; background-image: var(--button-gradient); background-size: 300% 100%; background-position: 0 0; transition: background-position .4s ease-in-out; box-shadow: var(--button-shadow); color: #152322; font-size: 15px; font-weight: 800; }
.project-button:hover { background-position: 100% 0; }
.project-button svg { width: 20px; height: 20px; }
.work-approach { padding: 80px 0 40px; }
.approach-list { display: flex; flex-direction: column; gap: 64px; }
.approach-item { width: 56%; max-width: 620px; }
.approach-item:nth-child(2) { align-self: center; text-align: center; }
.approach-item:nth-child(3) { align-self: flex-end; text-align: right; }
.approach-label { margin-bottom: 20px; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.approach-label span { margin-left: 6px; }
.approach-item h3 { font-size: clamp(26px, 2.7vw, 42px); font-weight: 800; line-height: 1.4; letter-spacing: -.045em; }
.approach-description { margin-top: 24px; color: #a1a7ae; font-size: 15px; line-height: 1.9; }

/* Project cards */
.selected-projects { margin-top: 40px; padding: 64px 0 30px; border-top: 1px dashed var(--line); }
.projects-header { margin-bottom: 28px; }
.projects-header h2 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; }
.projects-header p { margin-top: 10px; color: #a1a7ae; font-size: 15px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.project-grid > li { min-width: 0; }
.project-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #151515;  transition: border-color .18s, transform .18s; }
.project-card:hover, .project-card:focus-visible { border-color: var(--accent); transform: translateY(-4px); }
.project-thumbnail { aspect-ratio: 16 / 10; flex-shrink: 0; background-color: #000; border-bottom: 1px solid var(--line); }
.project-card-content { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 24px; }
.project-card h3 { font-size: 20px; font-weight: 800; line-height: 1.5; letter-spacing: -.025em; }
.project-card p { margin-top: 12px; margin-bottom: 24px; color: #a1a7ae; font-size: 14px; line-height: 1.8; }
.project-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.project-tools li { display: inline-block; padding: 4px 10px; border: 1px solid #30423f; border-radius: 5px; background: #1c2927; color: var(--accent); font-size: 12px; }

/* Skills & Tools */
.skills-section { margin-top: 40px; padding: 64px 0 30px; border-top: 1px dashed var(--line); }
.skills-header { margin-bottom: 28px; }
.skills-header h2 { font-size: 28px; font-weight: 800; letter-spacing: -.025em; }
.skills-header p { margin-top: 10px; color: #a1a7ae; font-size: 15px; }
.skills-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.skills-grid > .skill-card { grid-column: span 2; }
.skills-grid > .skill-card:nth-child(n+4) { grid-column: span 3; }
.skill-card { min-width: 0; padding: 28px 24px 32px; border: 1px solid #323536; border-radius: 28px; background: #17181c;transition: border-color .18s, background .18s; }
.skill-card:hover {  border-color: #587b77; background: #191e20; }
.skill-number { display: block; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.skill-icon { display: block; width: 24px; height: 24px; margin-top: 16px; color: var(--accent); }
.skill-card h3 { margin-top: 12px; font-size: 25px; font-weight: 800; letter-spacing: -.03em; line-height: 1.4; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.skill-tags li { display: inline-block; max-width: 100%; padding: 5px 10px; border: 1px solid #3b3f45; border-radius: 20px; color: #d0d5db; font-size: 12px; font-weight: 800; line-height: 1.5; }
.skill-description { margin-top: 16px; color: #adb3bc; font-size: 14px; line-height: 1.8; }

/* Projects page */
.personal-empty { padding: 64px 20px; border-top: 1px dashed var(--line); color: var(--muted); text-align: center; }
.projects-page .project-card { position: relative; }
.project-ended-label { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 5px 10px; border-radius: 4px; background: rgba(17, 17, 17, .85); color: #fff; font-size: 13px; font-weight: 700; border: 1px solid #fff;}
.projects-page-header { padding-bottom: 36px; }
.projects-eyebrow { margin-bottom: 14px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.projects-page-header h1 { font-size: clamp(36px, 4vw, 56px); line-height: 1.25; letter-spacing: -.04em; }
.projects-page-header > p:last-child { margin-top: 18px; color: #a1a7ae; font-size: 16px; }
.project-filters { padding: 24px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-button { min-height: 44px; padding: 10px 20px; border: 1px solid #34383a; border-radius: 24px; color: #b9bfc5; font-size: 14px; }
.filter-button:hover { border-color: var(--accent); color: var(--accent); }
.filter-button.is-active { border-color: transparent; background-image: var(--button-gradient); background-size: 300% 100%; background-position: 0 0; box-shadow: var(--button-shadow); color: #152322; font-weight: 800; transition: background-position .4s ease-in-out; }
.filter-button.is-active:hover { background-position: 100% 0; }
.project-filter-mobile { display: none; }
.project-results { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0 20px; font-size: 14px; }
.project-results span { color: #a1a7ae; }
.projects-page .project-card h2 { font-size: 20px; font-weight: 800; line-height: 1.5; letter-spacing: -.025em; }

/* Project detail */
.detail-back { display: inline-block; margin-bottom: 24px; color: #a1a7ae; font-size: 14px; }
.detail-header { min-width: 0; padding: 0; }
.detail-header h1 { font-size: clamp(28px, 3vw, 42px); letter-spacing: -.04em; }
.detail-header > p { margin-top: 16px; color: #adb3bc; line-height: 1.9; }
.detail-intro-list { display: grid; gap: 8px; margin-top: 16px; color: #adb3bc; line-height: 1.8; }
.detail-intro-list li { position: relative; padding-left: 14px; }
.detail-intro-list li::before { content: ''; position: absolute; left: 0; top: .75em; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.detail-contribution { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 15px; }
.detail-contribution dt { color: #8f969f; font-weight: 600;}
.detail-contribution dd { color: var(--accent); font-weight: 700; }
.detail-site { display: flex; align-items: center; gap: 24px; margin-top: 28px; }
.detail-site .project-button { margin-top: 0; }
.detail-status { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 15px; }
.detail-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.detail-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding: 36px 0; border-top: 1px solid var(--line); }
.detail-row h2, .detail-screen h2, .detail-related h2 { font-size: 22px; letter-spacing: -.03em; }
.detail-row .project-tools { margin-top: 0; align-items: flex-start; }
.detail-duties { display: grid; gap: 12px; color: #bcc1c7; }
.detail-duties li { position: relative; padding-left: 16px; }
.detail-duties li::before { content: ''; position: absolute; left: 0; top: .7em; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.detail-work-list { gap: 20px; }
.detail-screen { padding: 40px 0; border-top: 1px solid var(--line); }
.detail-screen header, .detail-related > header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.detail-screen header span { font-size: 12px; color: #a1a7ae; }
.detail-screen figure { margin: 0; }
.detail-screen img { display: block; width: 100%; height: auto; border-radius: 10px; }
.detail-screen figcaption { margin-top: 14px; color: #a1a7ae; font-size: 13px; text-align: center; }
.detail-screen .detail-mobile-image { max-width: 440px; margin: 0 auto; }
.detail-related { margin-top: 24px; padding-top: 40px; border-top: 1px dashed var(--line); }
.detail-related > header a { font-size: 14px; color: var(--accent); }

/* PC/MO preview pair */
.detail-screens { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; gap: 32px; border-top: 1px solid var(--line); }
.detail-screens .detail-screen { min-width: 0; border-top: 0; }
.detail-screens .detail-screen:only-child { grid-column: 1 / -1; width: 100%; max-width: 1000px; justify-self: center; }
.detail-screens .screen-mobile:only-child { max-width: 408px; }
.detail-screens .detail-screen header { align-items: flex-start; }
.detail-screens.is-stacked { display: block; }
.detail-screens.is-stacked .detail-screen { width: 100%; max-width: none; }
.detail-screens.is-stacked .detail-screen + .detail-screen { border-top: 1px solid var(--line); }
.detail-screens.is-stacked .screen-mobile { max-width: 408px; margin: 0 auto; }

/* Detail introduction */
.detail-hero { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); align-items: center; gap: 40px; padding-bottom: 44px; }
.detail-thumbnail { width: 100%; max-width: 600px; overflow: hidden; border-radius: 12px; background-color: #000; }
.detail-thumbnail img { display: block; width: 100%; height: auto; }
.detail-tech { margin-top: 24px; }
.detail-tech h2 { margin-bottom: 12px; font-size: 15px; color: #adb3bc; font-weight: 500;}
.detail-tech .project-tools { margin-top: 0; }

/* Related project text links */
.detail-related > header { margin-bottom: 16px; }
.detail-related h2 { font-size: 16px; }
.related-project-list { border-top: 1px solid #adb3bc; }
.related-project-list li { border-bottom: 1px solid #43484d; }
.related-project-list a { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 56px; padding: 16px 4px; color: #d1d5db; font-size: 16px; }
.related-project-list a:hover, .related-project-list a:focus-visible { color: var(--accent); }
.related-project-arrow { flex-shrink: 0; font-size: 20px; line-height: 1; }

.project-thumbnail.pic { aspect-ratio: auto; }
.project-thumbnail.pic img { display: block; width: 100%; height: auto; }

/* About */
.about-page { max-width: 1200px; margin: 0 auto; }
.about-header { padding: 24px 0 56px; }
.about-header h1 { font-size: clamp(36px, 4vw, 56px); font-weight: 800; letter-spacing: -.04em; }
.about-lead { margin-top: 28px; font-size: clamp(23px, 2.5vw, 36px); font-weight: 800; line-height: 1.5; letter-spacing: -.04em; }
.about-lead span { color: var(--accent); }
.about-description { margin-top: 20px; color: #a1a7ae; font-size: 16px; line-height: 1.9; }
.about-section { padding: 40px 0; border-top: 1px dashed var(--line); }
.about-section-heading { display: flex; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.about-section-heading > span { color: var(--accent); font-size: 12px; font-weight: 800; }
.about-section-heading h2 { font-size: 25px; font-weight: 800; letter-spacing: -.03em; }
.about-section-heading small { margin-left: 10px; color: var(--muted); font-size: 14px; font-weight: 400; }
.career-list { margin-left: 5px; padding-left: 28px; border-left: 1px solid #354542; }
.career-list > li { position: relative; display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 24px; padding: 0 0 32px; }
.career-list > li:last-child { padding-bottom: 0; }
.career-list > li::before { content: ''; position: absolute; top: 7px; left: -33px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--background); }
.career-date { padding-top: 3px; color: var(--accent); font-size: 14px; }
.career-list h3 { font-size: 22px; font-weight: 800; }
.career-role { margin-top: 5px; color: #d0d5db; font-size: 15px; }
.career-description { margin-top: 10px; color: #a1a7ae; font-size: 14px; line-height: 1.8; }
.credentials-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.credential-group { padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: #151515; }
.credential-group > h3 { margin-bottom: 24px; color: var(--accent); font-size: 17px; }
.credential-group li { display: grid; gap: 8px; }
.credential-group li + li { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.credential-group time, .credential-date { color: var(--muted); font-size: 13px; }
.credential-group h4 { font-size: 18px; font-weight: 800; }
.credential-group p { margin-top: 5px; color: #a1a7ae; font-size: 14px; }
.about-keywords { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.about-keywords article { padding: 28px 24px; border: 1px solid #323536; border-radius: 16px; background: #17181c; }
.about-keyword-label { color: var(--accent); font-size: 13px; }
.about-keywords h3 { margin-top: 12px; font-size: clamp(20px, 2vw, 25px); font-weight: 800; }
.about-keywords p { margin-top: 18px; color: #adb3bc; font-size: 14px; line-height: 1.9; }
.about-actions { margin-top: 0; padding: 24px 0 30px; }

/* Project navigation loading */
.is-project-loading { overflow: hidden; }
.project-loading { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(17, 17, 17, 1); cursor: wait; }
.project-loading[hidden] { display: none; }
.loader { display: inline-flex; width: 90px; aspect-ratio: 2; animation: l11-0 1s linear infinite; }
.loader::before, .loader::after { content: ''; flex: 1; background: #A7D3CF; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); animation: l11-1 1s linear infinite; transform-origin: right; }
.loader::after { scale: -1.6 1.6; translate: -100% 0; background: #C3C0E3; clip-path: polygon(100% 50%, 81.17% 89.09%, 38.87% 98.75%, 4.95% 71.69%, 4.95% 28.31%, 38.87% 1.25%, 81.17% 10.91%); animation: l11-2 1s linear infinite; }
@keyframes l11-0 { 0% { translate: 0 -35.35%; } to { translate: 0 35.35%; } }
@keyframes l11-1 { 0% { rotate: -45deg; } to { rotate: 45deg; } }
@keyframes l11-2 { 0% { rotate: 25.7deg; } to { rotate: -25.7deg; } }

/* Contact */
.contact-page { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 60px); min-height: calc(100dvh - 60px); padding: 110px 0; text-align: center; }
.contact-content { width: 100%; min-width: 0; }
.contact-content h1 { font-size: clamp(36px, 4vw, 56px); font-weight: 800; letter-spacing: -.04em;color: var(--accent); }
.contact-description { margin-top: 24px; color: #afb3b9; font-size: 17px; line-height: 1.9; }
.contact-email-wrap { position: relative; width: fit-content; max-width: 100%; margin: 40px auto 0; }
.contact-email { display: inline-flex; justify-content: center; max-width: 100%; padding: 10px 0; color: var(--accent); font-size: clamp(22px, 3.6vw, 64px); font-weight: 800; line-height: 1.3; letter-spacing: -.035em; white-space: nowrap; }
.contact-email > span { display: inline-block; transition: color .2s ease, transform .2s cubic-bezier(.34, 1.45, .64, 1); transition-delay: calc(var(--letter-index) * 12ms); }
.contact-popover { position: absolute; top: calc(100% + 20px); left: 50%; z-index: 5; width: 340px; max-width: calc(100vw - 40px); padding: 16px; border: 1px solid #3b4947; border-radius: 14px; background: #1b2221; box-shadow: 0 12px 32px rgba(0, 0, 0, .3); transform: translateX(-50%); }
.contact-popover[hidden] { display: none; }
.contact-popover::before { content: ''; position: absolute; top: -7px; left: calc(50% - 7px); width: 12px; height: 12px; border-top: 1px solid #3b4947; border-left: 1px solid #3b4947; background: #1b2221; transform: rotate(45deg); }
.contact-actions { display: flex; gap: 10px; }
.contact-actions > * { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 14px; font-weight: 700; }
.contact-actions .project-button { margin-top: 0; border-radius: 8px; }
.contact-copy { border: 1px solid #526561; border-radius: 8px; color: var(--accent); }
.contact-copy:hover { background: #293a36; }
.contact-feedback { color: #c4d4d0; font-size: 13px; line-height: 1.6; }
.contact-feedback:not(:empty) { margin-top: 12px; }
.contact-copy-fallback { display: block; width: 100%; margin-top: 8px; padding: 8px; border: 1px solid #526561; border-radius: 4px; background: #111; color: #fff; font-size: 14px; }

/* Responsive */

/* Tablet and smaller */
@media (max-width: 1199px) {
    .project-filters { display: none; }
    .project-filter-mobile { display: flex; flex-direction: column; gap: 10px; padding: 24px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
    .project-filter-mobile label { color: #a1a7ae; font-size: 13px; }
    .project-filter-mobile select { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #414849; border-radius: 8px; background: #1b2121; color: var(--accent); font: inherit; color-scheme: dark; }
    .detail-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .detail-thumbnail { max-width: 600px; }
    .intro-description em.mbr{display: block;}
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
    .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .skills-grid > .skill-card, .skills-grid > .skill-card:nth-child(n+4) { grid-column: auto; }
    .skills-grid > .skill-card:last-child { grid-column: 1 / -1; }
    .about-keywords { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about-keywords article:last-child { grid-column: 1 / -1; }
}

/* Narrow tablet */
@media (min-width: 768px) and (max-width: 1100px) {
    .approach-item { width: 80%; }
}

/* Mobile */
@media (max-width: 767px) {
    .home-content > section { min-height: calc(100vh - 81px); min-height: calc(100dvh - 81px); }
    .sidebar { inset: 0 0 auto; width: 100%; max-height: 100vh; max-height: 100dvh; padding: 0 20px; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar.is-open{height: 100%;}
    .sidebar-header { display: flex; align-items: center; justify-content: space-between; min-height: 80px; padding: 16px 0; border: 0; }
    .profile-image { width: 40px; height: 40px; }
    .profile-info strong { font-size: 14px; }
    .profile-info > span { font-size: 11px; }
    .menu-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 7px; color: var(--accent); }
    .menu-toggle span { width: 18px; height: 1px; background: currentColor; transition: transform .18s; }
    .menu-toggle[aria-expanded='true'] span:first-child { transform: translateY(3.5px) rotate(45deg); }
    .menu-toggle[aria-expanded='true'] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
    .sidebar-menu { display: none; border-top: 1px dashed var(--line); }
    .sidebar.is-open .sidebar-menu { display: flex; }
    .navigation { padding-top: 16px; margin-bottom: 24px; }
    .navigation ul { gap: 6px; }
    .nav-link { min-height: 48px; }
    .sidebar-footer { padding: 14px 0 18px; }
    .main-content { margin-left: 0; margin-top: 81px; min-height: calc(100dvh - 81px); }
    .intro { padding-bottom: 56px; }
    .intro-greeting { margin-bottom: 22px; font-size: 15px; }
    .intro-title { font-size: clamp(29px, 7.9vw, 58px); line-height: 1.4; }
    .intro-description { margin-top: 26px; font-size: 15px; line-height: 1.85; }
    .project-button { margin-top: 28px; }
    .work-approach { padding: 48px 0 10px; }
    .approach-list { gap: 44px; }
    .approach-item, .approach-item:nth-child(2), .approach-item:nth-child(3) { width: 100%; max-width: none; align-self: auto; text-align: left; }
    .approach-label { margin-bottom: 14px; font-size: 12px; }
    .approach-item h3 { font-size: clamp(24px, 5.8vw, 32px); }
    .approach-description { margin-top: 16px; font-size: 14px; }
    .selected-projects { margin-top: 40px; padding: 40px 0 10px; }
    .projects-header h2 { font-size: 24px; }
    .projects-header p { font-size: 14px; }
    .project-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .project-card-content { padding: 20px; }
    .skills-section { margin-top: 40px; padding: 40px 0 10px; }
    .skills-header h2 { font-size: 24px; }
    .skills-header p { font-size: 14px; }
    .skills-grid { grid-template-columns: minmax(0, 1fr); }
    .skills-grid > .skill-card, .skills-grid > .skill-card:nth-child(n+4) { grid-column: 1 / -1; }
    .skill-card { padding: 24px 20px 28px; border-radius: 24px; }
    .skill-card h3 { font-size: 23px; }
    .projects-page-header { padding-bottom: 28px; }
    .projects-page-header > p:last-child { font-size: 14px; }
    .detail-header { padding: 0; }
    .detail-row { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 0; }
    .detail-site { flex-wrap: wrap; gap: 16px; }
    .detail-screen { padding: 30px 0; }
    .detail-screens { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .detail-screens .screen-mobile { width: 100%; max-width: 408px; justify-self: center; }
    .related-project-list a { gap: 16px; font-size: 14px; }
    .about-header { padding: 10px 0 36px; }
    .about-description { font-size: 14px; }
    .about-section { padding: 30px 0; }
    .about-section-heading h2 { font-size: 22px; }
    .career-list > li { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .credentials-grid, .about-keywords { grid-template-columns: minmax(0, 1fr); }
    .credential-group, .about-keywords article { padding: 22px 20px; }
    .contact-page { min-height: calc(100vh - 141px); min-height: calc(100dvh - 141px); padding: 160px 0; }
    .contact-description { font-size: 14px; }
    .contact-email { font-size: clamp(20px, 5.7vw, 40px); }
    .contact-email-wrap { margin-top: 30px; }
}

/* Small mobile */
@media (max-width: 399px) {
    .intro-actions { width: 100%; flex-direction: column; align-items: stretch; }
}

/* Hover support */
@media (hover: hover) {
    .contact-email:hover > span:nth-child(even) { transform: translateY(-.14em) rotate(10deg) scale(1.06); }
    .contact-email:hover > span:nth-child(odd) { color: #C3C0E3; transform: translateY(.08em) rotate(-10deg) scale(1.04); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; }
    .filter-button.is-active { transition: none; }
    .loader, .loader::before, .loader::after { animation: none; }
    .contact-email:hover > span:nth-child(n) { transform: none; }
}
