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

:root {
  --black: #150f26;
  --dark: #17112b;
  --gray-700: #3f3a52;
  --gray-500: #75718c;
  --gray-300: #ded9f0;
  --gray-100: #f4f1fc;
  --white: #ffffff;
  --accent: #6d4aff;
  --accent-light: #ede7ff;
  --accent-dark: #5433db;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Poppins', var(--font);
  --radius: 16px;
  --shadow: 0 1px 3px rgba(21,15,38,0.06), 0 4px 16px rgba(21,15,38,0.06);
  --shadow-hover: 0 12px 32px rgba(109,74,255,0.18);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== Custom Cursor ===== */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, opacity 0.2s;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(37, 99, 235, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor-ring.hovering {
  width: 56px;
  height: 56px;
  border-color: var(--accent);
}

/* ===== Page Load ===== */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.done {
  opacity: 0;
  visibility: hidden;
}

.loader-text {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--black);
  overflow: hidden;
}

.loader-text span {
  display: inline-block;
  animation: loaderChar 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i) * 0.05s);
}

@keyframes loaderChar {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ===== Layout ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section-alt { background: var(--gray-100); }

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(209,213,219,0.5);
  transform: translateY(-100%);
  animation: navSlideIn 0.6s 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes navSlideIn {
  to { transform: translateY(0); }
}

.nav.scrolled { box-shadow: var(--shadow); }

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

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--black);
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-links a:hover { color: var(--black); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--accent); }

.nav-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-socials a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--accent-light);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-socials a:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 56px;
  padding: 140px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-container { width: 100%; }

.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  width: 100%;
}

.hero-content { text-align: left; }

/* Animated gradient orbs */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: orbFloat linear infinite;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #6d4aff, transparent);
  top: -200px; left: -200px;
  animation-duration: 20s;
}

.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #a78bfa, transparent);
  bottom: -100px; right: -100px;
  animation-duration: 25s;
  animation-direction: reverse;
}

.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #c4b5fd, transparent);
  top: 50%; left: 60%;
  animation-duration: 18s;
}

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -30px) scale(1.05); }
  66%  { transform: translate(-20px, 40px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Hero content stagger */
.hero-greeting {
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.7s 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--black);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(24px);
  animation: heroIn 0.7s 1.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-name span { color: var(--accent); }

.hero-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: 0.03em;
  margin-bottom: 24px;
  min-height: 24px;
  opacity: 0;
  animation: heroIn 0.7s 1.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-desc {
  font-size: 17px;
  color: var(--gray-700);
  max-width: 480px;
  margin: 0 0 40px;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.7s 1.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.7s 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ===== Hero Visual (avatar panel) ===== */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: heroVisualIn 0.8s 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heroVisualIn {
  from { opacity: 0; transform: translateX(24px) scale(0.94); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.hero-avatar-card {
  position: relative;
  width: min(280px, 60vw);
  height: min(280px, 60vw);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-light), #fff 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-hover);
  border: 1px solid rgba(109,74,255,0.12);
}

.hero-avatar-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-avatar-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px dashed rgba(109,74,255,0.25);
  pointer-events: none;
}

.ring-1 { inset: -18px; animation: heroSpin 32s linear infinite; }
.ring-2 { inset: -38px; border-color: rgba(109,74,255,0.12); animation: heroSpin 46s linear infinite reverse; }

@keyframes heroSpin { to { transform: rotate(360deg); } }

.hero-avatar-initials {
  font-family: var(--font-display);
  font-size: clamp(48px, 10vw, 64px);
  font-weight: 700;
  color: var(--accent);
}

.hero-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  box-shadow: var(--shadow);
  white-space: nowrap;
}

.hero-badge-1 { top: 4%; right: -6%; }
.hero-badge-2 { bottom: 6%; left: -10%; }

/* ===== Companies strip ===== */
.companies-strip { text-align: center; }

.companies-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-500);
  margin-bottom: 18px;
}

.companies-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}

.companies-list span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-500);
  opacity: 0.85;
  transition: opacity 0.25s, color 0.25s;
}

.companies-list span:hover {
  opacity: 1;
  color: var(--accent);
}

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Typewriter cursor */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.25s;
  cursor: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.btn:hover::after { transform: translateX(100%); }

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,0.45);
}

.btn-outline {
  border: 1.5px solid var(--gray-300);
  color: var(--dark);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: heroIn 0.5s 2.3s ease forwards;
}

.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--gray-300);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
  margin: 0 auto 6px;
}

