* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    color-scheme: dark;
    --bg: #000000;
    --text: #ffffff;
    --accent: #ffd60a;
    --accent-text: #ffd60a;
    --ink: #000000;
    --header: rgba(0, 0, 0, 0.82);
    --shade: rgba(0, 0, 0, 0.78);
    --surface: rgba(0, 0, 0, 0.55);
    --focus: #ffffff;
    --glass: rgba(12, 12, 14, 0.46);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-sheen: linear-gradient(165deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04) 34%, transparent 58%);
    --glass-title: #ffffff;
    --glass-muted: rgba(255, 255, 255, 0.62);
    --glass-body: rgba(255, 255, 255, 0.8);
    --glass-chip: rgba(255, 255, 255, 0.08);
    --glass-chip-text: rgba(255, 255, 255, 0.9);
    --glass-line: rgba(255, 255, 255, 0.16);
    --glass-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #eef1f6;
    --text: #16181d;
    --accent: #ffd60a;
    --accent-text: #74580a;
    --ink: #000000;
    --header: rgba(255, 255, 255, 0.78);
    --shade: transparent;
    --surface: rgba(255, 255, 255, 0.72);
    --focus: #16181d;
    --glass: rgba(255, 255, 255, 0.46);
    --glass-border: rgba(255, 255, 255, 0.82);
    --glass-sheen: linear-gradient(165deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.18) 40%, transparent 68%);
    --glass-title: #111827;
    --glass-muted: #5c6b7a;
    --glass-body: #3e4c5e;
    --glass-chip: rgba(17, 24, 39, 0.06);
    --glass-chip-text: #374151;
    --glass-line: rgba(17, 24, 39, 0.1);
    --glass-shadow: 0 18px 40px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

::selection {
    background: var(--accent);
    color: var(--ink);
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--bg);
    color: var(--text);
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 40;
    padding: 10px 14px;
    background: var(--accent);
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
    padding: 14px 8vw;
    background: transparent;
    border-bottom: 1px solid rgba(255, 214, 10, 0.35);
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.brand,
.site-nav a,
.site-footer a,
.expertise-list a {
    text-decoration: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--accent-text);
    font-weight: 700;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.header-end {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.theme-toggle {
    position: relative;
    z-index: 42;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
}

.theme-toggle svg {
    display: block;
}

.theme-toggle .theme-icon-sun {
    display: none;
}

html[data-theme="light"] .theme-toggle .theme-icon-moon {
    display: none;
}

html[data-theme="light"] .theme-toggle .theme-icon-sun {
    display: block;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    background: var(--accent);
    color: var(--ink);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.nav-toggle,
.nav-overlay {
    display: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.site-nav a,
.expertise-list a,
.site-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.expertise-list a:hover,
.expertise-list a:focus-visible,
.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--accent-text);
}

.brand:focus-visible,
.site-nav a:focus-visible,
.expertise-list a:focus-visible,
.site-footer a:focus-visible,
.btn-contact:focus-visible,
.btn-resume:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

#sparkle-trail {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 70vh;
    padding: 32px 8vw;
    background: #000000;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.72);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 640px;
    min-width: 0;
}

.hero-content h1 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.05;
    color: #ffffff;
}

.hero-highlight {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hero-highlight::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--accent);
    flex: 0 0 auto;
}

