@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid #1d1d1f;
  outline-offset: 2px;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #ffffff;
  color: #1d1d1f;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section .container {
  position: relative;
  z-index: 1;
}

.section {
  padding: 100px 0;
  scroll-margin-top: 72px;
  position: relative;
  overflow: hidden;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(29, 29, 31, 0.05) 0 1px,
      transparent 1px 48px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(29, 29, 31, 0.05) 0 1px,
      transparent 1px 48px
    );
}
.section-alt {
  background-color: #f5f5f7;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(29, 29, 31, 0.05) 0 1px,
      transparent 1px 48px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(29, 29, 31, 0.05) 0 1px,
      transparent 1px 48px
    );
}
.section-header {
  text-align: center;
  margin-bottom: 64px;
  position: relative;
}
.section-header .label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #86868b;
  margin-bottom: 12px;
}
.section-header h2 {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #1d1d1f;
}
@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }
  .section-header {
    margin-bottom: 40px;
  }
  .section-header h2 {
    font-size: 28px;
  }
}

/* Decorative static patterns (Apple-style pastel accents) */
#skills::before,
#projects::before,
#faq::before,
#skills::after,
#projects::after,
#faq::after,
#contact::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* unique line-art shapes (replacing the aurora washes) */
#skills::before,
#projects::before,
#faq::before {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle, #000 0%, transparent 68%);
}
/* sunburst */
#skills::before {
  top: -130px;
  right: -120px;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(122, 150, 255, 0.2) 0deg 1deg,
    transparent 1deg 9deg
  );
}
/* blueprint grid */
#projects::before {
  top: -130px;
  right: -120px;
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(168, 130, 255, 0.18) 0 1px,
      transparent 1px 30px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(168, 130, 255, 0.18) 0 1px,
      transparent 1px 30px
    );
}
/* diagonal stripes */
#faq::before {
  bottom: -140px;
  left: -120px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 158, 128, 0.2) 0 1px,
    transparent 1px 16px
  );
}
/* line-art heart */
.deco-heart {
  position: absolute;
  bottom: -140px;
  left: -120px;
  width: 440px;
  height: 440px;
  pointer-events: none;
  z-index: 0;
  transform: rotate(45deg);
}
.deco-heart svg {
  display: block;
  width: 100%;
  height: 100%;
}
.deco-heart svg path {
  fill: none;
  stroke: rgba(255, 107, 157, 0.4);
  stroke-width: 0.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* line-art question mark */
.deco-q {
  position: absolute;
  top: 30px;
  right: -20px;
  width: 560px;
  height: 560px;
  pointer-events: none;
  z-index: 0;
  transform: rotate(-18deg);
}
@media (max-width: 768px) {
  .deco-q {
    top: 10px;
    right: -40px;
    width: 360px;
    height: 360px;
  }
}
.deco-q svg {
  display: block;
  width: 100%;
  height: 100%;
}
.deco-q svg path,
.deco-q svg circle {
  fill: none;
  stroke: rgba(255, 201, 77, 0.5);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* thin concentric rings */
#skills::after,
#projects::after,
#faq::after,
#contact::after {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    transparent 0 27px,
    rgba(122, 150, 255, 0.16) 27px 28px
  );
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle, #000 0%, transparent 72%);
}
#skills::after {
  top: 60px;
  left: -150px;
}
#projects::after {
  top: 60px;
  left: -150px;
  background: repeating-radial-gradient(
    circle,
    transparent 0 27px,
    rgba(168, 130, 255, 0.16) 27px 28px
  );
}
#faq::after {
  bottom: 60px;
  right: -150px;
  background: repeating-radial-gradient(
    circle,
    transparent 0 27px,
    rgba(255, 158, 128, 0.14) 27px 28px
  );
}
#contact::after {
  bottom: 60px;
  right: -150px;
  background: repeating-radial-gradient(
    circle,
    transparent 0 27px,
    rgba(92, 201, 185, 0.14) 27px 28px
  );
}

