:root {
  color-scheme: dark;
  --page: #020617;
  --paper: rgba(30, 41, 59, 0.4);
  --ink: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.1);
  --soft-line: rgba(255, 255, 255, 0.05);
  --blue: #38bdf8;
  --green: #22c55e;
  --gold: #facc15;
  --coral: #ff5f6d;
  --teal: #21c9bd;
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --soft-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.2);
  --mesh-1: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.12), transparent 45%);
  --mesh-2: radial-gradient(circle at 80% 10%, rgba(99, 102, 241, 0.14), transparent 40%);
  --mesh-3: radial-gradient(circle, rgba(34, 197, 94, 0.1), transparent 70%);
  --max: 1180px;
}

html.light {
  color-scheme: light;
  --page: #f8f8f4;
  --paper: rgba(255, 255, 255, 0.72);
  --ink: #15151b;
  --muted: #6e6f76;
  --line: rgba(225, 226, 221, 0.7);
  --soft-line: rgba(238, 238, 234, 0.7);
  --shadow: 0 18px 42px rgba(21, 21, 27, 0.09);
  --soft-shadow: 0 12px 28px rgba(21, 21, 27, 0.07);
  --mesh-1: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.08), transparent 45%);
  --mesh-2: radial-gradient(circle at 80% 10%, rgba(99, 102, 241, 0.08), transparent 40%);
  --mesh-3: radial-gradient(circle, rgba(34, 197, 94, 0.08), transparent 70%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--page);
  background-image: var(--mesh-1), var(--mesh-2), var(--mesh-3);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--ink) 3.5%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 65%);
  pointer-events: none;
}

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

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 74px;
  margin: 0;
  padding: 12px max(16px, calc((100vw - var(--max)) / 2));
  background: color-mix(in srgb, var(--page) 70%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  object-fit: contain;
  transition: filter 0.3s ease;
}

:root:not(.light) .brand img {
  filter: invert(1);
}

.brand span {
  display: grid;
  min-width: 0;
}

.brand strong {
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small,
.feature-meta,
.panel-toolbar,
.hero-card small,
.portrait figcaption {
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hamburger {
  display: none;
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  gap: 8px;
}

.nav-links a,
.contact-actions a,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.92rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}

.theme-toggle {
  padding: 0;
  width: 40px;
}

.nav-links a:hover,
.contact-actions a:hover,
.theme-toggle:hover,
.nav-links a:focus-visible,
.contact-actions a:focus-visible,
.theme-toggle:focus-visible {
  border-color: var(--ink);
  transform: translateY(-1px);
  outline: none;
}

#top {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 5vh 0 6vh;
  text-align: center;
}

.script-note,
.map-label {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 1.06rem;
  font-weight: 700;
}

.hero h1 {
  max-width: 820px;
  margin: 4px auto 8px;
  font-size: 4.7rem;
  line-height: 0.96;
  text-wrap: balance;
}



.hero-subtitle {
  max-width: 720px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-map {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 420px) minmax(180px, 1fr);
  grid-template-rows: auto auto auto;
  gap: 16px 58px;
  align-items: center;
  padding-top: 3vh;
}

.map-label {
  font-size: 0.96rem;
  align-self: end;
  padding-bottom: 8px;
  margin: 0;
  color: var(--ink);
  font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  font-weight: 700;
}

.map-label-left {
  grid-column: 1;
  grid-row: 1;
  margin-left: auto;
  width: 100%;
  max-width: 190px;
  text-align: left;
}

.map-label-right {
  grid-column: 3;
  grid-row: 1;
  margin-right: auto;
  width: 100%;
  max-width: 190px;
  text-align: right;
}

.hero-card,
.feature-card,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 36px;
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 1;
  width: 100%;
  max-width: 190px;
  padding: 20px;
  text-align: left;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.hero-card:hover,
.hero-card:focus-visible {
  border-color: color-mix(in srgb, var(--ink) 40%, var(--line));
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  outline: none;
}

.hero-card-social,
.hero-card-design {
  grid-column: 1;
  margin-left: auto;
}

.hero-card-work,
.hero-card-contact {
  grid-column: 3;
  margin-right: auto;
}

.hero-card-social,
.hero-card-work {
  grid-row: 2;
}

.hero-card-design,
.hero-card-contact {
  grid-row: 3;
}

.hero-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.hero-card small {
  display: block;
  line-height: 1.35;
  font-size: 0.78rem;
}

.card-mark,
.card-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.card-mark {
  width: 44px;
  height: 44px;
  color: #fff;
}

.card-mark-blue {
  background: var(--blue);
}

.card-mark-green {
  background: var(--green);
}

.card-mark-gold {
  background: var(--gold);
}

.card-mark-coral {
  background: var(--coral);
}

.card-arrow {
  width: 28px;
  height: 28px;
  background: var(--page);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

.portrait {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 3;
  margin: 0;
  padding: 18px 18px 0;
}

.portrait img {
  width: min(100%, 360px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.portrait figcaption {
  margin-top: 16px;
  font-size: 0.94rem;
}

.intro-band,
.contact-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(280px, 1.15fr);
  gap: 42px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 72px max(24px, calc((100vw - var(--max)) / 2));
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--page) 60%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.intro-band h2,
.contact-band h2,
.section-head h2 {
  margin: 0;
  font-size: 2.28rem;
  line-height: 1.08;
  text-wrap: balance;
}

.intro-band p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.skill-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: min(100% - 32px, var(--max));
  margin: 36px auto 0;
  gap: 10px;
}

.skill-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.section {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 82px 0 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 1.1fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -28px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: start;
  min-height: 258px;
  padding: 22px;
}

.feature-card img {
  width: 72px;
  height: 72px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--paper);
  object-fit: contain;
}

