/* ─────────────────────────────────────────
   PORTFOLIO — DARK FUTURISTIC AESTHETIC
   ───────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0A0A0F;
  --bg2: #0E0E16;
  --surface: #12121A;
  --border: #1A1A28;
  --border2: #24243A;
  --accent: #6C63FF;
  --accent2: #FF6B6B;
  --accent3: #43E8D8;
  --text: #E8E8F4;
  --muted: #5A5A72;
  --muted2: #8A8AA8;
  --font-head: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── OVERLAYS ─── */
.scanlines {
  position: fixed; inset: 0; z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
}

.noise-overlay {
  position: fixed; inset: 0; z-index: 9998;
  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");
  pointer-events: none;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 68px;
  display: flex; align-items: center;
  transition: background 0.3s, border-color 0.3s;
}

.nav.scrolled {
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border2);
}

.nav-inner {
  max-width: 1200px; width: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
}
.logo-bracket { color: var(--accent); }

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

.nav-links a {
  color: var(--muted2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 0.45rem 1.1rem !important;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 8px;
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.85; }

.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all 0.2s;
}

.mobile-menu {
  display: none; position: fixed;
  top: 68px; left: 0; right: 0;
  background: rgba(10,10,15,0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border2);
  z-index: 999; padding: 1rem 0;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; }
.mobile-menu a {
  display: block; padding: 0.8rem 2rem;
  color: var(--muted2); text-decoration: none; font-size: 1rem;
}
.mobile-menu a:hover { color: var(--accent); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 2rem 4rem;
  position: relative; overflow: hidden;
}

.hero-grid-lines {
  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;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 80%);
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%; left: -10%;
  width: 60%; height: 80%;
  background: radial-gradient(ellipse, rgba(108,99,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -10%; right: -5%;
  width: 40%; height: 60%;
  background: radial-gradient(ellipse, rgba(67,232,216,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero-content {
  flex: 1; max-width: 640px;
  animation: fadeUp 0.8s ease both;
}

.hero-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(108,99,255,0.1);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 100px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}
.dot {
  width: 7px; height: 7px;
  background: #4ADE80;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

.hero-name {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #fff 0%, #A8A4FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--accent3);
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}
.title-line::before { content: '> '; color: var(--muted); }

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

.hero-actions {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.8rem 1.75rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); }
.btn-primary.large { padding: 1rem 2.25rem; font-size: 1rem; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.8rem 1.75rem;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border2);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.hero-socials {
  display: flex; gap: 1rem;
}
.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--muted2);
  text-decoration: none;
  transition: all 0.2s;
}
.social-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.hero-visual {
  flex: 0 0 400px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  animation: fadeUp 0.8s ease 0.2s both;
}

.hex-frame {
  width: 280px; height: 280px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  background: linear-gradient(135deg, var(--accent) 0%, #9C95FF 100%);
  padding: 3px;
  position: relative;
  animation: morph 8s ease-in-out infinite;
}
@keyframes morph {
  0%,100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
  50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
  75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

.hex-frame > * {
  width: 100%; height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.profile-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.profile-placeholder {
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
}

.floating-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
}
.card-1 { bottom: 20px; left: -20px; animation: float 4s ease-in-out infinite; }
.card-2 { top: 20px; right: -20px; animation: float 4s ease-in-out 2s infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.card-label { font-size: 0.7rem; color: var(--muted); font-family: var(--font-mono); }
.card-value { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--accent); }

/* ─── SECTIONS ─── */
.section { padding: 6rem 2rem; }
.section-alt { background: var(--bg2); }

.container { max-width: 1200px; margin: 0 auto; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0;
  width: 48px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ─── ABOUT ─── */
.about-grid {
  display: grid; grid-template-columns: 1fr 380px; gap: 5rem; align-items: center;
}
.about-text p { color: var(--muted2); font-size: 1.05rem; line-height: 1.8; margin-bottom: 1.5rem; }
.about-meta { display: flex; flex-direction: column; gap: 0.6rem; }
.meta-item {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.9rem; color: var(--muted2);
}
.meta-item svg { color: var(--accent); flex-shrink: 0; }

.about-img-wrap {
  position: relative;
}
.about-img {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: 20px;
  border: 1px solid var(--border2);
  position: relative; z-index: 1;
}
.about-img-placeholder {
  width: 100%; aspect-ratio: 4/5;
  border-radius: 20px;
  border: 2px dashed var(--border2);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.9rem;
}
.img-accent {
  position: absolute;
  bottom: -16px; right: -16px;
  width: 100%; height: 100%;
  border: 2px solid var(--accent);
  border-radius: 20px;
  opacity: 0.2;
  z-index: 0;
}

/* ─── SKILLS ─── */
.skills-tabs {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 2rem;
}
.skill-tab {
  padding: 0.45rem 1.2rem;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 100px;
  color: var(--muted2);
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}
.skill-tab:hover, .skill-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.skill-panel { display: none; }
.skill-panel.active { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s;
}
.skill-card:hover { border-color: var(--accent); }
.skill-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.75rem;
}
.skill-name { font-weight: 500; font-size: 0.95rem; }
.skill-pct { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); }
.skill-bar {
  background: var(--border);
  border-radius: 100px; height: 5px; overflow: hidden;
}
.skill-fill {
  height: 100%; width: var(--w, 0%);
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent3) 100%);
  border-radius: 100px;
  animation: fillBar 1s ease 0.3s both;
}
@keyframes fillBar { from { width: 0; } to { width: var(--w, 0%); } }

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(108,99,255,0.15);
}
.project-card.featured { border-color: rgba(108,99,255,0.4); }