/* extra concentric rings filling empty areas */
.deco-rings {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: repeating-radial-gradient(
    circle,
    transparent 0 30px,
    rgba(122, 150, 255, 0.15) 30px 31px
  );
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle, #000 0%, transparent 72%);
}
.deco-rings.sm {
  width: 260px;
  height: 260px;
}
.deco-rings.lg {
  width: 440px;
  height: 440px;
}
#projects .deco-rings {
  background: repeating-radial-gradient(
    circle,
    transparent 0 30px,
    rgba(168, 130, 255, 0.15) 30px 31px
  );
}
#faq .deco-rings {
  background: repeating-radial-gradient(
    circle,
    transparent 0 30px,
    rgba(255, 158, 128, 0.13) 30px 31px
  );
}
#contact .deco-rings {
  background: repeating-radial-gradient(
    circle,
    transparent 0 30px,
    rgba(92, 201, 185, 0.13) 30px 31px
  );
}
#skills .r1 {
  top: 34%;
  right: -150px;
}
#skills .r2 {
  bottom: 10%;
  left: -140px;
}
#skills .r3 {
  top: 62%;
  left: -110px;
}
#projects .r1 {
  bottom: 12%;
  right: -150px;
}
#projects .r2 {
  top: 40%;
  left: -140px;
}
#projects .r3 {
  bottom: 45%;
  right: -120px;
}
#faq .r1 {
  top: 10%;
  left: -140px;
}
#faq .r2 {
  top: 46%;
  right: -150px;
}
#faq .r3 {
  bottom: 24%;
  left: -120px;
}
#contact .r1 {
  top: 8%;
  right: -140px;
}
#contact .r2 {
  top: 40%;
  left: -150px;
}
#contact .r3 {
  bottom: 18%;
  left: -120px;
}
html.dark .deco-rings {
  background: repeating-radial-gradient(
    circle,
    transparent 0 30px,
    rgba(122, 150, 255, 0.2) 30px 31px
  );
}
html.dark #projects .deco-rings {
  background: repeating-radial-gradient(
    circle,
    transparent 0 30px,
    rgba(168, 130, 255, 0.2) 30px 31px
  );
}
html.dark #faq .deco-rings {
  background: repeating-radial-gradient(
    circle,
    transparent 0 30px,
    rgba(255, 158, 128, 0.18) 30px 31px
  );
}
html.dark #contact .deco-rings {
  background: repeating-radial-gradient(
    circle,
    transparent 0 30px,
    rgba(92, 201, 185, 0.18) 30px 31px
  );
}

/* dark mode: slightly brighter accents */
html.dark #skills::before {
  background: repeating-conic-gradient(
    from 0deg,
    rgba(122, 150, 255, 0.26) 0deg 1deg,
    transparent 1deg 9deg
  );
}
html.dark #projects::before {
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(168, 130, 255, 0.24) 0 1px,
      transparent 1px 30px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(168, 130, 255, 0.24) 0 1px,
      transparent 1px 30px
    );
}
html.dark #faq::before {
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 158, 128, 0.26) 0 1px,
    transparent 1px 16px
  );
}
html.dark .deco-heart svg path {
  stroke: rgba(255, 138, 179, 0.55);
}
html.dark .deco-q svg path,
html.dark .deco-q svg circle {
  stroke: rgba(255, 214, 102, 0.65);
}
html.dark #skills::after {
  background: repeating-radial-gradient(
    circle,
    transparent 0 27px,
    rgba(122, 150, 255, 0.2) 27px 28px
  );
}
html.dark #projects::after {
  background: repeating-radial-gradient(
    circle,
    transparent 0 27px,
    rgba(168, 130, 255, 0.2) 27px 28px
  );
}
html.dark #faq::after {
  background: repeating-radial-gradient(
    circle,
    transparent 0 27px,
    rgba(255, 158, 128, 0.18) 27px 28px
  );
}
html.dark #contact::after {
  background: repeating-radial-gradient(
    circle,
    transparent 0 27px,
    rgba(92, 201, 185, 0.18) 27px 28px
  );
}
.section-header h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 16px auto 0;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(29, 29, 31, 0.75),
    transparent
  );
}
html.dark .section-header h2::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 245, 247, 0.8),
    transparent
  );
}

