:root {
  --bg: #030406;
  --bg-soft: rgba(9, 14, 26, 0.76);
  --panel: rgba(10, 18, 34, 0.70);
  --panel-2: rgba(12, 22, 42, 0.68);
  --border: rgba(121, 175, 255, 0.18);
  --text: #edf5ff;
  --muted: #a9bdd9;
  --accent: #7bb1ff;
  --accent-2: #9fcbff;
  --green: #8cff95;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.bg-base {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(90, 140, 255, 0.12), transparent 22%),
    radial-gradient(circle at 80% 18%, rgba(50, 86, 180, 0.16), transparent 20%),
    linear-gradient(180deg, #030406 0%, #05070c 45%, #030406 100%);
  z-index: -4;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(123, 177, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 177, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 88%);
  pointer-events: none;
  z-index: -3;
}

.code-corner {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 420px;
  height: auto;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
  opacity: 0.42;
}

.code-corner pre {
  margin: 0;
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(140, 255, 149, 0.40);
  text-shadow: 0 0 10px rgba(80, 255, 110, 0.08);
  white-space: pre-wrap;
}

.code-corner .k,
.code-corner .f {
  color: rgba(151, 255, 158, 0.78);
}

.code-corner .o,
.code-corner .n {
  color: rgba(120, 255, 130, 0.72);
}

.code-corner .s {
  color: rgba(194, 255, 199, 0.72);
}

.code-corner .c {
  color: rgba(113, 179, 117, 0.62);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 22px 24px;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  padding: 12px 20px;
  border-radius: 14px;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(3,4,6,0.92), rgba(3,4,6,0.55));
}

.topbar a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.topbar a:hover,
.topbar a:focus-visible {
  color: var(--accent);
  text-shadow: 0 0 16px rgba(123, 177, 255, 0.22);
}

.eyebrow,
.section-tag,
.project-topline,
.timeline-date,
.mono {
  font-family: "JetBrains Mono", monospace;
}

main {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 20px 24px 100px;
}

.project-previews-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;   /* THIS centers vertically */
  gap: 16px;
  height: 100%;
}

.hero-photo-wrap {
  display: block;
  width: 100%;
}

.project-preview-card {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  min-height: 150px;
  text-decoration: none;
  box-shadow: 0 12px 35px rgba(0,0,0,0.22);
}

.project-preview-large {
  min-height: 190px;
}

.project-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease, opacity 0.35s ease;
}

.project-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 16px;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.28) 0%,
    rgba(0,0,0,0.10) 40%,
    rgba(0,0,0,0.42) 100%
  );
  opacity: 0;
  transition: opacity 0.28s ease;
}

.project-preview-title {
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.project-preview-sub {
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  line-height: 1.4;
  max-width: 80%;
}

.project-preview-card:hover .project-preview-img {
  transform: scale(1.02);
  filter: blur(2px) brightness(0.70);
}

.project-preview-card:hover .project-preview-overlay {
  opacity: 1;
}

@media (max-width: 900px) {
  .project-preview-large {
    min-height: 170px;
  }

  .project-preview-card {
    min-height: 135px;
  }
}

.hero {
  min-height: 90vh;
  display: grid;
  align-content: center;
  padding: 40px 0 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: center;
}

.hero-photo-wrap {
  display: block;
  width: 100%;
}

.headshot-img {
  width: 100%;
  max-width: 430px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(123, 177, 255, 0.18);
  box-shadow: var(--shadow);
}

.hero-content {
  display: grid;
  gap: 18px;
}

.eyebrow,
.section-tag,
.project-topline,
.timeline-date {
  color: var(--accent);
  letter-spacing: 0.03em;
}

h1 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(1.95rem, 4.7vw, 3.6rem);
  line-height: 1.02;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

p {
  color: var(--muted);
  line-height: 1.72;
  font-size: 1.02rem;
}

.hero-copy {
  max-width: 680px;
  font-size: 1.02rem;
}

.hero-copy span {
  color: var(--text);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.button-primary {
  color: white;
  background: linear-gradient(135deg, rgba(123,177,255,0.24), rgba(123,177,255,0.08));
  border-color: rgba(123,177,255,0.36);
  box-shadow: 0 14px 42px rgba(79, 139, 255, 0.2);
}

.button-secondary {
  color: var(--accent);
  background: rgba(255,255,255,0.01);
  border-color: rgba(123,177,255,0.2);
}

.hero-terminal,
.glass-panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-terminal {
  max-width: 700px;
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(123,177,255,0.12);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(123,177,255,0.46);
}

.terminal-body {
  padding: 18px 20px 22px;
}

.terminal-body p {
  margin: 0 0 10px;
  color: #eaf2ff;
  font-size: 0.96rem;
}

.prompt {
  color: var(--accent-2);
}

.key {
  color: #d7e6ff;
}

.section {
  padding: 72px 0 0;
}

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

.glass-panel {
  padding: 24px;
}

.about-single {
  max-width: 980px;
}

.skills-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.project-card::after {
  content: "";
  position: absolute;
  inset: auto -18% -42% auto;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(123,177,255,0.18), transparent 65%);
  pointer-events: none;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.project-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(123,177,255,0.18);
  background: rgba(123,177,255,0.05);
  color: #dce9ff;
  font-size: 0.9rem;
}

.project-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.project-links a,
.contact-links a {
  color: var(--accent);
  text-decoration: none;
}

.project-links a:hover,
.contact-links a:hover {
  text-decoration: underline;
}

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

.role-line {
  margin-top: -4px;
  margin-bottom: 10px;
  color: #dce9ff;
}

.contact-panel {
  display: grid;
  gap: 20px;
}

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

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

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

  .topbar {
    justify-content: flex-start;
  }

  .hero-photo-wrap {
    justify-content: flex-start;
  }

  .headshot-placeholder {
    max-width: 300px;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
    align-items: flex-start;
    gap: 12px;
  }

  .topbar nav {
    gap: 16px;
  }

  .code-corner {
    width: 100%;
    opacity: 0.34;
    height: 260px;
  }

  .code-corner pre {
    font-size: 11px;
  }
}

@media (max-width: 620px) {
  main {
    padding-inline: 16px;
  }

  .button {
    width: 100%;
  }

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

  .headshot-placeholder {
    max-width: 100%;
  }
}

.container {
  max-width: 750px;
  margin: 80px auto;
  padding: 0 20px;
  line-height: 1.6;
}

.subtitle {
  color: #888;
  margin-bottom: 20px;
}

.tags span {
  display: inline-block;
  margin-right: 10px;
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 12px;
}

h2 {
  margin-top: 40px;
  font-size: 20px;
}

p {
  margin-top: 10px;
}

.project-preview-tall {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #030406;
}

.project-preview-tall .project-preview-img {
  width: 100%;
  height: 85%;
  object-fit: contain;
  object-position: center;
}
