/* ============================================
   Components — navbar, cards, timeline, buttons, forms
   ============================================ */

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-nav);
  width: 90%;
  max-width: 1100px;
  transition: all var(--transition-smooth);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: var(--clr-glass-bg-heavy);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  transition: all var(--transition-smooth);
}

/* Shrunk state (on scroll) */
.navbar.shrunk .nav-inner {
  padding: 10px 28px;
  background: rgba(12, 12, 29, 0.9);
}

.nav-brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--clr-text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-accent-2);
  border-radius: 1px;
  transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--clr-text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ---- Hamburger ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px 4px;
  cursor: pointer;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
}

/* Hamburger open animation */
.hamburger.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.nav-overlay.visible {
  display: block;
  opacity: 1;
}

/* ==========================================
   HERO
   ========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 20px 60px;
}

/* Animated background orbs */
.hero-bg {
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(ellipse 40% 50% at 25% 50%, rgba(108, 92, 231, 0.15), transparent),
    radial-gradient(ellipse 35% 55% at 75% 40%, rgba(0, 206, 201, 0.1), transparent),
    radial-gradient(ellipse 30% 40% at 50% 60%, rgba(253, 121, 168, 0.08), transparent);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

.hero-content {
  position: relative;
  z-index: var(--z-content);
  text-align: center;
  max-width: 700px;
}

/* ---- Avatar ---- */
.hero-avatar {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 32px;
}

.avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: var(--radius-full);
  background: var(--gradient-accent);
  animation: spin-slow 8s linear infinite;
  opacity: 0.6;
}

.avatar-inner {
  position: absolute;
  inset: 3px;
  border-radius: var(--radius-full);
  background: var(--clr-bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.avatar-text {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  font-weight: 600;
  letter-spacing: 1px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

/* ---- Greeting ---- */
.hero-greeting {
  color: var(--clr-text-muted);
  font-size: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ---- Name ---- */
.hero-name {
  margin-bottom: 16px;
}

/* ---- Tagline ---- */
.hero-tagline {
  margin-bottom: 36px;
}

.tagline-text {
  color: var(--clr-text-secondary);
  font-size: 1.15rem;
  line-height: 1.5;
}

/* ---- CTA Buttons ---- */
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--clr-accent-1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(108, 92, 231, 0.55);
}

.btn-arrow {
  transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-secondary {
  background: transparent;
  color: var(--clr-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

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

/* ---- Scroll Indicator ---- */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-text {
  color: var(--clr-text-muted);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-chevron {
  display: block;
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--clr-text-muted);
  border-bottom: 2px solid var(--clr-text-muted);
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
}

/* ==========================================
   SKILL CARDS
   ========================================== */
.skill-card {
  padding: 28px 20px;
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  background: var(--clr-glass-hover);
}

.skill-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 12px;
}

.skill-card h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--clr-text-primary);
}

.skill-card p {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  margin-bottom: 14px;
}

/* Skill progress bar */
.skill-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: 2px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.skill-card.revealed .skill-fill {
  /* Width is set inline; the transition animates from 0 */
}

/* ==========================================
   PROJECT CARDS (with 3D tilt)
   ========================================== */
.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition-base);
}

/* Tilt container */
[data-tilt] {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.project-card .project-thumb,
.project-card .project-info,
.project-card .project-link,
.project-card .project-gloss {
  transform-style: preserve-3d;
}

.project-card:hover {
  box-shadow: var(--shadow-card-hover);
}

/* Thumbnail placeholder */
.project-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  transform: translateZ(30px);
}

.project-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.3), rgba(0, 206, 201, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.project-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  z-index: 1;
}

/* Hide placeholder when image loads */
.project-thumb-img:not([src=""]) + .project-thumb-placeholder {
  display: none;
}

/* Coming soon variant */
.project-thumb-placeholder.coming-soon {
  background: linear-gradient(135deg, rgba(100, 100, 120, 0.25), rgba(60, 60, 80, 0.15));
  border: 2px dashed rgba(255, 255, 255, 0.06);
  font-size: 1.1rem;
}

/* Glossy light reflection overlay */
.project-gloss {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  transform: translateZ(35px);
}

.project-card:hover .project-gloss {
  opacity: 1;
}

/* Project info */
.project-info {
  padding: 24px;
  transform: translateZ(20px);
}

.project-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.project-desc {
  color: var(--clr-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  transform: translateZ(10px);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(108, 92, 231, 0.2);
  color: var(--clr-accent-2);
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(108, 92, 231, 0.25);
}

/* External link icon */
.project-link {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  transition: all var(--transition-fast);
  transform: translateZ(40px);
}

.project-link:hover {
  background: var(--clr-accent-1);
  transform: translateZ(40px) scale(1.1);
}

/* ==========================================
   TIMELINE
   ========================================== */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Center line */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: var(--gradient-timeline);
  border-radius: 1px;
  opacity: 0.5;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 0;
}

/* Left side items */
.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 50px;
  text-align: right;
}

/* Right side items */
.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 50px;
}

/* Dot on the line */
.timeline-item::before {
  content: '';
  position: absolute;
  top: 32px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--clr-accent-2);
  box-shadow: var(--glow-teal);
  z-index: 2;
}

.timeline-item:nth-child(odd)::before {
  right: -6px;
}

.timeline-item:nth-child(even)::before {
  left: -6px;
}

/* Pseudo line connecting dot to card */
.timeline-item::after {
  content: '';
  position: absolute;
  top: 37px;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.timeline-item:nth-child(odd)::after {
  right: 12px;
  width: 38px;
}

.timeline-item:nth-child(even)::after {
  left: 12px;
  width: 38px;
}

/* Timeline card */
.timeline-card {
  padding: 24px;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.timeline-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.timeline-date {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--clr-accent-2);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.timeline-org {
  color: var(--clr-accent-3);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.timeline-desc {
  color: var(--clr-text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ==========================================
   CONTACT CARDS
   ========================================== */
.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  text-align: center;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}

a.contact-card {
  cursor: pointer;
}

a.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  background: var(--clr-glass-hover);
}

.contact-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.contact-label {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.contact-value {
  font-size: 0.9rem;
  color: var(--clr-text-secondary);
  word-break: break-all;
}

/* ---- Contact Form ---- */
.contact-form {
  padding: 32px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--clr-text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--clr-text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--clr-accent-1);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.form-group input:disabled,
.form-group textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-form .btn:disabled:hover {
  transform: none;
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}
