:root {
  color-scheme: dark;
  --navy: #0a1628;
  --navy-soft: #10223b;
  --teal: #4fd1c5;
  --teal-soft: rgba(79, 209, 197, 0.18);
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.68);
  --quiet: rgba(255, 255, 255, 0.1);
  --panel: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.12);
  font-family: Inter, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--navy);
  color: var(--white);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(10, 22, 40, 0.82) 0%, rgba(10, 22, 40, 0.9) 48%, rgba(6, 16, 28, 0.96) 100%),
    url("seabed.png") center top / cover fixed no-repeat,
    #0a1628;
  color: var(--white);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at 70% 14%, rgba(79, 209, 197, 0.12), transparent 28rem);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
}

.brand,
.header-actions,
.nav-links,
.lang-switcher {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(79, 209, 197, 0.56);
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.header-actions {
  gap: 24px;
}

.lang-switcher {
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.lang-button {
  min-width: 38px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease;
}

.lang-button:hover,
.lang-button[aria-pressed="true"] {
  background: rgba(79, 209, 197, 0.16);
  color: var(--white);
}

.nav-links a,
.footer-links a {
  transition: color 180ms ease, opacity 180ms ease;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--teal);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: clamp(38px, 5vw, 70px);
  align-items: center;
  min-height: calc(100svh - 240px);
  padding: 42px 0 92px;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(4rem, 7vw, 6rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.tagline {
  max-width: 470px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  line-height: 1.55;
}

.hero-art {
  justify-self: center;
  width: min(100%, 540px);
  margin: 0;
}

.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 28px 92px rgba(0, 0, 0, 0.26);
}

.section {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(28px, 6vw, 84px);
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.section-body {
  max-width: 760px;
}

#projects .section-body {
  max-width: 880px;
}

.about-section {
  grid-template-columns: 140px minmax(0, 1fr);
  padding: 56px 0 64px;
}

.about-section .section-body {
  max-width: 640px;
}

.about-section h2 {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.25;
}

.about-section .section-body > p {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.96rem;
  line-height: 1.75;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.section-body > p {
  max-width: 660px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.03rem, 2vw, 1.22rem);
  line-height: 1.75;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  min-height: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.project-copy h3 {
  margin-bottom: 10px;
  font-size: 1.35rem;
}

.project-copy p {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.65;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(79, 209, 197, 0.54);
  border-radius: 999px;
  background: rgba(79, 209, 197, 0.1);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 700;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button-link:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
  transform: translateY(-1px);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 42px 0 80px;
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.site-footer p {
  margin-bottom: 0;
}

body .floatingchat-container-wrap,
body .floatingchat-container-wrap-mobi {
  right: 16px !important;
  left: auto !important;
  width: 195px !important;
  max-width: 195px !important;
}

body .floating-chat-kofi-popup-iframe,
body .floating-chat-kofi-popup-iframe-mobi {
  right: 16px !important;
  left: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 820px) {
  .site-shell {
    width: min(100% - 28px, 680px);
  }

  .site-header {
    min-height: 72px;
  }

  .nav-links {
    gap: 14px;
    font-size: 0.82rem;
  }

  .header-actions {
    gap: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 44px 0 132px;
  }

  .hero-art {
    width: min(100%, 482px);
  }

  .section {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 72px 0;
  }

  .section-label {
    font-size: 0.68rem;
  }

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

}

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 24px, 440px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 20px 0 10px;
  }

  .header-actions,
  .nav-links {
    width: 100%;
  }

  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-links {
    justify-content: space-between;
  }

  .lang-switcher {
    align-self: flex-start;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 3.9rem);
  }

  .tagline {
    font-size: 1.05rem;
  }

  .hero {
    padding-bottom: 180px;
  }

  .project-card {
    padding: 18px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
