/* ================================================================
   3D_CODE_AI PORTFOLIO — DESIGN SYSTEM
   Cyberpunk × Apple Minimalism
   ================================================================ */

/* ── Custom Properties ─────────────────────────────────────────── */
:root {
  --bg:         #020510;
  --bg-1:       #070d1f;
  --bg-2:       #0b1228;
  --surface:    rgba(10, 20, 50, 0.6);
  --surface-2:  rgba(15, 30, 70, 0.5);
  --border:     rgba(0, 200, 255, 0.12);
  --border-2:   rgba(0, 200, 255, 0.25);

  --cyan:       #00eeff;
  --cyan-dim:   rgba(0, 238, 255, 0.15);
  --purple:     #8b00ff;
  --purple-dim: rgba(139, 0, 255, 0.15);
  --blue:       #0077ff;
  --blue-dim:   rgba(0, 119, 255, 0.15);

  --text:       #dde8ff;
  --text-2:     #8aa0cc;
  --text-3:     #4d6080;

  --font-head:  'Space Grotesk', sans-serif;
  --font-body:  'Inter', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.87, 0, 0.13, 1);

  --section-pad: clamp(64px, 8vw, 120px);
  --container:   1200px;
  --radius:      16px;
  --radius-sm:   8px;
  --radius-lg:   24px;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: none; border: none; background: none; font: inherit; }

/* ── Background Canvas ──────────────────────────────────────────── */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: auto;
}

/* Pointer Events Management for Immersive 3D Overlays */
section, nav, footer {
  pointer-events: none;
}

.nav-container,
.hero-content,
.container,
.modal-box,
.footer-inner,
#loader {
  pointer-events: auto;
}

a, button, input, textarea, .project-card, .service-card, .testimonial-card, .contact-item {
  pointer-events: auto;
}

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  border-radius: 3px;
}

/* ── Custom Cursor ──────────────────────────────────────────────── */
#cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--cyan), 0 0 25px var(--cyan);
  transition: transform 0.1s ease, opacity 0.3s ease;
  mix-blend-mode: screen;
}
#cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(0, 238, 255, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: all 0.18s ease;
}
body:hover #cursor { opacity: 1; }
a:hover ~ #cursor, button:hover ~ #cursor { transform: translate(-50%, -50%) scale(2); }

