/* ========================================
   THEME VARIABLES
   ======================================== */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-elevated: #ffffff;
  --text: #0a0a0a;
  --text-soft: #444;
  --text-muted: #888;
  --border: #e6e6e9;
  --border-soft: rgba(0, 0, 0, 0.08);
  --accent: #6366f1;
  --accent-strong: #4f46e5;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --shadow: 0 22px 50px rgba(15, 23, 42, 0.07);
  --about-bg: #f5f5f7;
}

[data-theme="dark"] {
  --bg: #0b0b10;
  --bg-alt: #14141c;
  --bg-elevated: #1a1a25;
  --text: #f4f4f8;
  --text-soft: #c7c7d1;
  --text-muted: #8a8a99;
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.06);
  --accent: #818cf8;
  --accent-strong: #6366f1;
  --accent-soft: rgba(129, 140, 248, 0.18);
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.55);
  --about-bg: #14141c;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  cursor: none;
  overflow: hidden;
  height: 100%;
  --nav-height: 92px;
}

body {
  font-family: 'Barlow', sans-serif;
  color: var(--text);
  background: var(--bg);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s ease, color 0.4s ease;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: none;
}

button {
  cursor: none;
  font-family: 'Barlow', sans-serif;
}

img {
  max-width: 100%;
}

/* ========================================
   CUSTOM CURSOR
   ======================================== */
/* Hidden until first pointer move (avoids dot/ring stuck on viewport center over hero) */
html:not(.cursor-has-moved) #cursor-dot,
html:not(.cursor-has-moved) #cursor-ring {
  opacity: 0;
  visibility: hidden;
}

#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100000;
  pointer-events: none;
  width: 6px;
  height: 6px;
  background: #000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease;
}

#cursor-dot.clicking {
  transform: translate(-50%, -50%) scale(0.4);
}

#cursor-dot.hover {
  width: 10px;
  height: 10px;
}

#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99998;
  pointer-events: none;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              background 0.3s ease,
              opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

#cursor-ring.hover {
  width: 72px;
  height: 72px;
  border-color: rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.04);
}

#cursor-ring.text-visible {
  width: 90px;
  height: 90px;
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.6);
}

#cursor-ring.clicking {
  width: 32px;
  height: 32px;
}

#cursor-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
}

#cursor-ring.text-visible #cursor-text {
  opacity: 1;
}

/* Dark page cursor override */
.page-dark #cursor-dot {
  background: #fff;
}

.page-dark #cursor-ring {
  border-color: rgba(255, 255, 255, 0.35);
}

.page-dark #cursor-ring.hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

.page-dark #cursor-ring.text-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

.page-dark #cursor-text {
  color: #fff;
}

/* Native / OS dialogs (tg://, etc.): show real pointer — custom cursor stops updating while blurred */
html.use-system-cursor #cursor-dot,
html.use-system-cursor #cursor-ring {
  visibility: hidden !important;
  opacity: 0 !important;
}

html.use-system-cursor,
html.use-system-cursor body {
  cursor: auto !important;
}

html.use-system-cursor a,
html.use-system-cursor button,
html.use-system-cursor .hoverable,
html.use-system-cursor [data-cursor] {
  cursor: pointer !important;
}

/* ========================================
   PAGE TRANSITIONS (per-section variants)
   ======================================== */
#page-transition {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
}

#page-transition.pt-blocking {
  pointer-events: auto;
}

.pt-layer {
  position: fixed;
  pointer-events: none;
  background: #000;
  will-change: transform, opacity, clip-path;
}

/* Split — classic two panels */
.pt-split-left {
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  z-index: 9001;
}

.pt-split-right {
  top: 0;
  right: -50%;
  width: 50%;
  height: 100%;
  z-index: 9001;
}

/* Full wipe — single panel from left */
.pt-wipe {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9002;
  transform: translate3d(-100%, 0, 0);
}

/* Horizontal — top / bottom halves */
.pt-h-top {
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  z-index: 9003;
  transform: translate3d(0, -100%, 0);
}

.pt-h-bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  z-index: 9003;
  transform: translate3d(0, 100%, 0);
}

