/* ═══════════════════════════════════════════════════════
   ASTERUNE STUDIO — style.css
   Dark minimalist theme inspired by AAKAIROO
═══════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

:root {
  --bg:        #0a0a0a;
  --bg-2:      #111111;
  --bg-3:      #1a1a1a;
  --bg-4:      #222222;
  --bg-5:      #2a2a2a;

  --border:    rgba(255,255,255,0.08);
  --border-2:  rgba(255,255,255,0.15);

  --text:      #ffffff;
  --text-2:    #b0b0b0;
  --text-3:    #666666;

  --accent:    #ffffff;
  --accent-dim: rgba(255,255,255,0.06);

  /* Purple/Blue gradient palette for dark theme */
  --purple-a: #6366f1;
  --purple-b: #8b5cf6;
  --purple-c: #a78bfa;
  --purple-d: #c4b5fd;
  --purple-glow: rgba(139, 92, 246, 0.35);
  --purple-gradient: linear-gradient(135deg, var(--purple-a) 0%, var(--purple-b) 40%, var(--purple-c) 75%, var(--purple-d) 100%);
  --purple-gradient-hover: linear-gradient(135deg, #4f46e5 0%, var(--purple-a) 40%, var(--purple-b) 75%, var(--purple-c) 100%);

  --glass-bg: rgba(20,20,20,0.72);
  --glass-bg-dark: rgba(15,15,15,0.65);
  --glass-border: rgba(255,255,255,0.08);
  --glass-border-inner: rgba(255,255,255,0.06);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 1.5px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);

  --font: 'Urbanist', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  --sb-w: 264px;
  --tb-h: 54px;
  --ease: 0.18s cubic-bezier(0.4,0,0.2,1);
  --ease-slow: 0.32s cubic-bezier(0.4,0,0.2,1);
}

/* ── BASE ─────────────────────────────────────────────── */

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
  transition: background 2s ease, color 2s ease;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Animated background gradient */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99,102,241,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(167,139,250,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 70% at 50% 50%, rgba(139,92,246,0.05) 0%, transparent 70%);
  animation: bgDrift 18s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes bgDrift {
  0%   { opacity: 1; transform: scale(1) translate(0, 0); }
  33%  { opacity: 0.8; transform: scale(1.06) translate(-1%, 1.5%); }
  66%  { opacity: 1; transform: scale(0.97) translate(1.5%, -1%); }
  100% { opacity: 0.85; transform: scale(1.04) translate(-0.5%, 0.5%); }
}

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

/* ── CURSOR ───────────────────────────────────────────── */

#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 20px; height: 20px;
  border: 2px solid var(--text);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10010;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease, width 0.2s ease, height 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
#cursor::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  background: var(--text);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
body.cursor-ready #cursor { opacity: 1; }
body.cursor-hover #cursor {
  width: 40px; height: 40px;
  border-color: var(--purple-b);
  transform: translate(-50%, -50%) scale(1.2);
  transition: opacity 0.3s ease, width 0.2s ease, height 0.2s ease, border-color 3s ease, transform 0.2s ease;
}

/* ── SCROLL ANIMATIONS ───────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1), transform 0.65s cubic-bezier(0.16,1,0.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ── TOPBAR ──────────────────────────────────────────── */

#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--tb-h);
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--glass-border-inner);
  box-shadow: 0 1px 0 var(--glass-border) inset, 0 4px 24px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
}

.topbar-logo {
  width: var(--sb-w);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-right: 1px solid var(--border);
  height: 100%;
}