.shuffle-toggle {
  display: flex;
  justify-content: flex-end;
  margin-top: -44px;
  margin-bottom: 28px;
}
.shuffle-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.shuffle-switch input {
  display: none;
}
.shuffle-slider {
  position: relative;
  width: 40px;
  height: 22px;
  background: #d2d2d7;
  border-radius: 11px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.shuffle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.shuffle-switch input:checked + .shuffle-slider {
  background: #34c759;
}
.shuffle-switch input:checked + .shuffle-slider::after {
  transform: translateX(18px);
}
.shuffle-label {
  font-size: 13px;
  color: #86868b;
  font-weight: 500;
}
html.dark .shuffle-label {
  color: #a1a1a6;
}
html.dark .shuffle-switch input:checked + .shuffle-slider {
  background: #f5f5f7;
}
html.dark .shuffle-switch input:checked + .shuffle-slider::after {
  background: #1d1d1f;
}
@media (max-width: 768px) {
  .shuffle-toggle {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll {
    animation: none;
  }
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition:
    background 0.3s ease,
    backdrop-filter 0.3s ease;
  padding: 0 24px;
}
nav.scrolled {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: #1d1d1f;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #1d1d1f;
  transition: width 0.3s;
}
.nav-links a:hover {
  color: #000000;
}
.nav-links a:hover::after {
  width: 100%;
}
.dark-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #86868b;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.dark-toggle:hover {
  color: #1d1d1f;
  background: rgba(0, 0, 0, 0.05);
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #86868b;
  margin-right: 10px;
}
.lang-switch a {
  color: #86868b;
  text-decoration: none;
  padding: 3px 7px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.lang-switch a:hover {
  color: #1d1d1f;
}
.lang-switch a.on {
  color: #1d1d1f;
  background: rgba(0, 0, 0, 0.06);
}
html.dark .lang-switch a.on {
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.1);
}
html.dark .lang-switch a {
  color: #a1a1a6;
}
html.dark .lang-switch a:hover {
  color: #f5f5f7;
}
.lang-switch .sep {
  color: #d2d2d7;
}
.lang-switch a::after {
  display: none;
}
html.dark .dark-toggle {
  color: #86868b;
}
html.dark .dark-toggle:hover {
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.08);
}
.dark-toggle .ph-sun {
  display: none;
}
html.dark .dark-toggle .ph-moon {
  display: none;
}
html.dark .dark-toggle .ph-sun {
  display: inline;
}
.dark-toggle .ph-moon {
  display: inline;
}
html.dark .dark-toggle .ph-sun {
  display: inline;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  color: #1d1d1f;
  padding: 0;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.2s;
}
.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}
html.dark .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100dvh;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5));
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    clip-path: inset(0 0 0 100%);
    will-change: backdrop-filter, clip-path;
    transition:
      clip-path 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    padding: 40px;
    z-index: 1001;
  }
  .nav-links.open {
    clip-path: inset(0);
  }
  .nav-links a {
    font-size: 18px;
  }
  .nav-toggle {
    display: flex;
    z-index: 1002;
  }
  html.dark .nav-links {
    background: linear-gradient(160deg, rgba(28, 28, 30, 0.7), rgba(28, 28, 30, 0.5));
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }
  html.dark .nav-links a {
    color: #f5f5f7;
  }
  html.dark .nav-links a:hover {
    color: #ffffff;
  }
  .lang-switch {
    font-size: 13px;
    margin-right: 0;
  }
  .lang-switch a {
    font-size: 13px;
  }
}

#hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  scroll-margin-top: 72px;
  overflow: hidden;
  border-bottom: 1px solid #e8e8ed;
}
#hero::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 245, 247, 0.6) 50%,
    transparent
  );
  pointer-events: none;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(29, 29, 31, 0.55) 0%,
    rgba(29, 29, 31, 0.3) 50%,
    rgba(29, 29, 31, 0.55) 100%
  );
}
.hero-content {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid #3d3d3f;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.hero-greeting {
  font-size: 14px;
  font-weight: 500;
  color: #f5f5f7;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.hero-name {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
  color: #f5f5f7;
}
.hero-title {
  font-size: clamp(15px, 2.5vw, 22px);
  font-weight: 400;
  color: #f5f5f7;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero-desc {
  font-size: 16px;
  color: #f5f5f7;
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
@media (max-width: 768px) {
  #hero {
    min-height: 100dvh;
    padding: 100px 20px 80px;
  }
  .hero-avatar {
    width: 128px;
    height: 128px;
    margin-bottom: 18px;
  }
  .hero-name {
    font-size: clamp(28px, 7vw, 40px);
  }
  .hero-title {
    font-size: clamp(14px, 3vw, 18px);
  }
}
@media (max-width: 480px) {
  #hero {
    min-height: 100dvh;
    padding: 80px 16px 70px;
  }
  .hero-avatar {
    width: 108px;
    height: 108px;
    margin-bottom: 16px;
  }
  .hero-name {
    font-size: clamp(24px, 8vw, 32px);
  }
  .hero-title {
    font-size: 14px;
  }
  .hero-desc {
    font-size: 14px;
    max-width: 100%;
    margin-bottom: 24px;
  }
}
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  background: none;
}
.btn-primary {
  background: #1d1d1f;
  color: #ffffff;
}
.btn-primary:hover {
  background: #000000;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.btn-outline {
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-outline:hover {
  border-color: #1d1d1f;
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}
html.dark .btn-outline {
  border-color: rgba(255, 255, 255, 0.15);
  color: #f5f5f7;
  background: rgba(255, 255, 255, 0.08);
}
html.dark .btn-outline:hover {
  border-color: #f5f5f7;
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}
html.dark .btn-outline {
  border-color: #3d3d3f;
  color: #f5f5f7;
  background: #1d1d1f;
}
html.dark .btn-outline:hover {
  border-color: #f5f5f7;
  background: #000000;
  transform: translateY(-1px);
}
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  z-index: 2;
  animation: float 2s ease-in-out infinite;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
@keyframes float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-text h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.about-text p {
  font-size: 16px;
  color: #515154;
  line-height: 1.7;
  margin-bottom: 16px;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.stat-item {
  text-align: center;
  padding: 32px 16px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #e8e8ed;
}
.stat-item .number {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1d1d1f;
}
.stat-item .label {
  font-size: 14px;
  color: #86868b;
  margin-top: 4px;
}
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .stat-item {
    padding: 24px 12px;
  }
  .stat-item .number {
    font-size: 32px;
  }
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.skill-card {
  background: #ffffff;
  border: 1px solid #e8e8ed;
  border-radius: 6px;
  padding: 32px 24px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}
.skill-card i {
  font-size: 32px;
  color: #1d1d1f;
  margin-bottom: 16px;
}
.skill-card h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}
.skill-card p {
  font-size: 14px;
  color: #86868b;
  line-height: 1.5;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.skill-tag {
  font-size: 12px;
  font-weight: 500;
  color: #515154;
  background: #f5f5f7;
  padding: 4px 12px;
  border-radius: 4px;
}
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.project-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid #e8e8ed;
  border-radius: 6px;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}
.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}
.project-body h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}
.project-body p {
  font-size: 14px;
  color: #86868b;
  line-height: 1.5;
  margin-bottom: 12px;
}
.project-body > p {
  flex: 1;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.project-tech span {
  font-size: 11px;
  font-weight: 500;
  color: #86868b;
  background: #f5f5f7;
  padding: 3px 10px;
  border-radius: 4px;
}
.project-github {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: #1d1d1f;
  color: #ffffff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.2s,
    transform 0.2s;
  margin-top: auto;
}
.project-github:hover {
  background: #000000;
  transform: translateY(-1px);
}
.project-github i {
  font-size: 18px;
}
.project-card.hidden {
  display: none;
}
.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.project-head h4 {
  margin-bottom: 6px;
  word-break: break-word;
}
.project-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #86868b;
  flex-shrink: 0;
  margin-top: 2px;
}
.project-stars i {
  font-size: 14px;
  color: #f5a623;
}
.show-more-wrap {
  text-align: center;
  margin-top: 32px;
}
.show-more-wrap .btn {
  padding: 12px 32px;
  font-size: 14px;
}
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.pricing-card {
  background: #ffffff;
  border: 1px solid #e8e8ed;
  border-radius: 6px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}