.scroll-wheel {
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 1.8s ease-in-out infinite;
}

@keyframes scrollWheel {
  0%   { transform: translateY(0); opacity: 1; }
  80%  { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

.scroll-label {
  font-size: 11px;
  color: var(--gray-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== Section Header ===== */
.section-header { margin-bottom: 56px; }

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
}

mark {
  background: linear-gradient(to top, var(--accent-light) 38%, transparent 38%);
  color: inherit;
  padding: 0 3px;
}

/* ===== Reveal Animation (scroll-triggered) ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0ms);
}

.reveal.from-left {
  transform: translateX(-32px);
}

.reveal.from-right {
  transform: translateX(32px);
}

.reveal.visible {
  opacity: 1;
  transform: translate(0);
}

/* ===== About ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.about-text p {
  font-size: 16px;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--black); font-weight: 600; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-light), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.stat-card:hover::before { opacity: 1; }

.stat-number {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
  position: relative;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  position: relative;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.skill-group-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 100px;
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  transform: scale(0.8) translateY(8px);
  cursor: none;
}

.skill-tag.popped {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(37,99,235,0.15);
}

.skill-tag.skill-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.skill-tag.skill-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(37,99,235,0.4);
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline-track {
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: var(--gray-300);
  overflow: hidden;
}

.timeline-track-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--accent), #7c3aed);
  transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

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

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--gray-300);
  z-index: 1;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.timeline-item.in-view .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light), 0 0 16px rgba(37,99,235,0.4);
  animation: dotPulse 2s 0.3s ease-out;
}

@keyframes dotPulse {
  0%   { box-shadow: 0 0 0 4px var(--accent-light), 0 0 0 rgba(37,99,235,0); }
  50%  { box-shadow: 0 0 0 8px rgba(37,99,235,0.1), 0 0 24px rgba(37,99,235,0.3); }
  100% { box-shadow: 0 0 0 4px var(--accent-light), 0 0 16px rgba(37,99,235,0.4); }
}

.timeline-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.35s, transform 0.35s, border-color 0.35s;
  opacity: 0;
  transform: translateX(24px);
  position: relative;
  overflow: hidden;
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
}

.timeline-item.in-view .timeline-card {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s, border-color 0.35s;
}

.timeline-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateX(4px) translateY(-2px);
  border-color: rgba(37,99,235,0.3);
}

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

.timeline-role {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 4px;
}

.timeline-company {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}

.timeline-period {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
  background: var(--gray-100);
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--gray-300);
  flex-shrink: 0;
}

.timeline-highlight {
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-weight: 500;
}

.timeline-bullets { padding-left: 0; }

.timeline-bullets li {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6;
  padding: 4px 0 4px 18px;
  position: relative;
  transition: color 0.2s;
}

.timeline-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 13px;
  transition: transform 0.2s;
}

.timeline-bullets li:hover { color: var(--black); }
.timeline-bullets li:hover::before { transform: translateX(3px); }
.timeline-bullets li strong { color: var(--black); font-weight: 600; }

/* ===== Page Header (sub-pages) ===== */
.page-header {
  padding: 160px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 700;
  color: var(--black);
  margin: 14px 0 16px;
  line-height: 1.15;
}

.page-header-desc {
  font-size: 16px;
  color: var(--gray-700);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Portfolio ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.portfolio-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.35s;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(109,74,255,0.3);
}

.portfolio-cover {
  position: relative;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  overflow: hidden;
  flex-shrink: 0;
}

.portfolio-card:nth-child(3n+2) .portfolio-cover { background: linear-gradient(135deg, #5433db, #7c5cff); }
.portfolio-card:nth-child(3n+3) .portfolio-cover { background: linear-gradient(135deg, #8a6bff, #c4b5fd); }

.portfolio-cover::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -90px;
  right: -60px;
}

.portfolio-icon {
  position: relative;
  z-index: 1;
  color: #fff;
  opacity: 0.95;
}

.portfolio-ribbon {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  z-index: 1;
}

.portfolio-period {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  z-index: 1;
}

/* ===== Portfolio cover with real screenshot ===== */
.portfolio-cover.has-image { background: var(--gray-300); }

.portfolio-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.portfolio-cover.has-image::after { display: none; }

.portfolio-cover.has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(20,15,38,0.55) 0%, rgba(20,15,38,0.12) 38%, rgba(20,15,38,0) 68%);
  pointer-events: none;
}

.portfolio-cover.has-image .portfolio-ribbon,
.portfolio-cover.has-image .portfolio-period { z-index: 2; }

.portfolio-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.portfolio-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
}

.portfolio-meta {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

.portfolio-desc {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.portfolio-tags span {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--accent-dark);
}

.portfolio-view {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 14px;
  transition: transform 0.2s;
}

.portfolio-card:hover .portfolio-view { transform: translateX(4px); }

/* ===== Project Detail ===== */
.project-detail-section { padding-top: 160px; }

.project-back-link {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 32px;
  transition: transform 0.2s;
}

.project-back-link:hover { transform: translateX(-3px); }

.project-header { margin-bottom: 40px; }

.project-header-meta {
  font-size: 15px;
  color: var(--gray-500);
  font-weight: 500;
}

.project-section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  margin: 32px 0 16px;
}

.project-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.project-cover-lg {
  height: 260px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.project-cover-lg.variant-2 { background: linear-gradient(135deg, #5433db, #7c5cff); }
.project-cover-lg.variant-3 { background: linear-gradient(135deg, #8a6bff, #c4b5fd); }

.project-cover-lg::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -120px;
  right: -80px;
}

.project-cover-lg .portfolio-icon { position: relative; z-index: 1; }

.project-cover-lg.has-image { background: var(--gray-300); }
.project-cover-lg.has-image::after { display: none; }

.project-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 1;
}

.overview-list { padding-left: 0; display: flex; flex-direction: column; gap: 12px; }

.overview-list li {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.7;
  padding: 6px 0 6px 26px;
  position: relative;
}

.overview-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.project-sidebar { position: sticky; top: 96px; }

.fact-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.fact-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 16px;
}

.fact-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }

.fact-item dt {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 3px;
}

.fact-item dd {
  font-size: 14px;
  font-weight: 600;
  color: var(--black);
}

.fact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-300);
  margin-bottom: 18px;
}

.fact-tags span {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--accent-dark);
}

.fact-cta { display: flex; justify-content: center; width: 100%; }

.other-projects { margin-top: 72px; }

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.cta-banner-inner {
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}

.cta-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(255,255,255,0.15);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.cta-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.5vw, 38px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 16px;
}