.logo-img-wrap {
  width: auto;
  height: 50px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.logo-img-wrap img {
  height: 100%;
  width: auto;
  object-fit: contain;
  max-width: 200px;
}
.logo-img-wrap svg { fill: var(--text); }

.logo-wordmark {
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.875rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}
.logo-sub {
  font-family: var(--mono);
  font-size: 0.47rem;
  color: var(--text-3);
  letter-spacing: 0.5px;
  line-height: 1;
  margin-top: 3px;
}

.topbar-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  gap: 12px;
}
.tb-path {
  font-family: var(--mono);
  font-size: 0.585rem;
  color: var(--text-3);
  letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 6px;
}
.tb-path span { color: var(--text-2); }
.tb-actions { display: flex; align-items: center; gap: 8px; }

.tb-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.54rem;
  letter-spacing: 1px; text-transform: uppercase;
  color: #4ade80;
  background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.25);
  padding: 4px 11px; border-radius: 100px;
}
.status-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #4ade80; animation: pulse 2.4s ease infinite;
}

/* ── BUTTONS ─────────────────────────────────────────── */

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1002;
  position: relative;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-2);
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 54px;
  left: 0;
  right: 0;
  background: var(--glass-bg-dark);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 20px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.mobile-menu.active {
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-link {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: rgba(255,255,255,0.1);
  color: var(--purple-b);
}

.tb-btn,
.tb-btn.primary,
.btn,
.btn.primary {
  transition: all 0.7 cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.tb-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 15px; border-radius: 6px;
  font-family: var(--font); font-size: 0.76rem; font-weight: 700;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  background: rgba(20,20,20,0.6);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all var(--ease);
  letter-spacing: 0.2px;
  
}
.tb-btn:hover { color: var(--text); background: rgba(30,30,30,0.8); }

.tb-btn.primary {
  background: rgba(20,20,20,0.6);
  border-color: var(--border-2);
  color: var(--text-2);
  box-shadow: none;
  transition: all var(--ease), background var(--ease), box-shadow var(--ease), color var(--ease), border-color var(--ease);
}
.tb-btn.primary:hover {
  background: var(--purple-gradient-hover);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 0 8px rgba(139,92,246,0.55),
    0 0 18px rgba(139,92,246,0.40),
    0 4px 28px rgba(99,102,241,0.50),
    0 8px 48px rgba(167,139,250,0.28),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all var(--ease), background 3s ease, box-shadow 3s ease, color var(--ease), border-color var(--ease);
}

/* Shared "pill" button used in hero/contact */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font); font-size: 0.82rem; font-weight: 700;
  padding: 11px 22px; border-radius: 8px;
  cursor: pointer;
  transition: all var(--ease), background var(--ease), box-shadow var(--ease), color var(--ease), border-color var(--ease);
  letter-spacing: 0.2px;
  border: 1px solid var(--border-2);
  color: var(--text-2);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
}
.btn:hover {
  color: var(--text);
  background: rgba(40,40,40,0.72);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.btn.primary {
  background: var(--glass-bg);
  border-color: var(--border-2);
  color: var(--text-2);
  box-shadow: var(--glass-shadow);
}
.btn.primary:hover {
  background: var(--purple-gradient-hover);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all var(--ease), background 3s ease, box-shadow 3s ease, color var(--ease), border-color var(--ease);
}

/* contact-link mirrors .btn behavior */
.contact-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font); font-size: 0.78rem; font-weight: 700;
  color: var(--text-2);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border-inner);
  box-shadow: var(--glass-shadow);
  padding: 10px 18px; border-radius: 8px;
  transition: all var(--ease), background var(--ease), box-shadow var(--ease), color var(--ease), border-color var(--ease);
  letter-spacing: 0.2px;
}
.contact-link:hover {
  background: rgba(40,40,40,0.72); border-color: var(--border-2);
  color: var(--text); transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.contact-link.primary {
  background: var(--glass-bg);
  border-color: var(--glass-border-inner);
  color: var(--text-2);
  box-shadow: var(--glass-shadow);
}
.contact-link.primary:hover {
  background: var(--purple-gradient-hover);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 0 10px rgba(139,92,246,0.60),
    0 0 22px rgba(139,92,246,0.45),
    0 6px 36px rgba(99,102,241,0.55),
    0 12px 60px rgba(167,139,250,0.30),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transition: all var(--ease), background 3s ease, box-shadow 3s ease, color var(--ease), border-color var(--ease);
}

/* ── LAYOUT ──────────────────────────────────────────── */

#layout {
  display: flex;
  min-height: calc(100vh - var(--tb-h));
  margin-top: var(--tb-h);
  position: relative;
  z-index: 1;
}

