/* =============================================
   AVIRUP BASAK — PORTFOLIO CSS
   Dark Cyberpunk-Editorial Aesthetic
   ============================================= */

/* ---- CSS VARIABLES ---- */
:root {
  --bg-primary: #060b14;
  --bg-secondary: #0b1426;
  --bg-card: #0e1a2e;
  --bg-card-hover: #122338;
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.12);
  --accent-glow: rgba(0, 212, 255, 0.25);
  --accent2: #7b5ea7;
  --accent3: #ff6b6b;
  --text-primary: #e8f0fe;
  --text-secondary: #8ca0c0;
  --text-muted: #4a6080;
  --border: rgba(0, 212, 255, 0.12);
  --border-strong: rgba(0, 212, 255, 0.25);
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.5);
  --glow: 0 0 20px rgba(0, 212, 255, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ---- CUSTOM CURSOR ---- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  transition: transform 0.1s ease, background 0.2s ease;
}
.cursor-ring {
  width: 32px; height: 32px;
  border: 1.5px solid rgba(0, 212, 255, 0.5);
  transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease;
}
body.cursor-hover .cursor-dot { transform: translate(-50%, -50%) scale(0); }
body.cursor-hover .cursor-ring {
  width: 48px; height: 48px;
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.05);
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.3); }

/* ---- SELECTION ---- */
::selection { background: rgba(0, 212, 255, 0.2); color: var(--accent); }

/* ---- CONTAINER ---- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---- SECTION BASE ---- */
.section {
  padding: 100px 0;
  position: relative;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-title.center { text-align: center; }

.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: center;
  margin-bottom: 3.5rem;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::after { opacity: 0.06; }

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.45);
}

.btn-outline {
  border: 1.5px solid var(--border-strong);
  color: var(--text-primary);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--glow);
}

.btn.full-width { width: 100%; justify-content: center; }

/* ---- GHOST BUTTON ---- */
.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  padding: 0.4rem 0;
  transition: var(--transition);
  letter-spacing: 0.03em;
}
.btn-ghost:hover { gap: 0.7rem; }

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 2.5rem;
  background: rgba(6, 11, 20, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  padding: 0.9rem 2.5rem;
  background: rgba(6, 11, 20, 0.92);
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.brand-bracket { color: var(--accent); }
.brand-name { color: var(--text-primary); margin: 0 1px; }

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  transition: var(--transition);
  letter-spacing: 0.02em;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute; bottom: 0; left: 50%;
  width: 0; height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width 0.3s ease;
  border-radius: 2px;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}
.nav-link:hover::after, .nav-link.active::after { width: 60%; }

.hamburger {
  display: none; flex-direction: column;
  gap: 5px; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; 
  /* overflow: hidden; */
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}

#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

.hero-grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
  opacity: 0.5;
}

.hero-content {
  position: relative; z-index: 1;
  max-width: 780px;
  padding: 0 2rem;
  margin: 0 auto;
  text-align: center;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  padding: 0.45rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  margin-bottom: 2rem;
  background: var(--accent-dim);
  letter-spacing: 0.05em;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.dot.pulse {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
  50% { opacity: 0.8; transform: scale(1.1); box-shadow: 0 0 0 6px transparent; }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.name-line { display: block; }
.accent-text {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  /* text-stroke: 2px var(--accent); */
  filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.4));
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sep { color: var(--accent); margin: 0 0.5rem; }

.hero-intro {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex; gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex; align-items: center; gap: 2rem;
  justify-content: center;
  padding: 1.5rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(14, 26, 46, 0.6);
  backdrop-filter: blur(8px);
  display: inline-flex;
}

.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.hero-scroll-hint {
  position: absolute; bottom: -1.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 1;
  animation: floatDown 2s infinite ease-in-out;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
}
@keyframes floatDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
  margin-top: 3rem;
}

.image-frame {
  position: relative;
  display: inline-block;
  width: 100%;
}

