/* ---------- Variables & base ---------- */

:root {
    --bg: #1f242d;
    --bg-alt: #252b35;
    --card: #292e38;
    --card-hover: #333a46;
    --card-line: rgba(255, 255, 255, 0.07);
    --accent: #c9fb24;
    --text: #ffffff;
    --text-muted: #cfcfcf;
    --nav-height: 80px;
    --radius: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Poppins', 'Noto Sans JP', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--text);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

section {
    padding: 110px 9% 90px;
}

section:nth-of-type(even) {
    background: var(--bg-alt);
}

.heading {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
}

.heading span {
    color: var(--accent);
}

/* Small Japanese label under each English section title, framed by short lines */
.heading-ja {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: -10px 0 36px;
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 3px;
}

.heading-ja::before,
.heading-ja::after {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--accent);
    opacity: 0.6;
}

.sub-heading {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin: 50px 0 25px;
}

.section-lead {
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
    text-align: center;
    line-height: 1.9;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    border: 2px solid var(--accent);
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.btn-primary {
    background: var(--accent);
    color: #111;
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    transform: translateY(-3px);
}

.btn-outline {
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #111;
    transform: translateY(-3px);
}

/* ---------- Navbar ---------- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    padding: 0 9%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(31, 36, 45, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
    background: rgba(31, 36, 45, 0.92);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.navbar .logo {
    display: inline-flex;
    font-size: 30px;
    font-weight: 800;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar .logo span {
    display: inline-block;
    min-width: 0.62em;
    text-align: center;
}

.navbar .logo span.scrambling {
    color: var(--accent);
}

.navbar .logo:hover {
    color: var(--accent);
    transform: scale(1.05);
}

.navbar ul {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
}

.navbar ul a {
    position: relative;
    font-size: 16px;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.navbar ul a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.navbar ul a:hover,
.navbar ul a.active {
    color: var(--accent);
}

.navbar ul a:hover::after,
.navbar ul a.active::after {
    width: 100%;
}

.navbar nav {
    margin-left: auto;
}

/* JA / EN language switch: one button showing the language you can switch to */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 32px;
    padding: 3px 3px 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--card-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--accent);
    font: inherit;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.lang-switch i {
    font-size: 14px;
    transition: transform 0.4s ease;
}

.lang-switch span {
    padding: 4px 12px;
    border-radius: 16px;
    background: var(--accent);
    color: #111;
    font-size: 13px;
    font-weight: 700;
}

.lang-switch:hover {
    border-color: var(--accent);
}

.lang-switch:hover i {
    transform: rotate(180deg);
}

/* The Japanese section labels are not needed on the English version */
html[lang="en"] .heading-ja {
    display: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 26px;
    cursor: pointer;
}

/* ---------- Home ---------- */

.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    min-height: 100vh;
    min-height: 100svh; /* phones: the visible screen, not counting the browser bars */
    padding-top: calc(var(--nav-height) + 30px);
    background:
        radial-gradient(circle at 75% 45%, rgba(201, 251, 36, 0.09), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(201, 251, 36, 0.04), transparent 40%),
        var(--bg);
}

/* Thin outline so cards stay visible on the lighter section background */
.about-card,
.project-box,
.skill-group,
.language-skill-box {
    outline: 1px solid var(--card-line);
    outline-offset: -1px;
}

.home-info {
    flex: 1;
}

.home-info .greeting {
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 6px;
}

.home-info h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

/* Romanized name under the katakana (katakana in English mode) */
.home-info .name-alt {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Job-hunting status badge */
.availability {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(201, 251, 36, 0.4);
    border-radius: 999px;
    background: rgba(201, 251, 36, 0.08);
    font-size: 14px;
    font-weight: 500;
}

.availability .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(201, 251, 36, 0.6);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    70% { box-shadow: 0 0 0 8px rgba(201, 251, 36, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 251, 36, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .availability .dot { animation: none; }
}

/* JLPT / languages chips */
.highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.highlights li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--card-line);
    font-size: 14px;
}