/* ── SIDEBAR ─────────────────────────────────────────── */

#sidebar {
  width: var(--sb-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--tb-h);
  height: calc(100vh - var(--tb-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--glass-bg-dark);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-right: 1px solid var(--glass-border-inner);
  box-shadow: 1px 0 0 rgba(255,255,255,0.03) inset;
  scrollbar-width: none;
}
#sidebar::-webkit-scrollbar { display: none; }

.sb-group { padding: 20px 10px 4px; }
.sb-group-label {
  font-family: var(--mono); font-size: 0.47rem;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--text-3); padding: 0 8px 8px;
  display: flex; align-items: center; gap: 8px;
}
.sb-group-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.sb-nav li { position: relative; }
.sb-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 7px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-2);
  transition: background var(--ease), color var(--ease), transform var(--ease);
}
.sb-nav li a svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--text-3); transition: color var(--ease); }
.sb-nav li a:hover { background: rgba(255,255,255,0.08); color: var(--text); transform: translateX(2px); }
.sb-nav li a:hover svg { color: var(--text-2); }
.sb-nav li a.active {
  background: rgba(255,255,255,0.1);
  color: var(--purple-b); font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: background var(--ease), color 3s ease, transform var(--ease);
}
.sb-nav li a.active svg { color: var(--purple-b); transition: color 3s ease; }
.sb-nav li a.active::before {
  content: '';
  position: absolute; left: 0; top: 5px; bottom: 5px;
  width: 2.5px;
  background: var(--purple-gradient);
  border-radius: 0 2px 2px 0;
  transition: background 3s ease;
}
.sb-badge {
  margin-left: auto; font-family: var(--mono); font-size: 0.5rem;
  background: var(--bg-4); color: var(--text-3);
  padding: 2px 7px; border-radius: 4px; letter-spacing: 0.3px;
}

.sb-stack-wrap { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 10px 14px; }
.sb-stack-tag {
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.4px;
  color: var(--text-2);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 5px;
  transition: background var(--ease), transform var(--ease);
}
.sb-stack-tag:hover { background: rgba(255,255,255,0.15); transform: translateY(-1px); }

.sb-footer {
  margin-top: auto; padding: 20px 20px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 11px; flex-shrink: 0;
  background: rgba(15,15,15,0.4);
}
.sb-footer-meta {
  font-family: var(--mono); font-size: 0.52rem;
  color: var(--text-3); letter-spacing: 0.3px; line-height: 1.75;
}
.sb-footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.sb-footer-links a {
  font-family: var(--mono); font-size: 0.54rem;
  color: var(--text-3); transition: color 3s ease;
}
.sb-footer-links a:hover { color: var(--purple-b); }

/* ── MAIN ────────────────────────────────────────────── */

#main { 
  flex: 1; 
  min-width: 0; 
  display: flex; 
  flex-direction: column;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── SECTION HEADERS ─────────────────────────────────── */

.content-section { border-bottom: 1px solid var(--border); }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 60px; border-bottom: 1px solid var(--border);
  background: rgba(15,15,15,0.5); backdrop-filter: blur(8px);
}
.section-title {
  font-family: var(--mono); font-size: 0.54rem;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-3); display: flex; align-items: center; gap: 10px;
}
.section-title::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }
.section-count { font-family: var(--mono); font-size: 0.52rem; color: var(--text-3); }

/* ── HERO / ITZDEV SECTION ──────────────────────────────── */

