:root {
  --bg: #030b12;
  --bg-strong: #06131a;
  --bg-panel: rgba(10, 18, 24, 0.86);
  --bg-panel-strong: rgba(12, 22, 29, 0.97);
  --line: rgba(113, 244, 177, 0.18);
  --line-strong: rgba(113, 244, 177, 0.28);
  --slate: #9cc5bc;
  --light-slate: #d1fff3;
  --lightest-slate: #eafefb;
  --white: #eafefb;
  --primary: #7df9ff;
  --primary-strong: #46e7ff;
  --secondary: #8d7bff;
  --accent: #71f4b1;
  --primary-tint: rgba(125, 249, 255, 0.12);
  --shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 0 30px rgba(125, 249, 255, 0.1);
  --border-radius: 4px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 20% 10%, rgba(70, 231, 255, 0.18), transparent 20%),
    radial-gradient(circle at 80% 15%, rgba(141, 123, 255, 0.18), transparent 18%),
    linear-gradient(180deg, #02080d 0%, #040d14 30%, #020a12 100%);
  color: var(--slate);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 249, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 249, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 25%, rgba(0,0,0,0.2) 70%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.5));
  pointer-events: none;
  z-index: 0;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--primary);
}

p,
ul,
li,
h1,
h2,
h3 {
  margin-top: 0;
}

p {
  margin-bottom: 18px;
}

ul {
  padding-left: 20px;
}

.page-noise {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.02), rgba(255,255,255,0.02));
  background-size: 14px 14px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.bg-orb {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.orb-one {
  left: -50px;
  top: 30px;
  background: rgba(119, 235, 255, 0.34);
}

.orb-two {
  right: 40px;
  bottom: 100px;
  background: rgba(142, 130, 255, 0.22);
}

.layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 40% 60%;
  max-width: 1600px;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 60px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  height: 100%;
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-name {
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--lightest-slate);
  margin: 0;
  font-family: var(--font-sans);
}

.hero-role {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--light-slate);
  margin: 0;
  min-height: 1.2em;
  display: inline-flex;
  align-items: baseline;
}

#role-cycler {
  color: var(--primary);
  font-weight: 600;
  display: inline-block;
  min-width: 1ch;
}

.cursor {
  display: inline-block;
  margin-left: 2px;
  color: var(--primary);
  font-weight: 700;
  line-height: 1;
  animation: blink 0.8s step-end infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.hero-quote {
  font-size: 16px;
  color: var(--slate);
  max-width: 420px;
  margin: 10px 0 0;
  line-height: 1.6;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 320px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--slate);
  text-transform: uppercase;
  transition: all 0.25s ease;
  cursor: pointer;
  padding: 4px 0;
}

.nav-item .nav-line {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--slate);
  transition: all 0.25s ease;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--lightest-slate);
  outline: none;
}

.nav-item:hover .nav-line,
.nav-item:focus-visible .nav-line {
  width: 70px;
  background: var(--primary);
}

.nav-item.active .nav-line {
  width: 70px;
  background: var(--primary);
}

.nav-item.active {
  color: var(--lightest-slate);
}

.nav-text {
  white-space: nowrap;
}

.sidebar-social {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: auto;
}

.sidebar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--light-slate);
  transition: color 0.25s ease, transform 0.25s ease;
}

.sidebar-social a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

.sidebar-social svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.content {
  padding: 60px 60px;
  display: flex;
  flex-direction: column;
  gap: 100px;
  max-width: 720px;
}

.content-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-section > p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--slate);
}

.content-section > p strong,
.content-section > p a {
  color: var(--lightest-slate);
}

.content-section > p a {
  position: relative;
  display: inline-block;
  color: var(--primary);
}

.content-section > p a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 1px;
  width: 100%;
  height: 1px;
  background: var(--primary);
  opacity: 0.3;
  transition: opacity 0.25s ease;
}

.content-section > p a:hover::after {
  opacity: 1;
}

.section-heading {
  margin-bottom: 10px;
}

.section-heading h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 700;
  color: var(--lightest-slate);
  margin: 0;
  letter-spacing: -0.02em;
}

.section-heading h2::after {
  content: "";
  display: block;
  width: 50px;
  height: 2px;
  background: var(--primary);
  margin-top: 12px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.skill-grid,
.project-grid,
.gallery-grid {
  display: grid;
  gap: 20px;
}

.skill-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 20px;
}