/* ── Loader ─────────────────────────────────────────────────────── */
#loader {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-inner { text-align: center; }
.loader-logo {
  font-family: var(--font-mono);
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}
.loader-bracket { color: var(--cyan); }
.loader-name {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.loader-bar-wrap {
  display: flex; align-items: center; gap: 12px;
  width: 300px; margin: 0 auto 16px;
}
.loader-bar {
  flex: 1; height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.loader-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 99px;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--cyan);
}
.loader-pct {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cyan);
  min-width: 36px;
}
.loader-status {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

/* ── Navbar ─────────────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}
#navbar.scrolled {
  background: rgba(2, 5, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}
#navbar.hidden { transform: translateY(-100%); }

.nav-container {
  display: flex; align-items: center;
  max-width: var(--container); margin: 0 auto;
  padding: 18px 32px;
  gap: 32px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700; font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--text);
  flex-shrink: 0;
}
.brand-hex {
  font-size: 22px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 6px var(--cyan));
  animation: hexSpin 8s linear infinite;
}
@keyframes hexSpin {
  0%   { filter: drop-shadow(0 0 6px var(--cyan)); }
  50%  { filter: drop-shadow(0 0 6px var(--purple)); }
  100% { filter: drop-shadow(0 0 6px var(--cyan)); }
}

.nav-links {
  display: flex; gap: 4px;
  margin-left: auto;
}
.nav-link {
  padding: 8px 16px;
  font-size: 14px; font-weight: 500;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}
.nav-link:hover, .nav-link.active {
  color: var(--cyan);
  background: var(--cyan-dim);
}
.nav-cta {
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #000;
  font-weight: 700; font-size: 13px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  transition: box-shadow 0.3s, transform 0.2s;
  flex-shrink: 0;
}
.nav-cta:hover {
  box-shadow: 0 0 20px var(--cyan);
  transform: translateY(-1px);
}
.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 8px;
  margin-left: 8px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 99px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  max-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
  background: rgba(2, 5, 16, 0.95);
  backdrop-filter: blur(20px);
  transition: max-height 0.4s var(--ease-out-expo);
  border-top: 1px solid var(--border);
}
.mobile-menu.open { max-height: 300px; }
.mobile-link {
  padding: 16px 32px;
  font-size: 15px; font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, padding-left 0.2s;
}
.mobile-link:hover { color: var(--cyan); padding-left: 40px; }

/* ── Hero Section ───────────────────────────────────────────────── */
#hero {
  position: relative;
  width: 100%; height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex; align-items: center;
}
#hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}
.hero-vignette {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(2,5,16,0.8) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 10;
  padding: 0 clamp(24px, 5vw, 80px);
  max-width: 680px;
  padding-top: 80px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 238, 255, 0.08);
  border: 1px solid var(--border-2);
  border-radius: 99px;
  font-size: 12px; font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.badge-pulse {
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 6px var(--cyan);
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(44px, 8vw, 88px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: #fff;
}
.title-glitch {
  position: relative;
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 50%, var(--purple) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.title-glitch::before,
.title-glitch::after {
  content: attr(data-text);
  position: absolute; top: 0; left: 0;
  background: none;
  -webkit-text-fill-color: var(--cyan);
  opacity: 0;
}
.title-glitch:hover::before { opacity: 0.4; animation: glitch1 0.3s steps(2) infinite; }
.title-glitch:hover::after  { opacity: 0.3; animation: glitch2 0.3s steps(2) infinite; -webkit-text-fill-color: var(--purple); }
@keyframes glitch1 {
  0%   { clip-path: polygon(0 20%, 100% 20%, 100% 30%, 0 30%); transform: translate(-3px, 0); }
  25%  { clip-path: polygon(0 50%, 100% 50%, 100% 60%, 0 60%); transform: translate(3px, 0); }
  50%  { clip-path: polygon(0 70%, 100% 70%, 100% 80%, 0 80%); transform: translate(-2px, 0); }
  75%  { clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%); transform: translate(2px, 0); }
  100% { clip-path: polygon(0 40%, 100% 40%, 100% 50%, 0 50%); transform: translate(0, 0); }
}
@keyframes glitch2 {
  0%   { clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%); transform: translate(4px, 0); }
  50%  { clip-path: polygon(0 30%, 100% 30%, 100% 40%, 0 40%); transform: translate(-4px, 0); }
  100% { clip-path: polygon(0 80%, 100% 80%, 100% 90%, 0 90%); transform: translate(2px, 0); }
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(14px, 2.5vw, 18px);
  color: var(--cyan);
  margin-bottom: 8px;
  min-height: 28px;
}
.type-cursor { animation: blink 0.9s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.hero-tagline {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--text-2);
  margin-bottom: 36px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px;
  font-weight: 600; font-size: 14px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
  transition: all 0.25s var(--ease-out-expo);
  position: relative; overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.25s;
}
.btn:hover::before { opacity: 1; }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #0066ff);
  color: #000;
  box-shadow: 0 0 0 0 transparent;
}
.btn-primary::before { background: linear-gradient(135deg, #fff3, transparent); }
.btn-primary:hover { box-shadow: 0 0 30px rgba(0, 238, 255, 0.5); transform: translateY(-2px); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(8px);
}
.btn-ghost::before { background: rgba(255,255,255,0.05); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats { display: flex; align-items: center; gap: 24px; }
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--font-head);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label { font-size: 11px; color: var(--text-3); letter-spacing: 0.08em; margin-top: 4px; }
.stat-sep { width: 1px; height: 40px; background: var(--border-2); }

.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 10; animation: floatUp 2s ease-in-out infinite;
}
@keyframes floatUp {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-8px); }
}
.scroll-label { font-size: 11px; color: var(--text-3); letter-spacing: 0.1em; }
.scroll-pill {
  width: 22px; height: 36px;
  border: 2px solid rgba(0,238,255,0.3);
  border-radius: 99px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-dot {
  width: 4px; height: 8px;
  background: var(--cyan);
  border-radius: 99px;
  animation: scrollDot 1.5s ease-in-out infinite;
  box-shadow: 0 0 6px var(--cyan);
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ── Common Section ─────────────────────────────────────────────── */
.section { padding: var(--section-pad) 0; }
.section-dark { background: var(--bg-1); }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}
.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { text-align: center; }
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
}
.section-title.center { text-align: center; }
.section-desc {
  margin-top: 16px;
  font-size: 15px;
  color: var(--text-2);
  max-width: 600px;
  line-height: 1.7;
}
.highlight {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── About ──────────────────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-text { }
.about-portrait-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.about-portrait {
  width: 96px; height: 96px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 24px rgba(0,238,255,0.25), 0 0 0 6px rgba(139,0,255,0.08);
  background: var(--surface);
}
.about-portrait-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}
.about-portrait-role {
  font-size: 13px;
  color: var(--cyan);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.about-text p {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
}
.about-ctas { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  cursor: default;
  backdrop-filter: blur(8px);
}
.service-card:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(0,238,255,0.1), inset 0 0 24px rgba(0,238,255,0.03);
  transform: translateY(-4px);
}
.service-title {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 600;
  color: var(--text);
}