.itzdev-section {
  padding: 100px 60px 108px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.itzdev-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.itzdev-orb-1 {
  width: 460px; height: 340px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  top: -60px; right: 80px;
  animation: orbDrift 14s ease-in-out infinite alternate;
}
.itzdev-orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(167,139,250,0.1) 0%, transparent 70%);
  bottom: 40px; left: 20px;
  animation: orbDrift 20s ease-in-out infinite alternate-reverse;
}

@keyframes orbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(20px, -15px) scale(1.08); }
  100% { transform: translate(-12px, 10px) scale(0.95); }
}

.itzdev-ghost-num {
  position: absolute; bottom: -0.08em; right: -0.01em;
  font-family: var(--font); font-weight: 800;
  font-size: clamp(60px, 15vw, 240px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.03);
  line-height: 1; pointer-events: none; user-select: none;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
}
.itzdev-label {
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 32px;
  display: flex; align-items: center; gap: 12px;
}
.itzdev-label::before { content: ''; width: 18px; height: 1px; background: var(--text-3); }
.itzdev-name {
  font-family: var(--font); font-weight: 800;
  font-size: clamp(28px, 6vw, 104px);
  line-height: 1.1; letter-spacing: -0.03em;
  color: var(--text); margin-bottom: 48px;
}
.itzdev-name .line2 { color: var(--text-3); display: block; margin-top: 0.05em; }
.itzdev-name .line2 em { font-style: italic; font-weight: 300; }
.itzdev-row {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.itzdev-desc-wrapper {
  display: flex; align-items: center; gap: 20px;
}
.itzdev-desc-logo {
  width: 80px;
  height: auto;
  flex-shrink: 0;
}
.itzdev-desc {
  font-size: 0.95rem; color: var(--text-2);
  max-width: 400px; line-height: 1.85; font-weight: 500;
}
.itzdev-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Stat cards */
.itzdev-stats { display: flex; gap: 14px; margin-top: 60px; flex-wrap: wrap; }
.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(139,92,246,0.2);
  box-shadow:
    var(--glass-shadow),
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 0 18px rgba(99,102,241,0.1);
  border-radius: 14px; padding: 20px 26px; min-width: 120px;
  position: relative; overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--purple-gradient);
  opacity: 0.7;
  transition: background 3s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 24px rgba(99,102,241,0.2);
}
.stat-num {
  font-family: var(--font); font-weight: 800;
  font-size: 1.7rem; letter-spacing: -0.03em;
  background: var(--purple-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label {
  font-family: var(--mono); font-size: 0.5rem;
  color: var(--text-3); letter-spacing: 1px;
  text-transform: uppercase; margin-top: 6px;
}

/* ── WORK GRID ───────────────────────────────────────── */

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

.work-card {
  padding: 54px 60px 60px;
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  text-decoration: none; color: inherit;
  overflow: hidden;
  transition: background var(--ease-slow), box-shadow var(--ease-slow);
}
.work-card:hover {
  background: rgba(255,255,255,0.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.work-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
  pointer-events: none;
}
.work-card:hover::before {
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
}
.work-card::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("images/banneritzdev'.png");
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}
.work-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
  pointer-events: none;
}
.work-card .work-num,
.work-card .work-title,
.work-card .work-desc,
.work-card .work-tags,
.work-card .work-arrow {
  position: relative;
  z-index: 2;
}
.work-card:hover::after {
  opacity: 0.6;
}

.work-num { font-family: var(--mono); font-size: 0.54rem; color: var(--text-3); letter-spacing: 1.5px; }
.work-title {
  font-family: var(--font); font-weight: 800; font-size: 1.5rem;
  line-height: 1.12; letter-spacing: -0.015em; color: var(--text);
}
.work-desc { font-size: 0.84rem; color: var(--text-2); line-height: 1.8; font-weight: 500; max-width: 340px; }
.work-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  font-family: var(--mono); font-size: 0.51rem; letter-spacing: 0.5px;
  color: var(--text-3);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 5px;
  transition: background var(--ease), color var(--ease);
}
.work-card:hover .tag { background: rgba(255,255,255,0.15); color: var(--text-2); }
.work-arrow {
  position: absolute; top: 32px; right: 32px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 0.72rem;
  transition: all var(--ease);
}
.work-card:hover .work-arrow {
  border-color: transparent; color: #fff;
  background: var(--purple-gradient);
  transform: translate(2px, -2px);
  box-shadow: 0 4px 14px var(--purple-glow);
}

