/* SF Pro Display via system font stack */

:root {
  --bg: #0f0f11;
  --surface: #15151a;
  --card: #19191f;
  --card-hover: #1e1e26;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.13);
  --text: #ffffff;
  --text-2: #a3a3a9;
  --text-3: #6b6b73;
  --accent: #4c5cf8;
  --accent-glow: rgba(76, 92, 248, 0.18);
  --tag-bg: rgba(255, 255, 255, 0.05);
  --tag-text: rgba(255, 255, 255, 0.8);
  --max-w: 880px;
  --pad-x: 45px;
  --r-card: 20px;
  --r-pill: 100px;
  --nav-h: 60px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  z-index: 100;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(15, 15, 17, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-color: var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-2);
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* Hamburger hidden on desktop */
.nav-burger {
  display: none;
}

/* Mobile menu overlay hidden by default (only styled inside @media) */
.mobile-menu {
  display: none;
}

/* ── HERO ── */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  padding-top: var(--nav-h);
  height: 100vh;
}

.hero-spline-wrap {
  width: 100%;
  flex: 1;
  min-height: 400px;
  margin-top: -6px;
}

spline-viewer {
  display: block;
  width: 106%;
  height: 106%;
  margin-left: -3%;
  margin-top: -1%;
}

.hero-text {
  width: 100%;
  padding: 16px 45px 44px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
}

.hero-text h1 {
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: 6px;
}

.hero-text p {
  font-size: clamp(17px, 1.4vw, 20px);
  color: #ffffff;
  line-height: 1.65;
  max-width: 720px;
}

/* Glow removed */
.hero-glow-left {
  display: none;
}


/* ── PAGE WRAPPER ── */
.page-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px var(--pad-x);
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 36px;
}

/* ── PROJECT CARDS ── */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s, transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: scale(1.03);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.project-card-img-wrap {
  width: 100%;
  height: 360px;
  overflow: hidden;
  position: relative;
}

.project-card-img-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover .project-card-img-wrap img {
  transform: scale(1.08);
}

.img-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
}

