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

:root {
  --bg: #0a0a0f;
  --bg-2: #111118;
  --bg-3: #1a1a24;
  --border: rgba(255, 255, 255, 0.07);
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --accent: #6c63ff;
  --accent-2: #a78bfa;
  --accent-glow: rgba(108, 99, 255, 0.25);
  --green: #22d3a5;
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===== LAYOUT ===== */
.container {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

section {
  padding: 5rem 0;
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background var(--transition), backdrop-filter var(--transition);
}

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

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--accent-2);
}

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

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== MOBILE NAV ===== */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-mobile a:hover {
  color: var(--text);
}

/* ===== HERO ===== */
#hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 60% 40%, rgba(108, 99, 255, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(34, 211, 165, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-grid {
  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 30%, transparent 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.25);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  color: var(--accent-2);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-name {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.hero-name .accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 8px 32px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

/* ===== SECTION HEADER ===== */
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.section-title .dim {
  color: var(--text-muted);
}

.section-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  margin-bottom: 3rem;
}

/* ===== ABOUT ===== */
#about {
  background: var(--bg-2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.75;
}

.about-text p strong {
  color: var(--text);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.sidebar-card h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

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

.tag {
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.2);
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  transition: all var(--transition);
}

.tag:hover {
  background: rgba(108, 99, 255, 0.2);
  border-color: var(--accent-2);
}

.tag.green {
  background: rgba(34, 211, 165, 0.08);
  border-color: rgba(34, 211, 165, 0.2);
  color: var(--green);
}

.tag.green:hover {
  background: rgba(34, 211, 165, 0.15);
}

/* ===== PROJECTS ===== */
#projects {
  background: var(--bg);
}

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

.project-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: rgba(108, 99, 255, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.project-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.project-thumb-placeholder svg {
  width: 36px;
  height: 36px;
  opacity: 0.3;
}

.project-thumb-placeholder span {
  opacity: 0.4;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-thumb-label {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(108, 99, 255, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.project-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.project-number {
  font-size: 0.75rem;
  color: var(--accent-2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
  white-space: nowrap;
  padding-top: 2px;
}

.project-section {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.project-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.project-section p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-todo {
  font-size: 0.75rem;
  color: var(--accent-2);
  background: rgba(108, 99, 255, 0.08);
  border: 1px dashed rgba(108, 99, 255, 0.3);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-style: italic;
}

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

.project-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ===== EXPERIENCE ===== */
#experience {
  background: var(--bg-2);
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: calc(-2rem - 5px);
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-2);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-dot.current {
  background: var(--green);
  box-shadow: 0 0 12px rgba(34, 211, 165, 0.4);
  animation: pulse-dot 2s infinite;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg-3);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.timeline-company {
  font-size: 0.75rem;
  color: var(--accent-2);
  font-weight: 600;
}

.timeline-role {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.timeline-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===== CONTACT ===== */
#contact {
  background: var(--bg);
}

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

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  font-size: 0.9rem;
}

.contact-link:hover {
  border-color: var(--accent-2);
  background: rgba(108, 99, 255, 0.05);
  transform: translateX(4px);
}

.contact-link svg {
  width: 18px;
  height: 18px;
  color: var(--accent-2);
  flex-shrink: 0;
}

.contact-link .cl-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-link .cl-value {
  font-weight: 500;
  color: var(--text);
}

.contact-visual {
  position: relative;
}

.contact-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: sticky;
  top: 6rem;
}

.contact-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.contact-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.contact-card-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--green);
  font-weight: 500;
}

.contact-card-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s infinite;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer span {
  color: var(--accent-2);
}

/* ===== ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.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; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section { padding: 3.5rem 0; }

  .nav-links { display: none; }
  .nav-burger { display: flex; }

  .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-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2.2rem; }
  .section-title { font-size: 1.6rem; }
  .timeline { padding-left: 1.5rem; }
  .timeline-dot { left: calc(-1.5rem - 5px); }
}