.skill-card {
  background: linear-gradient(180deg, rgba(17, 27, 42, 0.85), rgba(11, 18, 29, 0.96));
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  box-shadow: 0 0 20px rgba(125, 249, 255, 0.34);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.skill-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(125, 249, 255, 0.08) 35%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(119, 235, 255, 0.42);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card:hover::after {
  transform: translateX(100%);
}

.card-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 14px;
  font-weight: 600;
}

.skill-card h3 {
  font-size: 18px;
  color: var(--lightest-slate);
  margin: 0 0 14px;
  font-weight: 600;
}

.skill-card ul {
  margin: 0;
  padding-left: 16px;
  color: var(--slate);
  font-size: 14px;
}

.skill-card li {
  margin-bottom: 6px;
}

.skill-card li:last-child {
  margin-bottom: 0;
}

.project-grid {
  grid-template-columns: 1fr;
  margin-top: 20px;
  gap: 28px;
}

.project-card {
  background: linear-gradient(180deg, rgba(17, 27, 42, 0.85), rgba(11, 18, 29, 0.96));
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  position: relative;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  box-shadow: 0 0 20px rgba(125, 249, 255, 0.34);
  z-index: 2;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(125, 249, 255, 0.08) 35%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
  pointer-events: none;
  z-index: 1;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(119, 235, 255, 0.42);
}

.project-card:hover::after {
  transform: translateX(100%);
}

.project-card img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  background: var(--bg-lightest);
}

.project-body {
  padding: 24px;
}

.tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--border-radius);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  font-weight: 600;
  text-transform: uppercase;
}

.tag-primary {
  background: rgba(119, 235, 255, 0.12);
  color: var(--primary);
}

.tag-secondary {
  background: rgba(142, 130, 255, 0.12);
  color: #c0b9ff;
}

.tag-accent {
  background: rgba(125, 241, 191, 0.12);
  color: var(--accent);
}

.project-body h3 {
  font-size: 20px;
  color: var(--lightest-slate);
  margin: 0 0 10px;
  font-weight: 600;
}

.project-body p {
  margin: 0 0 14px;
  color: var(--slate);
  font-size: 14px;
  line-height: 1.6;
}

.project-body ul {
  margin: 0;
  padding-left: 16px;
  color: var(--light-slate);
  font-size: 13px;
}

.project-body li {
  margin-bottom: 4px;
}

.project-body li:last-child {
  margin-bottom: 0;
}

.gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(119, 235, 255, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-hover);
  border-color: rgba(119, 235, 255, 0.5);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item.tall img {
  height: 250px;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item.wide img {
  height: 200px;
}

.contact-card {
  background: linear-gradient(180deg, rgba(17, 27, 42, 0.85), rgba(11, 18, 29, 0.96));
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  box-shadow: 0 0 20px rgba(125, 249, 255, 0.34);
}

.contact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(125, 249, 255, 0.08) 35%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.contact-card:hover::after {
  transform: translateX(100%);
}

.contact-card h2 {
  margin: 0;
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--lightest-slate);
  line-height: 1.3;
  font-weight: 600;
  max-width: 420px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex-shrink: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--border-radius);
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.button:hover,
.button:focus-visible {
  background: var(--primary-tint);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  outline: none;
  color: var(--primary);
}

.button-secondary {
  border-color: var(--line-strong);
  color: var(--light-slate);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--accent);
  color: var(--lightest-slate);
}

.footer {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(119, 235, 255, 0.08);
}

.footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  letter-spacing: 0.05em;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin: 0 auto;
  }

  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    padding: 60px 40px 40px;
  }

  .sidebar-inner {
    gap: 40px;
  }

  .side-nav {
    display: none;
  }

  .sidebar-social {
    display: none;
  }

  .content {
    padding: 0 40px 60px;
    max-width: none;
    gap: 80px;
  }

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

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

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

  .gallery-item.wide {
    grid-column: auto;
  }

  .gallery-item.wide img {
    height: 180px;
  }

  .contact-card {
    flex-direction: column;
    text-align: left;
    align-items: flex-start;
    padding: 30px;
  }
}

@media (max-width: 560px) {
  .sidebar {
    padding: 40px 24px 30px;
  }

  .content {
    padding: 0 24px 40px;
    gap: 60px;
  }

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

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

  .gallery-item.tall img,
  .gallery-item.wide img,
  .gallery-item img {
    height: 200px;
  }

  .contact-card {
    padding: 24px;
  }

  .contact-actions {
    flex-direction: column;
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .project-body {
    padding: 18px;
  }
}