.highlights i {
    color: var(--accent);
}

.home-info h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

.home-info .intro {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-muted);
    max-width: 520px;
    margin-bottom: 30px;
}

.home-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.home-social {
    display: flex;
    gap: 14px;
    margin-top: 26px;
}

.home-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 18px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.home-social a:hover {
    background: var(--accent);
    color: #111;
    transform: translateY(-3px);
}

.home-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.img-box {
    position: relative;
    width: 100%;
    max-width: 350px;
    aspect-ratio: 7 / 9;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--accent);
    box-shadow: 0 0 0 10px rgba(201, 251, 36, 0.08), 0 20px 50px rgba(0, 0, 0, 0.5);
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.img-box:hover img {
    transform: scale(1.04);
}

/* ---------- About ---------- */

/* Timeline */

.timeline {
    list-style: none;
    position: relative;
    max-width: 760px;
    margin: 0 auto 60px;
    padding-left: 34px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(var(--accent), rgba(201, 251, 36, 0.15));
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(201, 251, 36, 0.18);
}

.timeline-item.future::before {
    background: var(--bg-alt);
    border: 2px solid var(--accent);
}

.timeline-date {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.timeline-item h4 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-item h4 small {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 6px;
}

.timeline-item p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

/* Horizontal cards: icon tile on the left, text on the right */
.about-grid {
    display: grid;
    gap: 22px;
    max-width: 1000px;
    margin: 0 auto;
}

.about-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 28px;
    align-items: start;
    background: var(--card);
    border-radius: var(--radius);
    padding: 30px 34px;
    border-left: 3px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.about-card:hover {
    transform: translateX(6px);
    border-color: var(--accent);
    background: var(--card-hover);
}

.about-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(201, 251, 36, 0.1);
    border: 1px solid rgba(201, 251, 36, 0.25);
    transition: background 0.3s ease;
}

.about-icon i {
    font-size: 26px;
    color: var(--accent);
    transition: color 0.3s ease;
}

.about-card:hover .about-icon {
    background: var(--accent);
}

.about-card:hover .about-icon i {
    color: var(--bg);
}

.about-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.about-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.9;
}

.about-body h4 {
    font-size: 16px;
    margin-top: 20px;
}

.about-body h3 + h4 {
    margin-top: 0;
}

.about-body h4 + p {
    margin-top: 6px;
}

.hobby-more strong {
    color: var(--text);
}

.motto {
    max-width: 800px;
    margin: 50px auto 0;
    padding: 30px 35px;
    border-left: 4px solid var(--accent);
    background: var(--card);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.motto i {
    color: var(--accent);
    font-size: 22px;
    margin-bottom: 10px;
}

.motto p {
    color: var(--text);
    font-size: 16px;
    line-height: 1.9;
}

/* ---------- Projects ---------- */

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 20px auto 0;
}

.project-box {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.project-cover {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2f3642, #1b1f27);
}

.project-cover i {
    font-size: 56px;
    color: var(--accent);
    transition: transform 0.3s ease;
}

.project-box:hover .project-cover i {
    transform: scale(1.12);
}

.project-info {
    padding: 22px;
}

.project-status {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

/* Two badges side by side (e.g. "Web app live" + "iOS app coming soon") */
.project-status + .project-status {
    margin-left: 4px;
}

.project-status i {
    margin-right: 3px;
}

.project-status.done {
    background: rgba(201, 251, 36, 0.15);
    color: var(--accent);
}

.project-info h3 {
    font-size: 19px;
    margin-bottom: 8px;
}

.project-info p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tags span {
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid #4a5160;
    color: var(--text-muted);
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 20px;
    border: 2px solid var(--accent);
    color: var(--accent);
    transition: background 0.3s ease, color 0.3s ease;
}

.project-links a:hover {
    background: var(--accent);
    color: #111;
}

/* "詳しく見る" expandable story on a project card */

.project-more {
    margin-top: 16px;
}

.project-more summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    list-style: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.project-more summary::-webkit-details-marker {
    display: none;
}

.project-more summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.project-more summary i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.project-more[open] summary i {
    transform: rotate(180deg);
}

.project-more .more-close,
.project-more[open] .more-open {
    display: none;
}

.project-more[open] .more-close {
    display: inline;
}

.project-more p {
    margin-top: 12px;
}

/* Full-width project card: icon on the left, text on the right */

.project-box.wide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 220px 1fr;
}

.project-box.wide .project-cover {
    height: auto;
    min-height: 160px;
}

/* Featured project with screenshots */

.project-box.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 2fr;
    align-items: center;
    gap: 10px;
}