.pricing-card h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.pricing-card .price {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1d1d1f;
  margin-top: 12px;
}
.pricing-card .price-note {
  font-size: 13px;
  color: #86868b;
  margin-bottom: 20px;
}
.pricing-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #515154;
  line-height: 1.4;
}
.pricing-features li i {
  color: #1d1d1f;
  font-size: 15px;
  margin-top: 1px;
}
.pricing-card .btn {
  width: 100%;
  justify-content: center;
}
.pricing-card.popular {
  border: 2px solid #1d1d1f;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}
.pricing-card.popular .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #1d1d1f;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
html.dark .pricing-card {
  background: #1d1d1f;
  border-color: #3d3d3f;
}
html.dark .pricing-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
html.dark .pricing-card h4,
html.dark .pricing-card .price {
  color: #f5f5f7;
}
html.dark .pricing-card .price-note {
  color: #a1a1a6;
}
html.dark .pricing-features li {
  color: #a1a1a6;
}
html.dark .pricing-features li i {
  color: #f5f5f7;
}
html.dark .pricing-card.popular {
  border-color: #f5f5f7;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
html.dark .pricing-card.popular .badge {
  background: #f5f5f7;
  color: #1d1d1f;
}
@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: #e8e8ed;
}
.timeline-item {
  position: relative;
  padding: 0 0 40px 60px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: 13px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #1d1d1f;
}
.timeline-date {
  font-size: 12px;
  font-weight: 600;
  color: #86868b;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.timeline-item h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 2px;
}
.timeline-item .company {
  font-size: 14px;
  color: #86868b;
  margin-bottom: 8px;
}
.timeline-item p {
  font-size: 14px;
  color: #515154;
  line-height: 1.6;
}
@media (max-width: 640px) {
  .timeline-item {
    padding-left: 52px;
  }
  .timeline::before {
    left: 16px;
  }
  .timeline-dot {
    left: 9px;
  }
}

.contact-layout {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.contact-intro h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.contact-intro p {
  font-size: 16px;
  color: #515154;
  line-height: 1.7;
  margin-bottom: 36px;
}
.contact-form-wrap {
  text-align: left;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-form .fg-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.contact-form #contactFields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  max-height: 170px;
  opacity: 1;
  visibility: visible;
  transition:
    max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease,
    visibility 0.5s;
}
.contact-form #contactFields.collapsed {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid #e8e8ed;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: #1d1d1f;
  background: #fafafa;
  transition:
    border-color 0.25s,
    box-shadow 0.25s,
    background 0.25s;
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #1d1d1f;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
  background: #ffffff;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #a1a1a6;
}
.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}
.contact-form button {
  align-self: flex-start;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
}
@media (max-width: 480px) {
  .contact-form .fg-group {
    grid-template-columns: 1fr;
  }
  .contact-form #contactFields {
    max-height: 220px;
  }
}

