/* Base */
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: #111;
  background-color: #eef1f5;
  line-height: 1.5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(1300px, calc(100% - 1rem));
  margin: 0 auto;
}

.section > h2,
.section > .subtitle,
.skills-grid,
.contact-grid {
  width: min(1100px, calc(100% - 2rem));
  margin-left: auto;
  margin-right: auto;
}

/* Header & navigation */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px) saturate(120%);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

.header-scrolled {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.header-hidden {
  transform: translateY(-110%);
  box-shadow: none;
  opacity: 0.95;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.logo {
  text-decoration: none;
  color: #111;
  font-size: 1.35rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: #111;
  font-weight: 500;
}

nav .cta {
  background: black;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  background:
    radial-gradient(120% 80% at 20% 20%, rgba(93, 63, 211, 0.5), transparent 60%),
    radial-gradient(120% 90% at 80% 30%, rgba(16, 185, 129, 0.45), transparent 65%),
    radial-gradient(140% 100% at 50% 80%, rgba(255, 115, 179, 0.35), transparent 60%),
    linear-gradient(135deg, #0d1117 0%, #0b0f16 50%, #0a0e15 100%);
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.5rem;
}

.hero-content p {
  margin: 0;
  color: #e5e7eb;
  letter-spacing: 0.02em;
}

.hero-content h1 {
  font-size: 3rem;
  margin: 0;
  line-height: 1.05;
}

.hero-content .light-title {
  font-weight: 300;
  font-size: 2.4rem;
}

.hero-typing {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  color: #c9d1d9;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  letter-spacing: 0.01em;
  text-align: center;
  margin-top: 6rem;
}

.typing-prefix {
  opacity: 0.8;
  font-weight: 300;
  display: block;
}

.typing-roller {
  position: relative;
  display: inline-block;
  width: 44ch;
  min-height: 1.3em;
}

.typing-output {
  display: inline-block;
  width: 100%;
  min-height: 1.3em;
  padding-right: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 1.05em;
  color: #f8fafc;
  text-decoration: underline;
  text-decoration-color: rgba(248, 250, 252, 0.9);
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
  text-decoration-skip-ink: none;
}

html {
  scroll-behavior: smooth;
}

/* Sections & spacing */
.section {
  padding: 5rem 1.5rem;
  background: transparent;
}

.section.light {
  background-color: transparent;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

/* Grids */
.skills-grid,
.contact-grid {
  display: grid;
  gap: 2rem;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 2rem;
}

/* About */
.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: center;
  gap: 2.5rem;
}

.about-img {
  width: 100%;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.08);
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: #374151;
  font-size: 1.05rem;
  line-height: 1.6;
}

.skill-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.tags span {
  background: #fff;
  color: #0f172a;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

/* Project cards grid */
.project-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  text-decoration: none;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.2s ease;
}

.project-card:hover::after {
  background: rgba(0, 0, 0, 0.12);
}

.project-card img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.project-card-content {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  background: transparent;
  color: #0b0f16;
  padding: 0;
  border-radius: 0;
  display: grid;
  gap: 0.2rem;
  text-align: right;
  align-items: end;
  max-width: 40%;
}

.project-card_top .project-card-content {
  top: 12px;
  bottom: auto;
}

.project-card_right .project-card-content {
  top: auto;
  bottom: 12px;
  right: auto;
  left: 12px;
  text-align: left;
  align-items: flex-start;
}

.project-card-content h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
}

.project-card-content p {
  margin: 0;
  font-size: 0.9rem;
  color: #111827;
  max-width: 100%;
  line-height: 1.3;
}

@media (max-width: 1024px) {
  .project-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .project-card-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    aspect-ratio: 4 / 5;
  }

  .project-card-content {
    right: 10px;
    bottom: 10px;
    max-width: 62%;
  }

  .project-card-content h3 {
    font-size: 1.2rem;
  }

  .project-card-content p {
    font-size: 0.95rem;
  }
}

/* Contact */
.contact-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
  gap: 2rem;
}

.contact-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.contact-form {
  display: grid;
  gap: 1.1rem;
  background: transparent;
  padding: 0;
}