.project-box.featured:hover {
    transform: none;
}

.project-box.featured .project-info {
    padding: 30px;
}

/* Featured project with a lot of text: intro + screenshots on top,
   features / story / links in a full-width row underneath */
.project-box.featured.split {
    grid-template-columns: minmax(300px, 1fr) 1.6fr;
}

.project-details {
    grid-column: 1 / -1;
    margin: 0 30px;
    padding: 24px 0 30px;
    border-top: 1px solid var(--card-line);
}

/* "My role" block at the top of the details row */
.project-role {
    margin-bottom: 22px;
    padding: 16px 20px;
    border-left: 3px solid var(--accent);
    border-radius: 0 10px 10px 0;
    background: rgba(201, 251, 36, 0.06);
}

.project-role h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 15px;
    color: var(--accent);
}

.project-role p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-muted);
}

.project-details .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 36px;
    margin-top: 0;
}

.project-details .project-more {
    margin-top: 20px;
}

.project-details .project-more p {
    max-width: 760px;
}

/* "How it works" system diagram (Kanezo) */
.arch {
    margin-top: 14px;
    padding: 6px 20px 20px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid var(--card-line);
}

.project-more .arch-title {
    margin: 16px 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

/* 4 equal boxes with arrows between; row 2 is the arrow up into the server,
   row 3 the receipt box centred under it (columns 3–7) */
.arch-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.arch-up {
    grid-column: 5;
    padding: 4px 0;
}

.arch-sources {
    grid-column: 3 / 8;
    padding: 4px 14px 14px;
    border-radius: 10px;
    border: 1px dashed rgba(201, 251, 36, 0.4);
}

.arch-sources .arch-title {
    margin-top: 10px;
}

.arch-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.arch-chip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--card);
    border: 1px solid var(--card-line);
}

.arch-chip > i {
    margin-top: 3px;
    color: var(--accent);
}

.arch-chip strong {
    display: block;
    font-size: 14px;
}

.arch-chip span {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
}

.arch-node {
    min-width: 0;
    padding: 12px 10px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--card-line);
    text-align: center;
}

.arch-node.core {
    border-color: rgba(201, 251, 36, 0.5);
    background: rgba(201, 251, 36, 0.07);
}

.arch-node i {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
    color: var(--accent);
}

.arch-node strong {
    display: block;
    font-size: 14px;
    color: var(--text);
}

.arch-node span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.arch-arrow {
    flex: 0 0 auto;
    max-width: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--accent);
    text-align: center;
}

.arch-arrow span {
    font-size: 11px;
    line-height: 1.3;
    color: var(--text-muted);
}

.project-more .arch-note {
    margin-top: 16px;
    font-size: 13px;
}

.project-info h3 small {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

.feature-list {
    list-style: none;
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.feature-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.feature-list i {
    color: var(--accent);
    width: 16px;
    flex-shrink: 0;
}

.screenshots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 30px 30px 30px 0;
}

.screenshots figure {
    text-align: center;
}

.shot {
    display: block;
    width: 100%;
    padding: 0;
    border: 2px solid #3a414e;
    border-radius: 16px;
    overflow: hidden;
    background: #f1eee4;
    cursor: zoom-in;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.shot:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.shot img {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 8;
    object-fit: cover;
    object-position: top;
}

/* Artwork thumbnails: centered crop instead of a phone-screen crop */
.screenshots.works .shot {
    background: #fff;
}

.screenshots.works .shot img {
    aspect-ratio: 4 / 5;
    object-position: center;
}

.screenshots figcaption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
}

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: rgba(10, 12, 16, 0.92);
}