/* ── ABOUT ───────────────────────────────────────────── */

.about-grid { display: grid; grid-template-columns: 1fr 1fr; }
.about-col { padding: 64px 60px; }
.about-col + .about-col { border-left: 1px solid var(--border); }
.about-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.about-logo {
  width: 500px;
  height: auto;
}
.about-col h2 {
  font-family: var(--font); font-weight: 800; font-size: 2.2rem;
  letter-spacing: -0.025em; line-height: 1.08;
  margin-bottom: 28px; color: var(--text);
}
.about-col p { font-size: 0.875rem; color: var(--text-2); line-height: 1.9; font-weight: 500; margin-bottom: 18px; }
.skills-heading {
  font-family: var(--mono); font-size: 0.51rem; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 20px;
}
.skill-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--border);
  font-size: 0.84rem; font-weight: 600; color: var(--text-2);
  transition: color var(--ease), padding-left var(--ease);
}
.skill-row:first-of-type { border-top: 1px solid var(--border); }
.skill-row:hover { color: var(--text); padding-left: 6px; }
.skill-type { font-family: var(--mono); font-size: 0.5rem; color: var(--text-3); letter-spacing: 0.5px; }

/* ── TEAM GRID ───────────────────────────────────────── */

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); }

.team-card {
  padding: 40px 36px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  text-decoration: none; color: inherit;
  overflow: hidden;
  transition: background var(--ease-slow), box-shadow var(--ease-slow);
}
.team-card:nth-child(3n) { border-right: none; }
.team-card:hover {
  background: rgba(255,255,255,0.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.team-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color var(--ease), transform var(--ease);
}
.team-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.team-card:hover .team-avatar {
  border-color: var(--purple-b);
  transform: scale(1.05);
  transition: border-color 3s ease, transform var(--ease);
}
.team-name {
  font-family: var(--font); font-weight: 800; font-size: 1.2rem;
  line-height: 1.12; letter-spacing: -0.015em; color: var(--text);
}
.team-role {
  font-size: 0.8rem; color: var(--text-3); line-height: 1.8; font-weight: 500; margin-bottom: 8px; }
.team-arrow {
  position: absolute; top: 24px; right: 24px;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 0.72rem;
  transition: all var(--ease);
}
.team-card:hover .team-arrow {
  border-color: transparent; color: #fff;
  background: var(--purple-gradient);
  transform: translate(2px, -2px);
  box-shadow: 0 4px 14px var(--purple-glow);
  transition: all var(--ease), background 3s ease, box-shadow 3s ease;
}

/* ── TEAM MEMBER PAGE ─────────────────────────────────── */

.member-hero {
  padding: 80px 60px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: stretch;
}
.member-hero-content {
  display: flex; flex-direction: column; gap: 24px;
  justify-content: center;
}
.member-label {
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--text-3);
  display: flex; align-items: center; gap: 12px;
}
.member-label::before { content: ''; width: 18px; height: 1px; background: var(--text-3); }
.member-name {
  font-family: var(--font); font-weight: 800;
  font-size: clamp(48px, 6vw, 72px);
  line-height: 0.9; letter-spacing: -0.03em;
  color: var(--text);
}
.member-role {
  font-family: var(--font); font-weight: 600;
  font-size: 1.4rem;
  color: var(--purple-b);
  font-style: italic;
  transition: color 2s ease;
}
.member-desc {
  font-size: 1rem; color: var(--text-2);
  line-height: 1.85; font-weight: 500;
  max-width: 500px;
  position: relative;
  padding: 20px 0 20px 40px;
}
.quote-mark {
  font-size: 5rem;
  color: var(--purple-b);
  line-height: 1;
  font-weight: 300;
  font-family: Georgia, 'Times New Roman', serif;
  transition: color 2s ease;
}
.quote-left {
  position: absolute;
  left: -15px;
  top: -5px;
}
.quote-right {
  position: absolute;
  right: -15px;
  bottom: -25px;
}
.member-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  height: 100%;
}
.member-image {
  width: 100%; height: 100%;
  object-fit: cover;
  /* Parallelogram with 3D perspective - vertical lines diagonal to left */
  clip-path: polygon(
    15% 0%, 100% 0%, 85% 100%, 0% 100%
  );
  filter: grayscale(20%);
  transition: filter var(--ease), transform var(--ease);
}
.member-image-wrapper:hover .member-image {
  filter: grayscale(0%);
  transform: scale(1.02);
}
.member-image-wrapper .member-image.floating-image {
  filter: none !important;
  clip-path: none !important;
}
.member-image-wrapper:hover .member-image.floating-image {
  filter: none !important;
  clip-path: none !important;
  transform: none !important;
}
.floating-image {
  animation: float 3s ease-in-out infinite;
  width: 250px;
  height: auto;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
.member-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(99,102,241,0.1) 100%);
  pointer-events: none;
  clip-path: polygon(
    15% 0%, 100% 0%, 85% 100%, 0% 100%
  );
  transition: background 3s ease;
}