/* Circle reveal — scaled disc from center */
.pt-circle-outer {
  inset: 0;
  z-index: 9004;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.pt-circle-inner {
  width: min(220vmin, 400vw);
  height: min(220vmin, 400vw);
  border-radius: 50%;
  background: #000;
  transform: scale(0);
  transform-origin: center center;
  transition: transform 0.55s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Diagonal — rotated plane (editorial / brutalist) */
.pt-diag {
  left: 50%;
  top: 50%;
  width: 220vmax;
  height: 220vmax;
  margin-left: -110vmax;
  margin-top: -110vmax;
  z-index: 9005;
  transform: rotate(12deg) scale(0);
  transform-origin: center center;
}

/* Blinds — horizontal strips */
.pt-blinds {
  inset: 0;
  z-index: 9006;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.pt-blinds span {
  flex: 1;
  min-height: 0;
  background: #000;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.42s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Slide up — dock from bottom */
.pt-slide {
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 9007;
  transform: translate3d(0, 100%, 0);
}

/* Soft fade — language switch (minimal motion) */
.pt-fade {
  inset: 0;
  z-index: 9008;
  background: #000;
  opacity: 0;
}

/* ========================================
   NAVBAR
   ======================================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 500;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: box-shadow 0.3s, background 0.3s;
}

#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

#navbar.dark-mode {
  background: #000;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

#navbar.dark-mode .nav-logo {
  color: #fff;
}

#navbar.dark-mode .nav-link {
  color: #fff;
}

#navbar.dark-mode .nav-link::after {
  background: #fff;
}

#navbar.dark-mode .nav-logo::after {
  background: #fff;
}

#navbar.dark-mode .lang-btn {
  color: #fff;
}

#navbar.dark-mode .lang-btn.active {
  color: #fff;
}

#navbar.dark-mode .lang-switcher span {
  color: rgba(255, 255, 255, 0.3);
}

#navbar.dark-mode .nav-cta {
  background: #fff;
  color: #000;
}

#navbar.dark-mode .hamburger span {
  background: #fff;
}

.nav-logo {
  font-weight: 800;
  font-size: 27px;
  letter-spacing: -0.03em;
  color: #000;
  transition: color 0.3s;
  position: relative;
}

.nav-logo::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #000;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-logo:hover::after {
  width: 100%;
}

.nav-logo.active::after {
  width: 100%;
}

.nav-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
}

.nav-link {
  font-size: 17px;
  font-weight: 400;
  color: #000;
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #000;
  border-radius: 1px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  font-weight: 600;
}

.nav-link.active::after {
  width: 100%;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-sep {
  color: #ccc;
  font-size: 15px;
}

.lang-btn {
  background: none;
  border: none;
  font-size: 15px;
  color: #888;
  font-family: inherit;
  cursor: none;
  padding: 0;
}

.lang-btn.active {
  color: #000;
  font-weight: 700;
}

.lang-btn:hover {
  color: #000;
}

.nav-cta {
  background: #000;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav-cta:hover {
  background: #333;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  z-index: 600;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #000;
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
#mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: #fff;
  z-index: 499;
  padding: 24px;
  border-bottom: 1px solid #e0e0e0;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s;
}

#mobile-menu.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.dark-mode {
  background: #000;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

#mobile-menu .mobile-link {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #000;
  padding: 12px 0;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
  transition: color 0.25s;
}

#mobile-menu .mobile-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #000;
  border-radius: 1px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu .mobile-link.active::after {
  width: 100%;
}

#mobile-menu.dark-mode .mobile-link {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

#mobile-menu.dark-mode .mobile-link::after {
  background: #fff;
}

#mobile-menu .mobile-lang-switcher {
  display: flex;
  gap: 16px;
  padding-top: 8px;
}

#mobile-menu .mobile-lang-btn {
  font-size: 16px;
  font-weight: 700;
  color: #888;
  background: none;
  border: none;
}

#mobile-menu .mobile-lang-btn.active {
  color: #000;
}

#mobile-menu.dark-mode .mobile-lang-btn.active {
  color: #fff;
}

/* ========================================
   PAGES CONTAINER
   ======================================== */
#pages-container {
  width: 100%;
  height: 100vh;
  position: relative;
}

.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.page.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   HOME PAGE — HERO
   ======================================== */
#page-home {
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
}

.hero-greeting {
  text-align: center;
  width: 100%;
  display: block;
  position: absolute;
  top: calc(var(--nav-height) + 18px);
  left: 0;
  font-size: 17px;
  font-weight: 400;
  color: #000;
  z-index: 10;
  white-space: nowrap;
}

.hero-title-container {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
  z-index: 5;
  overflow: hidden;
  padding-bottom: 20px;
}

.hero-titles-slider {
  position: relative;
  width: 100%;
  height: auto;
}

.hero-title-slide {
  position: absolute;
  width: 100%;
  left: 0;
  opacity: 0;
  transform: translateY(100%);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.hero-title-slide.active {
  position: relative;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-title-slide.exit-up {
  opacity: 0;
  transform: translateY(-100%);
}

.hero-title-line1 {
  display: block;
  font-size: clamp(50px, 8vw, 120px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  position: relative;
  z-index: 5;
  cursor: none;
  color: #000;
  -webkit-text-stroke: 2px #000;
  transition: color 3s ease-in-out;
}

/* Outlined line: stroke visually tightens gaps (e.g. А+д) — slightly open tracking */
.hero-title-line2 {
  display: block;
  font-size: clamp(50px, 8vw, 120px);
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1;
  margin-top: 0.04em;
  white-space: nowrap;
  position: relative;
  z-index: 5;
  cursor: none;
  color: transparent;
  -webkit-text-stroke: 2px #000;
  transition: color 3s ease-in-out;
}

.hero-photo {
  position: absolute;
  top: var(--nav-height);
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 42vw);
  z-index: 2;
  pointer-events: auto;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}


.hero-photo img,
.hero-photo svg {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top center;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: auto;
  filter: contrast(1.08) brightness(1.0);
  -webkit-mask-image:
    linear-gradient(to bottom, black 0%, black 55%, transparent 95%),
    linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-composite: destination-in;
  mask-image:
    linear-gradient(to bottom, black 0%, black 55%, transparent 95%),
    linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-composite: intersect;
  transition: filter 0.45s ease;
}

.hero-photo:hover img {
  filter: contrast(1.12) brightness(1.04) saturate(1.06);
}

/* anim-up uses transform — must keep translateX(-50%) or photo shifts right */
.hero-photo.anim-up {
  transform: translateX(-50%) translateY(60px);
}

.hero-photo.anim-up.visible {
  transform: translateX(-50%) translateY(0);
}

.hero-photo.anim-up.visible:hover,
.hero-photo.visible:hover {
  transform: translateX(-50%) translateY(0) scale(1.045);
}

.hero-bottom {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  padding: 0 60px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  z-index: 10;
}

.hero-location {
  font-size: 16px;
  font-weight: 400;
  color: #000;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.hero-btn-primary {
  background: #000;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
  white-space: nowrap;
}

.hero-btn-primary:hover {
  background: #333;
}

.hero-btn-primary::before {
  content: '●';
  font-size: 8px;
}

.hero-btn-secondary {
  background: transparent;
  color: #000;
  border: 1.5px solid #000;
  border-radius: 100px;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.hero-btn-secondary:hover {
  background: #000;
  color: #fff;
}

.hero-btn-secondary::before {
  content: '○';
  font-size: 10px;
}

.hero-social {
  display: flex;
  gap: 24px;
}

.hero-social a {
  font-size: 13px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.hero-social a:hover {
  color: #000;
}

/* Floating contact button */
#floating-contact {
  position: fixed;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #000;
  z-index: 450;
  transition: background 0.2s, color 0.2s;
}

#floating-contact:hover {
  background: #000;
  color: #fff;
}

/* Load animation */
.anim-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   WORK PAGE
   ======================================== */
#page-work {
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: absolute;
  inset: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-padding-top: var(--nav-height);
}

.work-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--nav-height) + 24px) 60px 16px;
  flex-shrink: 0;
  gap: 16px;
}

