/* Root Variables */
:root {
  --bg-dark: #050816;
  --bg-darker: #02040a;
  --bg-alt: #0b1020;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-subtle: #1f2933;
  --card-bg: #0f172a;
  --card-border: #1f2937;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
}

/* Global Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #111827 0, #020617 45%, #000 100%);
  color: var(--text-main);
  line-height: 1.6;
}

/* Layout Helpers */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: radial-gradient(circle at top left, #111827 0, #020617 55%, #000 100%);
}

.section-inner {
  position: relative;
}

/* Header Styles */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.75), transparent);
  border-bottom: 1px solid rgba(31, 41, 55, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #60a5fa, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #e5f0ff;
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.7);
}

.logo-text {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: #e5e7eb;
}

.nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.15rem;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #3b82f6, #22c55e);
  transition: width 0.2s ease-out;
}

.nav a:hover {
  color: #e5e7eb;
}

.nav a:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  gap: 0.35rem;
  z-index: 51;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 1px;
  transition: all 0.3s ease-out;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero */

.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-text h1 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: clamp(2.4rem, 4vw, 3rem);
  margin: 0 0 0.75rem;
  letter-spacing: 0.03em;
}

.hero-subtitle {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.12s ease-out, border-color 0.12s ease-out;
}

.btn.primary {
  background: linear-gradient(135deg, #2563eb, #22c55e);
  color: #f9fafb;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.55);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(37, 99, 235, 0.7);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border-color: #1f2937;
}

.btn.secondary:hover {
  background: rgba(15, 23, 42, 1);
  border-color: #374151;
  transform: translateY(-1px);
}

.hero-tag {
  justify-self: end;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
}

.hero-tag p {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.95));
}

/* Section headers */

.section-header {
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 1.6rem;
  margin: 0 0 0.4rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 2rem;
}

.about-highlight {
  border-radius: 1rem;
  padding: 1.5rem 1.4rem;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(55, 65, 81, 0.9);
  box-shadow: var(--shadow-soft);
}

.about-highlight h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.about-highlight ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-highlight li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
  color: #d1d5db;
  font-size: 0.92rem;
}

.about-highlight li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to bottom right, #3b82f6, #22c55e);
}

/* Skills */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1rem;
  padding: 1.4rem 1.3rem;
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: var(--shadow-soft);
}

.skill-card h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 1rem;
}

.skill-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.skill-card li {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 0.35rem;
}

/* Projects */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.7rem;
}

.project-card {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 1rem;
  padding: 1.5rem 1.4rem;
  border: 1px solid rgba(31, 41, 55, 0.95);
  box-shadow: var(--shadow-soft);
}

.project-card h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.project-meta {
  margin: 0 0 0.7rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}

.project-card p {
  margin-top: 0;
  margin-bottom: 0.7rem;
  color: #e5e7eb;
  font-size: 0.92rem;
}

.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-list li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #d1d5db;
}

.project-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #60a5fa;
}

/* Blog */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1rem;
  padding: 1.4rem 1.3rem;
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: var(--shadow-soft);
}

.blog-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.blog-card p {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.blog-note {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 2fr);
  gap: 2rem;
}

.contact-grid a {
  color: #93c5fd;
  text-decoration: none;
}

.contact-grid a:hover {
  text-decoration: underline;
}

.contact-note {
  font-size: 0.92rem;
  color: #d1d5db;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  padding: 1.5rem 0 1.8rem;
  background: radial-gradient(circle at bottom, #020617 0, #000 60%);
}

.footer-inner {
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
}

/* Responsive */

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(5, 8, 22, 0.98), rgba(2, 6, 23, 0.95));
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(31, 41, 55, 0.7);
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
  }

  .nav.active {
    max-height: 300px;
  }

  .nav a {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(31, 41, 55, 0.5);
    display: block;
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .nav a::after {
    display: none;
  }

  .nav a:hover {
    color: var(--accent);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-tag {
    justify-self: flex-start;
    margin-top: 1.5rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-header {
    border-bottom-color: rgba(31, 41, 55, 0.6);
  }

  .header-inner {
    padding: 0.75rem 0;
  }

  .logo-text {
    font-size: 0.85rem;
  }

  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 3rem 0;
  }

  .hero {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }

  .hero-text h1 {
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    margin-bottom: 0.5rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    padding: 0.65rem 1.2rem;
    font-size: 0.85rem;
  }

  .hero-tag p {
    font-size: 0.7rem;
    padding: 0.5rem 0.8rem;
  }

  .section-header {
    margin-bottom: 1.75rem;
  }

  .section-header h2 {
    font-size: 1.35rem;
    margin-bottom: 0.3rem;
  }

  .section-header p {
    font-size: 0.9rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .skill-card {
    padding: 1.2rem 1rem;
  }

  .skill-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
  }

  .skill-card li {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
  }

  .projects-grid,
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .project-card,
  .blog-card {
    padding: 1.2rem;
  }

  .project-card h3,
  .blog-card h3 {
    font-size: 0.95rem;
  }

  .project-card p,
  .blog-card p {
    font-size: 0.85rem;
  }

  .about-highlight {
    padding: 1.2rem;
  }

  .about-highlight h3 {
    font-size: 0.95rem;
  }

  .about-highlight li {
    font-size: 0.85rem;
    padding-left: 1rem;
  }

  .site-footer {
    padding: 1.2rem 0 1.5rem;
  }

  .footer-inner {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }

  .hero-text h1 {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .section-header h2 {
    font-size: 1.2rem;
  }

  .about-grid p {
    font-size: 0.85rem;
  }
}