/* jaybilgaye.github.io — redesigned profile */

/* ===== Theme Variables ===== */
:root,
[data-theme="light"] {
  --bg: #f8fafc;
  --bg-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.06);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 32px rgba(0, 0, 0, 0.06);
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --pill-bg: #f1f5f9;
  --pill-border: #e2e8f0;
  --pill-text: #475569;
  --timeline-line: #e2e8f0;
  --timeline-dot: #3b82f6;
  --footer-bg: #0f172a;
  --footer-text: #94a3b8;
  --toggle-bg: rgba(255, 255, 255, 0.15);
  --font: "Inter", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --bg-hero: linear-gradient(135deg, #022c22 0%, #064e3b 50%, #0c4a6e 100%);
  --card-bg: #1e293b;
  --card-border: rgba(255, 255, 255, 0.06);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
  --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(0, 0, 0, 0.2);
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #60a5fa;
  --accent-soft: rgba(96, 165, 250, 0.15);
  --pill-bg: rgba(255, 255, 255, 0.06);
  --pill-border: rgba(255, 255, 255, 0.1);
  --pill-text: #cbd5e1;
  --timeline-line: #334155;
  --timeline-dot: #60a5fa;
  --footer-bg: #020617;
  --footer-text: #64748b;
  --toggle-bg: rgba(255, 255, 255, 0.1);
}

/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--toggle-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

[data-theme="dark"] .theme-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--bg-hero);
  z-index: 0;
}

.hero-bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 50%, rgba(59, 130, 246, 0.15), transparent),
    radial-gradient(ellipse 500px 350px at 80% 30%, rgba(16, 185, 129, 0.12), transparent),
    radial-gradient(ellipse 400px 300px at 50% 80%, rgba(14, 165, 233, 0.1), transparent);
  z-index: 1;
}

.hero-bg::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 3.5rem 1.5rem 4rem;
  max-width: 640px;
  width: 100%;
}

/* ===== Avatar ===== */
.avatar {
  width: 110px;
  height: 110px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3), 0 0 60px rgba(16, 185, 129, 0.15);
  animation: float 6s ease-in-out infinite;
}

.avatar span {
  font-weight: 800;
  font-size: 2rem;
  color: #fff;
  letter-spacing: 0.02em;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== Hero Typography ===== */
.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
}

.hero .tagline {
  margin: 0 0 0.25rem;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.hero .subtitle {
  margin: 0 0 0.75rem;
  font-size: clamp(0.875rem, 2vw, 1rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
}

.hero .location {
  margin: 0 0 2rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

/* ===== Action Buttons ===== */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.25s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #fff;
  color: #0f172a !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background: #f1f5f9;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* ===== Main Content ===== */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* ===== Stats Section ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: -2.5rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 4;
}

.stat {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  display: inline;
  line-height: 1;
}

.stat-plus {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ===== Card Sections ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

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

.card h2 {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card h2 svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ===== About ===== */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.intro {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0;
}

.intro strong {
  font-weight: 700;
  color: var(--text);
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-highlight {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  transition: all 0.25s ease;
}

.about-highlight:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.about-highlight svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.about-highlight strong {
  font-weight: 700;
  color: var(--text);
}

.about-closing {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.about-closing strong {
  font-weight: 700;
  color: var(--text);
}

/* ===== Skill Pills ===== */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pills span {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  color: var(--pill-text);
  transition: all 0.2s ease;
  cursor: default;
}

.pills span:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* ===== Card List (Writing) ===== */
.card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-list a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 14px;
  color: inherit;
  text-decoration: none !important;
  transition: all 0.25s ease;
}

.card-list a:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateX(4px);
}

.card-list a:hover .t {
  color: var(--accent);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  transition: all 0.25s ease;
}

.card-list a:hover .card-icon {
  background: var(--accent);
  color: #fff;
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-list .t {
  font-weight: 600;
  font-size: 0.9375rem;
  display: block;
  color: var(--text);
  transition: color 0.2s ease;
}

.card-list .d {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  display: block;
  line-height: 1.45;
}

.card-list .ext {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.card-list a:hover .ext {
  transform: translate(2px, -2px);
  color: var(--accent);
}

/* ===== Experience Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--timeline-line);
  border-radius: 1px;
}

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

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

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 3px solid var(--timeline-dot);
  z-index: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  background: var(--timeline-dot);
}

.timeline-content {
  padding: 0;
}

.timeline-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-content h3 {
  margin: 0.25rem 0 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.timeline-company {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.timeline-content p {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ===== Certifications ===== */
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 12px;
  transition: all 0.25s ease;
}

.cert-item:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.cert-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 30px;
  padding: 0 0.5rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.cert-item:hover .cert-badge {
  background: var(--accent);
  color: #fff;
}

.cert-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.cert-item:hover .cert-name {
  color: var(--text);
}

/* ===== CTA Card ===== */
.cta-card {
  background: linear-gradient(135deg, #3b82f6, #10b981);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 200px at 20% 50%, rgba(255, 255, 255, 0.1), transparent),
    radial-gradient(circle 200px at 80% 30%, rgba(255, 255, 255, 0.08), transparent);
}

.cta-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  position: relative;
}

.cta-card p {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  position: relative;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  position: relative;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  background: #fff;
  color: #3b82f6 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.btn-cta-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  text-decoration: none !important;
  background: transparent;
  color: #fff !important;
  transition: all 0.25s ease;
}

.btn-cta-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--footer-bg);
  padding: 3rem 1.5rem;
  margin-top: 1rem;
}

.footer-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.social {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  transition: all 0.25s ease;
}

.social a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-3px);
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.copyright {
  margin: 0;
  font-size: 0.75rem;
  color: var(--footer-text);
}

/* ===== Scroll Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in hero */
.hero .reveal:nth-child(2) { transition-delay: 0.1s; }
.hero .reveal:nth-child(3) { transition-delay: 0.2s; }
.hero .reveal:nth-child(4) { transition-delay: 0.3s; }
.hero .reveal:nth-child(5) { transition-delay: 0.4s; }
.hero .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hero {
    min-height: 460px;
  }

  .hero-content {
    padding: 2.5rem 1.25rem 3rem;
  }

  .avatar {
    width: 88px;
    height: 88px;
  }

  .avatar span {
    font-size: 1.65rem;
  }

  .wrap {
    padding: 0 1rem 2rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: -2rem;
  }

  .stat {
    padding: 1rem 0.5rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .actions {
    gap: 0.5rem;
  }

  .btn {
    padding: 0.6rem 1.1rem;
    font-size: 0.8125rem;
  }

  .card-list a {
    padding: 0.85rem 1rem;
  }

  .card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .card-icon svg {
    width: 16px;
    height: 16px;
  }

  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-dot {
    left: -1.5rem;
    width: 12px;
    height: 12px;
  }

  .timeline::before {
    left: 5px;
  }

  .cta-card {
    padding: 2rem 1.25rem;
  }

  .cta-card h2 {
    font-size: 1.25rem;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-cta,
  .btn-cta-outline {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .social a {
    width: 40px;
    height: 40px;
  }

  .theme-toggle {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }

  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 380px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 220px;
    justify-content: center;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 1.35rem;
  }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

  .avatar {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
