:root {
  --bg: #07111f;
  --surface: rgba(13, 24, 43, 0.78);
  --surface-strong: #0d1a2c;
  --surface-soft: rgba(23, 37, 66, 0.72);
  --text: #f3f7fb;
  --muted: #9eb1c7;
  --heading: #ffffff;
  --border: rgba(151, 176, 214, 0.18);
  --accent: #59d0ff;
  --accent-strong: #1ca4d8;
  --accent-soft: rgba(89, 208, 255, 0.16);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  --hero-glow: radial-gradient(circle at top, rgba(89, 208, 255, 0.18), transparent 44%);
}

.light {
  --bg: #eef4fa;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --surface-soft: rgba(239, 246, 255, 0.94);
  --text: #173047;
  --muted: #5a7088;
  --heading: #081c2f;
  --border: rgba(9, 50, 84, 0.12);
  --accent: #0e9ccc;
  --accent-strong: #0978a0;
  --accent-soft: rgba(14, 156, 204, 0.12);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
  --hero-glow: radial-gradient(circle at top, rgba(14, 156, 204, 0.12), transparent 46%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 20% 15%, rgba(42, 145, 255, 0.18), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(77, 208, 225, 0.14), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

.site-shell {
  position: relative;
  isolation: isolate;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}

.ambient-one {
  top: -8rem;
  right: -6rem;
  background: rgba(89, 208, 255, 0.28);
}

.ambient-two {
  bottom: 8rem;
  left: -8rem;
  background: rgba(0, 122, 255, 0.2);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(18px);
  background: rgba(7, 17, 31, 0.38);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.light .site-header {
  background: rgba(238, 244, 250, 0.76);
  border-bottom-color: rgba(9, 50, 84, 0.08);
}

.nav-wrap,
.content-frame,
.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand-mark,
.hero-title,
.section-title,
.profile-copy h2,
.project-body h3,
.highlight-card h3 {
  font-family: "Space Grotesk", sans-serif;
}

.brand-mark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--heading);
}

.brand-mark img {
  max-height: 40px;
  width: auto;
  border-radius: 0.25rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-link {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--heading);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.mobile-nav-toggle,
.theme-toggle {
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--heading);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.mobile-nav-toggle:hover,
.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(89, 208, 255, 0.38);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease,
    border-color 0.25s ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #03111d;
  box-shadow: 0 18px 40px rgba(28, 164, 216, 0.25);
}

.button-secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--heading);
}

.hero-section {
  position: relative;
  padding: 5.5rem 0 3rem;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-glow);
  z-index: -1;
}

.hero-grid,
.two-column,
.contact-grid,
.highlight-grid {
  display: grid;
  gap: 2rem;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
  min-height: calc(100vh - 6rem);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: var(--heading);
}

.hero-title span {
  display: block;
  color: var(--accent);
}

.hero-copy,
.section-copy,
.project-body p,
.highlight-card p,
.timeline-content p,
.profile-copy p,
.contact-points a span {
  color: var(--muted);
  line-height: 1.8;
}

.hero-copy {
  max-width: 42rem;
  margin: 1.5rem 0 2rem;
  font-size: 1.08rem;
}

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

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.25rem;
}

.metric-card,
.profile-card,
.skill-group,
.project-card,
.highlight-card,
.timeline-card,
.contact-card {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 1rem 1.1rem;
  border-radius: 1.2rem;
}

.metric-card strong {
  display: block;
  color: var(--heading);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.hero-panel {
  position: relative;
}

.profile-card {
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  padding: 1.5rem;
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% auto;
  width: 12rem;
  height: 12rem;
  background: radial-gradient(circle, rgba(89, 208, 255, 0.24), transparent 68%);
}

.profile-photo-wrap {
  border-radius: 1.6rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(89, 208, 255, 0.18), rgba(255, 255, 255, 0.04));
  padding: 0.65rem;
}

.profile-photo {
  width: 100%;
  height: 24rem;
  object-fit: cover;
  border-radius: 1.2rem;
}

.profile-copy {
  margin-top: 1.3rem;
}

.profile-copy h2 {
  margin: 0 0 0.75rem;
  color: var(--heading);
  font-size: 1.7rem;
  line-height: 1.15;
}

.profile-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.profile-stack span,
.tag-row span {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--heading);
  font-size: 0.82rem;
  font-weight: 700;
}

.section {
  padding: 3.5rem 0;
}