.image-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem;
  border: 1px solid var(--border);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-muted);
  overflow: hidden;
}

.image-placeholder i {
  font-size: 5rem;
  color: var(--accent-dim);
  opacity: 0.5;
}

/* Real image styling */
.image-frame img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.frame-corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.7;
}
.frame-corner.tl { top: -8px; left: -8px; border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.frame-corner.tr { top: -8px; right: -8px; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.frame-corner.bl { bottom: -8px; left: -8px; border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.frame-corner.br { bottom: -8px; right: -8px; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }

.about-tag-stack {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.5rem;
}
.about-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--accent-dim);
  letter-spacing: 0.05em;
}

.about-text-col .section-label { margin-bottom: 0.5rem; }

.about-bio {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}
.about-bio strong { color: var(--text-primary); font-weight: 500; }

.about-details {
  margin-top: 2rem;
  display: flex; flex-direction: column; gap: 0.8rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.detail-item {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}
.detail-item i {
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.detail-item a { color: var(--accent); }
.detail-item a:hover { text-decoration: underline; }

/* ==========================================
   SKILLS SECTION
   ========================================== */
.skills {
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}
.skills::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(123, 94, 167, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation-delay: var(--delay, 0s);
}
.skill-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.skill-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), var(--glow);
  background: var(--bg-card-hover);
}
.skill-card:hover::before { transform: scaleX(1); }

.skill-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: var(--color, var(--accent));
  transition: var(--transition);
}
.skill-card:hover .skill-icon {
  background: rgba(255,255,255,0.07);
  transform: scale(1.05);
}

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.skill-card p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  line-height: 1.5;
}

.skill-level {
  height: 3px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  overflow: hidden;
}
.level-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 999px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.skill-card.visible .level-bar { width: var(--width, 0%); }

.learning-badge, .coming-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.learning-badge {
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent);
  border: 1px solid var(--border-strong);
}
.coming-badge {
  background: rgba(255, 107, 107, 0.12);
  color: var(--accent3);
  border: 1px solid rgba(255, 107, 107, 0.25);
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */
.projects {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex; flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  animation-delay: var(--delay, 0s);
}
.project-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), var(--glow);
}
.project-card:hover::after { opacity: 1; }

.project-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  letter-spacing: 0.1em;
}

.project-content { flex: 1; }
.project-content h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.project-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.project-tags {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  letter-spacing: 0.04em;
  transition: var(--transition);
}
.project-card:hover .tag {
  border-color: rgba(0, 212, 255, 0.2);
  color: var(--text-secondary);
}

.project-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.project-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.project-card:hover .project-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

/* ==========================================
   GOALS / TIMELINE SECTION
   ========================================== */
.goals {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}
.goals::after {
  content: 'FUTURE';
  position: absolute;
  right: -2rem; top: 50%;
  transform: translateY(-50%) rotate(90deg);
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 800;
  color: rgba(255,255,255,0.015);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: -0.05em;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border-strong) 10%, var(--border-strong) 90%, transparent);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  width: 50%;
  padding: 0 3rem 3rem 0;
  position: relative;
}
.timeline-item:nth-child(even) {
  margin-left: 50%;
  padding: 0 0 3rem 3rem;
  flex-direction: row-reverse;
}

.timeline-marker {
  position: absolute;
  right: -1px;
  top: 0;
  transform: translateX(50%);
}
.timeline-item:nth-child(even) .timeline-marker {
  right: auto;
  left: -1px;
  transform: translateX(-50%);
}

.marker-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--accent);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
  transition: var(--transition);
}
.timeline-item:hover .marker-icon {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  width: 100%;
}
.timeline-item:hover .timeline-content {
  border-color: var(--border-strong);
  box-shadow: var(--glow);
}

.timeline-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.timeline-content p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.goals-inspire {
  text-align: center;
  margin-top: 4rem;
}
blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}
blockquote cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 0.75rem;
  font-style: normal;
}