.form-message {
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.form-message.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}
.form-message.error {
  background: #fbe9e7;
  color: #c62828;
  border: 1px solid #ffccbc;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid #e8e8ed;
  padding: 24px 0;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-question {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 8px;
}
.faq-answer {
  font-size: 15px;
  color: #515154;
  line-height: 1.7;
}
.faq-answer a {
  text-decoration: underline;
}

footer {
  padding: 40px 24px;
  border-top: 1px solid #e8e8ed;
  position: relative;
}
footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(29, 29, 31, 0.5) 50%,
    transparent
  );
  pointer-events: none;
}
html.dark footer::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 245, 247, 0.55) 50%,
    transparent
  );
}
.footer-content {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-content p {
  font-size: 13px;
  color: #86868b;
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.footer-right a,
.footer-right button {
  line-height: 1;
}
.footer-admin {
  font-size: 12px;
  font-weight: 500;
  color: #a1a1a6;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-admin:hover {
  color: #1d1d1f;
}
.footer-link {
  font-size: 12px;
  font-weight: 500;
  color: #a1a1a6;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover {
  color: #1d1d1f;
}
html.dark .footer-link:hover {
  color: #f5f5f7;
}

/* Legal pages (privacy / terms) */
.legal-section {
  padding: 150px 0 100px;
}
.legal {
  max-width: 760px;
  margin: 0 auto;
}
.legal .intro {
  font-size: 16px;
  color: #86868b;
  line-height: 1.7;
  margin-bottom: 48px;
}
.legal h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 44px 0 14px;
  color: #1d1d1f;
}
.legal h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: #1d1d1f;
}
.legal p,
.legal li {
  font-size: 15px;
  line-height: 1.75;
  color: #515154;
  margin-bottom: 10px;
}
.legal ul {
  padding-left: 22px;
  margin: 0 0 12px;
}
.legal li {
  margin-bottom: 6px;
}
.legal .updated {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: #a1a1a6;
}
.sitemap-list {
  list-style: none;
  padding-left: 0;
}
.sitemap-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 12px;
  margin-bottom: 10px;
}
.sitemap-list a {
  color: #0a84ff;
  text-decoration: none;
  font-weight: 600;
}
.sitemap-list a:hover {
  text-decoration: underline;
}
.sitemap-list span {
  color: #86868b;
  font-size: 13px;
}
html.dark .sitemap-list a {
  color: #5eb0ff;
}
html.dark .sitemap-list span {
  color: #86868b;
}
html.dark .legal h3,
html.dark .legal h4 {
  color: #f5f5f7;
}
html.dark .legal p,
html.dark .legal li {
  color: #c7c7cc;
}
html.dark .legal .intro {
  color: #a1a1a6;
}
.back-top-fab {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 50;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #1d1d1f;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 20px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.call-fab {
  position: fixed;
  bottom: 76px;
  right: 20px;
  z-index: 50;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #1d1d1f;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  font-size: 20px;
  transition:
    transform 0.3s,
    background 0.3s;
}
.call-fab:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}
.back-top-fab.show {
  opacity: 1;
  pointer-events: auto;
}
.back-top-fab:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}
.back-top-fab.show:hover {
  transform: translateY(-2px);
}
html.dark .back-top-fab {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
html.dark .back-top-fab:hover {
  background: rgba(255, 255, 255, 0.15);
}
html.dark .call-fab {
  background: rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
html.dark .call-fab:hover {
  background: rgba(255, 255, 255, 0.15);
}
@media (max-width: 640px) {
  .footer-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .footer-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.nav-overlay {
  display: none;
}
@media (max-width: 768px) {
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
  }
  .nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-intro {
  font-size: 16px;
  color: #515154;
  line-height: 1.7;
  margin-bottom: 28px;
}
.contact-links {
  margin-bottom: 28px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.contact-item i {
  font-size: 20px;
  color: #1d1d1f;
  width: 24px;
  text-align: center;
}
.contact-item a,
.contact-item span {
  font-size: 15px;
  color: #515154;
}
.contact-item a:hover {
  color: #1d1d1f;
}
.contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid #e8e8ed;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #515154;
  transition: all 0.2s;
}
.social-link:hover {
  border-color: #1d1d1f;
  color: #1d1d1f;
  background: #f5f5f7;
}
.social-link i {
  font-size: 18px;
}
.contact-form-wrap h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
#toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  z-index: 2000;
  max-width: min(90vw, 460px);
  padding: 14px 26px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  font-size: 14px;
  font-weight: 500;
  color: #1d1d1f;
  text-align: center;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#toast.ok {
  color: #1d7f3c;
}
#toast.err {
  color: #c62828;
}
html.dark #toast {
  background: rgba(28, 28, 30, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
}
html.dark #toast.ok {
  color: #7ddc9a;
}
html.dark #toast.err {
  color: #ff8a8a;
}
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

