:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #111111;
  --panel-2: #151515;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f5;
  --muted: #b8b8bb;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.16);
  --hire: #74ef8b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background:
    linear-gradient(rgba(10, 10, 10, 0.98), rgba(10, 10, 10, 0.98)),
    linear-gradient(90deg, transparent 24px, rgba(255, 255, 255, 0.035) 25px, transparent 26px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-color: var(--bg);
  background-size: auto, 26px 26px, 26px 26px;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top, rgba(37, 99, 235, 0.06), transparent 35%);
  opacity: 0.5;
  z-index: 0;
}

.page-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.25;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
}

.navbar {
  z-index: 200;
}

.section-shell {
  width: min(1400px, calc(100% - 40px));
  margin: 0 auto;
}

.navbar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 32px;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}

.brand-sign {
  color: var(--accent);
  font-size: 1.4rem;
}

.brand-name {
  font-size: 0.92rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  transition: color 180ms ease, opacity 180ms ease;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px 6px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 280ms ease, opacity 280ms ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 100;
  cursor: pointer;
}

.nav-overlay.is-open {
  display: block;
}

body.nav-open {
  overflow: hidden;
}

.monospace,
.section-kicker,
.nav-links a,
.brand,
.btn,
.skill-meta span:last-child,
.stat-card span,
.project-index,
.project-links a,
.tech-tags span,
.timeline-company,
.timeline-topline span,
.contact-card p,
.footer-kicker,
.ticker-track {
  font-family: "JetBrains Mono", monospace;
}

.hero {
  padding: 56px 0 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 0.9fr);
  gap: 40px;
  align-items: center;
}

.hero-copy {
  padding-top: 16px;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.18em;
}

.status-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-live {
  background: var(--hire);
  box-shadow: 0 0 0 0 rgba(116, 239, 139, 0.65);
  animation: pulse 1.8s infinite;
}

.dot-bright {
  background: #f2f2f2;
}

.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  letter-spacing: 0.18em;
  font-size: 0.85rem;
}

.hero-title {
  margin: 0;
  line-height: 0.86;
  text-transform: uppercase;
  font-family: "Space Grotesk", sans-serif;
}

.hero-first,
.hero-last,
.section-title,
.projects-title,
.experience-title,
.contact-title {
  display: block;
}

.hero-first {
  font-size: clamp(4.4rem, 10vw, 8.8rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  color: var(--text);
}

.hero-last {
  margin-top: 10px;
  font-size: clamp(3.2rem, 7vw, 6.1rem);
  font-style: italic;
  font-weight: 500;
  color: #c8c8cc;
  letter-spacing: -0.06em;
}

.hero-subtitle {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 26px;
}

.hero-accent-line {
  width: 56px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(37, 99, 235, 0.45);
}

.hero-subtitle p {
  margin: 0;
  color: #f0f0f0;
  letter-spacing: 0.2em;
  font-size: 0.92rem;
}

.hero-typing {
  display: inline-block;
  min-width: 26ch;
}

.cursor {
  color: var(--accent);
  animation: blink 0.8s steps(1) infinite;
}

.hero-bio {
  margin: 22px 0 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease,
    background-color 180ms ease, color 180ms ease;
}

.btn:hover,
.skill-card:hover,
.project-card:hover,
.contact-card:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.33);
  filter: brightness(1.05);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18) inset;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.portrait-frame {
  position: relative;
  margin: 0;
  width: min(100%, 510px);
  aspect-ratio: 0.84;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #050505;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
}

.portrait-frame img,
.project-card > img {
  width: 100%;
  display: block;
}

.portrait-frame img {
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(0.92);
}

.corner {
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.corner::before,
.corner::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
}

.corner::before {
  width: 26px;
  height: 1px;
}

.corner::after {
  width: 1px;
  height: 26px;
}

.corner-tl {
  top: 14px;
  left: 14px;
}

.corner-tl::before,
.corner-bl::before {
  left: 0;
}

.corner-tl::after,
.corner-tr::after {
  top: 0;
}

.corner-tr {
  top: 14px;
  right: 14px;
}

.corner-tr::before,
.corner-br::before {
  right: 0;
}

.corner-bl {
  bottom: 14px;
  left: 14px;
}

.corner-bl::after,
.corner-br::after {
  bottom: 0;
}

.corner-br {
  bottom: 14px;
  right: 14px;
}

.portrait-labels {
  position: absolute;
  inset: auto 14px 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.8);
}

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

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.stat-card {
  padding: 24px 24px 22px;
  border-right: 1px solid var(--line);
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  font-weight: 800;
  color: white;
}

.stat-card span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  letter-spacing: 0.16em;
  font-size: 0.74rem;
}

.ticker {
  margin-top: 18px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 26px;
  padding: 16px 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.7vw, 1.45rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: marquee 34s linear infinite;
}

.ticker-track span:nth-child(odd) {
  color: #f0f0f0;
}

.skills-section,
.projects-section,
.experience-section,
.contact-section {
  padding-top: 88px;
}

.section-head,
.projects-head,
.contact-head {
  display: grid;
  gap: 24px;
  align-items: end;
}

.split-head,
.projects-head,
.contact-head {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.section-title-wrap {
  text-align: right;
}

.section-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: white;
}

.section-description {
  max-width: 55ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.skills-grid,
.projects-grid,
.contact-grid {
  margin-top: 30px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.skill-card,
.project-card,
.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease,
    background-color 180ms ease, filter 180ms ease;
}

.skill-card {
  min-height: 250px;
  padding: 18px;
}

.skill-card:hover,
.project-card:hover,
.contact-card:hover {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1) inset, 0 18px 42px rgba(0, 0, 0, 0.34);
  filter: brightness(1.02);
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #dce4ff;
}

