/* ======================================================
   BASE
====================================================== */

:root {
  --bg: #050814;
  --bg-alt: #0b0f1f;
  --card: #111726;
  --card-soft: #151b2c;
  --accent: #ff7a3c;
  --accent-soft: rgba(255, 122, 60, 0.18);
  --text: #f5f6ff;
  --muted: #a0a3b8;
  --border-soft: #242a3c;
  --radius-lg: 18px;
  --radius-md: 999px;
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at top left, #131a33 0, #050814 55%),
    url("../assets/bg-network.jpg");
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-attachment: scroll, fixed;
  background-position: center top, center;
  color: var(--text);
  line-height: 1.6;
}

/* ======================================================
   LAYOUT
====================================================== */

.section,
.hero {
  padding: 4.5rem 1.5rem;
}

.section-inner,
.footer-inner,
.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section-alt {
  background: radial-gradient(circle at top right, #151b2b 0, #070b17 55%);
}

/* ======================================================
   HEADER / NAV
====================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  background: rgba(5, 8, 20, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.logo {
  font-weight: 600;
  letter-spacing: 0.03em;
}

.accent {
  color: var(--accent);
}

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

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

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

/* ======================================================
   BUTTONS
====================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, #ff7a3c, #ffb347);
  color: #1a0f08;
  box-shadow: 0 14px 35px rgba(255, 122, 60, 0.45);
}

.btn.ghost {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: transparent;
}

/* ======================================================
   HERO
====================================================== */

.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at left, rgba(5, 8, 20, 0.96) 0,
      rgba(5, 8, 20, 0.9) 42%,
      rgba(5, 8, 20, 1) 82%),
    url("../assets/hero-aiml.jpg") no-repeat right center / cover;
  z-index: -1;
}

.hero-text {
  max-width: 36rem;
}

/* Fix hero links (Email • GitHub • LinkedIn) */
.hero-links a,
.hero-links a:visited {
  color: rgba(245, 246, 255, 0.75);
  text-decoration: none;
  font-weight: 500;
}

.hero-links a:hover {
  color: #ffffff;
}

.hero-links span {
  color: rgba(245, 246, 255, 0.35);
}

/* ======================================================
   CARDS (Skills / Projects / Experience)
====================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.6rem;
}

.project-card {
  position: relative;
  overflow: hidden;

  background: var(--card-soft);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--border-soft);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px circle at 50% 20%,
      rgba(255, 122, 60, 0.14),
      transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 122, 60, 0.35);
  background: rgba(21, 27, 44, 0.92);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6);
}

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

.project-card h3 {
  margin: 0 0 0.6rem;
  color: rgba(245, 246, 255, 0.96);
}

.project-card p {
  margin: 0 0 0.6rem;
  color: var(--muted);
}

/* ======================================================
   TAGS / SKILLS
====================================================== */

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

.project-tags span {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  color: rgba(245, 246, 255, 0.88);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.project-card:hover .project-tags span {
  background: rgba(255, 122, 60, 0.15);
  border-color: rgba(255, 122, 60, 0.35);
}

/* ======================================================
   PROJECT LINKS → BUTTON
====================================================== */

.project-links {
  margin-top: 0.9rem;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: rgba(255, 122, 60, 0.18);
  border: 1px solid rgba(255, 122, 60, 0.35);
  text-decoration: none;
}

.project-links a:hover {
  background: rgba(255, 122, 60, 0.32);
  border-color: rgba(255, 122, 60, 0.55);
  box-shadow: 0 14px 28px rgba(255, 122, 60, 0.22);
}

/* ======================================================
   CONTACT (FIX ICON SIZE ISSUE)
====================================================== */

.contact-grid {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;

  padding: 0.9rem 1.6rem;
  background: rgba(20, 25, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);

  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 14px;
  text-decoration: none;
}

/* HARD CLAMP ICON SIZE — prevents giant images */
.contact-btn img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  object-fit: contain;
  display: block;
}

/* ======================================================
   FOOTER
====================================================== */

.site-footer {
  padding: 1.6rem 1.5rem 2.3rem;
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.site-footer p {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ======================================================
   MOBILE + ACCESSIBILITY
====================================================== */

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}