.cta-title mark {
  background: linear-gradient(to top, rgba(255,255,255,0.3) 38%, transparent 38%);
  color: var(--white);
}

.cta-desc {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
}

.btn-white {
  background: var(--white);
  color: var(--accent-dark);
  box-shadow: 0 8px 24px rgba(21,15,38,0.2);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(21,15,38,0.28);
}

/* ===== Contact ===== */
.contact-sub {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 40px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: none;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-light), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.contact-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.contact-card:hover::before { opacity: 1; }

.contact-card:hover .contact-icon {
  background: var(--accent);
  color: var(--white);
  transform: rotate(-5deg) scale(1.1);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  z-index: 1;
}

.contact-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.contact-value {
  font-size: 14px;
  color: var(--black);
  font-weight: 600;
  word-break: break-all;
  position: relative;
  z-index: 1;
}

/* ===== Footer ===== */
.footer {
  background: var(--black);
  padding-top: 64px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
}

.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin: 14px 0 20px;
  max-width: 320px;
}

.footer-socials { display: flex; gap: 10px; }

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-socials a:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 18px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
  width: fit-content;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.45); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .project-layout { grid-template-columns: 1fr; }
  .project-sidebar { position: static; }
  .project-detail-section { padding-top: 140px; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 13px; }
  .nav-socials { display: none; }
  .section { padding: 72px 0; }
  .timeline-header { flex-direction: column; gap: 8px; }
  body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }

  .hero-split { grid-template-columns: 1fr; gap: 48px; text-align: center; }
  .hero-content { text-align: center; }
  .hero-desc { margin: 0 auto 40px; }
  .hero-cta { justify-content: center; }
  .hero-visual { order: -1; }
  .companies-list { gap: 20px 28px; }

  .footer-inner { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .footer-tagline { margin-left: auto; margin-right: auto; }
  .footer-socials { justify-content: center; }
  .footer-col { align-items: center; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 36px; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-avatar-card { width: 200px; height: 200px; }
  .hero-badge { font-size: 11px; padding: 6px 12px; }
  .companies-list { gap: 14px 22px; }

  .nav-inner { padding: 0 14px; }
  .nav-logo { font-size: 14px; }
  .nav-links { gap: 9px; }
  .nav-links a { font-size: 10.5px; }
}