.hero-role {
    display: inline-block;
    max-width: 100%;
    margin-top: 14px;
    padding: 6px 12px;
    background: var(--accent);
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.hero-content p {
    margin-top: 16px;
    max-width: 36em;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.55;
    color: #ffffff;
}

.hero-marquee {
    margin-top: 18px;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hero-marquee-track {
    display: flex;
    width: max-content;
    animation: hero-marquee 22s linear infinite;
}

.hero-marquee-track ul {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
    margin: 0;
    padding-right: 8px;
    list-style: none;
}

.hero-content li {
    flex-shrink: 0;
    padding: 6px 12px;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

@keyframes hero-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.btn-recruit {
    display: inline-block;
    margin-top: 32px;
    padding: 14px 28px;
    background: var(--accent);
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.btn-recruit:hover,
.btn-recruit:focus-visible {
    background: #ffffff;
}

.btn-recruit:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero .hero-actions {
    gap: 7px;
    margin-top: 16px;
}

.hero-actions .btn-recruit {
    margin-top: 0;
}

.btn-contact,
.btn-resume {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 14px 28px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent-text);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}

.hero .btn-recruit,
.hero .btn-contact,
.hero .btn-resume {
    min-height: 34px;
    padding: 10px 20px;
    font-size: 13px;
}

.hero .btn-contact,
.hero .btn-resume {
    color: var(--accent);
}

.btn-contact:hover,
.btn-contact:focus-visible,
.btn-resume:hover,
.btn-resume:focus-visible {
    background: var(--accent);
    color: var(--ink);
}

.about {
    position: relative;
    padding: 96px 8vw;
    background: var(--bg) ;
}

.about::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--shade);
}

.about-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1040px;
    min-width: 0;
}

.about-content span {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
}

.about-content h2 {
    margin-top: 20px;
    max-width: 16ch;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text);
}

.about-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.about-photo {
    margin: 0;
}

.about-photo img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--accent);
}

.about-content > p,
.about-layout > div > p {
    margin-top: 20px;
    max-width: 46em;
    font-size: 18px;
    line-height: 1.7;
}

.about-layout .about-profile {
    color: var(--accent-text);
    font-size: 15px;
    font-weight: 500;
}

.about-profile {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    color: var(--accent-text);
    font-size: 15px;
    font-weight: 500;
}

.about-profile span + span::before {
    content: "·";
    margin-right: 16px;
}

.about-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 36px;
    list-style: none;
}

.about-points li {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--accent);
}

.about-points li h3,
.about-points li strong {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-text);
    font-size: 18px;
    font-weight: 600;
}

.about-points li p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}

.skill {
    padding: 96px 8vw;
    background: var(--bg);
}

.skill-content {
    width: 100%;
    max-width: 1040px;
    min-width: 0;
}

.skill-content > span {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
}

.skill-content h2 {
    margin-top: 20px;
    max-width: 16ch;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.15;
}

.skill-content > p {
    margin-top: 20px;
    max-width: 40em;
    font-size: 18px;
    line-height: 1.7;
}

.skill-tabs {
    margin-top: 36px;
    min-width: 0;
    max-width: 100%;
}

.skill-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
}

.skill-tablist button {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.skill-tablist button[aria-selected="true"] {
    background: var(--accent);
    color: var(--ink);
}

.skill-tablist button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.skill-panel {
    margin-top: 20px;
    padding: 28px;
    border: 1px solid var(--accent);
}

.skill-panel h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
}

.skill-note {
    margin-top: 8px;
    color: var(--accent-text);
    font-size: 14px;
    font-weight: 500;
}

.skill-panel ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    list-style: none;
}

