@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #05060a;
  --surface: #0f1118;
  --card: rgba(255, 255, 255, 0.04);
  --text: #f5f5f5;
  --muted: #b7b9c4;
  --primary: linear-gradient(135deg, #7f5dff, #22d6ff);
  --accent: #22d6ff;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 60px rgba(6, 7, 20, 0.6);
  --footer-bg: #05060a;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --card: rgba(5, 6, 10, 0.05);
  --text: #1a1d29;
  --muted: #58607a;
  --border: rgba(15, 17, 24, 0.08);
  --shadow: 0 20px 60px rgba(23, 37, 84, 0.15);
  --footer-bg: #f3f5fb;
}

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

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 1rem;
  object-fit: cover;
}

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

section {
  padding: 5rem 0;
}

.container {
  width: min(1200px, 90%);
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 2rem;
}

.btn {
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn.primary {
  background-image: var(--primary);
  color: #05060a;
  box-shadow: var(--shadow);
}

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

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

/* Navbar */
.hero {
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(127, 93, 255, 0.2), transparent 50%),
    radial-gradient(circle at right, rgba(34, 214, 255, 0.15), transparent 40%),
    var(--bg);
  position: relative;
  overflow: hidden;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 5%;
  backdrop-filter: blur(16px);
  background: rgba(5, 6, 10, 0.75);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.9);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.1em;
}

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

.nav-links a {
  color: var(--muted);
  font-weight: 500;
}

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

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-toggle span {
  width: 1.5rem;
  height: 2px;
  background: var(--text);
  display: block;
}

.theme-toggle {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0.4rem 0.9rem;
  display: flex;
  gap: 0.4rem;
  cursor: pointer;
}

.hero-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 3rem;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin: 0.5rem 0;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero-stats span {
  font-size: 2.3rem;
  font-weight: 600;
}

.hero-visual {
  position: relative;
}

.photo-frame {
  padding: 1.5rem;
  background: var(--card);
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.photo-frame img {
  border-radius: 1.2rem;
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.floating-card {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--surface);
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.floating-blog-btn {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  background-image: var(--primary);
  color: #05060a;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 20;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
}

.about-cards {
  display: grid;
  gap: 1rem;
}

.about-cards article {
  padding: 1.5rem;
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
}

.about-highlights {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

/* Skills */
.skills {
  background: var(--surface);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  padding: 1.5rem;
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.skill-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

.skill-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-image: var(--primary);
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(127, 93, 255, 0.7);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.project-card img {
  height: 200px;
}

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

/* Services */
.services {
  background: linear-gradient(135deg, rgba(127, 93, 255, 0.2), rgba(34, 214, 255, 0.05));
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.services-grid article {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  background: var(--surface);
}

/* Certificates */
.certificate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.certificate-grid article {
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 1rem;
  text-align: center;
}

@media (min-width: 0) {
  .certificate-thumb {
    border-radius: 0.9rem;
    border: 1px dashed var(--border);
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.02);
  }

  .certificate-thumb span {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
  }
}

/* Blog */
.blog-preview {
  background: var(--surface);
}

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

.blog-card {
  background: var(--card);
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.blog-card img {
  height: 180px;
}

.blog-card .category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.blog-card a {
  font-weight: 600;
  color: var(--accent);
}

.blog-actions {
  text-align: center;
  margin-top: 2rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.contact-form {
  background: var(--card);
  padding: 2rem;
  border-radius: 1.2rem;
  border: 1px solid var(--border);
  display: grid;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: inherit;
}

.contact-details article {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
}

.contact-details ul {
  list-style: none;
  padding: 0;
}

.footer {
  background: var(--footer-bg);
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.copyright {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--muted);
}

/* Blog page */
.blog-hero {
  text-align: center;
  padding: 6rem 0 3rem;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.filter-btn.active {
  background-image: var(--primary);
  color: #05060a;
}

.blog-detail {
  width: min(850px, 90%);
  margin: 0 auto;
  padding: 4rem 0;
}

.blog-detail header {
  text-align: center;
  margin-bottom: 2rem;
}

.blog-detail img {
  height: 340px;
  margin-bottom: 2rem;
}

.blog-detail article {
  background: var(--card);
  padding: 2rem;
  border-radius: 1.2rem;
  border: 1px solid var(--border);
  line-height: 1.8;
}

/* Responsive */
@media (max-width: 900px) {
  .navbar {
    position: fixed;
    width: 100%;
    left: 0;
    padding: 1rem 1.5rem;
  }

  body {
    padding-top: 80px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 1.5rem;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 1rem;
    display: none;
    width: min(260px, 70vw);
    box-shadow: var(--shadow);
  }

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

  .hero-content {
    padding-top: 3rem;
  }

  .hero-visual .photo-frame {
    max-width: 340px;
    margin: 0 auto;
  }

  section {
    padding: 4rem 0;
  }

  .services-grid,
  .projects-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 600px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .floating-blog-btn {
    right: 1rem;
    bottom: 1rem;
    font-size: 0.9rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-text h1 {
    font-size: 2.3rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .blog-card img {
    height: 150px;
  }

  .blog-hero {
    padding: 5rem 0 2rem;
  }

  .blog-detail {
    padding: 3rem 0;
  }
}

