/* ══════════════════════════════════════════════════════════
   PORTFOLIO — style.css
   Tailwind dark mode strategy: class
   ══════════════════════════════════════════════════════════ */

/* ── Base Transitions ──────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Noise Overlay ─────────────────────────────────────── */
.noise-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: 0.025;
  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)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px;
}

/* ── Navbar ────────────────────────────────────────────── */
#navbar {
  background: rgba(248, 250, 252, 0);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(226, 232, 240, 0.8);
}

.dark #navbar.scrolled {
  background: rgba(13, 13, 18, 0.85);
  border-bottom-color: rgba(30, 30, 45, 0.8);
}

.nav-link {
  position: relative;
  color: #64748b;
  transition: color 0.2s ease;
  padding-bottom: 2px;
}

.dark .nav-link {
  color: #94a3b8;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: #6366f1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover {
  color: #6366f1;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* ── Mobile Menu ───────────────────────────────────────── */
.menu-bar {
  display: block;
  height: 1.5px;
  width: 22px;
  background: currentColor;
  transition: all 0.25s ease;
  border-radius: 1px;
}

.menu-bar.short {
  width: 14px;
  margin-left: auto;
}

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
  max-height: 300px;
}

.mobile-nav-link {
  display: block;
  color: #64748b;
  padding: 4px 0;
  transition: color 0.2s;
}

.dark .mobile-nav-link {
  color: #94a3b8;
}

.mobile-nav-link:hover {
  color: #6366f1;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero-blob {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: blob-drift 8s ease-in-out infinite alternate;
}

.hero-blob-2 {
  position: absolute;
  bottom: 10%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
  pointer-events: none;
  animation: blob-drift 11s ease-in-out infinite alternate-reverse;
}

@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(20px, -30px) scale(1.05); }
}

/* ── Gradient Text ─────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  background: #6366f1;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  border: 1.5px solid #e2e8f0;
  color: #475569;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.dark .btn-ghost {
  border-color: #334155;
  color: #94a3b8;
}

.btn-ghost:hover {
  border-color: #6366f1;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
}

/* ── Scroll Hint ───────────────────────────────────────── */
.scroll-hint {
  width: 24px;
  height: 38px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  position: relative;
}

.dark .scroll-hint {
  border-color: #334155;
}

.scroll-hint::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: #6366f1;
  border-radius: 2px;
  animation: scroll-hint-bounce 1.8s ease-in-out infinite;
}

@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  80%       { transform: translateX(-50%) translateY(10px); opacity: 0; }
}

/* ── Fade-in Animations ────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  animation: fade-in-up 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fade-in-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Section Labels & Titles ───────────────────────────── */
.section-label {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6366f1;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.dark .section-title {
  color: #f1f5f9;
}

/* ── About — Avatar ────────────────────────────────────── */
.avatar-frame {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

.avatar-inner {
  width: 200px;
  height: 200px;
  border-radius: 28px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.dark .avatar-inner {
  background: linear-gradient(135deg, #1e1b4b, #2d1b69);
}

.avatar-ring {
  position: absolute;
  inset: -10px;
  border-radius: 36px;
  border: 2px dashed rgba(99, 102, 241, 0.3);
  animation: spin-slow 20s linear infinite;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

/* ── About — Stats ─────────────────────────────────────── */
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dark .stat-card {
  background: rgba(255,255,255,0.03);
  border-color: #1e293b;
}

.stat-card:hover {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08);
}

.stat-number {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #6366f1;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ── Skills Cards ──────────────────────────────────────── */
.skill-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}

.dark .skill-card {
  background: rgba(255,255,255,0.03);
  border-color: #1e293b;
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.4);
}

.skill-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.skill-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.dark .skill-title {
  color: #f1f5f9;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-list li {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  letter-spacing: 0.01em;
  transition: background 0.2s, color 0.2s;
}

.dark .skill-list li {
  background: rgba(255,255,255,0.06);
  color: #94a3b8;
}

.skill-card:hover .skill-list li {
  background: rgba(99,102,241,0.08);
  color: #6366f1;
}

/* ── Project Cards ─────────────────────────────────────── */
.project-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  cursor: pointer;
}

.dark .project-card {
  background: rgba(255,255,255,0.03);
  border-color: #1e293b;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  border-color: rgba(99,102,241,0.3);
}

.dark .project-card:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

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

.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.05));
}

.project-image-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.2);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  position: relative;
  z-index: 1;
}

.project-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.project-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.dark .project-title {
  color: #f1f5f9;
}

.project-desc {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.dark .project-desc {
  color: #94a3b8;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  background: #f1f5f9;
  color: #6366f1;
  letter-spacing: 0.02em;
  border: 1px solid #e0e7ff;
  transition: background 0.2s, color 0.2s;
}

.dark .tag {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.2);
}

/* ── Contact ───────────────────────────────────────────── */
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #475569;
}

.dark .contact-info-item {
  color: #94a3b8;
}

.contact-icon {
  font-size: 1.1rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dark .contact-icon {
  background: rgba(255,255,255,0.05);
}

.contact-form-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 2rem;
}

.dark .contact-form-wrapper {
  background: rgba(255,255,255,0.03);
  border-color: #1e293b;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.1rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: uppercase;
}

.dark .form-label {
  color: #64748b;
}

.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.dark .form-input {
  background: rgba(255,255,255,0.04);
  border-color: #1e293b;
  color: #f1f5f9;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
  background: #ffffff;
}

.dark .form-input:focus {
  background: rgba(255,255,255,0.06);
}

/* ── Utility ───────────────────────────────────────────── */
.text-accent { color: #6366f1; }