/* ── CONTACT ─────────────────────────────────────────── */

.contact-wrap {
  padding: 108px 60px;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 36px; position: relative; overflow: hidden;
}
.contact-wrap h2 {
  font-family: var(--font); font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  letter-spacing: -0.03em; line-height: 0.96;
  color: var(--text); max-width: 640px;
}
.contact-wrap h2 span { color: var(--text-3); font-weight: 300; font-style: italic; }
.contact-sub { font-size: 0.9rem; color: var(--text-2); max-width: 400px; line-height: 1.85; font-weight: 500; }
.contact-links-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.contact-ghost {
  position: absolute; right: -0.02em; bottom: -0.14em;
  font-family: var(--font); font-weight: 800;
  font-size: clamp(90px, 15vw, 200px);
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.03);
  line-height: 1; pointer-events: none; user-select: none; letter-spacing: -0.04em;
}

/* ── FOOTER ──────────────────────────────────────────── */

#footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 60px; border-top: 1px solid var(--border);
  background: var(--glass-bg-dark); backdrop-filter: blur(12px);
}
.footer-left {
  font-family: var(--mono); font-size: 0.52rem;
  color: var(--text-3); display: flex; align-items: center; gap: 7px;
}
.footer-dot { width: 5px; height: 5px; border-radius: 50%; background: #4ade80; animation: pulse 2.4s ease infinite; }
.footer-right { font-family: var(--mono); font-size: 0.52rem; color: var(--text-3); }

/* ── ANIMATIONS ──────────────────────────────────────── */

@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--purple-glow); }
  50% { box-shadow: 0 0 40px var(--purple-glow); }
}

