* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, rgba(79, 140, 255, 0.12), transparent 45%), var(--bg);
  line-height: 1.6;
}

.bg-glow {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  animation: pulseGlow 5s infinite ease-in-out;
}

.bg-glow-primary {
  background: var(--primary);
  top: -80px;
  left: -110px;
}

.bg-glow-accent {
  background: var(--accent);
  right: -80px;
  bottom: 8%;
}

#scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  background: var(--gradient);
  z-index: 9999;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  background: rgba(11, 15, 25, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 var(--radius) var(--radius);
}

.brand {
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 0;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 5rem 1rem 1rem;
}

.hero {
    min-height: 90vh;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}


.hero-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-photo {
    display: flex;
    justify-content: center;
    width: 100%;
}

.photo-frame {
    width: 320px;
    height: 320px;

    padding: 8px;

    border-radius: 24px;

    background: linear-gradient(
        135deg,
        #4f8cff,
        #7c5cff,
        #00d4ff
    );

    box-shadow:
        0 20px 50px rgba(0,0,0,.35),
        0 0 40px rgba(79,140,255,.25);

    transition: transform .3s ease;
}

.photo-frame:hover {
    transform: translateY(-5px);
}

.profile-photo {
    width: 100%;
    height: 100%;

    border-radius: 18px;

    object-fit: cover;

    display: block;
}


.eyebrow {
  color: var(--success);
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  margin: 0;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.tagline {
  display: inline-block;
  border-right: 2px solid var(--primary);
  animation: typingCaret 1s infinite;
  min-height: 2rem;
  margin: 0.5rem 0;
}

.hero-bio,
#about-text,
#contact-text {
  color: var(--muted);
  max-width: 72ch;
}

.cta-group {
    display: flex;
    gap: .75rem;
    margin: 1.1rem 0;
    flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gradient);
  box-shadow: var(--shadow);
}

.btn-secondary {
  border-color: var(--card-border);
  background: rgba(255, 255, 255, 0.05);
}

.social-links {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.social-links {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255,255,255,.04);

    border: 1px solid var(--card-border);

    transition: .25s;
}

.social-icon:hover {
    transform: translateY(-4px);

    border-color: var(--primary);

    background: rgba(79,140,255,.08);

    box-shadow: 0 10px 25px rgba(79,140,255,.18);
}

.social-icon-img {
    width: 22px;
    height: 22px;

    object-fit: contain;
}

.hero-stats,
.skills-grid,
.projects-grid,
.cards-grid {
  display: grid;
  gap: 1rem;
}

.hero-stats {
    width: 100%;

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 0.75rem;

    align-items: stretch;
}

.stat-card,
.skill-card,
.project-card,
.content-card,
.timeline-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}

.stat-card {
    padding: 0.75rem;

    text-align: center;

    animation: float 5s ease-in-out infinite;

    min-height: 90px;

    display: flex;

    flex-direction: column;

    justify-content: center;
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    color: var(--muted);
    font-size: 0.75rem;
    margin-top: .35rem;
    line-height: 1.2;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.skill-category {
  margin-bottom: 2rem;
}

.skill-category-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 1rem;
}

.skill-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}


.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 0.75rem;
  padding: 1rem;

  min-height: 170px;

  transition: transform 0.2s ease, border-color 0.2s ease;
}

.skill-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--primary);
}

.skill-icon {
    width: 52px;
    height: 52px;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
    display: block;
}

.skill-card h4,
.skill-card h3 {
  margin: 0;
  text-align: center;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.project-controls {
  display: flex;
  gap: 0.6rem;
}

.project-controls select,
.project-controls input {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
}

.project-controls select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.project-controls select option {
  background: var(--card-bg);
  color: var(--text);
}

.projects-grid {
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card {
  overflow: hidden;
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.project-content {
  padding: 1rem;
}

.tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0.8rem 0;
}

.tag {
  font-size: 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  color: var(--muted);
}

.project-links {
  display: flex;
  gap: 0.5rem;
}

.timeline {
  border-left: 2px solid rgba(79, 140, 255, 0.35);
  padding-left: 1rem;
  display: grid;
  gap: 1rem;
}

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

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.55rem;
  top: 1rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--gradient);
}

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.content-card {
  padding: 1rem;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: var(--gradient);
  color: var(--text);
  border: 0;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  display: none;
  cursor: pointer;
}

.back-to-top.show {
  display: inline-grid;
  place-content: center;
}

footer {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 1rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 860px) {

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-right {
    margin-top: 2rem;
}

  .photo-frame {
      width: 260px;
      height: 260px;
  }

  .hero-stats {
      grid-template-columns: repeat(2, 1fr);
      margin-top: 1rem;
  }
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    width: min(280px, calc(100vw - 2rem));
    flex-direction: column;
    background: rgba(11, 15, 25, 0.95);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    display: none;
  }

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