.two-column {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  max-width: 15ch;
  color: var(--heading);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.section-title-center {
  margin-left: auto;
  margin-right: auto;
  max-width: 18ch;
}

.skill-groups {
  display: grid;
  gap: 1.4rem;
}

.skill-group {
  border-radius: 1.8rem;
  padding: 1.5rem;
}

.skill-group h3 {
  margin: 0 0 1rem;
  color: var(--heading);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.skill-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 1.2rem;
  background: var(--surface-soft);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--heading);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: rgba(89, 208, 255, 0.28);
}

.skill-card i {
  width: 1.7rem;
  font-size: 1.4rem;
  text-align: center;
}

.fab.fa-html5 { color: #e34f26; }
.fab.fa-css3-alt { color: #1572b6; }
.fab.fa-js { color: #f7df1e; }
.fab.fa-react { color: #61dafb; }
.fas.fa-paint-brush { color: #ec4899; }
.fab.fa-bootstrap { color: #7952b3; }
.fas.fa-layer-group { color: #60a5fa; }
.fab.fa-node-js { color: #339933; }
.fas.fa-server { color: #94a3b8; }
.fas.fa-bolt { color: #facc15; }
.fas.fa-plug { color: #4ade80; }
.fas.fa-key { color: #f59e0b; }
.fas.fa-database { color: #8b5cf6; }
.fas.fa-leaf { color: #16a34a; }
.fas.fa-video { color: #f87171; }
.fas.fa-exchange-alt { color: #7dd3fc; }
.fas.fa-cubes { color: #fb923c; }
.fab.fa-git-alt { color: #f05032; }
.fab.fa-github { color: var(--heading); }
.fas.fa-rocket { color: #2dd4bf; }
.fas.fa-cloud { color: #60a5fa; }
.fas.fa-image { color: #fcd34d; }

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-btn {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  transition: all 0.25s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--accent);
  color: #042032;
  border-color: transparent;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.project-card {
  overflow: hidden;
  border-radius: 1.8rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(89, 208, 255, 0.3);
}

.project-card.is-hidden {
  display: none;
}

.project-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0c1628;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card:hover .project-image {
  transform: scale(1.04);
}

.project-body {
  padding: 1.4rem;
}

.project-topline,
.timeline-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-body h3 {
  margin: 0 0 0.8rem;
  color: var(--heading);
  font-size: 1.45rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.project-links {
  display: flex;
  gap: 1.1rem;
  margin-top: 1.3rem;
}

.project-links a,
.site-footer a {
  color: var(--accent);
  font-weight: 700;
}

.highlight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.highlight-card {
  border-radius: 1.7rem;
  padding: 1.5rem;
}

.highlight-card h3 {
  margin: 0 0 0.8rem;
  color: var(--heading);
  font-size: 1.45rem;
}

.timeline {
  position: relative;
  max-width: 52rem;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 1.1rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), transparent);
}

.timeline-card {
  position: relative;
  border-radius: 1.5rem;
  padding: 1.5rem 1.5rem 1.5rem 3.5rem;
}

.timeline-dot {
  position: absolute;
  left: 0.55rem;
  top: 1.6rem;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(89, 208, 255, 0.12);
}

.contact-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
}

.contact-points {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-points a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.contact-points i {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
}

.contact-card {
  border-radius: 1.8rem;
  padding: 1.5rem;
}

.contact-input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--heading);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.contact-input::placeholder {
  color: var(--muted);
}

.contact-input:focus {
  border-color: rgba(89, 208, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(89, 208, 255, 0.1);
}

.form-message {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  animation: fadeInUp 0.35s ease;
}

.form-message-success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #9ff4cd;
}

.form-message-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.26);
  color: #fecaca;
}

.hidden {
  display: none !important;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .two-column,
  .contact-grid,
  .highlight-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
  }

  .section-title,
  .section-title-center {
    max-width: none;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .nav-wrap {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    background: var(--surface-strong);
  }

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

@media (min-width: 841px) {
  .mobile-nav-toggle {
    display: none;
  }
}

@media (max-width: 640px) {
  .nav-wrap,
  .content-frame,
  .site-footer {
    width: min(1120px, calc(100% - 1.25rem));
  }

  .hero-section {
    padding-top: 4.5rem;
  }

  .section {
    padding: 2.8rem 0;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .button {
    width: 100%;
  }

  .hero-actions {
    flex-direction: column;
  }
}