/* ==========================================
   PHOTOGRAPHY / HOBBY SECTION
   ========================================== */
.hobby {
  background: var(--bg-secondary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 1rem;
}

.gallery-item {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
}
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }

.gallery-placeholder {
  width: 100%; height: 100%;
  background: oklch(from var(--bg-card) l c calc(var(--hue, 200) * 1deg));
  background: linear-gradient(
    135deg,
    hsl(var(--hue, 200), 20%, 12%) 0%,
    hsl(var(--hue, 200), 30%, 18%) 100%
  );
  display: flex; align-items: center; justify-content: center;
  color: hsl(var(--hue, 200), 40%, 40%);
  font-size: 3rem;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item:hover .gallery-placeholder { transform: scale(1.08); }

.gallery-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item:hover img{
  transform: scale(1.08);
}


.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: white;
}
.gallery-overlay i {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 1.3rem;
  color: white;
  opacity: 0.8;
}

.gallery-note {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2rem;
  display: flex; align-items: center; gap: 0.4rem; justify-content: center;
}
.gallery-note code {
  background: var(--bg-card);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  align-items: start;
  margin-top: 1rem;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.contact-info > p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-link {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}
.contact-link:hover {
  border-color: var(--border-strong);
  box-shadow: var(--glow);
  transform: translateX(4px);
}
.contact-link-icon {
  width: 42px; height: 42px;
  border-radius: 9px;
  background: var(--accent-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
}
.link-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.link-val {
  display: block;
  font-size: 0.88rem;
  color: var(--text-primary);
}

/* ---- FORM ---- */
.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  resize: vertical;
  outline: none;
  appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.form-error {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent3);
  margin-top: 0.4rem;
  min-height: 1rem;
}

.form-success {
  display: none;
  align-items: center; gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
}
.form-success.show { display: flex; }

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.footer-social {
  display: flex; gap: 1rem;
}
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.footer-social a:hover {
  border-color: var(--border-strong);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
}
.footer-bottom p {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================
   SCROLL TO TOP
   ========================================== */
.scroll-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
  opacity: 0; transform: translateY(10px);
  transition: var(--transition);
  pointer-events: none;
}
.scroll-top.show {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--accent);
  color: #000;
  box-shadow: var(--glow);
  transform: translateY(-2px);
}

/* ==========================================
   REVEAL ANIMATIONS
   ========================================== */
.reveal-up, .reveal-left, .reveal-right {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal-up { transform: translateY(40px); }
.reveal-left { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }

.reveal-up.visible, .reveal-left.visible, .reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

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

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .timeline::before { left: 20px; }
  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 0 0 2.5rem 4rem;
    flex-direction: row;
  }
  .timeline-marker,
  .timeline-item:nth-child(even) .timeline-marker {
    left: 0; right: auto;
    transform: translateX(-50%) translateX(20px);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
  }
}

@media (max-width: 768px) {
  .section { padding: 70px 0; }

  /* Navbar mobile */
  .hamburger { display: flex; }
  
  .nav-links {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 100%;
    background: var(--bg-primary);
    border-left: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem 2rem;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    z-index: 999;
  }
  .nav-link {
    font-size: 1.4rem;
    width: auto;
    text-align: center;
    padding: 0.75rem 1rem;
  }

  .nav-links.open { transform: translateX(0); }
  .nav-link { font-size: 1rem; width: 100%; padding: 0.6rem 0.5rem; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-stats { gap: 1.5rem; padding: 1.25rem 1.75rem; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }
  .gallery-item.wide { grid-column: span 2; }

  .footer-bottom { flex-direction: column; gap: 0.4rem; text-align: center; }

  /* Disable custom cursor on touch */
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: default; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 130px;
  }
  .gallery-item.tall { grid-row: span 1; }
  .hero-stats {
    flex-direction: column; gap: 0.75rem;
    padding: 1.25rem;
  }
  .stat-divider { display: none; }
  .contact-form-wrap { padding: 1.5rem; }
}