html.dark :focus-visible {
  outline-color: #f5f5f7;
}
html.dark body {
  background: #1d1d1f;
  color: #f5f5f7;
}
html.dark .section {
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(245, 245, 247, 0.06) 0 1px,
      transparent 1px 48px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(245, 245, 247, 0.06) 0 1px,
      transparent 1px 48px
    );
}
html.dark .section-alt {
  background-color: #252527;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(245, 245, 247, 0.06) 0 1px,
      transparent 1px 48px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(245, 245, 247, 0.06) 0 1px,
      transparent 1px 48px
    );
}
html.dark nav.scrolled {
  background: rgba(28, 28, 30, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
html.dark .nav-links a {
  color: #f5f5f7;
}
html.dark .nav-links a:hover {
  color: #ffffff;
}
html.dark .nav-links a::after {
  background: #f5f5f7;
}
html.dark .btn-primary {
  background: #f5f5f7;
  color: #1d1d1f;
}
html.dark .btn-primary:hover {
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}
html.dark .btn-outline {
  border-color: #3d3d3f;
  color: #f5f5f7;
}
html.dark .btn-outline:hover {
  border-color: #f5f5f7;
  background: #2d2d2f;
}
html.dark .skill-card,
html.dark .stat-item {
  background: #2d2d2f;
  border-color: #3d3d3f;
}
html.dark .project-card {
  background: rgba(28, 28, 30, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-color: rgba(255, 255, 255, 0.12);
}
html.dark .skill-card i,
html.dark .stat-item .number {
  color: #f5f5f7;
}
html.dark .skill-tag,
html.dark .project-tech span {
  background: #3d3d3f;
  color: #a1a1a6;
}
html.dark .project-github {
  background: #f5f5f7;
  color: #1d1d1f;
}
html.dark .project-github:hover {
  background: #ffffff;
}
html.dark .show-more-wrap .btn {
  border-color: #424245;
  color: #f5f5f7;
}
html.dark .show-more-wrap .btn:hover {
  background: #2c2c2e;
}
html.dark .faq-item {
  border-color: #3d3d3f;
}
html.dark .faq-question {
  color: #f5f5f7;
}
html.dark .faq-answer,
html.dark .about-text p,
html.dark .contact-intro,
html.dark .contact-item i {
  color: #f5f5f7;
}
html.dark .contact-item a,
html.dark .contact-item span,
html.dark .timeline-item p {
  color: #a1a1a6;
}
html.dark .contact-item a:hover {
  color: #f5f5f7;
}
html.dark .social-link {
  border-color: #3d3d3f;
  color: #a1a1a6;
}
html.dark .social-link:hover {
  border-color: #f5f5f7;
  color: #f5f5f7;
  background: #2d2d2f;
}
html.dark .contact-form input,
html.dark .contact-form textarea {
  background: #2d2d2f;
  border-color: #3d3d3f;
  color: #f5f5f7;
}
html.dark .contact-form input:focus,
html.dark .contact-form textarea:focus {
  border-color: #f5f5f7;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
  background: #2d2d2f;
}
html.dark .section-header h2,
html.dark .hero-name,
html.dark .about-text h3,
html.dark .skill-card h4,
html.dark .project-body h4,
html.dark .timeline-item h4,
html.dark .contact-form-wrap h3 {
  color: #f5f5f7;
}
html.dark .timeline::before {
  background: #3d3d3f;
}
html.dark .timeline-dot {
  background: #1d1d1f;
  border-color: #f5f5f7;
}
html.dark footer {
  border-color: #3d3d3f;
}
html.dark .footer-admin {
  color: #6e6e73;
}
html.dark .footer-admin:hover {
  color: #f5f5f7;
}
html.dark .nav-toggle {
  color: #f5f5f7;
}
html.dark .nav-overlay.open {
  background: rgba(0, 0, 0, 0.5);
}
html.dark .hero-scroll {
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
html.dark .contact-form input::placeholder,
html.dark .contact-form textarea::placeholder {
  color: #6e6e73;
}
html.dark .section-header .label,
html.dark .stat-item .label,
html.dark .timeline-date,
html.dark .timeline-item .company,
html.dark .project-body p {
  color: #86868b;
}

/* Header over the hero: always light text, like dark mode, until scrolled past the hero */
nav:not(.scrolled) .nav-links a {
  color: #f5f5f7;
}
nav:not(.scrolled) .nav-links a:hover {
  color: #ffffff;
}
nav:not(.scrolled) .nav-links a::after {
  background: #f5f5f7;
}
nav:not(.scrolled) .dark-toggle {
  color: rgba(255, 255, 255, 0.85);
}
nav:not(.scrolled) .dark-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}
nav:not(.scrolled) .nav-toggle {
  color: #f5f5f7;
}
nav:not(.scrolled) .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
}
@media (max-width: 768px) {
  nav:not(.scrolled) .nav-links.open a,
  nav:not(.scrolled) .nav-links.open a:hover {
    color: #1d1d1f;
  }
  nav:not(.scrolled) .nav-links.open a::after {
    background: #1d1d1f;
  }
  html.dark nav:not(.scrolled) .nav-links.open a,
  html.dark nav:not(.scrolled) .nav-links.open a:hover {
    color: #f5f5f7;
  }
  html.dark nav:not(.scrolled) .nav-links.open a::after {
    background: #f5f5f7;
  }
}
/* Mobile: scrolled bar keeps liquid glass — but drop its backdrop-filter
   while the drawer (.nav-links) is open, otherwise the ancestor's
   backdrop-filter disables the descendant's glass effect. */
@media (max-width: 768px) {
  nav.scrolled:not(:has(.nav-links.open)) {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.55);
  }
  html.dark nav.scrolled:not(:has(.nav-links.open)) {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(28, 28, 30, 0.55);
  }
  nav.scrolled:has(.nav-links.open) {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.92);
  }
  html.dark nav.scrolled:has(.nav-links.open) {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(28, 28, 30, 0.92);
  }
}

/* ------------------------------------------------------------------ */
/* Ultra-large screens (4K / ultrawide / browser zoomed out < 70%)     */
/* Scale the whole layout proportionally so content never looks tiny,  */
/* and let the main column breathe a little wider on very big displays.*/
/* ------------------------------------------------------------------ */
@media (min-width: 1600px) {
  html {
    zoom: 1.06;
  }
  .container,
  .nav-container,
  .footer-content {
    max-width: 1220px;
  }
}
@media (min-width: 2200px) {
  html {
    zoom: 1.16;
  }
  .container,
  .nav-container,
  .footer-content {
    max-width: 1360px;
  }
}
@media (min-width: 3000px) {
  html {
    zoom: 1.28;
  }
  .container,
  .nav-container,
  .footer-content {
    max-width: 1520px;
  }
}
@media (min-width: 4000px) {
  html {
    zoom: 1.42;
  }
  .container,
  .nav-container,
  .footer-content {
    max-width: 1720px;
  }
}
