:root {
  --ink-900: #1d1a17;
  --ink-700: #4d4742;
  --muted: #6f6861;
  --paper-200: #efe4d6;
  --card-border: #e4d5c4;
  --accent-500: #c77b3b;
  --accent-700: #a15f2b;
  --teal-500: #2b7a78;
  --teal-700: #205d5c;
  --white: #ffffff;
  --shadow-soft: 0 12px 28px rgba(45, 37, 30, 0.08);
  --shadow-strong: 0 16px 30px rgba(45, 37, 30, 0.14);
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 22px;
  --nav-h: 60px;
  --shell-max: 1120px;
  --shell-narrow: 920px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: #e3ddd2;
  line-height: 1.5;
}

img {
  max-width: 100%;
}

.site-shell {
  width: min(100% - 2rem, var(--shell-max));
  margin-inline: auto;
}

.narrow-shell {
  width: min(100% - 2rem, var(--shell-narrow));
}

.center-content {
  text-align: center;
}

.section {
  padding: 4rem 0;
  background: #e3ddd2;
}

.section-title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.7rem, 1.15rem + 1.35vw, 2.15rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.section-title-light {
  color: var(--white);
}

.section-intro {
  margin: 1rem auto 0;
  color: rgba(255, 255, 255, 0.92);
  max-width: 36ch;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: linear-gradient(120deg, #1f1a16, #2f2924);
  transition: height 180ms ease, background-color 180ms ease;
}

.site-header.navbar-shrink {
  height: 52px;
  background: linear-gradient(120deg, #1a1511, #26211d);
}

.site-title {
  margin: 0;
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
}

/* Hero */
.hero {
  margin-top: var(--nav-h);
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, #25201c 0%, #3a3027 45%, var(--teal-700) 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0.22;
}

.hero::before {
  width: 440px;
  height: 440px;
  top: -170px;
  right: -130px;
  background: var(--accent-500);
}

.hero::after {
  width: 320px;
  height: 320px;
  bottom: -150px;
  left: -110px;
  background: var(--teal-500);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 410px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 3.2rem 0;
}

.hero-avatar {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.hero-name {
  margin: 0.5rem 0 0.2rem;
  color: var(--white);
  font-size: clamp(2.35rem, 3.6vw, 3.15rem);
  font-weight: 700;
}

.hero-subtitle {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
}

.hero-strong {
  font-weight: 700;
  color: var(--white);
}

.hero-dot {
  color: #d2b48c;
  font-size: 0.62em;
}

/* Feature card */
.feature-card {
  margin: 2rem auto 0;
  background: #f7f5f2;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.55rem 1.4rem;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.feature-title {
  margin: 0.2rem 0 0.75rem;
  font-size: 1.8rem;
}

.feature-card p {
  margin: 0.65rem auto;
  max-width: 74ch;
  font-size: 1rem;
  color: var(--ink-700);
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #f3e3d2;
  color: var(--accent-700);
}

.detail-list {
  margin: 1rem auto 1.15rem;
  padding-left: 1.2rem;
  text-align: left;
  max-width: 72ch;
}

.detail-list li {
  margin-bottom: 0.66rem;
  color: #35312d;
  line-height: 1.42;
  font-size: 0.94rem;
}

.detail-list strong {
  color: #171412;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: #b88153;
  color: #fbf6ee;
  border-color: #ab7548;
  padding: 0.56rem 0.98rem;
  font-size: 0.9rem;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #ad784b;
  border-color: #a16f45;
}

.button-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.58);
  color: var(--white);
  padding: 0.56rem 0.98rem;
  font-size: 0.9rem;
}

.button-ghost:hover,
.button-ghost:focus-visible {
  background: rgba(255, 255, 255, 0.15);
}

.button-social {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
  width: 3rem;
  height: 3rem;
  padding: 0;
  font-size: 1.2rem;
  border-radius: 999px;
}

.button-social:hover,
.button-social:focus-visible {
  background: rgba(255, 255, 255, 0.13);
}

.button-icon {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
}

.live-work .button-icon {
  filter: grayscale(1) brightness(0) invert(1);
}

.live-work .button-ghost:hover .button-icon,
.live-work .button-ghost:focus-visible .button-icon {
  filter: grayscale(1) brightness(0);
}

.button-row {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Skills */
.skills-layout {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.7rem;
  align-items: stretch;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.skill-option {
  background: #f7f5f2;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow-soft);
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.skill-option:hover,
.skill-option:focus-visible,
.skill-option.selected {
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent-500);
  outline: none;
}

.skill-option h3 {
  margin: 0 0 0.36rem;
  font-size: 1.08rem;
}

.skill-option p {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.92rem;
  line-height: 1.36;
}

.skill-glyph {
  margin: 0 auto 0.72rem;
  color: var(--teal-500);
  font-size: 1.9rem;
  display: block;
}

.skills-panel {
  min-width: 0;
}

#skill-details-panel {
  width: 100%;
  height: 100%;
}

.skill-detail-panel {
  text-align: left;
  background: #f7f5f2;
  border: 2px solid #e3d4c3;
  border-radius: var(--radius-xl);
  padding: 1.9rem 1.7rem;
  box-shadow: 0 12px 28px rgba(45, 37, 30, 0.13);
  margin: 0;
  height: 100%;
}

.skill-detail-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
}

.detail-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(130deg, var(--teal-700), var(--teal-500));
  color: var(--white);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.detail-icon i {
  color: var(--white);
}

.detail-title-wrap .badge {
  margin-bottom: 0.32rem;
}

.detail-title {
  margin: 0;
  font-size: clamp(1.65rem, 1.25rem + 0.95vw, 2rem);
  line-height: 1.15;
  color: #2f302f;
  text-transform: none;
}

.detail-summary {
  margin: 0.45rem 0 0.8rem;
  color: #3c3631;
  line-height: 1.4;
  font-size: 1rem;
}

.skills-mobile-details {
  display: none;
  margin-top: 1.25rem;
  gap: 1rem;
}

/* About */
.about-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.body-copy {
  margin: 0;
  color: var(--ink-700);
  font-size: 1.08rem;
  line-height: 1.52;
}

/* Live work */
.live-work {
  background: linear-gradient(130deg, var(--teal-700), var(--teal-500));
  padding-top: 4.35rem;
  padding-bottom: 4.35rem;
}

/* Footer */
.site-footer {
  background: #25201c;
  color: var(--white);
  text-align: center;
  padding: 3.25rem 0 2rem;
}

.footer-heading {
  margin: 0;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.social-row {
  margin: 1.1rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.site-footer small {
  font-size: 1rem;
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 991px) {
  .skills-layout {
    display: none;
  }

  .skills-mobile-details {
    display: grid;
  }
}

@media (max-width: 767px) {
  :root {
    --nav-h: 52px;
  }

  .site-header {
    height: var(--nav-h);
  }

  .hero {
    margin-top: var(--nav-h);
  }

  .site-title {
    font-size: 0.9rem;
  }

  .hero-content {
    min-height: 320px;
    padding: 2rem 0;
  }

  .hero-avatar {
    width: 180px;
    height: 180px;
  }

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

  .section {
    padding: 2.4rem 0;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .body-copy {
    font-size: 1rem;
  }

  .site-footer {
    padding: 2.6rem 0 1.65rem;
  }

  .footer-heading {
    font-size: 1rem;
  }
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(43, 122, 120, 0.26);
  outline-offset: 2px;
}