/* ── Experience / Timeline ──────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple), transparent);
  border-radius: 99px;
}
.timeline-item {
  position: relative;
  margin-bottom: 48px;
  padding-left: 32px;
}
.timeline-item::before {
  content: '';
  position: absolute; left: -37px; top: 6px;
  width: 12px; height: 12px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0,238,255,0.2), 0 0 12px var(--cyan);
}
.timeline-item:hover::before { background: var(--purple); box-shadow: 0 0 0 4px rgba(139,0,255,0.2), 0 0 12px var(--purple); }
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: border-color 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(8px);
}
.timeline-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 4px 40px rgba(0,0,0,0.3);
}
.timeline-header { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.timeline-title {
  font-family: var(--font-head);
  font-size: 18px; font-weight: 700;
  color: #fff;
}
.timeline-company {
  font-size: 13px; color: var(--cyan);
  font-weight: 500; margin-top: 2px;
}
.timeline-date {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text-3);
  white-space: nowrap;
}
.timeline-points { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.timeline-point {
  display: flex; gap: 10px;
  font-size: 14px; color: var(--text-2);
  line-height: 1.6;
}
.timeline-point::before {
  content: '▸';
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Skills ─────────────────────────────────────────────────────── */
.skills-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--badge-color, var(--border));
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  backdrop-filter: blur(8px);
  transition: transform 0.2s, box-shadow 0.2s;
}
.tech-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px color-mix(in srgb, var(--badge-color, var(--cyan)) 35%, transparent);
}
.tech-badge-emoji { font-size: 16px; }

.skills-wrap {
  position: relative;
  width: 100%;
  height: clamp(400px, 55vh, 600px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse at center, rgba(0,100,200,0.06) 0%, transparent 70%);
}
#skills-canvas { width: 100%; height: 100%; display: block; }

.skill-tooltip {
  position: absolute;
  background: rgba(0,238,255,0.1);
  border: 1px solid var(--border-2);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--cyan);
  font-family: var(--font-mono);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
  white-space: nowrap;
}
.skill-tooltip.visible { opacity: 1; }

/* ── Projects ───────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  group: true;
}
.project-card:hover {
  border-color: var(--cyan);
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 30px rgba(0,238,255,0.1);
}
.project-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,238,255,0.04), transparent, rgba(139,0,255,0.04));
  opacity: 0; transition: opacity 0.3s;
  z-index: 1; pointer-events: none;
}
.project-card:hover::before { opacity: 1; }

/* Holographic shimmer overlay */
.project-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(110deg,
    transparent 25%, rgba(255,255,255,0.04) 50%, transparent 75%
  );
  background-size: 200% 100%;
  opacity: 0; transition: opacity 0.3s;
  animation: shimmer 2.5s infinite linear;
  z-index: 2; pointer-events: none;
}
.project-card:hover::after { opacity: 1; }
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.project-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  overflow: hidden;
  background: var(--bg-2);
}
.project-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out-expo);
}
.project-card:hover .project-img { transform: scale(1.05); }

.project-img-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,100,200,0.2), rgba(100,0,200,0.2));
}