.skill-icon {
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent);
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.24);
}

.skill-card h3,
.project-title-row h3,
.timeline-topline h3,
.contact-card h3 {
  margin: 0;
  color: white;
  font-family: "Space Grotesk", sans-serif;
}

.skill-card h3 {
  margin-top: 28px;
  font-size: 1.2rem;
}

.skill-card ul,
.timeline-content ul {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  color: var(--muted);
}

.skill-card li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-top: 10px;
}

.skill-card li span,
.timeline-content li {
  color: var(--accent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.project-card > img {
  height: 240px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.project-index {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  color: #dfe4ee;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
}

.project-body {
  padding: 20px;
}

.project-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.project-title-row h3 {
  font-size: 1.45rem;
}

.project-title-row span,
.timeline-topline span {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}

.project-body p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tech-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #e9e9ee;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.project-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.project-links a {
  text-decoration: none;
  color: #dfe4ee;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
}

.project-links a:last-child {
  color: #8eb0ff;
}

.experience-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.35fr) minmax(0, 0.65fr);
  gap: 36px;
}

.experience-intro {
  position: sticky;
  top: 98px;
  align-self: start;
}

.experience-title,
.projects-title {
  margin-top: 4px;
}

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

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.timeline-marker {
  width: 16px;
  height: 16px;
  margin-top: 6px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.45);
}

.timeline-topline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.timeline-topline h3 {
  font-size: 1.15rem;
}

.timeline-company {
  margin-top: 8px;
  color: #d8d8dc;
  letter-spacing: 0.1em;
  font-size: 0.74rem;
}

.timeline-company span {
  color: var(--muted);
}

.timeline-content ul {
  margin-top: 16px;
}

.timeline-content li {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.timeline-tags {
  margin-top: 18px;
}

.contact-section {
  padding-bottom: 72px;
}

.contact-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.4rem, 6.8vw, 6.3rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.contact-title span:last-child {
  font-style: italic;
  color: #c7c7cb;
  font-weight: 500;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.contact-card {
  min-height: 168px;
  position: relative;
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.contact-card--link {
  color: inherit;
  text-decoration: none;
}

.contact-icon,
.contact-arrow {
  position: absolute;
  color: var(--accent);
  font-size: 1.1rem;
}

.contact-icon {
  top: 16px;
  left: 16px;
}

.contact-arrow {
  top: 16px;
  right: 16px;
}

.contact-card p {
  margin: 40px 0 0;
  color: var(--accent);
  letter-spacing: 0.18em;
  font-size: 0.76rem;
}

.contact-value {
  display: block;
  margin-top: auto;
  color: #f5f5f5;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.28rem);
  line-height: 1.35;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.contact-card:hover .contact-value,
.contact-card--link:hover .contact-value {
  color: #ffffff;
}

.contact-card--link:hover,
.contact-card--link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1) inset, 0 18px 42px rgba(0, 0, 0, 0.34);
  filter: brightness(1.02);
}

.contact-card--link:focus-visible {
  outline: none;
}

.contact-value[href] {
  cursor: pointer;
}

.contact-card--link .contact-value {
  line-height: 1.35;
}

.contact-footer {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.document-copy p {
  margin: 0;
}

.footer-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

.document-copy p:last-child {
  margin-top: 10px;
  color: var(--muted);
}

.footer-actions {
  margin-top: 0;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(116, 239, 139, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(116, 239, 139, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(116, 239, 139, 0);
  }
}

@media (max-width: 1180px) {
  .hero,
  .experience-section,
  .split-head,
  .projects-head,
  .contact-head,
  .skills-grid,
  .projects-grid,
  .contact-grid,
  .stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-visual {
    justify-content: flex-start;
  }

  .section-title-wrap,
  .projects-description,
  .contact-description {
    text-align: left;
  }

  .experience-intro {
    position: static;
  }

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

@media (max-width: 860px) {
  .navbar {
    padding: 16px 18px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(300px, 82vw);
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    padding: 80px 36px;
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(28px);
    border-left: 1px solid var(--line-strong);
    transform: translateX(110%);
    transition: transform 320ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 150;
  }

  .nav-links.is-open {
    transform: translateX(0);
  }

  .nav-links a {
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
    letter-spacing: 0.26em;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .section-shell {
    width: min(100% - 28px, 1400px);
  }

  .hero,
  .skills-grid,
  .projects-grid,
  .contact-grid,
  .stats-bar,
  .experience-section,
  .split-head,
  .projects-head,
  .contact-head {
    grid-template-columns: 1fr;
  }

  .hero-first {
    font-size: clamp(3.8rem, 15vw, 6.3rem);
  }

  .hero-last {
    font-size: clamp(2.8rem, 10vw, 4.8rem);
  }

  .portrait-frame {
    width: 100%;
  }

  .stat-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat-card:last-child {
    border-bottom: 0;
  }

  .timeline-topline,
  .project-title-row,
  .contact-footer,
  .project-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .hero-actions,
  .nav-links,
  .tech-tags {
    gap: 10px;
  }

  .btn {
    width: 100%;
  }

  .project-card > img {
    height: 190px;
  }

  .project-body,
  .skill-card,
  .timeline-item,
  .contact-card {
    padding: 16px;
  }

  .skill-card h3,
  .project-title-row h3,
  .timeline-topline h3,
  .contact-card h3 {
    font-size: 1.05rem;
  }
}
