/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f4f2ee;
  --text: #111111;
  --muted: #666666;
  --border: #e2e2de;
  --code-bg: #0d1117;
  --font: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  width: 100%;
}

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

/* ── Nav ── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 249, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--bg);
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 6px;
  padding: 7px 16px;
  transition:
    background 0.2s,
    color 0.2s;
  white-space: nowrap;
}

.nav-cta:hover {
  background: transparent;
  color: var(--text);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s;
}

/* ── Hero ── */
#hero {
  padding: 100px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-name {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-role {
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-tagline {
  font-size: 18px;
  font-weight: 400;
  color: #444;
  line-height: 1.5;
}

.hero-btns {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--bg);
  background: var(--text);
  border: 1px solid var(--text);
  border-radius: 6px;
  padding: 10px 22px;
  transition:
    background 0.2s,
    color 0.2s;
}

.btn-primary:hover {
  background: transparent;
  color: var(--text);
}

.btn-secondary {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 22px;
  transition:
    border-color 0.2s,
    color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--text);
}

/* ── Code Block ── */
.code-block {
  background: var(--code-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  font-family: var(--mono);
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid #30363d;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red {
  background: #ff5f57;
}
.dot.yellow {
  background: #ffbd2e;
}
.dot.green {
  background: #28c840;
}

.code-filename {
  margin-left: 8px;
  font-size: 12px;
  color: #8b949e;
  font-family: var(--mono);
}

.code-body {
  padding: 20px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre;
  color: #e6edf3;
}

/* Syntax colors */
.t-comment {
  color: #8b949e;
}
.t-tag {
  color: #79c0ff;
}
.t-kw {
  color: #ff7b72;
}
.t-var {
  color: #e6edf3;
}
.t-fn {
  color: #d2a8ff;
}
.t-str {
  color: #a5d6ff;
}
.t-num {
  color: #79c0ff;
}
.t-html {
  color: #7ee787;
}
.t-attr {
  color: #79c0ff;
}

/* Blinking cursor */
.cursor {
  color: #7ee787;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ── About ── */
#about {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 64px;
  align-items: center;
}

.about-img-wrap {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #e8e8e4;
  flex-shrink: 0;
}

.about-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.section-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-label::before {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  flex-shrink: 0;
}

.about-bio {
  font-size: 19px;
  font-weight: 400;
  line-height: 1.7;
  color: #222;
  margin-bottom: 32px;
}

.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stack-tag {
  font-size: 13px;
  font-family: var(--mono);
  color: var(--muted);
  background: #eeeeeb;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 10px;
}

/* ── Work ── */
#work {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 0;
}

.work-card {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.work-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.work-img-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #e8e8e4;
  position: relative;
}

.work-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  transition: object-position 3s ease;
}

.work-card:hover .work-img-wrap img {
  object-position: 50% 100%;
}

.work-visit {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 32px;
  padding: 0 10px 0 8px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: scale(0.85) translateY(-4px);
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 2;
  white-space: nowrap;
}

.work-visit svg {
  flex-shrink: 0;
  font-size: 14px;
}

.work-visit::after {
  content: "Visit Site";
  font-size: 12px;
  font-weight: 500;
}

.work-card:hover .work-visit {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.work-info {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.work-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.work-tag {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Testimonials ── */
#testimonials {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.testi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}

.testi-quote {
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  flex: 1;
}

.testi-quote::before {
  content: "\201C";
  font-size: 40px;
  line-height: 0;
  vertical-align: -16px;
  color: var(--border);
  margin-right: 4px;
  font-family: Georgia, serif;
}

.testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testi-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.testi-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.testi-badge {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.testi-country {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* Splide pagination dots */
#testimonialSlider .splide__pagination {
  bottom: -36px;
  gap: 6px;
}

#testimonialSlider .splide__pagination__page {
  width: 12px;
  height: 12px;
  background: var(--text);
  opacity: 0.25;
  border-radius: 99px;
  border: none;
  transition: width 0.3s, opacity 0.3s;
  margin: 0;
}

#testimonialSlider .splide__pagination__page.is-active {
  background: var(--text);
  opacity: 1;
  width: 36px;
  transform: none;
}

/* ── Contact ── */
#contact {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-tagline {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.2;
}

.contact-email {
  display: inline-block;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--text);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.contact-email:hover {
  opacity: 0.55;
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.contact-links a {
  color: var(--muted);
  transition: color 0.2s;
}
.contact-links a:hover {
  color: var(--text);
}
.contact-sep {
  color: var(--border);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.form-input,
.form-textarea {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--text);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
}

.form-submit {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--text);
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  cursor: pointer;
  transition: opacity 0.2s;
  align-self: flex-start;
  letter-spacing: 0.01em;
}

.form-submit:hover {
  opacity: 0.75;
}

.form-status {
  font-size: 13px;
  color: var(--muted);
  min-height: 20px;
}

.form-status--success {
  color: #16a34a;
}
.form-status--error {
  color: #dc2626;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

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

.footer-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.lb-content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 900px);
  max-height: 85vh;
  width: 100%;
  overflow-y: auto;
  transform: scale(0.94);
  transition: transform 0.25s ease;
}

.lightbox.open .lb-content {
  transform: scale(1);
}

.lb-img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.lb-caption {
  margin-top: 16px;
  text-align: center;
}

.lb-name {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}

.lb-result {
  font-size: 13px;
  color: #7ee787;
  margin-top: 4px;
  font-family: var(--mono);
}

.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 2;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 4px 8px;
}

.lb-close:hover {
  opacity: 1;
}

.splide__pagination {
  margin-top: 30px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    color: var(--text);
  }

  .nav-cta {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  #hero {
    padding: 56px 0 48px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-name {
    font-size: 38px;
  }
  .hero-tagline {
    max-width: 100%;
  }

  .hero-right {
    width: 100%;
    overflow: hidden;
  }

  .code-block {
    border-radius: 8px;
    font-size: 0;
  }

  .code-body {
    font-size: 11px;
    padding: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: pre;
  }

  .code-bar {
    padding: 10px 14px;
  }
  .code-filename {
    font-size: 11px;
  }

  #about,
  #work,
  #contact {
    padding: 72px 0;
  }

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

  .about-img-wrap {
    max-width: 220px;
    aspect-ratio: 1/1;
  }

  .about-bio {
    font-size: 17px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-inner {
    flex-wrap: wrap;
    gap: 16px;
  }
  .footer-links {
    gap: 20px;
  }

  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .contact-email {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
  .hero-name {
    font-size: 30px;
  }
  .code-body {
    font-size: 10px;
    padding: 12px;
  }
  .dot {
    width: 10px;
    height: 10px;
  }
}