.lightbox[hidden] {
    display: none;
}

.lightbox figure {
    text-align: center;
}

.lightbox img {
    max-height: 82vh;
    max-width: min(90vw, 480px);
    border-radius: 16px;
    margin: 0 auto;
}

.lightbox figcaption {
    margin-top: 12px;
    color: var(--text-muted);
}

.lightbox button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.lightbox button:hover {
    background: var(--accent);
    color: #111;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Demo video: vertical (YouTube Shorts) player */
.video-frame {
    height: min(82vh, 160vw);
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Skills ---------- */

/* Skill cards grouped by category */
/* Flex so an incomplete last row stays centered */
.skill-groups {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-group {
    flex: 0 1 calc((100% - 44px) / 3);
    background: var(--card);
    border-radius: var(--radius);
    padding: 26px;
    border-top: 3px solid transparent;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.skill-group:hover {
    transform: translateY(-6px);
    background: var(--card-hover);
    border-color: var(--accent);
}

.skill-group h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--card-line);
}

.skill-group h4 i {
    color: var(--accent);
}

.skill-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.skill-list li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 500;
}

.skill-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(201, 251, 36, 0.1);
    color: var(--accent);
    font-size: 22px;
}

.skill-icon svg {
    width: 26px;
    height: 26px;
}

.language-skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.language-skill-box {
    background: var(--card);
    width: 170px;
    padding: 25px 15px;
    border-radius: var(--radius);
    text-align: center;
    border-bottom: 3px solid transparent;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.language-skill-box:hover {
    transform: translateY(-8px);
    background: var(--card-hover);
    border-color: var(--accent);
}

.lang-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(201, 251, 36, 0.12);
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 12px;
}

.lang-name {
    font-weight: 500;
    margin-bottom: 8px;
}

.lang-level {
    display: inline-block;
    font-size: 13px;
    padding: 2px 12px;
    border-radius: 20px;
    background: var(--accent);
    color: #111;
    font-weight: 600;
}

/* ---------- Contact ---------- */

.contact-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 50px 44px 36px;
    text-align: center;
    border-radius: 22px;
    border: 1px solid var(--card-line);
    background:
        radial-gradient(circle at 50% 0%, rgba(201, 251, 36, 0.12), transparent 60%),
        var(--card);
}

.contact-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(201, 251, 36, 0.1);
    border: 1px solid rgba(201, 251, 36, 0.25);
    color: var(--accent);
    font-size: 28px;
}

.contact-card h3 {
    font-size: 26px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.contact-card > p {
    color: var(--text-muted);
    line-height: 1.9;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.contact-actions .btn i {
    margin-right: 6px;
}

.email-copy {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px 20px;
    border-radius: 30px;
    background: var(--bg);
    border: 1px solid var(--card-line);
    font-size: 15px;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(201, 251, 36, 0.12);
    color: var(--accent);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.copy-btn:hover,
.copy-btn.copied {
    background: var(--accent);
    color: #111;
}

.contact-card .copy-status {
    min-height: 24px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--accent);
}

.contact-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px 28px;
    margin-top: 20px;
    padding-top: 26px;
    border-top: 1px solid var(--card-line);
}

.contact-social {
    display: flex;
    gap: 12px;
}

.contact-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 18px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.contact-social a:hover {
    background: var(--accent);
    color: #111;
    transform: translateY(-3px);
}

.contact-location {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 14px;
}

.contact-location i {
    color: var(--accent);
}

/* ---------- Footer ---------- */

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 20px;
    padding: 22px 9%;
    background: #181c23;
    color: var(--text-muted);
    font-size: 14px;
}

.footer .updated {
    font-size: 13px;
    opacity: 0.7;
}

.back-to-top {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent);
    color: #111;
    transition: transform 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-4px);
}