.contact-form h3 {
  margin: 0 0 0.75rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  color: #111827;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  box-sizing: border-box;
}

.contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-form button {
  margin-top: 0.75rem;
  background: #000;
  color: #fff;
  border: none;
  padding: 1rem 1.2rem;
  border-radius: 28px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  padding-top: 0.5rem;
}

.contact-icon {
  font-size: 1.25rem;
}

.contact-circle {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: none;
  box-shadow: none;
  text-decoration: none;
  color: #0f172a;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.contact-circle:hover {
  transform: translateY(-2px);
  box-shadow: none;
  border-color: #cbd5e1;
}

.contact-circle::after {
  content: attr(data-label);
  position: absolute;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #111827;
  color: #f8fafc;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.contact-circle:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.btn {
  display: inline-block;
  margin-top: 2rem;
  background: white;
  color: black;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.btn.secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.btn.secondary:hover {
  border-color: rgba(255, 255, 255, 0.8);
}

/* Case study */
.eyebrow {
  margin: 0;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.9rem;
}

.intro-card {
  padding: 1.75rem;
  display: grid;
  gap: 1.25rem;
  border-radius: 28px;
}

.intro-top {
  display: flex;
  justify-content: flex-start;
}

.intro-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font-weight: 700;
}

.intro-body {
  display: grid;
  grid-template-columns: minmax(320px, 1.2fr) minmax(280px, 1fr);
  gap: 1.75rem;
  align-items: stretch;
}

.intro-copy {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  justify-content: space-between;
}

.intro-text h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 3rem);
}

.intro-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 0.5rem 1rem;
}