/* Enhanced reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* Hover animations for cards */
.team-card:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
  transform: translateY(-5px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Button hover animations */
.btn:hover, .tb-btn:hover, .contact-link:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* Orb animations */
.itzdev-orb {
  animation: float 6s ease-in-out infinite;
}

.itzdev-orb-1 {
  animation-delay: 0s;
}

.itzdev-orb-2 {
  animation-delay: 3s;
}

/* Stat card animations */
.stat-card {
  transition: transform 0.3s ease, background 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
}

/* ── RESPONSIVE ──────────────────────────────────────── */

/* Base mobile reset */
@media (max-width: 768px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Layout containers */
  #layout {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  #main {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Header/Topbar fix */
  #topbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    max-width: 100%;
  }
  
  .topbar-logo {
    width: auto;
    border-right: none;
    margin-bottom: 0;
  }
  
  .topbar-right {
    width: auto;
    padding: 0;
    justify-content: flex-end;
  }
  
  .tb-path {
    display: none;
  }
  
  .tb-status {
    display: none;
  }
  
  /* Mobile menu button */
  .mobile-menu-btn {
    display: flex;
    order: 2;
  }
  
  .tb-btn {
    display: none;
  }
  
  /* Show back button on project pages in mobile */
  .tb-actions .tb-btn[href*="index.html"] {
    display: inline-flex;
    order: 1;
  }
  
  /* Mobile menu */
  .mobile-menu {
    display: block;
    position: fixed;
    top: 54px;
    left: 0;
    right: 0;
    background: var(--glass-bg-dark);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 16px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 100%;
  }
  
  .mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  /* Sidebar hide */
  #sidebar {
    display: none;
  }
  
  :root {
    --sb-w: 0px;
  }
  
  /* Hero section */
  .itzdev-section {
    padding: 60px 20px 40px;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Title fix for mobile */
  .itzdev-name {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 24px;
  }
  
  .itzdev-desc {
    font-size: 0.9rem;
    max-width: 100%;
  }
  
  /* Background text fix */
  .itzdev-ghost-num {
    font-size: clamp(40px, 12vw, 80px);
    white-space: nowrap;
    overflow: hidden;
  }
  
  /* All sections */
  .content-section {
    padding: 40px 20px;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .section-header {
    padding: 16px 20px;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-count {
    font-size: 0.8rem;
  }
  
  /* About section */
  .about-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  
  .about-col {
    padding: 24px 20px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .about-col + .about-col {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  
  .about-col p {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
  }
  
  .about-logo {
    max-width: 100%;
    height: auto;
  }
  
  /* Projects section */
  .work-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  
  .work-card {
    padding: 24px 20px;
    border-right: none;
    width: 100%;
  }
  
  .work-title {
    font-size: 1.2rem;
  }
  
  .work-desc {
    font-size: 0.9rem;
  }
  
  /* Team section */
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  
  .team-card {
    padding: 24px 20px;
    border-right: none;
    width: 100%;
  }
  
  .team-name {
    font-size: 1.1rem;
  }
  
  .team-role {
    font-size: 0.85rem;
  }
  
  /* Contact section */
  .contact-wrap {
    padding: 40px 20px;
    max-width: 100%;
  }
  
  .contact-wrap h2 {
    font-size: 2rem;
  }
  
  .contact-link {
    font-size: 0.9rem;
    padding: 12px 16px;
  }
  
  /* Footer */
  #footer {
    padding: 16px 20px;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
  }
  
  /* Member pages */
  .member-hero {
    grid-template-columns: 1fr;
    padding: 40px 20px;
    gap: 24px;
    max-width: 100%;
  }
  
  .member-image-wrapper {
    max-width: 250px;
    margin: 0 auto;
  }
  
  .member-name {
    font-size: 2rem;
  }
  
  .member-role {
    font-size: 1rem;
  }
  
  .member-desc {
    font-size: 0.9rem;
  }
  
  /* Stats */
  .itzdev-stats {
    gap: 8px;
    flex-wrap: wrap;
  }
  
  /* Cursor hide on mobile */
  #cursor {
    display: none;
  }
}

@media (max-width: 480px) {
  .itzdev-name {
    font-size: 1.8rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  .itzdev-section {
    padding: 40px 16px 32px;
  }
  
  .content-section {
    padding: 32px 16px;
  }
  
  #topbar {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  body::after { animation: none; }
}