.work-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
}

.work-nav-arrows {
  display: flex;
  gap: 12px;
}

.work-nav-btn {
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}

.work-nav-btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.work-cards-container {
  display: flex;
  gap: 20px;
  padding: 16px 60px 32px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  flex: 0 0 auto;
  align-items: stretch;
}

.work-cards-container::-webkit-scrollbar {
  display: none;
}

.work-card {
  background: #111;
  border-radius: 8px;
  padding: 18px 20px 20px;
  width: 300px;
  min-width: 300px;
  min-height: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              background 0.3s ease;
}

.work-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.15);
  background: #161616;
}

.work-card-image {
  width: 100%;
  aspect-ratio: 2 / 1;
  max-height: 118px;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 6px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background 0.4s ease;
}

.work-card:hover .work-card-image {
  background: linear-gradient(135deg, #1a1a2e 0%, #1a3a5c 50%, #1a5276 100%);
}

.work-card-image svg {
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.work-card:hover .work-card-image svg {
  opacity: 0.85;
  transform: scale(1.1);
}

.work-card-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #fff;
  line-height: 1.2;
  flex: 0 0 auto;
}

.work-card-tech {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  line-height: 1.35;
  flex: 0 0 auto;
}

.work-card-desc {
  font-size: 13px;
  font-weight: 400;
  color: #aaa;
  line-height: 1.45;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
}

/* Work bottom section — "You need a website" */
.work-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 60px 36px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  gap: 24px;
}

.work-bottom-left {
  max-width: 540px;
}

.work-bottom-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin-bottom: 16px;
}

.work-bottom-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.1;
}

.work-bottom-subtitle {
  font-size: 16px;
  font-weight: 400;
  color: #888;
  margin-bottom: 16px;
}

.work-bottom-body {
  font-size: 15px;
  font-weight: 400;
  color: #999;
  line-height: 1.6;
  margin-bottom: 24px;
}

.work-bottom-btn {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 100px;
  padding: 14px 32px;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s;
}

.work-bottom-btn:hover {
  background: #e0e0e0;
}

/* Rotating SVG badge */
.work-badge {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.work-badge svg {
  animation: rotateBadge 10s linear infinite;
  width: 100%;
  height: 100%;
}

.work-badge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
}

@keyframes rotateBadge {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================
   ABOUT PAGE
   ======================================== */
#page-about {
  background: #fff;
  display: flex;
}

.about-photo {
  width: 45vw;
  height: 100vh;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.about-photo::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(to top, #fff 0%, transparent 25%),
    linear-gradient(to right, transparent 90%, #fff 100%);
  pointer-events: none;
  z-index: 1;
}

.about-photo img,
.about-photo svg {
  width: 90%;
  height: 90%;
  object-fit: contain;
  object-position: center bottom;
  filter: contrast(1.06) brightness(1.0);
  display: block;
  transition: filter 0.8s ease, transform 0.8s ease;
  margin-top: auto;
}

.about-photo:hover img {
  filter: contrast(1.08) brightness(1.02) saturate(1.1);
  transform: scale(1.02);
}

.about-content {
  width: 55vw;
  height: 100vh;
  padding: 120px 60px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}

.about-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 20px;
}

.about-title {
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 900;
  color: #000;
  line-height: 1.1;
  margin-bottom: 20px;
}

.about-bio {
  font-size: 16px;
  font-weight: 400;
  color: #555;
  line-height: 1.7;
  margin-bottom: 36px;
}

.about-stats {
  display: flex;
  gap: 0;
  margin-bottom: 36px;
}

.about-stat {
  padding: 0 32px;
  border-right: 1px solid #e0e0e0;
}

.about-stat:first-child {
  padding-left: 0;
}

.about-stat:last-child {
  border-right: none;
}

.about-stat-value {
  font-size: 32px;
  font-weight: 900;
  color: #000;
}

.about-stat-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-top: 4px;
}