.intro-meta .meta-label {
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.intro-meta .meta-value {
  color: #111827;
  font-weight: 700;
  font-size: 1rem;
}

.meta-link {
  text-decoration: none;
  border-bottom: 1px solid rgba(17, 24, 39, 0.2);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.meta-link:hover,
.meta-link:focus-visible {
  color: #0f172a;
  border-color: #0f172a;
}

.intro-visual {
  background: #0f172a;
  border-radius: 12px;
  min-height: 320px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.meta-block {
  display: grid;
  gap: 0.25rem;
}

.image-frame {
  position: relative;
  overflow: hidden;
}

.plain-frame {
  border-radius: 18px;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.placeholder {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.placeholder-wide {
  border-radius: 18px;
  min-height: 320px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(218, 11%, 65%);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.placeholder-tall {
  border-radius: 18px;
  min-height: 420px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.case-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.case-section h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.case-section {
  background: transparent;
  padding: 2.75rem 1.5rem;
  margin: 0.75rem 0;
}

.case-section .image-frame {
  background: #fff;
  box-shadow: none;
}

.zoom-frame {
  max-width: 100%;
  width: 100%;
  margin: 1.5rem auto 0;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.zoom-frame img {
  transition: transform 1.6s ease, transform-origin 0.16s ease;
  transform-origin: center;
  transform: scale(1);
}

.zoom-frame.is-zoomed img {
  transform: scale(3);
}

.case-section .image-card,
.case-section .intro-visual {
  box-shadow: none;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.case-card.span-2 {
  grid-column: span 2;
}

.case-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  color: #111827;
}

.text-card {
  margin: 2rem auto;
  padding: 5rem 5rem;
  font-size: 1.25rem;
  line-height: 1.5;
  font-weight: 500;
  color: #111;
  letter-spacing: -0.015em;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.06);
}

.case-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.case-card p {
  margin: 1.5;
  color: #4b5563;
  line-height: 1.2;
}

.text-card p {
  color: #111827;
}

.text-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #8b1247;
  margin-top: -0.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.text-lead {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 650;
  color: #a43434;
  margin-bottom: 1.25rem;
  line-height: 1.45;
}



.emoji-highlight {
  display: inline-block;
  margin: 0 0.35rem;
  font-size: 1.35em;
  line-height: 1;
  vertical-align: middle;
}

.text-lead .muted {
  color: #9ca3af;
  font-weight: 700;
}

.description-card {
  margin: 1.75rem auto;
  padding: 3.5rem 3.8rem;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.06);
  color: #4b5563;
}

.description-body {
  margin: 2;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 500;
  text-indent: 1.25rem;
}

.description-body-list {
  list-style: disc;
  padding-left: 2rem;
  margin: 0.4rem 0 0.6rem 0;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 500;
}

.description-body-list li {
  line-height: 1.4;
  color: inherit;
}

.description-body-list li + li {
  margin-top: 0.3rem;
}

.dot-accent {
  position: absolute;
  left: 1.25rem;
  bottom: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4338ca;
}

.case-card strong {
  color: #111827;
}

.case-card ul {
  padding-left: 1.1rem;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  color: inherit;
  line-height: 1.6;
}

.description-card .description-body-list {
  display: block;
  list-style: disc;
  padding-left: 2rem;
  margin: 0.4rem 0 0.6rem 0;
  gap: 0;
}

.metric-list {
  display: grid;
  gap: 0.8rem;
}

.metric {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.metric-value {
  font-weight: 800;
  font-size: 1.2rem;
}

.metric-label {
  color: #6b7280;
}

.steps {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.6rem;
  color: #4b5563;
  line-height: 1.5;
}

.quad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.quad-item {
  border-radius: 16px;
  min-height: 220px;
  height: 220px;
  overflow: hidden;
}

.pan-frame {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  padding: 1.25rem 1.25rem 1.25rem 0.75rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.08);
}

.pan-frame img {
  width: 140%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  --pan-x: -20%;
  transform: translateX(var(--pan-x));
  transition: transform 0.08s linear;
  will-change: transform;
}

.full-bleed-container {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.full-bleed-frame {
  width: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.full-bleed-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.image-card {
  min-height: 380px;
  border-radius: 20px;
}

.triple-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.square-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.square-card {
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.square-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-card {
  border-radius: 16px;
  min-height: 200px;
}

.case-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

/* Responsive */
@media (max-width: 900px) {
  header {
    padding: 1rem;
    flex-wrap: nowrap;
    gap: 0.75rem;
  }

  nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  nav ul {
    flex-wrap: nowrap;
    justify-content: flex-end;
    width: auto;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  nav ul::-webkit-scrollbar {
    display: none;
  }

  nav li {
    display: flex;
  }

  nav a {
    display: block;
    padding: 0.35rem 0.45rem;
    white-space: nowrap;
  }

  .section {
    padding: 3.5rem 1rem;
  }

  .case-section {
    padding: 2rem 1rem;
    margin: 0.75rem 0;
  }

  .intro-body {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .intro-visual {
    min-height: 220px;
  }

  .intro-meta {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .text-lead {
    font-size: clamp(1.15rem, 5vw, 1.35rem);
  }

  .image-card {
    min-height: 260px;
  }

  .quad-item,
  .mini-card {
    min-height: 160px;
  }

  .hero {
    height: 80vh;
    padding: 0 1.25rem;
  }

  .about {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-text {
    align-items: center;
  }

  .contact-header {
    margin-bottom: 2rem;
  }

  .contact-grid {
    gap: 1.25rem;
  }

  .contact-form h3,
  .contact-links h3 {
    text-align: left;
  }

  .case-next {
    flex-direction: column;
    align-items: flex-start;
  }

  .typing-roller {
    min-width: 32ch;
  }
}

@media (max-width: 600px) {
  .intro-back {
    width: 38px;
    height: 38px;
  }

  .intro-text h1 {
    font-size: clamp(1.8rem, 6vw, 2.2rem);
  }

  .intro-meta {
    grid-template-columns: 1fr;
  }

  .case-section {
    padding: 2.25rem 1.1rem;
  }

  .case-card {
    padding: 1.1rem;
  }

  .quad-grid,
  .triple-cards {
    gap: 0.5rem;
  }

  footer {
    flex-direction: column;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem 1.25rem;
    font-size: 0.95rem;
    text-align: center;
  }

  footer a {
    display: inline-block;
  }
}

/* Footer */
footer {
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: #111827;
  background-color: #eef1f5;
  border-top: 1px solid #eee;
}

footer a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  }

  footer a:hover {
    text-decoration: underline;
  }

/* Scroll reveal (test page) */
.scroll-fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.scroll-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Template project test animations */