/* Touchscreens: a tap triggers :hover and the card stays lifted, so skip the movement there */
@media (hover: none) {
    .about-card:hover,
    .project-box:hover,
    .skill-group:hover,
    .language-skill-box:hover,
    .shot:hover,
    .btn:hover,
    .home-social a:hover,
    .contact-social a:hover,
    .back-to-top:hover {
        transform: none;
    }
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .navbar,
    section,
    .footer {
        padding-left: 5%;
        padding-right: 5%;
    }

    .home-info h1 {
        font-size: 42px;
    }

    .project-box.featured,
    .project-box.featured.split,
    .project-box.wide {
        grid-template-columns: 1fr;
    }

    .project-box.wide .project-cover {
        height: 160px;
    }

    .screenshots {
        padding: 0 30px 30px;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
    }

    /* Phones: language switch sits just left of the menu button */
    .navbar nav {
        margin-left: 0;
    }

    .lang-switch {
        order: 1;
        margin-left: auto;
    }

    .menu-toggle {
        display: block;
        order: 2;
        margin-left: 14px;
    }

    .navbar ul {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 10px 5% 20px;
        background: rgba(31, 36, 45, 0.97);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    }

    .navbar ul.open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .navbar ul li {
        width: 100%;
    }

    .navbar ul a {
        display: block;
        padding: 14px 0;
        font-size: 17px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .navbar ul a::after {
        display: none;
    }

    section {
        padding-top: 90px;
        padding-bottom: 70px;
    }

    .home {
        flex-direction: column-reverse;
        justify-content: center;
        text-align: center;
        gap: 40px;
        padding-top: calc(var(--nav-height) + 40px);
    }

    .home-info .intro {
        margin-left: auto;
        margin-right: auto;
    }

    .home-buttons,
    .home-social,
    .highlights {
        justify-content: center;
    }

    .img-box {
        max-width: 260px;
    }

    .heading {
        font-size: 30px;
    }

    .skill-groups {
        max-width: 480px;
    }

    .skill-group {
        flex-basis: 100%;
    }

    .about-card {
        grid-template-columns: 52px 1fr;
        gap: 20px;
        padding: 26px;
    }

    .about-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .about-icon i {
        font-size: 22px;
    }

    .motto {
        padding: 24px;
    }

    .screenshots {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 0 22px 22px;
    }

    .screenshots figure {
        flex: 0 0 42%;
        scroll-snap-align: start;
    }

    .project-details .feature-list {
        grid-template-columns: 1fr;
    }

    /* Phones: the diagram runs top to bottom */
    .arch-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .arch-chips {
        grid-template-columns: 1fr;
    }

    /* the "up" arrow sits under the database here, so its label names the server */
    .arch-arrow.arch-up i {
        transform: none;
    }

    .arch-arrow {
        max-width: none;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
    }

    .arch-arrow i {
        transform: rotate(90deg);
    }

    .lightbox {
        gap: 8px;
        padding: 10px;
    }

    .lightbox-nav {
        position: absolute;
        bottom: 20px;
    }

    .lightbox-nav.prev {
        left: calc(50% - 60px);
    }

    .lightbox-nav.next {
        right: calc(50% - 60px);
    }

    .lightbox img {
        max-height: 72vh;
    }
}

@media (max-width: 480px) {
    .navbar .logo {
        font-size: 24px;
    }

    .home-info h1 {
        font-size: 34px;
    }

    .home-info h2 {
        font-size: 18px;
    }

    .heading {
        font-size: 26px;
    }

    /* Phones: icon tile sits above the text */
    .about-card {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 22px;
    }

    .language-skill-box {
        width: calc(50% - 13px);
    }

    .contact-card {
        padding: 36px 20px 28px;
    }

    .contact-card h3 {
        font-size: 20px;
    }

    .contact-actions .btn {
        width: 100%;
    }

    .email-copy {
        font-size: 14px;
    }

    .footer {
        flex-direction: column;
        text-align: center;
    }
}

/* Inline link inside a project description (e.g. kanezo.app) */
.project-info p a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