.about-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.about-chip {
  padding: 8px 18px;
  border: 1.5px solid #e0e0e0;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #000;
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.about-chip:hover {
  background: #000;
  color: #fff;
}

.about-socials {
  display: flex;
  gap: 28px;
}

.about-socials a {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.about-socials a:hover {
  opacity: 1;
}

/* About animation */
.anim-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================
   EXPERIENCE, SKILLS, CERTIFICATES (scrollable inner pages)
   ======================================== */
#page-experience,
#page-certificates {
  background: #fff;
  color: #000;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#page-skills {
  background: #f4f4f4;
  color: #000;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.exp-wrapper,
.certs-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 100px 60px 80px;
  box-sizing: border-box;
}

/* Skills: full-width bento (not a narrow centered column) */
.skills-wrapper {
  max-width: min(1420px, 100%);
  margin: 0;
  padding: 96px clamp(20px, 4vw, 64px) 100px;
  box-sizing: border-box;
}

.skills-header {
  max-width: 100%;
  margin-bottom: clamp(36px, 4vw, 52px);
}

.skills-header .section-title {
  margin-bottom: 12px;
  white-space: nowrap;
  font-size: clamp(22px, min(4.8vw, 3.2rem), 56px);
  line-height: 1.05;
}

.skills-header .section-line {
  margin-bottom: 18px;
}

.skills-lead {
  max-width: 42rem;
  font-size: clamp(16px, 1.15vw, 18px);
  font-weight: 400;
  line-height: 1.6;
  color: #555;
  margin: 0;
  letter-spacing: 0.01em;
}

.section-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-line {
  width: 64px;
  height: 4px;
  background: #000;
  margin-bottom: 48px;
}

/* —— Experience page heading —— */
#page-experience .section-title {
  text-align: center;
}

#page-experience .section-line {
  margin-left: auto;
  margin-right: auto;
}

/* —— Experience timeline (modern cards) —— */
.timeline {
  position: relative;
  padding-left: 44px;
  max-width: 820px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.12) 0%,
    rgba(0, 0, 0, 0.35) 45%,
    rgba(0, 0, 0, 0.12) 100%
  );
}

.timeline-item {
  position: relative;
  margin-bottom: clamp(22px, 3vw, 32px);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -44px;
  top: 22px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #0a0a0a;
  box-shadow:
    0 0 0 5px rgba(0, 0, 0, 0.04),
    0 6px 16px rgba(0, 0, 0, 0.12);
  z-index: 1;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.08);
  box-shadow:
    0 0 0 5px rgba(0, 0, 0, 0.06),
    0 8px 22px rgba(0, 0, 0, 0.16);
}

.timeline-card {
  --exp-accent: #0a0a0a;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff 0%, #f4f5f7 100%);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 22px;
  padding: 26px 30px 28px 34px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s ease,
              border-color 0.3s ease;
}

.timeline-item:nth-child(1) .timeline-card { --exp-accent: #111827; }
.timeline-item:nth-child(2) .timeline-card { --exp-accent: #2563eb; }
.timeline-item:nth-child(3) .timeline-card { --exp-accent: #059669; }
.timeline-item:nth-child(4) .timeline-card { --exp-accent: #d97706; }

.timeline-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 22px 0 0 22px;
  background: var(--exp-accent);
  opacity: 0.95;
}

.timeline-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.timeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 4px;
}

.timeline-role {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #0a0a0a;
}

.timeline-company {
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.timeline-company:hover {
  color: #000;
  border-bottom-color: rgba(0, 0, 0, 0.25);
}

.timeline-date {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #374151;
  white-space: nowrap;
  padding: 10px 16px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.045);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 14px;
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.7;
  color: #374151;
}

.timeline-list li:last-child {
  margin-bottom: 0;
}

.timeline-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--exp-accent, #111);
  opacity: 0.85;
}

/* —— Skills: one full-width card per row —— */
.skills-bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 2.5vw, 32px);
  align-items: stretch;
  width: 100%;
}

.skill-card {
  --skill-accent: #111;
  position: relative;
  background: linear-gradient(165deg, #fff 0%, #f5f5f5 100%);
  border: 1px solid #e6e6e6;
  border-radius: 22px;
  padding: clamp(26px, 3vw, 36px) clamp(28px, 3.2vw, 40px) clamp(30px, 3.2vw, 42px) clamp(30px, 3.2vw, 44px);
  min-height: 0;
  overflow: hidden;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.38s ease,
              border-color 0.38s ease;
}

.skill-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--skill-accent);
  border-radius: 22px 0 0 22px;
}