.feature-card h3,
.detail-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  margin-bottom: 12px;
  background: transparent;
}

.detail-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.22;
}

.feature-card p,
.detail-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.feature-meta {
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 800;
}

.modal {
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  max-width: 90%;
  width: 520px;
}

.modal::backdrop {
  background: rgba(10, 15, 25, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.modal-content {
  background: var(--page);
  color: var(--ink);
  border-radius: 20px;
  border: 2px solid var(--ink);
  box-shadow: 12px 12px 0px rgba(10, 15, 25, 0.9);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

:root:not(.light) .modal-content {
  box-shadow: 12px 12px 0px rgba(0, 0, 0, 0.6);
  border-color: var(--line);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 1.4rem;
  margin: 0 0 4px;
}

.modal-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.modal-close {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--line);
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.modal-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.modal-tab:hover {
  color: var(--ink);
  background: var(--line);
}

.modal-tab.is-active {
  color: var(--ink);
  background: var(--line);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
}

.modal-list-item,
.detail-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.2s ease;
  background: var(--page);
  flex-shrink: 0;
}

.modal-list-item:hover,
.detail-card:hover {
  background: var(--line);
  transform: translateY(-2px);
}

.modal-item-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.modal-item-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.modal-item-text span {
  font-size: 0.85rem;
  color: var(--muted);
}

.modal-item-arrow {
  color: var(--muted);
  font-weight: bold;
  display: flex;
  align-items: center;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.detail-tags span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 26px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  font-weight: 800;
}

@media (max-width: 1040px) {
  .hero-map {
    grid-template-columns: 1fr 1fr;
    max-width: 760px;
    margin-inline: auto;
  }

  .portrait {
    grid-column: 1 / -1;
    grid-row: 1;
    order: -1;
  }

  .hero-card-social,
  .hero-card-design,
  .hero-card-work,
  .hero-card-contact {
    grid-column: auto;
    grid-row: auto;
  }

  .map-label {
    position: static;
    grid-column: 1 / -1;
    text-align: left;
  }

  .map-label-right {
    margin-top: 8px;
  }

  .feature-grid,
  .panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card {
    min-height: 220px;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: center;
  }

  .brand strong {
    max-width: 172px;
  }

  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    width: 100%;
    background: var(--page);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    gap: 8px;
  }
  
  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.86rem;
    width: 100%;
  }

  .hero {
    width: min(100% - 28px, var(--max));
    padding-top: 36px;
  }

  .hero h1 {
    font-size: 3rem;
  }



  .portrait figcaption {
    font-size: 0.88rem;
  }
  
  .modal-content {
    padding: 16px;
  }
  
  .modal-header h2 {
    font-size: 1.25rem;
  }

  .modal-list-item,
  .detail-card {
    padding: 12px;
    gap: 12px;
  }

  .modal-item-arrow {
    display: none;
  }

  .modal-item-text p {
    font-size: 0.82rem !important;
  }

  .hero-subtitle {
    font-size: 0.98rem;
  }

  .hero-map {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 38px;
    width: min(100% - 28px, var(--max));
    margin-inline: auto;
    padding-top: 0;
  }

  .hero {
    padding: 32px 0;
  }

  .skill-strip {
    margin-top: 16px;
  }

  .portrait {
    grid-column: 1 / -1;
    grid-row: auto;
    padding: 0 14px;
    order: 0;
  }

  .map-label-left,
  .map-label-right {
    grid-column: 1 / -1;
    grid-row: auto;
    text-align: left;
    margin: 0;
    max-width: 100%;
  }

  .map-label-left {
    order: 1;
  }

  .hero-card-social {
    order: 2;
    margin-left: 0;
  }

  .hero-card-design {
    order: 3;
    margin-left: 0;
  }

  .map-label-right {
    order: 4;
  }

  .hero-card-work {
    order: 5;
    margin-right: 0;
  }

  .hero-card-contact {
    order: 6;
    margin-right: 0;
  }

  .portrait img {
    width: min(100%, 274px);
  }

  .hero-card {
    grid-column: auto;
    grid-row: auto;
    max-width: 100%;
    padding: 16px;
    gap: 12px;
  }

  .card-mark {
    width: 46px;
    height: 46px;
  }

  .intro-band,
  .contact-band,
  .section-head {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .intro-band,
  .contact-band {
    padding: 56px 20px;
  }

  .intro-band h2,
  .contact-band h2,
  .section-head h2 {
    font-size: 2rem;
  }

  .section-head .eyebrow {
    grid-column: auto;
    margin-bottom: -10px;
  }

  .feature-grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .section {
    width: min(100% - 28px, var(--max));
    padding-top: 62px;
  }

  .feature-card {
    grid-template-columns: 58px 1fr;
    min-height: 0;
    padding: 18px;
  }

  .feature-card img {
    width: 58px;
    height: 58px;
  }

  .detail-card,
  .detail-card.compact {
    min-height: 0;
  }

  .contact-actions {
    justify-content: flex-start;
  }

  .site-footer {
    width: min(100% - 28px, var(--max));
  }
}

@media (max-width: 430px) {
  .brand {
    gap: 8px;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand strong {
    max-width: 136px;
    font-size: 0.88rem;
  }

  .brand small {
    font-size: 0.76rem;
  }

  .hero h1 {
    font-size: 2.55rem;
  }



  .hero-card strong,
  .feature-card h3,
  .detail-card h3 {
    overflow-wrap: anywhere;
  }

  .skill-strip {
    justify-content: center;
    width: min(100% - 28px, var(--max));
  }
}
