:root {
  --background: #080808;
  --surface: #0a0a0a;
  --border: #292929;

  --text-primary: #f1f1f1;
  --text-secondary: #74808d;
  --text-muted: #59616b;

  --accent: #c9b3ff;

  --content-width: 1250px;
  --page-padding: 32px;

  --font-mono:
    "JetBrains Mono",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

/* --------------------------------------------------
   Reset
-------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;

  background: var(--background);
  color: var(--text-primary);

  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.6;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  font: inherit;
}

::selection {
  background: var(--accent);
  color: var(--background);
}

/* --------------------------------------------------
   Header
-------------------------------------------------- */

.site-header {
  width: 100%;
  height: 64px;
  border-bottom: 1px solid var(--border) !important;
  background: var(--background);
}

.nav {
  position: relative;
  z-index: 1;

  width: 100%;
  max-width: var(--content-width);
  min-height: 64px;

  margin: 0 auto;
  padding: 14px var(--page-padding) 12px;
  border-bottom: 1px solid var(--border);
   padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: 0;

  color: var(--text-muted);

  font-size: 18px;
  font-weight: 500;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.ip-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
}

.ip-button {
  padding: 7px 10px;
  color: #b9ffcf;
  border: 1px solid #287a46;
  background: rgba(30, 255, 120, 0.04);
  box-shadow:
    0 0 5px rgba(30, 255, 120, 0.12),
    inset 0 0 5px rgba(30, 255, 120, 0.04);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-shadow: 0 0 6px rgba(30, 255, 120, 0.35);
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.ip-button:hover,
.ip-button:focus-visible {
  color: #caffd8;
  border-color: #39a85f;
  background: rgba(30, 255, 120, 0.08);
  box-shadow:
    0 0 8px rgba(30, 255, 120, 0.2),
    inset 0 0 7px rgba(30, 255, 120, 0.06);
}

.ip-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.ip-result {
  min-width: 0;
  color: #b9ffcf;
  font-size: 11px;
  line-height: 1.4;
  text-shadow: 0 0 6px rgba(30, 255, 120, 0.35);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 18px;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.social-link:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
}

.social-link svg {
  width: 25px;
  height: 25px;
  display: block;
}

.nav-links a {
  position: relative;

  transition:
    color 160ms ease,
    opacity 160ms ease;
}

.nav-links a::after {
  content: "";

  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;

  height: 1px;

  background: var(--accent);

  transform: scaleX(0);
  transform-origin: left;

  transition: transform 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

/* --------------------------------------------------
   Main
-------------------------------------------------- */

main {
  width: 100%;
  max-width: var(--content-width);

  margin: 0 auto;
  padding: 0 var(--page-padding);
}

/* --------------------------------------------------
   Hero
-------------------------------------------------- */
.hero {
  min-height: 280px;
  display: flex;
  align-items: flex-start;
  padding-top: 32px;
}

.hero-content {
  width: 100%;
  padding: 64px 0 8px;
}

.hero h1 {
  margin: 0;

  color: var(--text-primary);

  font-size: clamp(64px, 7vw, 92px);
  font-weight: 800;
  line-height: 0.95;

  letter-spacing: -0.075em;
}

.hero-subtitle {
  margin: 30px 0 0;

  color: var(--text-secondary);

  font-size: 19px;
  font-weight: 400;
  line-height: 1.5;

  letter-spacing: -0.035em;
}

/* --------------------------------------------------
   Projects
-------------------------------------------------- */

.projects {
  padding: 18px 0 100px;
}

.section-header {
  margin-bottom: 8px;
}

.section-label {
  color: var(--text-secondary);

  font-size: 13px;
  font-weight: 600;

  letter-spacing: 0.16em;
}

/* --------------------------------------------------
   Project grid
-------------------------------------------------- */

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

  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

/* --------------------------------------------------
   Project card
-------------------------------------------------- */

.project-card {
  min-height: 280px;

  display: flex;
  flex-direction: column;

  padding: 30px;

  background: var(--surface);

  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);

  transition:
    background-color 180ms ease,
    border-color 180ms ease;
}

.project-card:hover {
  background: #0d0d0d;
  border-color: #353535;
}

.project-card:focus-within {
  background: #0d0d0d;
}

/* --------------------------------------------------
   Project card header
-------------------------------------------------- */

.project-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;
}

.project-card h2 {
  margin: 0;

  color: var(--text-primary);

  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;

  letter-spacing: -0.04em;
}

.project-link {
  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  color: var(--text-muted);

  border: 1px solid transparent;

  font-size: 17px;
  line-height: 1;

  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.project-link:hover,
.project-link:focus-visible {
  color: var(--accent);
  border-color: var(--border);
  background: #111111;
}

/* --------------------------------------------------
   Project description
-------------------------------------------------- */

.project-description {
  max-width: 680px;

  margin: 28px 0 30px;

  color: var(--text-secondary);

  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;

  letter-spacing: -0.025em;
}

/* --------------------------------------------------
   Technology tags
-------------------------------------------------- */

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.project-tags span {
  display: inline-block;

  padding: 4px 8px;

  color: #b9ffcf;

  border: 1px solid #287a46;

  background: rgba(30, 255, 120, 0.04);

  box-shadow:
    0 0 5px rgba(30, 255, 120, 0.12),
    inset 0 0 5px rgba(30, 255, 120, 0.04);

  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;

  letter-spacing: -0.025em;

  text-shadow: 0 0 6px rgba(30, 255, 120, 0.35);

  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    text-shadow 160ms ease;
}

.project-actions {
  margin-top: 24px;
}

.demo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  color: #e9d5ff;
  border: 1px solid #a855f7;
  background: rgba(168, 85, 247, 0.08);
  box-shadow:
    0 0 8px rgba(168, 85, 247, 0.22),
    inset 0 0 8px rgba(168, 85, 247, 0.08);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 0 0 7px rgba(216, 180, 254, 0.65);
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    text-shadow 160ms ease;
}

.demo-button:hover,
.demo-button:focus-visible {
  color: #f3e8ff;
  border-color: #d8b4fe;
  background: rgba(168, 85, 247, 0.16);
  box-shadow:
    0 0 12px rgba(168, 85, 247, 0.42),
    inset 0 0 10px rgba(168, 85, 247, 0.12);
  text-shadow: 0 0 9px rgba(216, 180, 254, 0.85);
}

.project-tags span:hover {
  color: #caffd8;
  border-color: #39a85f;
  background: rgba(30, 255, 120, 0.07);
  box-shadow:
    0 0 8px rgba(30, 255, 120, 0.2),
    inset 0 0 7px rgba(30, 255, 120, 0.06);
  text-shadow:
    0 0 7px rgba(30, 255, 120, 0.5);
}

/* --------------------------------------------------
   Focus accessibility
-------------------------------------------------- */

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

/* --------------------------------------------------
   Responsive — tablet
-------------------------------------------------- */

@media (max-width: 800px) {
  :root {
    --page-padding: 24px;
  }

  .site-header {
    height: auto;
    min-height: 64px;
  }

  .nav {
    min-height: 64px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

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

  .ip-widget {
    width: 100%;
    justify-content: flex-end;
  }

  .hero {
    min-height: 430px;
  }

  .hero-content {
    padding: 80px 0 90px;
  }

  .hero h1 {
    font-size: clamp(56px, 11vw, 76px);
  }

  .hero-subtitle {
    font-size: 17px;
  }

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

  .project-card {
    min-height: 0;
  }
}

/* --------------------------------------------------
   Responsive — mobile
-------------------------------------------------- */

@media (max-width: 500px) {
  :root {
    --page-padding: 18px;
  }

  .nav {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
  }

  .logo {
    padding-top: 4px;
  }

  .nav-links {
    gap: 10px 16px;

    font-size: 11px;
  }

  .ip-widget {
    margin-left: 0;
  }

  .nav-links a::after {
    bottom: -4px;
  }

  .hero {
    min-height: 380px;
  }

  .hero-content {
    padding: 70px 0 75px;
  }

  .hero h1 {
    font-size: clamp(52px, 15vw, 60px);
    line-height: 0.98;
  }

  .hero-subtitle {
    margin-top: 24px;

    font-size: 15px;
    line-height: 1.65;
  }

  .projects {
    padding: 52px 0 70px;
  }

  .section-header {
    margin-bottom: 22px;
  }

  .section-label {
    font-size: 12px;
  }

  .project-card {
    padding: 20px;
  }

  .project-card h2 {
    font-size: 17px;
  }

  .project-description {
    margin-top: 22px;
    margin-bottom: 24px;

    font-size: 14px;
    line-height: 1.75;
  }

  .project-tags span {
    font-size: 10px;
  }
}

/* --------------------------------------------------
   Reduced motion
-------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

.nav-links a.is-active {
  color: var(--text-primary);
}

.nav-links a.is-active::after {
  transform: scaleX(1);
}

 /* --------------------------------------------------
    Experience
 -------------------------------------------------- */

.experience {
  padding: 14px 0 120px;
}

 .experience-content {
   width: 100%;
 }

 .experience-item {
   padding: 28px 30px;

   border-top: 1px solid var(--border);

   background: var(--surface);
 }

 .experience-item:last-child {
   border-bottom: 1px solid var(--border);
 }

 .experience-header {
   display: flex;
   align-items: baseline;
   justify-content: space-between;

   gap: 24px;
 }

 .experience-item h3 {
   margin: 0;

   color: var(--text-primary);

   font-size: 17px;
   font-weight: 700;
   line-height: 1.4;

   letter-spacing: -0.04em;
 }

 .experience-period {
   flex: 0 0 auto;

   color: var(--text-muted);

   font-size: 12px;
 }

 .experience-company {
   margin-top: 6px;

   color: var(--accent);

   font-size: 13px;
 }

 .experience-description {
   max-width: 800px;

   margin: 18px 0 0;

   color: var(--text-secondary);

   font-size: 14px;
   line-height: 1.8;
 }


 /* --------------------------------------------------
    About
 -------------------------------------------------- */
.about {
  padding: 80px 0 120px;
}

 .about-content {
   max-width: 850px;

   border-top: 1px solid var(--border);
 }

 .about-content p {
   margin: 0;

   padding: 26px 30px;

   color: var(--text-secondary);

   background: var(--surface);

   border-bottom: 1px solid var(--border);

   font-size: 16px;
   line-height: 1.9;

   letter-spacing: -0.025em;
 }


 /* --------------------------------------------------
    Mobile — Experience & About
 -------------------------------------------------- */

 @media (max-width: 500px) {
   .experience {
     padding-bottom: 70px;
   }

   .experience-item {
     padding: 22px 20px;
   }

   .experience-header {
     align-items: flex-start;
     flex-direction: column;
     gap: 5px;
   }

   .experience-item h3 {
     font-size: 16px;
   }

   .experience-period {
     font-size: 11px;
   }

   .experience-description {
     margin-top: 16px;

     font-size: 13px;
   }

   .about {
     padding-bottom: 80px;
   }

   .about-content p {
     padding: 22px 20px;

     font-size: 14px;
     line-height: 1.8;
   }
 }