.project-img-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.project-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.project-card:hover .project-img { transform: scale(1.04); }
.project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(18,18,26,0.7) 0%, transparent 60%);
}
.project-no-img {
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
}

.project-body { padding: 1.5rem; }
.badge-featured {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: rgba(108,99,255,0.15);
  border: 1px solid rgba(108,99,255,0.4);
  border-radius: 100px;
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.project-category {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent3);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.project-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.project-desc {
  font-size: 0.875rem;
  color: var(--muted2);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.tech-tag {
  padding: 0.2rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--muted2);
}
.project-links { display: flex; gap: 1rem; }
.proj-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted2);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.proj-link:hover { color: var(--accent); }

/* ─── TIMELINE ─── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: '';
  position: absolute; left: 7px; top: 8px;
  width: 2px;
  height: calc(100% - 16px);
  background: var(--border2);
}
.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute; left: -2rem; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 12px rgba(108,99,255,0.5);
}
.timeline-body {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s;
}
.timeline-body:hover { border-color: var(--accent); }
.timeline-header { margin-bottom: 0.5rem; }
.timeline-header h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.timeline-company {
  font-size: 0.875rem;
  color: var(--accent3);
  font-weight: 500;
}
.timeline-dur {
  float: right;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.timeline-body > p { font-size: 0.875rem; color: var(--muted2); line-height: 1.7; }

/* ─── CONTACT ─── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-intro { font-size: 1.05rem; color: var(--muted2); margin-bottom: 2rem; line-height: 1.7; }
.contact-items { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.contact-item:hover { border-color: var(--accent); transform: translateX(4px); }
.contact-icon {
  width: 40px; height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-label { display: block; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.05em; }
.contact-value { display: block; font-size: 0.9rem; font-weight: 500; }
.contact-socials { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.soc-btn {
  padding: 0.5rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--muted2);
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}
.soc-btn:hover { border-color: var(--accent); color: var(--accent); }

.contact-cta-box {
  position: sticky; top: 100px;
}
.cta-box-inner {
  background: linear-gradient(135deg, rgba(108,99,255,0.15) 0%, rgba(67,232,216,0.05) 100%);
  border: 1px solid rgba(108,99,255,0.3);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
}
.cta-box-text {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ─── FOOTER ─── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border2);
  padding: 2rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
}
.footer p { font-size: 0.85rem; color: var(--muted); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .hero { flex-direction: column; text-align: center; padding-top: 120px; gap: 3rem; }
  .hero-content { max-width: 100%; }
  .hero-sub { margin: 0 auto 2.5rem; }
  .hero-actions { justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-visual { flex: none; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .about-img-wrap { max-width: 320px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-visual { display: none; }
  .section { padding: 4rem 1.25rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