.project-info {
  padding: 20px 20px 20px;
  position: relative; z-index: 3;
}
.project-name {
  font-family: var(--font-head);
  font-size: 18px; font-weight: 700;
  color: #fff; margin-bottom: 8px;
}
.project-desc {
  font-size: 13px; color: var(--text-2);
  line-height: 1.6; margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
}
.project-tag {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px; font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}
.tag-blue   { background: rgba(0,119,255,0.15); color: #4db3ff; border: 1px solid rgba(0,119,255,0.3); }
.tag-green  { background: rgba(0,200,100,0.15); color: #4dffaa; border: 1px solid rgba(0,200,100,0.3); }
.tag-pink   { background: rgba(200,0,150,0.15); color: #ff4dcc; border: 1px solid rgba(200,0,150,0.3); }

.project-links {
  display: flex; gap: 10px;
}
.project-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  transition: all 0.2s;
}
.project-link:hover { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-dim); }
.project-link svg { width: 12px; height: 12px; }

/* Modal */
.modal {
  position: fixed; inset: 0;
  z-index: 5000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal.open { opacity: 1; pointer-events: all; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--bg-1);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  max-width: 700px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s var(--ease-out-expo);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 60px rgba(0,238,255,0.05);
}
.modal.open .modal-box { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 14px; color: var(--text-2);
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.modal-close:hover { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-dim); }
.modal-body { }
.modal-img {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--bg-2);
}
.modal-content { padding: 28px; }
.modal-title {
  font-family: var(--font-head);
  font-size: 28px; font-weight: 800;
  color: #fff; margin-bottom: 12px;
}
.modal-desc { color: var(--text-2); line-height: 1.7; margin-bottom: 20px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 12px; }

/* ── Testimonials ───────────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
  backdrop-filter: blur(8px);
}
.testimonial-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
}
.testimonial-quote {
  font-size: 32px; line-height: 1;
  color: var(--cyan); opacity: 0.5;
  margin-bottom: 12px;
  font-family: Georgia, serif;
}
.testimonial-text {
  font-size: 15px; color: var(--text-2);
  line-height: 1.7; margin-bottom: 20px;
  font-style: italic;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  object-fit: cover;
}
.testimonial-name {
  font-weight: 600; font-size: 14px; color: #fff;
}
.testimonial-role { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ── Contact ────────────────────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.contact-info h3 {
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: #fff;
}
.contact-info > p {
  color: var(--text-2); font-size: 15px;
  line-height: 1.7; margin-bottom: 32px;
}
.contact-items { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s, transform 0.2s;
  backdrop-filter: blur(8px);
}
.contact-item:hover { border-color: var(--border-2); transform: translateX(4px); }
.contact-item-label { font-size: 11px; color: var(--text-3); letter-spacing: 0.05em; }
.contact-item-value { font-size: 14px; color: var(--text); font-weight: 500; margin-top: 2px; }

.contact-globe {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  max-width: 420px;
  margin: 0 auto;
}
#contact-canvas { width: 100%; height: 100%; display: block; }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg);
}
.footer-inner {
  max-width: var(--container); margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-weight: 700; font-size: 14px;
}
.footer-hex { font-size: 18px; color: var(--cyan); }
.footer-copy { font-size: 13px; color: var(--text-3); margin-left: auto; }
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-size: 13px; color: var(--text-3);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--cyan); }

/* ── Reveal Animations ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-fade {
  opacity: 0;
  transition: opacity 0.8s ease 0.2s;
}
.reveal-fade.visible { opacity: 1; }

.reveal-slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--ease-out-expo) 0.1s,
              transform 0.7s var(--ease-out-expo) 0.1s;
}
.reveal-slide-left.visible { opacity: 1; transform: translateX(0); }

.reveal-slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s var(--ease-out-expo) 0.2s,
              transform 0.7s var(--ease-out-expo) 0.2s;
}
.reveal-slide-right.visible { opacity: 1; transform: translateX(0); }

.timeline-item { opacity: 0; transform: translateX(-20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.timeline-item.visible { opacity: 1; transform: translateX(0); }

.project-card { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s, box-shadow 0.3s; }
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover { transform: translateY(-6px) !important; }

.service-card { opacity: 0; transform: scale(0.95); transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s, box-shadow 0.3s; }
.service-card.visible { opacity: 1; transform: scale(1); }
.service-card:hover { transform: translateY(-4px) !important; }

.testimonial-card { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.3s; }
.testimonial-card.visible { opacity: 1; transform: translateY(0); }
.testimonial-card:hover { transform: translateY(-4px) !important; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-globe { max-width: 300px; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-copy { margin-left: 0; }
  .timeline { padding-left: 16px; }
  .timeline-item { padding-left: 20px; }
  .timeline-header { flex-wrap: wrap; }
  .timeline-date { margin-left: 0; width: 100%; }
}

@media (min-width: 901px) {
  .nav-hamburger { display: none; }
  .mobile-menu { display: none !important; }
}