.skill-card--accent-1 { --skill-accent: #111; }
.skill-card--accent-2 { --skill-accent: #2563eb; }
.skill-card--accent-3 { --skill-accent: #059669; }
.skill-card--accent-4 { --skill-accent: #dc2626; }
.skill-card--accent-5 { --skill-accent: #7c3aed; }
.skill-card--accent-6 { --skill-accent: #d97706; }
.skill-card--accent-7 { --skill-accent: #0891b2; }

.skill-card:hover {
  transform: translateY(-6px);
  border-color: #ccc;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.09);
}

.skill-card-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
  min-height: 1.2em;
}

.skill-card-index {
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 800;
  letter-spacing: 0.18em;
  color: #bbb;
}

.skill-card-title {
  font-size: clamp(18px, 1.5vw, 26px);
  font-weight: 800;
  margin: 0 0 clamp(20px, 2vw, 28px);
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #000;
  padding-right: 8px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 1.2vw, 14px);
}

.skill-tags span {
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  line-height: 1.3;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.skill-card:hover .skill-tags span {
  border-color: rgba(0, 0, 0, 0.12);
}

.skill-tags span:hover {
  background: #000;
  color: #fff;
  border-color: #000;
  transform: translateY(-1px);
}

/* —— Certificates —— */
#page-certificates .section-title {
  text-align: center;
}

#page-certificates .section-line {
  margin-left: auto;
  margin-right: auto;
}

.certs-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

/* Rotating accent per row — icon + bar pick up the same hue on hover */
.certs-grid a.cert-card:nth-child(8n + 1) { --cert-accent: #0078d4; }
.certs-grid a.cert-card:nth-child(8n + 2) { --cert-accent: #4285f4; }
.certs-grid a.cert-card:nth-child(8n + 3) { --cert-accent: #0d9488; }
.certs-grid a.cert-card:nth-child(8n + 4) { --cert-accent: #7c3aed; }
.certs-grid a.cert-card:nth-child(8n + 5) { --cert-accent: #dc2626; }
.certs-grid a.cert-card:nth-child(8n + 6) { --cert-accent: #d97706; }
.certs-grid a.cert-card:nth-child(8n + 7) { --cert-accent: #0891b2; }
.certs-grid a.cert-card:nth-child(8n + 8) { --cert-accent: #4f46e5; }

a.cert-card {
  --cert-accent: #111;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(165deg, #fafafa 0%, #f3f4f6 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  cursor: none;
  isolation: isolate;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.45s ease,
              border-color 0.35s ease,
              background 0.45s ease;
}

a.cert-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  background: var(--cert-accent);
  opacity: 0.35;
  transform: scaleY(0.65);
  transform-origin: center;
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

a.cert-card > * {
  position: relative;
  z-index: 1;
}

a.cert-card:hover {
  transform: translateY(-6px) translateX(4px);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  background: linear-gradient(155deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
}

a.cert-card:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.cert-icon-fa {
  flex-shrink: 0;
  width: 56px;
  text-align: center;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

a.cert-card:hover .cert-icon-fa {
  transform: scale(1.06);
}

.cert-icon-fa i {
  font-size: 2rem;
  color: #1a1a1a;
  opacity: 0.88;
  transition: color 0.4s ease, opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.4s ease;
}

a.cert-card:hover .cert-icon-fa i {
  color: var(--cert-accent);
  opacity: 1;
  transform: scale(1.08);
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12));
}

.cert-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cert-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #0a0a0a;
  transition: color 0.3s ease;
}

a.cert-card:hover .cert-card-title {
  color: #000;
}

.cert-provider {
  font-size: 0.95rem;
  font-weight: 700;
  color: #555;
  transition: color 0.35s ease;
}

a.cert-card:hover .cert-provider {
  color: #374151;
}

.cert-date {
  font-size: 0.88rem;
  font-weight: 600;
  color: #888;
}

.cert-external {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #bbb;
  transition: color 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

a.cert-card:hover .cert-external {
  color: var(--cert-accent);
  transform: translate(4px, -4px) scale(1.05);
}

/* ========================================
   CONTACT PAGE
   ======================================== */
#page-contact {
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

.contact-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin-bottom: 24px;
}

.contact-title {
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 60px;
}

.contact-rows {
  max-width: 700px;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-row:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-row:hover {
  transform: translateX(-8px);
}

.contact-row-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  min-width: 100px;
}

.contact-row-value {
  font-size: 18px;
  font-weight: 600;
  color: #888;
  transition: color 0.2s;
}

.contact-row:hover .contact-row-value {
  color: #fff;
}

.contact-row-arrow {
  font-size: 18px;
  color: #fff;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s, transform 0.3s;
}

.contact-row:hover .contact-row-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================
   MARQUEE
   ======================================== */
.marquee {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #000;
  overflow: hidden;
  z-index: 450;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  height: 40px;
  display: none;
  align-items: center;
}

.marquee.visible {
  display: flex;
}

.marquee-track {
  display: flex;
  animation: marqueeScroll 20s linear infinite;
  white-space: nowrap;
}

.marquee-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  padding-right: 48px;
  white-space: nowrap;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ========================================
   TABLET RESPONSIVENESS
   ======================================== */
@media (max-width: 1024px) {
  .about-photo {
    width: 40vw;
  }

  .about-content {
    width: 60vw;
    padding: 100px 40px 40px;
  }

  .hero-photo {
    width: min(420px, 38vw);
  }

  .work-card {
    width: 280px;
    min-width: 280px;
  }

  .work-cards-container {
    padding: 14px 40px 28px;
  }

  .work-header {
    padding: calc(var(--nav-height) + 20px) 40px 14px;
  }

  .work-bottom {
    padding: 24px 40px 32px;
    margin-top: 4px;
  }
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */
@media (max-width: 768px) {
  html {
    cursor: auto;
  }

  #cursor-dot,
  #cursor-ring,
  #cursor {
    display: none !important;
  }

  #navbar {
    padding: 0 20px;
  }

  .nav-center,
  .nav-right {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero mobile */
  .hero-greeting {
    top: calc(var(--nav-height) + 12px);
    font-size: 14px;
    padding: 0 20px;
    white-space: normal;
    text-align: center;
  }

  .hero-title-line1,
  .hero-title-line2 {
    font-size: clamp(48px, 12vw, 90px);
  }

  .hero-title-line1 {
    -webkit-text-stroke: 1.5px #000;
  }

  .hero-photo {
    width: min(280px, 60vw);
    top: var(--nav-height);
    bottom: auto;
  }

  .hero-bottom {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0 20px;
    bottom: 24px;
  }

  .hero-location {
    font-size: 14px;
  }

  .hero-buttons {
    position: static;
    transform: none;
    flex-direction: column;
    width: 100%;
  }

  .hero-btn-primary,
  .hero-btn-secondary {
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    font-size: 13px;
  }

  .hero-social {
    display: none;
  }

  #floating-contact {
    width: 48px;
    height: 48px;
    right: 16px;
    font-size: 16px;
  }

  /* Work mobile */
  .work-header {
    padding: calc(var(--nav-height) + 16px) 20px 12px;
    flex-wrap: wrap;
  }

  .work-label {
    font-size: 12px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .work-cards-container {
    padding: 12px 20px 24px;
    gap: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .work-card {
    width: min(260px, calc(100vw - 56px));
    min-width: min(260px, calc(100vw - 56px));
    max-width: calc(100vw - 40px);
    padding: 14px 16px 16px;
  }

  .work-card-image {
    aspect-ratio: 2 / 1;
    max-height: 100px;
    margin-bottom: 10px;
  }

  .work-card-image svg {
    width: 40px;
    height: 40px;
  }

  .work-card-title {
    font-size: 18px;
  }

  .work-bottom {
    padding: 22px 20px 28px;
    margin-top: 4px;
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .work-badge {
    width: 100px;
    height: 100px;
  }

  /* Experience, skills, certificates mobile */
  .exp-wrapper,
  .skills-wrapper,
  .certs-wrapper {
    padding: 90px 20px 60px;
  }

  .section-title {
    font-size: clamp(26px, 7vw, 40px);
  }

  .section-line {
    margin-bottom: 28px;
  }

  .timeline {
    padding-left: 32px;
    max-width: none;
  }

  .timeline::before {
    left: 11px;
    width: 2px;
  }

  .timeline-dot {
    left: -32px;
    top: 18px;
    width: 14px;
    height: 14px;
    border-width: 2px;
  }

  .timeline-card {
    padding: 20px 18px 22px 24px;
    border-radius: 18px;
  }

  .timeline-card::before {
    border-radius: 18px 0 0 18px;
    width: 4px;
  }

  .timeline-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-date {
    align-self: flex-start;
  }

  .skills-header {
    margin-bottom: 28px;
  }

  .skills-header .section-title {
    font-size: clamp(18px, 5.2vw, 40px);
  }

  .skills-bento {
    gap: 18px;
  }

  .skill-card {
    padding: 22px 18px 24px 22px;
    border-radius: 18px;
  }

  .skill-card-title {
    font-size: clamp(17px, 4.2vw, 22px);
    margin-bottom: 16px;
  }

  .skill-tags span {
    font-size: clamp(12px, 3.1vw, 14px);
    padding: 8px 12px;
  }

  a.cert-card {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 1.15rem 1.1rem;
    gap: 0.85rem;
  }

  .cert-icon-fa {
    width: 40px;
  }

  .cert-icon-fa i {
    font-size: 1.4rem;
  }

  .cert-external {
    margin-left: auto;
    align-self: center;
  }

  /* About mobile */
  #page-about {
    flex-direction: column;
  }

  .about-photo {
    width: 100%;
    height: 50vh;
    background: #f5f5f5;
  }

  .about-photo img,
  .about-photo svg {
    object-fit: contain;
    object-position: center bottom;
  }

  .about-photo::after {
    background:
      linear-gradient(to top, #fff 0%, transparent 20%);
  }

  .about-content {
    width: 100%;
    height: auto;
    padding: 32px 20px;
    overflow-y: auto;
  }

  .about-stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .about-stat {
    padding: 0 16px;
  }

  .about-stat-value {
    font-size: 24px;
  }

  /* Contact mobile */
  #page-contact {
    padding: 100px 20px 60px;
  }

  .contact-title {
    font-size: clamp(32px, 8vw, 60px);
    margin-bottom: 40px;
  }

  .contact-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .contact-row-value {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .hero-title-line1,
  .hero-title-line2 {
    font-size: clamp(40px, 14vw, 70px);
  }

  .hero-photo {
    width: min(220px, 55vw);
    top: var(--nav-height);
    bottom: auto;
  }

  .about-chips {
    gap: 8px;
  }

  .about-chip {
    font-size: 12px;
    padding: 6px 14px;
  }
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  font-size: 14px;
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}

.theme-toggle .theme-icon-sun,
.theme-toggle .theme-icon-moon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1) rotate(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

[data-theme="light"] .theme-toggle .theme-icon-sun,
:root:not([data-theme="dark"]) .theme-toggle .theme-icon-sun {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5) rotate(-90deg);
}

[data-theme="light"] .theme-toggle .theme-icon-moon,
:root:not([data-theme="dark"]) .theme-toggle .theme-icon-moon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0);
}

[data-theme="dark"] .theme-toggle .theme-icon-sun {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0);
}

[data-theme="dark"] .theme-toggle .theme-icon-moon {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5) rotate(90deg);
}

.mobile-theme-toggle {
  margin-left: auto;
}

/* ========================================
   ACCENT COLOR — global links and key surfaces
   ======================================== */

/* Hero — outline title uses accent */
.hero-title-line1 {
  color: var(--text);
  -webkit-text-stroke-color: var(--text);
}

.hero-title-line2 {
  -webkit-text-stroke-color: var(--accent);
}

[data-theme="dark"] .hero-title-line1 {
  -webkit-text-stroke-color: var(--text);
}

[data-theme="dark"] .hero-title-line2 {
  -webkit-text-stroke-color: var(--accent);
}

/* Hero — location, social */
.hero-location {
  color: var(--text);
}

.hero-social a {
  color: var(--text-muted);
}

.hero-social a:hover {
  color: var(--accent);
}

/* Home page background follows theme */
#page-home {
  background: var(--bg);
}

/* About */
#page-about {
  background: var(--bg);
}

.about-photo {
  background: var(--about-bg);
}

.about-photo::after {
  background:
    linear-gradient(to top, var(--bg) 0%, transparent 25%),
    linear-gradient(to right, transparent 90%, var(--bg) 100%);
}

.about-label {
  color: var(--text-muted);
}

.about-title {
  color: var(--text);
}

.about-bio {
  color: var(--text-soft);
}

.about-stat-value {
  color: var(--text);
}

.about-stat-label {
  color: var(--text-muted);
}

.about-stat {
  border-right-color: var(--border);
}

.about-chip {
  border-color: var(--border);
  color: var(--text);
}

.about-chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.about-socials a {
  color: var(--text-muted);
}

.about-socials a:hover {
  color: var(--accent);
}

/* Experience & Skills page backgrounds */
#page-experience {
  background: var(--bg);
  color: var(--text);
}

#page-skills {
  background: var(--bg-alt);
  color: var(--text);
}

.skills-lead {
  color: var(--text-soft);
}

.section-line {
  background: var(--accent);
}

/* Timeline cards */
.timeline::before {
  background: linear-gradient(
    180deg,
    var(--border-soft) 0%,
    var(--border) 45%,
    var(--border-soft) 100%
  );
}

.timeline-dot {
  background: var(--bg);
  border-color: var(--accent);
  box-shadow:
    0 0 0 5px var(--accent-soft),
    0 6px 16px rgba(0, 0, 0, 0.12);
}

.timeline-card {
  background: linear-gradient(145deg, var(--bg-elevated) 0%, var(--bg-alt) 100%);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

.timeline-card::before {
  background: var(--accent);
}

.timeline-item:nth-child(1) .timeline-card,
.timeline-item:nth-child(2) .timeline-card,
.timeline-item:nth-child(3) .timeline-card,
.timeline-item:nth-child(4) .timeline-card {
  --exp-accent: var(--accent);
}

.timeline-card:hover {
  border-color: var(--accent);
}

.timeline-role {
  color: var(--text);
}

.timeline-company {
  color: var(--text-soft);
}

.timeline-company:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.timeline-date {
  color: var(--text-soft);
  background: var(--accent-soft);
  border-color: var(--border);
}

.timeline-list li {
  color: var(--text-soft);
}

.timeline-list li::before {
  background: var(--accent);
}

/* Skills cards */
.skill-card {
  background: linear-gradient(165deg, var(--bg-elevated) 0%, var(--bg-alt) 100%);
  border-color: var(--border);
}

.skill-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.skill-card::before {
  background: var(--accent);
}

.skill-card--accent-1,
.skill-card--accent-2,
.skill-card--accent-3,
.skill-card--accent-4,
.skill-card--accent-5,
.skill-card--accent-6,
.skill-card--accent-7 {
  --skill-accent: var(--accent);
}

.skill-card-index {
  color: var(--text-muted);
}

.skill-card-title {
  color: var(--text);
}

.skill-tags span {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text);
}

.skill-tags span:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Section title */
.section-title {
  color: var(--text);
}

/* ========================================
   NAVBAR & MOBILE — theme aware
   ======================================== */
#navbar {
  background: var(--bg);
  border-bottom-color: var(--border);
}

#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.nav-logo {
  color: var(--text);
}

.nav-logo::after {
  background: var(--accent);
}

.nav-link {
  color: var(--text);
}

.nav-link::after {
  background: var(--accent);
}

.lang-sep {
  color: var(--border);
}

.lang-btn {
  color: var(--text-muted);
}

.lang-btn.active,
.lang-btn:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--accent);
  color: #fff;
}

