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

:root {
  --bg: #080808;
  --surface: #111111;
  --surface-2: #1A1A1A;
  --border: #242424;
  --border-subtle: rgba(255,255,255,0.06);
  --text: #F2F2F2;
  --text-muted: #777;
  --accent: #00A1FF;
  --accent-hover: #5a52e0;
  --accent-2: #FF6B6B;
  --accent-3: #43D9AD;
  --accent-glow: rgba(108, 99, 255, 0.35);
  --radius: 16px;
  --radius-sm: 8px;
  --nav-h: 64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 99, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 99, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: -1;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background:
    linear-gradient(var(--accent), var(--accent)) padding-box,
    conic-gradient(from 0deg, var(--accent), #a855f7, var(--accent-3), var(--accent)) border-box;
  color: #fff;
}

.btn-primary:hover {
  background:
    linear-gradient(var(--accent-hover), var(--accent-hover)) padding-box,
    conic-gradient(from 0deg, var(--accent), #a855f7, var(--accent-3), var(--accent)) border-box;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-outline {
  background:
    linear-gradient(#000, #000) padding-box,
    conic-gradient(from 0deg, var(--accent), #a855f7, var(--accent-3), var(--accent)) border-box;
  color: #fff;

}

.btn-outline:hover {
  background:
    linear-gradient(#000, #000) padding-box,
    conic-gradient(from 0deg, var(--accent), #a855f7, var(--accent-3), var(--accent)) border-box;
  color: #fff;
  transform: translateY(-2px);
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 1rem; left: 1rem; right: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.75rem;
  background:
    linear-gradient(rgba(255,255,255,0.06), rgba(255,255,255,0.06)) padding-box, border-box;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid transparent;
  border-radius: 14px;
  transition: box-shadow 0.3s;
}

.nav.scrolled {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.25rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:not(.btn-nav)::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-links a:not(.btn-nav):hover::after,
.nav-links a.active::after { transform: scaleX(1); }

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

.btn-nav {
  background:
    linear-gradient(var(--accent), var(--accent)) padding-box,
    conic-gradient(from 0deg, var(--accent), #a855f7, var(--accent-3), var(--accent)) border-box !important;
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.875rem;
  transition: background 0.2s, box-shadow 0.2s !important;
}

.btn-nav:hover {
  background:
    linear-gradient(var(--accent-hover), var(--accent-hover)) padding-box,
    conic-gradient(from 0deg, var(--accent), #a855f7, var(--accent-3), var(--accent)) border-box !important;
  box-shadow: 0 4px 20px var(--accent-glow) !important;
}

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

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

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 9rem 2.5rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  flex-shrink: 0;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  0%, 100% { box-shadow: 0 0 0 0 rgba(67, 217, 173, 0.7); }
  60% { box-shadow: 0 0 0 8px rgba(67, 217, 173, 0); }
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent), #a855f7 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.hero-stat { display: flex; flex-direction: column; gap: 0.15rem; }

.hero-stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 480px;
}

.hero-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(107, 99, 255, 0.28);
}

.hero-ring-xl {
  width: 490px;
  height: 490px;
  animation: ring-spin 60s linear infinite;
}

.hero-ring-outer {
  width: 400px;
  height: 400px;
  animation: ring-spin 40s linear infinite reverse;
}

.hero-ring-mid {
  width: 310px;
  height: 310px;
  animation: ring-spin 25s linear infinite reverse;
}

@keyframes ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.avatar-ring {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), #a855f7, var(--accent-3), var(--accent));
  padding: 2px;
  position: relative;
  z-index: 2;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.orbit-badge {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  z-index: 3;
  white-space: nowrap;
  animation: badge-float 3s ease-in-out infinite;
}

.orbit-badge-1 { top: 50px; right: 15px; color: var(--accent-3); border-color: rgba(67, 217, 173, 0.25); animation-delay: 0s; }
.orbit-badge-2 { bottom: 110px; left: 5px; color: var(--accent); border-color: rgba(108, 99, 255, 0.25); animation-delay: 1s; }
.orbit-badge-3 { bottom: 50px; right: 25px; color: var(--accent-2); border-color: rgba(255, 107, 107, 0.25); animation-delay: 2s; }
.orbit-badge-4 { top: 100px; left: 50px; color: rgb(0, 170, 255); border-color: rgba(0, 170, 255, 0.25); animation-delay: 1.5s; }

@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  transform-origin: top;
  animation: scroll-draw 2s ease-in-out infinite;
}

@keyframes scroll-draw {
  0% { transform: scaleY(0); opacity: 1; }
  70% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ===== LOGOS ===== */
.logos {
  border-bottom: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}

.logos-label {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text);
  margin-bottom: 1.75rem;
}

.logos-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.logo-item {
  opacity: 0.6;
  transition: opacity 0.3s ease;
  cursor: default;
}

.logo-item:hover { opacity: 1; }

.logo-item img {
  height: 52px;
  width: auto;
  max-width: 148px;
  object-fit: contain;
  display: block;
}

/* ===== ABOUT ===== */
.about { background: var(--surface); }

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.skill-chip {
  padding: 0.4rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.2s;
  cursor: default;
}

.skill-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(108, 99, 255, 0.1);
}

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

.stat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #a855f7);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.stat-card:hover {
  border-color: rgba(108, 99, 255, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.stat-card:hover::before { transform: scaleX(1); }

.stat-num {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== WORK ===== */
.work h2 { margin-bottom: 2.5rem; }

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.project-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  border-color: rgba(108, 99, 255, 0.3);
}

.project-img {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-img::after {
  content: 'View Case Study →';
  position: absolute;
  inset: 0;
  background: rgba(108, 99, 255, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.project-card:hover .project-img::after { opacity: 1; }

.project-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-screenshot {
  transform: scale(1.07);
}

.project-info { padding: 1.5rem; }

.project-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.project-tags span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.project-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.project-info p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.project-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s;
  display: inline-flex;
  align-items: center;
}

.project-link:hover { opacity: 0.8; }

.project-role {
  display: block;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Shimmer sweep on image hover */
.project-img::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.07) 50%,
    transparent 65%
  );
  transform: translateX(-150%);
}

.project-img::after { z-index: 2; }

.project-card:hover .project-img::before {
  animation: project-shimmer 0.6s ease forwards;
}

@keyframes project-shimmer {
  from { transform: translateX(-150%); }
  to   { transform: translateX(150%); }
}

/* Viewport-entry glow pulse */
@keyframes card-glow-pulse {
  0%   { box-shadow: none; }
  40%  { box-shadow: 0 0 0 1px rgba(0, 161, 255, 0.22), 0 6px 32px rgba(0, 161, 255, 0.09); }
  100% { box-shadow: none; }
}

.projects-grid .project-card.visible { animation: card-glow-pulse 1.1s ease; }
.projects-grid .project-card.visible:nth-child(1) { animation-delay: 0.05s; }
.projects-grid .project-card.visible:nth-child(2) { animation-delay: 0.15s; }
.projects-grid .project-card.visible:nth-child(3) { animation-delay: 0.25s; }
.projects-grid .project-card.visible:nth-child(4) { animation-delay: 0.35s; }
.projects-grid .project-card.visible:nth-child(5) { animation-delay: 0.05s; }
.projects-grid .project-card.visible:nth-child(6) { animation-delay: 0.15s; }
.projects-grid .project-card.visible:nth-child(7) { animation-delay: 0.05s; }
.projects-grid .project-card.visible:nth-child(8) { animation-delay: 0.15s; }
.projects-grid .project-card.visible:nth-child(9) { animation-delay: 0.25s; }
.projects-grid .project-card.visible:nth-child(10) { animation-delay: 0.35s; }
.projects-grid .project-card.visible:nth-child(11) { animation-delay: 0.05s; }
.projects-grid .project-card.visible:nth-child(12) { animation-delay: 0.15s; }
.projects-grid .project-card.visible:nth-child(13) { animation-delay: 0.25s; }

.contact-details {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-detail:hover { color: var(--accent); }

.contact-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

.contact-detail:hover .contact-icon { color: var(--accent); }

/* ===== SELECTED WORK UI (MASONRY) ===== */
.work-ui h2 { margin-bottom: 0; }

.masonry-grid {
  columns: 3;
  column-gap: 1rem;
  margin-top: 2.5rem;
}

.masonry-item {
  break-inside: avoid;
  display: block;
  position: relative;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
}

.masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.45s ease;
}

.masonry-item:hover img {
  transform: scale(1.04);
}

.masonry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.masonry-item:hover .masonry-overlay {
  opacity: 1;
}

.masonry-overlay span {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .masonry-grid { columns: 2; }
}

@media (max-width: 600px) {
  .masonry-grid { columns: 1; }
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-stage {
  position: relative;
  z-index: 2;
  max-width: min(90vw, 1100px);
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.7);
  display: block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.lightbox-img.is-loading {
  opacity: 0;
  transform: scale(0.97);
}

.lightbox-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(90vw, 1100px);
  margin-top: 1rem;
  padding: 0 0.25rem;
}

.lightbox-caption {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.02em;
}

.lightbox-counter {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}

.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.2;
  cursor: default;
}

/* masonry cursor update */
.masonry-item { cursor: zoom-in; }

/* ===== RESUME ===== */
.resume { background: var(--surface); }
.resume h2 { margin-bottom: 2.5rem; }

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.resume-col-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.timeline { position: relative; }

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2rem;
}

.timeline-dot {
  position: absolute;
  left: 3px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(108, 99, 255, 0.4);
  transition: transform 0.2s;
}

.timeline-item:hover .timeline-dot { transform: scale(1.3); }

.timeline-date {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.3rem;
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timeline-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.tool-bars { display: flex; flex-direction: column; gap: 0.9rem; }

.tool-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tool-bar span {
  width: 110px;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.bar {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 100px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a855f7);
  border-radius: 100px;
  width: 0;
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.resume-download {
  margin-top: 3rem;
  text-align: center;
}

/* ===== CONTACT ===== */
.contact-inner {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.contact-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.2s;
  resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

.contact-form .btn { align-self: center; }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 7rem;
  }

  .hero-visual { height: 320px; margin-top: 2rem; order: -1; }
  .hero-sub { margin: 0 auto 2.5rem; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-ring-xl { width: 360px; height: 360px; }
  .hero-ring-outer { width: 290px; height: 290px; }
  .hero-ring-mid { width: 230px; height: 230px; }
  .hero-glow { width: 250px; height: 250px; }
  .avatar-ring { width: 180px; height: 180px; }

  .grid-2, .resume-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .logo-hide-mobile { display: none; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0; right: 0;
    background: rgba(8, 8, 8, 0.97);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    gap: 0.25rem;
    backdrop-filter: blur(20px);
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a { display: block; padding: 0.6rem 0.75rem; border-radius: 8px; }
  .nav-links.open a:hover { background: var(--surface-2); }
  .hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .orbit-badge-1, .orbit-badge-2, .orbit-badge-3 { display: none; }
  .hero-scroll-hint { display: none; }
}

/* ===== FADE IN ANIMATION ===== */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* 3D entrance for project cards */
.project-card.fade-in {
  transform: perspective(900px) rotateX(16deg) translateY(44px);
  transform-origin: center bottom;
  transition: opacity 0.65s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card.fade-in.visible {
  transform: perspective(900px) rotateX(0deg) translateY(0);
}

/* Scale + blur materialise entrance for masonry items */
.masonry-item.fade-in {
  opacity: 0;
  transform: scale(0.86);
  filter: blur(5px);
  transform-origin: center center;
  transition: opacity 0.5s ease, transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.5s ease;
}

.masonry-item.fade-in.visible {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* Staggered delays for grid children */
.projects-grid .project-card:nth-child(1) { transition-delay: 0.05s; }
.projects-grid .project-card:nth-child(2) { transition-delay: 0.15s; }
.projects-grid .project-card:nth-child(3) { transition-delay: 0.25s; }
.projects-grid .project-card:nth-child(4) { transition-delay: 0.35s; }
.projects-grid .project-card:nth-child(5) { transition-delay: 0.05s; }
.projects-grid .project-card:nth-child(6) { transition-delay: 0.15s; }
.projects-grid .project-card:nth-child(7) { transition-delay: 0.05s; }
.projects-grid .project-card:nth-child(8) { transition-delay: 0.15s; }
.projects-grid .project-card:nth-child(9) { transition-delay: 0.25s; }
.projects-grid .project-card:nth-child(10) { transition-delay: 0.35s; }
.projects-grid .project-card:nth-child(11) { transition-delay: 0.05s; }
.projects-grid .project-card:nth-child(12) { transition-delay: 0.15s; }
.projects-grid .project-card:nth-child(13) { transition-delay: 0.25s; }

/* All masonry items animate in simultaneously */
.masonry-grid .masonry-item { transition-delay: 0s; }

/* Soft border-glow pop for masonry items (distinct from UX card pulse) */
@keyframes masonry-pop {
  0%   { box-shadow: none; }
  30%  { box-shadow: 0 0 0 2px rgba(0, 161, 255, 0.2), 0 8px 32px rgba(0, 161, 255, 0.1); }
  100% { box-shadow: none; }
}
.masonry-grid .masonry-item.visible { animation: masonry-pop 0.9s ease forwards; }

.about-stats .stat-card:nth-child(1) { transition-delay: 0.05s; }
.about-stats .stat-card:nth-child(2) { transition-delay: 0.15s; }
.about-stats .stat-card:nth-child(3) { transition-delay: 0.25s; }
.about-stats .stat-card:nth-child(4) { transition-delay: 0.35s; }

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in { opacity: 1; transform: none; }
  .project-card.fade-in, .project-card.fade-in.visible { transform: none; }
  .masonry-item.fade-in, .masonry-item.fade-in.visible { transform: none; filter: none; }
}