.skill-panel li {
    max-width: 100%;
    padding: 8px 12px;
    background: var(--accent);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.project {
    padding: 96px 8vw;
    background:
        radial-gradient(680px 320px at 8% 0%, rgba(255, 214, 10, 0.18), transparent 62%),
        radial-gradient(540px 380px at 100% 100%, rgba(255, 255, 255, 0.08), transparent 58%),
        var(--bg);
}

html[data-theme="light"] .project {
    background:
        radial-gradient(680px 320px at 8% 0%, rgba(255, 214, 10, 0.38), transparent 62%),
        radial-gradient(560px 380px at 100% 90%, rgba(176, 196, 220, 0.7), transparent 60%),
        var(--bg);
}

.project-content {
    width: 100%;
    max-width: 1120px;
    min-width: 0;
}

.project-content > span {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
}

.project-content > h2 {
    margin-top: 20px;
    max-width: 12ch;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.15;
}

.project-content > p {
    margin-top: 20px;
    max-width: 42em;
    font-size: 18px;
    line-height: 1.7;
}

.project-content ol {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 36px;
    list-style: none;
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 22px 22px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    background: var(--glass);
    color: var(--glass-body);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: var(--glass-sheen);
}

.project-card > * {
    position: relative;
    z-index: 1;
}

.project-card h3 {
    margin: 0;
    color: var(--glass-title);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.project-meta {
    margin-top: 6px;
    color: var(--glass-muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.project-summary {
    margin-top: 14px;
    color: var(--glass-body);
    font-size: 14px;
    line-height: 1.65;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    margin-bottom: 22px;
    padding: 0;
    list-style: none;
}

.project-tech li {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--glass-chip);
    color: var(--glass-chip-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--glass-line);
    color: var(--glass-muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
}

.project-link svg {
    flex: 0 0 auto;
}

.project-link:hover,
.project-link:focus-visible {
    color: var(--glass-title);
}

.project-link:focus-visible {
    outline: 2px solid var(--glass-title);
    outline-offset: 3px;
}

.project-stack {
    margin-top: 28px;
    padding: 28px;
    border: 1px solid var(--accent);
}

.project-stack h3 {
    font-size: 20px;
    font-weight: 600;
}

.project-stack ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    list-style: none;
}

.project-stack li {
    padding: 8px 12px;
    border: 1px solid var(--accent);
    color: var(--accent-text);
    font-size: 14px;
    font-weight: 500;
}

.experience {
    padding: 96px 8vw 112px;
    background: var(--bg);
}

.experience-content {
    width: 100%;
    max-width: 1040px;
    min-width: 0;
}

.experience-content > span {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
}

.experience-content > h2 {
    margin-top: 20px;
    max-width: 14ch;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.15;
}

.experience-content > p {
    margin-top: 20px;
    max-width: 42em;
    font-size: 18px;
    line-height: 1.7;
}

.experience-list {
    position: relative;
    display: grid;
    gap: 18px;
    margin: 36px 0 0 28px;
    padding: 0;
    list-style: none;
}

.experience-list::before {
    content: "";
    position: absolute;
    top: 28px;
    bottom: 28px;
    left: -22px;
    width: 2px;
    background: var(--glass-line);
}

.experience-item {
    position: relative;
}

.experience-item::before,
.experience-item::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.experience-item::before {
    top: 26px;
    left: -29px;
    width: 16px;
    height: 16px;
    background:
        radial-gradient(circle, var(--glass-title) 0 2.5px, transparent 3px),
        var(--bg);
    box-shadow: 0 0 0 2px var(--glass-title);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.experience-item::after {
    top: 22px;
    left: -33px;
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent);
    opacity: 0;
    transform: scale(0.55);
}

.experience-item:hover::before,
.experience-item:focus-within::before {
    transform: scale(1.12);
    box-shadow:
        0 0 0 2px var(--glass-title),
        0 0 0 7px rgba(255, 214, 10, 0.28);
}

.experience-item:hover::after,
.experience-item:focus-within::after {
    animation: experience-pulse 1.15s ease-out infinite;
}

@keyframes experience-pulse {
    0% {
        opacity: 0.75;
        transform: scale(0.55);
    }

    100% {
        opacity: 0;
        transform: scale(1.55);
    }
}

.experience-card {
    position: relative;
    padding: 22px 22px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    background: var(--glass);
    color: var(--glass-body);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.experience-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: var(--glass-sheen);
}

.experience-card > * {
    position: relative;
    z-index: 1;
}

.experience-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 28px;
}

.experience-card h3 {
    margin: 0;
    color: var(--glass-title);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.experience-company {
    margin-top: 6px;
    color: var(--glass-title);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.experience-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    color: var(--glass-muted);
    font-size: 13px;
    line-height: 1.4;
    text-align: right;
}

.experience-period,
.experience-site {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.experience-site {
    min-height: 24px;
    color: var(--glass-muted);
    font-weight: 500;
    text-decoration: none;
}

.experience-site:hover,
.experience-site:focus-visible {
    color: var(--glass-title);
}

.experience-site:focus-visible {
    outline: 2px solid var(--glass-title);
    outline-offset: 3px;
}

.experience-tasks {
    margin-top: 16px;
    padding-left: 18px;
}

.experience-tasks li {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.65;
}

.experience-tasks li::marker {
    color: var(--glass-muted);
}

.experience-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-line);
    list-style: none;
}

.experience-tags li {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--glass-chip);
    color: var(--glass-chip-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.education,
.expertise {
    padding: 96px 8vw;
    background: var(--bg);
}

.education-content,
.expertise-content {
    width: 100%;
    max-width: 1040px;
    min-width: 0;
}

.education-content > span,
.expertise-content > span {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
}

.education-content h2,
.expertise-content h2 {
    margin-top: 20px;
    max-width: 16ch;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.15;
}

.education-content > p,
.expertise-content > p,
.contact-content > p {
    margin-top: 20px;
    max-width: 42em;
    font-size: 18px;
    line-height: 1.7;
}

.education-content ul,
.expertise-list {
    display: grid;
    gap: 16px;
    margin-top: 36px;
    padding: 0;
    list-style: none;
}

.expertise-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.education-content li,
.expertise-list li {
    padding: 24px;
    border: 1px solid var(--accent);
}

.education-content h3,
.expertise-list h3 {
    font-size: 20px;
    font-weight: 600;
}

.education-content li p,
.expertise-list li p {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.7;
}

.contact {
    padding: 96px 8vw 112px;
    background: var(--bg);
}

.contact-content {
    width: 100%;
    max-width: 1040px;
    min-width: 0;
}

.contact-content > span {
    display: inline-block;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
}

.contact-content h2 {
    margin-top: 20px;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.15;
}

.contact-content ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 36px;
    list-style: none;
}

.contact-content li {
    border: 1px solid var(--accent);
}

.contact-link,
.contact-place {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 96px;
    padding: 24px;
}

.contact-link {
    color: var(--text);
    text-decoration: none;
}

.contact-content strong {
    color: var(--accent-text);
    font-size: 14px;
    font-weight: 600;
}

.contact-link span,
.contact-place p {
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.contact-link:hover,
.contact-link:focus-visible {
    background: var(--accent);
}

.contact-link:hover strong,
.contact-link:hover span,
.contact-link:focus-visible strong,
.contact-link:focus-visible span {
    color: var(--ink);
}

.contact-content a:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 28px 8vw 40px;
    border-top: 1px solid var(--accent);
    background: var(--bg);
}

.site-footer p {
    font-size: 14px;
    line-height: 1.6;
}

.sound-toggle {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: var(--header);
    color: var(--accent);
    box-shadow: var(--glass-shadow);
    cursor: pointer;
}

.sound-toggle svg {
    display: block;
}

.sound-toggle .sound-on {
    display: none;
}

.sound-toggle.is-playing .sound-off {
    display: none;
}

.sound-toggle.is-playing .sound-on {
    display: block;
}

.sound-toggle:hover,
.sound-toggle:focus-visible {
    background: var(--accent);
    color: var(--ink);
}

.sound-toggle:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .site-nav,
    .nav-overlay,
    .nav-toggle-icon,
    .nav-toggle-icon::before,
    .nav-toggle-icon::after,
    .experience-item::before {
        transition: none;
    }

    .experience-item:hover::after,
    .experience-item:focus-within::after,
    .hero-marquee-track {
        animation: none;
    }

    .hero-marquee-track {
        flex-wrap: wrap;
        width: auto;
    }

    .hero-marquee {
        mask-image: none;
    }
}

@media (max-width: 1100px) {
    .project-content ol {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .site-header,
    .hero,
    .about,
    .skill,
    .project,
    .experience,
    .education,
    .expertise,
    .contact,
    .site-footer {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    html {
        scroll-padding-top: 80px;
    }

    body.nav-open {
        overflow: hidden;
    }

    .site-header {
        flex-direction: row;
        align-items: center;
        padding-top: max(12px, env(safe-area-inset-top));
    }

    .nav-toggle {
        position: relative;
        z-index: 42;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid var(--accent);
        background: var(--bg);
        cursor: pointer;
    }

    .nav-toggle:focus-visible {
        outline: 2px solid var(--focus);
        outline-offset: 3px;
    }

    .nav-toggle-icon,
    .nav-toggle-icon::before,
    .nav-toggle-icon::after {
        display: block;
        width: 18px;
        height: 2px;
        background: var(--accent);
        transition: transform 0.35s ease, top 0.35s ease, background 0.35s ease;
    }

    .nav-toggle-icon {
        position: relative;
    }

    .nav-toggle-icon::before,
    .nav-toggle-icon::after {
        content: "";
        position: absolute;
        left: 0;
    }

    .nav-toggle-icon::before {
        top: -6px;
    }

    .nav-toggle-icon::after {
        top: 6px;
    }

    .site-header.is-open .nav-toggle-icon {
        background: transparent;
    }

    .site-header.is-open .nav-toggle-icon::before {
        top: 0;
        transform: rotate(45deg);
    }

    .site-header.is-open .nav-toggle-icon::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .nav-overlay {
        display: block;
        position: fixed;
        z-index: 40;
        inset: 0;
        width: auto;
        height: auto;
        border: 0;
        padding: 0;
        background: rgba(0, 0, 0, 0.72);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    }

    .site-nav {
        position: fixed;
        z-index: 41;
        top: 0;
        left: 0;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 8px;
        width: min(320px, 82vw);
        height: 100%;
        height: 100dvh;
        margin: 0;
        padding: 88px 24px 32px;
        overflow: auto;
        background: var(--bg);
        border-right: 1px solid var(--accent);
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.35s ease, visibility 0s linear 0.35s;
    }

    .site-header.is-open .nav-overlay {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        transition: opacity 0.35s ease;
    }

    .site-header.is-open .site-nav {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.35s ease;
    }

    .hero {
        align-items: flex-start;
        min-height: 70svh;
        padding-top: max(40px, env(safe-area-inset-top));
        padding-bottom: 28px;
    }

    .hero-content,
    .hero-content p {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-highlight {
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .hero-content p,
    .about-content > p,
    .about-layout > div > p,
    .skill-content > p,
    .project-content > p,
    .experience-content > p,
    .expertise-content > p,
    .contact-content > p {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-recruit,
    .btn-contact,
    .btn-resume {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
    }

    .about-profile {
        flex-direction: column;
        gap: 4px;
    }

    .about-profile span + span::before {
        content: none;
    }

    .about {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .about-content,
    .about-content > p,
    .about-layout > div > p {
        max-width: 100%;
    }

    .about-layout {
        grid-template-columns: 1fr;
    }

    .about-photo {
        max-width: 180px;
    }

    .about-points {
        grid-template-columns: 1fr;
    }

    .skill {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .skill-content,
    .skill-content > p {
        max-width: 100%;
    }

    .skill-tablist {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .skill-tablist button {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .skill-panel {
        padding: 20px;
    }

    .project {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .project-content,
    .project-content > p {
        max-width: 100%;
    }

    .project-content ol,
    .expertise-list {
        grid-template-columns: 1fr;
    }

    .project-stack {
        padding: 20px;
    }

    .experience {
        padding-top: 64px;
        padding-bottom: 80px;
    }

    .experience-content,
    .experience-content > p {
        max-width: 100%;
    }

    .experience-list {
        margin-left: 22px;
    }

    .experience-top {
        flex-direction: column;
    }

    .experience-meta,
    .experience-period,
    .experience-site {
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
    }

    .education,
    .expertise {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .contact {
        padding-top: 64px;
        padding-bottom: 80px;
    }

    .contact-content ul {
        grid-template-columns: 1fr;
    }
}