.nav-cta:hover {
  background: var(--accent-strong);
}

.hamburger span {
  background: var(--text);
}

#mobile-menu {
  background: var(--bg);
  border-bottom-color: var(--border);
}

#mobile-menu .mobile-link {
  color: var(--text);
  border-bottom-color: var(--border);
}

#mobile-menu .mobile-link::after {
  background: var(--accent);
}

#mobile-menu .mobile-lang-btn {
  color: var(--text-muted);
}

#mobile-menu .mobile-lang-btn.active {
  color: var(--text);
}

/* Override nav-cta look on dark sections (work/contact) — keep accent visible */
#navbar.dark-mode {
  background: #0c0c1a;
  border-bottom-color: rgba(129, 140, 248, 0.18);
}

#navbar.dark-mode .nav-cta {
  background: var(--accent);
  color: #fff;
}

#navbar.dark-mode .nav-cta:hover {
  background: var(--accent-strong);
}

#navbar.dark-mode .theme-toggle {
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

#navbar.dark-mode .theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========================================
   HERO PHOTO — improved fit
   ======================================== */
.hero-photo {
  width: min(560px, 46vw);
  top: calc(var(--nav-height) - 6px);
  height: calc(100vh - var(--nav-height) - 200px);
  max-height: 720px;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  -webkit-mask-image:
    linear-gradient(to bottom, black 0%, black 78%, transparent 100%),
    linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-image:
    linear-gradient(to bottom, black 0%, black 78%, transparent 100%),
    linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

[data-theme="dark"] .hero-photo img {
  filter: contrast(1.05) brightness(0.95);
}

[data-theme="dark"] .hero-photo:hover img {
  filter: contrast(1.1) brightness(1.0) saturate(1.05);
}

.about-photo img {
  width: 92%;
  height: 92%;
  object-fit: contain;
  object-position: center bottom;
}

[data-theme="dark"] .about-photo img {
  filter: contrast(1.05) brightness(0.95);
}

/* Work card image gradient — accent-based */
.work-card-image {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
}

.work-card:hover .work-card-image {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 50%, #6366f1 100%);
}

.work-card-image--accent-2 {
  background: linear-gradient(135deg, #1f2937 0%, #475569 50%, #64748b 100%);
}

.work-card:hover .work-card-image--accent-2 {
  background: linear-gradient(135deg, #475569 0%, #64748b 50%, #94a3b8 100%);
}

.work-card-image--accent-3 {
  background: linear-gradient(135deg, #134e4a 0%, #115e59 50%, #0f766e 100%);
}

.work-card:hover .work-card-image--accent-3 {
  background: linear-gradient(135deg, #115e59 0%, #0f766e 50%, #14b8a6 100%);
}

.work-card-image--accent-4 {
  background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 50%, #7c3aed 100%);
}

.work-card:hover .work-card-image--accent-4 {
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #a855f7 100%);
}

/* Work bottom CTA uses accent */
.work-bottom-btn {
  background: var(--accent);
  color: #fff;
}

.work-bottom-btn:hover {
  background: var(--accent-strong);
}

/* ========================================
   RESPONSIVE TWEAKS
   ======================================== */
@media (max-width: 1024px) {
  .hero-photo {
    width: min(440px, 42vw);
    height: calc(100vh - var(--nav-height) - 180px);
  }
}

@media (max-width: 768px) {
  .theme-toggle {
    width: 36px;
    height: 36px;
  }

  .hero-photo {
    width: min(280px, 60vw);
    height: calc(50vh);
    max-height: 420px;
  }

  .nav-right .theme-toggle {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-photo {
    width: min(220px, 55vw);
    height: 38vh;
  }
}

/* ========================================
   REPLACE REMAINING BLACK SURFACES WITH INDIGO THEME
   ======================================== */

/* Dark sections (work, contact) — deep indigo gradient instead of pure black */
#page-work {
  background: linear-gradient(135deg, #0a0a14 0%, #15152e 50%, #1e1b4b 100%);
}

#page-contact {
  background: linear-gradient(135deg, #0a0a14 0%, #15152e 50%, #1e1b4b 100%);
}

[data-theme="dark"] #page-work,
[data-theme="dark"] #page-contact {
  background: linear-gradient(135deg, #050510 0%, #0e0e22 50%, #16163a 100%);
}

/* Marquee bar — accent-strong instead of pure black */
.marquee {
  background: linear-gradient(90deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
  border-top: 1px solid rgba(129, 140, 248, 0.18);
}

.marquee-text {
  color: #e0e7ff;
}

/* Work cards — deep indigo with subtle indigo border */
.work-card {
  background: rgba(30, 27, 75, 0.55);
  border: 1px solid rgba(129, 140, 248, 0.15);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.work-card:hover {
  background: rgba(49, 46, 129, 0.6);
  border-color: rgba(129, 140, 248, 0.4);
}

/* Work nav arrows */
.work-nav-btn {
  border-color: rgba(129, 140, 248, 0.25);
}

.work-nav-btn:hover {
  border-color: var(--accent);
  background: rgba(129, 140, 248, 0.12);
}

/* Work bottom border + label color */
.work-bottom {
  border-top-color: rgba(129, 140, 248, 0.18);
}

.work-bottom-label {
  color: #a5b4fc;
}

.work-bottom-subtitle {
  color: #cbd5e1;
}

.work-bottom-body {
  color: #cbd5e1;
}

/* Page transitions — deep indigo instead of pure black.
   IMPORTANT: only animate-in layers; .pt-circle-outer and .pt-blinds containers
   must stay transparent (they overlay the viewport with inset: 0). */
.pt-split-left,
.pt-split-right,
.pt-wipe,
.pt-h-top,
.pt-h-bottom,
.pt-diag,
.pt-slide,
.pt-fade,
.pt-blinds span,
.pt-circle-inner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
}

/* Contact rows — indigo border tints */
.contact-row {
  border-top-color: rgba(129, 140, 248, 0.18);
}

.contact-row:last-child {
  border-bottom-color: rgba(129, 140, 248, 0.18);
}

.contact-row-label {
  color: #a5b4fc;
}

.contact-row-value {
  color: #cbd5e1;
}

.contact-row:hover .contact-row-value {
  color: #fff;
}

.contact-row-arrow {
  color: var(--accent);
}

.contact-title {
  background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Mobile menu in dark mode — indigo */
#mobile-menu.dark-mode {
  background: #0c0c1a;
  border-bottom-color: rgba(129, 140, 248, 0.18);
}

/* Cursor — accent-tinted in light mode for brand cohesion */
[data-theme="dark"] #cursor-dot {
  background: var(--accent);
}

[data-theme="dark"] #cursor-ring {
  border-color: rgba(129, 140, 248, 0.4);
}

[data-theme="dark"] #cursor-ring.hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Hero buttons (rare) — accent */
.hero-btn-primary {
  background: var(--accent);
  color: #fff;
}

.hero-btn-primary:hover {
  background: var(--accent-strong);
}

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

.hero-btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

/* Floating contact button (if used) — accent */
#floating-contact {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
}

#floating-contact:hover {
  background: var(--accent);
  color: #fff;
}

/* Work badge — accent gradient ring */
.work-badge svg text {
  fill: #e0e7ff;
}

.work-badge-center {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}