.ph-mercedes {
  background: linear-gradient(135deg, #0d1b3e 0%, #1a2040 40%, #2d1b4e 100%);
}

.ph-c1 {
  background: linear-gradient(135deg, #1a0d0d 0%, #2d1a1a 50%, #1a1a2d 100%);
}

.ph-alfa-c {
  background: linear-gradient(135deg, #1a0e0e 0%, #3d2510 60%, #2a1a0a 100%);
}

.ph-alfa-m {
  background: linear-gradient(135deg, #0a0e2a 0%, #151a3d 50%, #1a0d2d 100%);
}

.ph-sber {
  background: linear-gradient(135deg, #0a1a10 0%, #0d2618 50%, #0a2020 100%);
}

.project-card-body {
  padding: 22px 26px 26px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.project-card-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 7px;
  letter-spacing: -0.01em;
}

.project-card-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.65;
}

/* ── ACHIEVEMENTS ── */
.achievements {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.achievement {
  background: var(--card);
  padding: 22px 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: background 0.2s;
}

.achievement:hover {
  background: var(--card-hover);
}

.ach-icon {
  font-size: 22px;
  width: 40px;
  text-align: center;
  flex-shrink: 0;
}

.ach-title {
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 3px;
}

.ach-sub {
  font-size: 12.5px;
  color: var(--text-2);
}

/* ── ABOUT SECTION ── */
.about-section {
  background: var(--bg);
  padding: 100px 45px 80px;
  border-top: 1px solid var(--border);
}

.about-inner {
  width: 100%;
  max-width: 1100px;
}

.about-heading {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 56px;
}

/* Tool icons row */
.about-tools {
  display: flex;
  align-items: center;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

.tool-icon {
  width: 165px;
  height: 165px;
  border-radius: 50%;
  background: #1a1a24;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border: 2px solid #2E2A2E;
  margin-left: -30px;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.3);
}

.tool-icon:first-child {
  margin-left: 0;
  box-shadow: none;
}

/* Image-based icon — fills the full circle perfectly */
.tool-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  position: absolute;
  inset: 0;
}

.tool-icon svg {
  width: 62px;
  height: 62px;
}

.tool-icon[data-tool="Miro"] {
  background: #FFD02F;
}

.tool-icon[data-tool="Miro"] svg {
  width: 72px;
  height: 72px;
}

.tool-icon[data-tool="ChatGPT"] {
  background: #10a37f;
}

.tool-icon[data-tool="ChatGPT"] svg {
  width: 66px;
  height: 66px;
}

.tool-icon[data-tool="Framer"] {
  background: #1a1a24;
}

.tool-icon[data-tool="Framer"] svg {
  width: 46px;
  height: 66px;
}

.tool-icon[data-tool="Notion"] {
  background: #ffffff;
}

.tool-icon[data-tool="Notion"] svg {
  width: 66px;
  height: 66px;
}

.tool-icon-spline {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6e3bff, #c44bff, #ff4bec, #ff7e5f);
}

.tool-icon:hover {
  transform: translateY(-10px) scale(1.06);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

/* tooltips on hover */
.tool-icon::after {
  content: attr(data-tool);
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.tool-icon:hover::after {
  opacity: 1;
}


.about-body {
  max-width: 760px;
}

.about-body p {
  font-size: 17px;
  color: #ffffff;
  line-height: 1.9;
  margin-bottom: 20px;
}

.about-body p:last-child {
  margin-bottom: 0;
}

/* ── CONTACT SECTION ── */
.contact-section {
  background: var(--bg);
  padding: 80px 0 0;
}

.contact-grid {
  width: 100%;
  padding: 0 165px 0 45px;
}

.contact-top {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.contact-heading {
  margin: 0;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.contact-cells {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.contact-col-left {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
}

.contact-col-right {
  display: flex;
  flex-direction: column;
}

.contact-cell {
  position: relative;
  padding: 32px 45px 40px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.contact-col-right .contact-cell {
  padding-left: 45px;
  padding-right: 0;
  min-height: 440px;
  /* span both rows */
}

#contact-cell-mobile {
  border-bottom: 1px solid var(--border);
}

.contact-cell-label {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.contact-cell-value {
  align-self: flex-end;
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  letter-spacing: -0.03em;
  white-space: nowrap;
  transition: color 0.2s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.contact-cell-value:hover {
  color: var(--text);
  transform: translateY(-3px);
}

.contact-social-links {
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  height: 100%;
}

.contact-social-link {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text-2);
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.2s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.contact-social-link:hover {
  color: var(--text);
  transform: translateY(-3px);
}


.footer-copy {
  text-align: center;
  padding: 20px;
  color: var(--text-3);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

/* ── CASE STUDY PAGES ── */
.case-hero {
  padding: calc(var(--nav-h) + 48px) var(--pad-x) 0;
  max-width: var(--max-w);
  margin: 0 auto;
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 40px;
  transition: color 0.2s;
}

.case-back:hover {
  color: rgba(255, 255, 255, 0.6);
}

.case-back .arrow {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s ease;
  margin-bottom: 2px;
}

.case-back:hover .arrow {
  transform: translateX(-4px);
}

.case-hero h1 {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin-bottom: 24px;
}

.case-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(76, 92, 248, 0.12);
  border: 1px solid rgba(76, 92, 248, 0.28);
  border-radius: var(--r-pill);
  padding: 5px 14px;
  font-size: 12.5px;
  color: #7b8eff;
  font-weight: 600;
  margin-bottom: 24px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7b8eff;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 40px;
}

.case-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-meta-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  font-weight: 600;
}

.case-meta-value {
  font-size: 14px;
  color: var(--text-2);
}

.case-cover {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) 0;
}

.case-cover img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
}

.case-cover-ph {
  width: 100%;
  height: 460px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 14px;
}

.case-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
  max-width: var(--max-w);
  margin: 40px auto;
  padding: 0 var(--pad-x);
  background-clip: padding-box;
}

.metrics-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.case-metric {
  background: var(--card);
  padding: 26px 22px;
}

.case-metric-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}

.case-metric-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.case-layout-grid {
  display: flex;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--pad-x);
  gap: 64px; /* gap-16 approx */
}

.case-sidebar {
  display: none;
  width: 180px;
  flex-shrink: 0;
  padding-top: 100px;
}

@media (min-width: 1024px) {
  .case-sidebar {
    display: block;
  }
}

.case-sidebar-inner {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-nav-link {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-family: inherit;
  transition: all 0.3s var(--ease);
  display: flex;
  align-items: center;
  gap: 20px;
  color: #4a4a4a;
  text-decoration: none;
}

.sidebar-nav-link:hover {
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.3s var(--ease);
  background-color: #333333;
}

.sidebar-nav-link.active {
  color: #ffffff;
}

.sidebar-nav-link.active .sidebar-nav-dot {
  background-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.case-body {
  flex: 1;
  min-width: 0;
  max-width: 1100px;
  padding-top: 0;
  margin-bottom: 80px;
}

.case-section {
  padding: 24px var(--pad-x);
}

.case-section h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.015em;
}

.case-section p {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.85;
  margin-bottom: 14px;
}

.case-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.case-section ul li {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.case-section ul li::before {
  content: '•';
  color: #ffffff;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 5px;
}

.case-img {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) 40px;
}

.case-img img {
  width: 100%;
  border-radius: 14px;
}

.case-img-ph {
  width: 100%;
  height: 360px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
}

/* ── DIVIDER ── */
.divider {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.divider hr {
  border: none;
  border-top: 1px solid var(--border);
}

/* ── SCROLL ANIMATIONS ── */
.fade-in {
  --fade-y: 50px;
  opacity: 0;
  transform: translateY(var(--fade-y));
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  --fade-y: 0px;
}

/* ── TWO-COLUMN SECTION LAYOUT ── */
.two-col-section {
  display: grid;
  grid-template-columns: 28% 1fr;
  width: 100%;
  padding: 80px 80px 100px 45px;
  gap: 0 32px;
}

.two-col-left {
  position: relative;
}

.two-col-sticky {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
}

.section-heading {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 16px;
}

.section-sub {
  font-size: clamp(17px, 1.4vw, 20px);
  color: #ffffff;
  line-height: 1.65;
  white-space: nowrap;
}

.two-col-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* ── PROJECT CARDS — FRAMER STYLE ── */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project-card {
  background: #ffffff;
  padding: 24px;
  border: none;
  border-radius: 24px;
  text-decoration: none;
  display: block;
  color: #111;
  width: 640px;
  aspect-ratio: 1;
  --rX: 0deg;
  --rY: 0deg;
  --tY: 0px;
  --s: 1;
  /* We use the --fade-y from .fade-in to maintain the scroll entrance effect */
  transform: perspective(1200px) rotateX(var(--rX)) rotateY(var(--rY)) translateY(calc(var(--tY) + var(--fade-y, 0px))) scale(var(--s));
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, box-shadow;
  transform-style: preserve-3d;
  position: relative;
  cursor: none;
}

/* Ensure hover parallax always wins over general scroll animation */
.project-card.fade-in.visible {
  transform: perspective(1200px) rotateX(var(--rX)) rotateY(var(--rY)) translateY(calc(var(--tY) + var(--fade-y, 0px))) scale(var(--s));
}

.project-card:hover {
  --s: 1.05;
  --tY: -8px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
}

.project-card-img-wrap {
  width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: 16px;
  position: relative;
}

.project-card-img-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-card-img-wrap img {
  transform: scale(1.04);
}

/* Cover inside placeholder (Mercedes Me) */
.project-card-img-wrap .img-placeholder .project-card-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.project-card-img-wrap .img-placeholder .project-card-fallback-label {
  position: relative;
  z-index: 0;
  pointer-events: none;
}

.img-placeholder {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

/* After cover loads: hide gradient overlay (sibling <img> cards) or strip gradient + label (cover inside placeholder) */
.project-card-img-wrap.is-loaded .img-placeholder:not(:has(.project-card-cover-img)) {
  display: none;
}

.project-card-img-wrap.is-loaded .img-placeholder:has(.project-card-cover-img) {
  background: none !important;
}

.project-card-img-wrap.is-loaded .img-placeholder:has(.project-card-cover-img) .project-card-fallback-label {
  display: none;
}

/* Gradient placeholder backgrounds stay the same */
.ph-mercedes {
  background: linear-gradient(135deg, #0d1b3e, #2d1b4e);
}

.ph-c1 {
  background: linear-gradient(135deg, #1a0d0d, #1a1a2d);
}

.ph-alfa-c {
  background: linear-gradient(135deg, #1a0e0e, #3d2510);
}

.ph-alfa-m {
  background: linear-gradient(135deg, #0a0e2a, #1a0d2d);
}

.ph-sber {
  background: linear-gradient(135deg, #0a1a10, #0a2020);
}

.project-card-body {
  padding: 24px 0 0 0;
}

/* Override tags to light style (like Framer) */
.project-card .project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-card .tag {
  background: transparent;
  border: 1px solid #000000;
  color: #000000;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 100px;
  padding: 4px 12px;
}

/* Tweak typography inside the card */
.project-card-title {
  font-size: 24px;
  font-weight: 700;
  color: #000000;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.project-card-desc {
  font-size: 15px;
  color: #000000;
  line-height: 1.6;
}

/* ── MAGNETIC VIEW CURSOR ── */
.view-cursor {
  position: fixed;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.3);
  transition: opacity 0.2s ease, transform 0.2s ease;
  /* position updated by JS */
  left: 0;
  top: 0;
}

.view-cursor span {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font);
}

.view-cursor.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── CV / EXPERIENCE SECTION ── */
.cv-section {
  background: #f2f2f4;
  color: #000000;
  padding: 80px 165px 100px 45px;
  border-radius: 60px;
}

.cv-header {
  width: 100%;
  padding-bottom: 40px;
  border-bottom: 1px solid #d0d0d5;
}

.cv-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #000000;
}

.cv-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cv-group {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0 80px;
  padding: 48px 0 64px;
  border-bottom: 1px solid #d0d0d5;
  align-items: start;
}

.cv-group-label {
  position: sticky;
  top: calc(var(--nav-h) + 60px);
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  padding-top: 4px;
}

.cv-group-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cv-item {
  border-top: 1px solid #d0d0d5;
  padding: 28px 0;
}

.cv-item:first-child {
  border-top: none;
  padding-top: 0;
}

.cv-item-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.cv-company {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #000000;
  margin-bottom: 6px;
  line-height: 1.15;
}

.cv-role {
  font-size: 15px;
  color: #000000;
}

.cv-date {
  font-size: 15px;
  color: #000000;
  white-space: nowrap;
  padding-top: 4px;
  text-align: right;
}

/* ── RESPONSIVE ── */
@media(max-width:900px) {
  .two-col-section {
    grid-template-columns: 1fr;
    padding: 60px 24px 60px;
  }

  .two-col-sticky {
    position: static;
    margin-bottom: 40px;
  }

  .section-sub {
    max-width: 100%;
  }

  .cv-section {
    padding: 60px 24px 80px;
  }

  .cv-group {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cv-group-label {
    padding-bottom: 0;
  }
}

@media(max-width:1024px) {
  :root {
    --pad-x: 20px;
  }

  .nav {
    z-index: 200;
  }

  .nav.menu-open {
    background: transparent !important;
    border-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .nav.menu-open .nav-logo {
    opacity: 0;
    pointer-events: none;
  }

  .nav-logo {
    transition: opacity 0.3s ease;
  }

  /* ── Hamburger button ── */
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
    position: relative;
  }

  .nav-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1),
                opacity 0.3s ease;
    transform-origin: center;
  }

  /* X state */
  .nav-burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-burger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .nav-burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Hide desktop nav links on mobile */
  .nav-links {
    display: none;
  }

  /* Mobile menu overlay */
  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(10, 10, 12, 0.5);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.4,0,0.2,1);
  }

  .mobile-menu.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  /* Close button */
  .mobile-menu-close {
    position: absolute;
    top: 32px;
    right: 24px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 42px;
    cursor: pointer;
    line-height: 1;
    padding: 8px;
    transition: transform 0.2s;
    outline: none;
  }

  .mobile-menu-close:active {
    transform: scale(0.9);
  }

  .mobile-menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .mobile-menu-link {
    display: block;
    font-size: clamp(36px, 10vw, 52px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 24px;
    line-height: 1.1;
    transition: color 0.2s, transform 0.2s;
  }

  .mobile-menu-link:active {
    color: rgba(255,255,255,0.5);
    transform: scale(0.97);
  }

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

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-right {
    align-items: flex-start;
  }

  .case-hero h1 {
    font-size: 32px;
  }

  .cv-item-inner {
    flex-direction: column;
    gap: 4px;
  }

  .cv-date {
    text-align: left;
  }

  /* Contact section mobile */
  .contact-cells {
    grid-template-columns: 1fr;
  }

  .contact-col-left {
    border-right: none;
  }

  .contact-col-right .contact-cell {
    padding-left: 0;
    min-height: 220px;
  }

  .contact-grid {
    padding: 0 24px;
  }

  /* ── MOBILE: 1) Hero — Vertical stack, centered, optimal typography ── */
  .hero {
    min-height: 100svh;
    height: auto;
    padding-top: calc(var(--nav-h) + 16px);
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligned to left */
    overflow: hidden;
  }

  .hero-spline-wrap {
    flex: none;
    width: 100%;
    height: 46svh; /* Proportional space in top half */
    min-height: 0;
    margin-top: 0;
    margin-bottom: 24px; /* Generous spacing below */
    position: relative;
  }

  spline-viewer {
    position: absolute;
    top: 10px; /* Top padding */
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    transform: scale(0.95); /* Larger scale so hello is fully visible */
    transform-origin: top center;
  }

  /* Hide the Built with Spline badge */
  spline-viewer::part(logo) {
    display: none !important;
  }
  
  .hero-spline-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 150px;
    height: 50px;
    background: var(--bg);
    pointer-events: none;
  }

  .hero-text {
    flex: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 24px; /* Safe area padding */
    width: 100%;
    max-width: 480px; /* Readable on larger phones */
    margin: 0; /* Align to left */
    background: transparent;
    text-align: left; /* Keep left alignment */
  }

  .hero-text h1 {
    font-size: 38px; /* Matched image */
    line-height: 1.1; 
    margin-bottom: 24px; /* More spacing according to image */
    letter-spacing: -0.02em;
  }

  .hero-text p {
    display: block;
    font-size: 18px; /* Larger body size matched to image */
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85); /* Slightly brighter */
    max-width: 100%; 
    white-space: normal;
  }

  /* ── MOBILE: 2) Project cards — full-width, vertical scroll ── */
  .two-col-section {
    grid-template-columns: 1fr;
    padding: 60px 24px 60px;
  }

  .two-col-sticky {
    position: static;
    margin-bottom: 40px;
  }

  .section-sub {
    max-width: 100%;
    white-space: normal;
  }

  .two-col-right {
    align-items: stretch;
  }

  .projects-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-x: visible;
    padding: 0;
  }

  .project-card {
    width: 100%;
    flex: none;
    aspect-ratio: auto;
    cursor: pointer;
    transform: none !important;
  }

  .project-card.fade-in.visible {
    transform: none !important;
  }

  .project-card-img-wrap {
    height: 240px;
  }

  /* ── MOBILE: 3) CV — vertical scroll, sticky group labels ── */
  .cv-section {
    border-radius: 32px;
    padding: 48px 0 64px;
    overflow: visible;
  }

  .cv-header {
    padding: 0 24px 32px;
  }

  .cv-group {
    grid-template-columns: 100px 1fr;
    gap: 0 20px;
    padding: 32px 24px 32px;
    border-bottom: 1px solid #d0d0d5;
    align-items: start;
  }

  .cv-group-label {
    position: sticky;
    top: calc(var(--nav-h) + 16px);
    font-size: 14px;
    font-weight: 700;
    padding: 0;
    line-height: 1.3;
  }

  .cv-group-items {
    display: flex;
    flex-direction: column;
    overflow-x: visible;
    padding: 0;
    border-bottom: none;
    scrollbar-width: auto;
  }

  .cv-item {
    flex: none;
    border-left: none;
    border-top: 1px solid #d0d0d5;
    padding: 20px 0;
    margin-right: 0;
  }

  .cv-item:first-child {
    border-top: none;
    padding-top: 0;
  }

  .cv-item-inner {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }

  /* ── MOBILE: 4) Tool icons — compact single-line horizontal scroll ── */
  .about-tools {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
    margin-bottom: 40px;
    padding-bottom: 8px;
  }

  .about-tools::-webkit-scrollbar {
    display: none;
  }

  .tool-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-left: -16px;
  }

  .tool-icon:first-child {
    margin-left: 0;
  }
}