@charset "UTF-8";

/* === Skip to content === */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 1.6rem;
  background: #79C0FF;
  color: #0D1117;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-content:focus {
  top: 1.6rem;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 62.5%; scrollbar-gutter: stable; } /* 1rem = 10px */

body {
  font-family: 'JetBrains Mono', monospace;
  background-color: #0D1117;
  color: #CDD9E5;
  font-size: 1.4rem;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  color: #E6EDF3;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 1rem;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.7rem; }
h4, h5, h6 { font-size: 1.4rem; }

p {
  font-size: 1.4rem;
  margin: 0 0 1rem;
}

a { color: #79C0FF; }

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border: 0;
  display: block;
}

ul, ol { margin: 0; padding: 0; }

/* === Layout === */
.layout {
  display: flex;
  min-height: 100vh;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 40px;
}

/* === Sidebar === */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  padding: 56px 36px 48px 0;
  border-right: 1px solid #21262D;
  margin-right: 64px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  text-align: right;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.sidebar-photo-link img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #30363D;
  filter: grayscale(20%) brightness(0.85);
}

.sidebar-photo-link img:hover {
  border-color: #484F58;
}

.site-title {
  margin-top: 14px;
  color: #E6EDF3;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.3;
  display: block;
}

.tag-line {
  font-family: 'JetBrains Mono', monospace;
  color: #3FB950;
  font-size: 1.3rem;
  font-weight: 300;
  margin-top: 10px;
  margin-bottom: 0;
  white-space: nowrap;
}

.tag-line::before {
  content: '# ';
  color: #484F58;
}

.sidebar-nav {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  color: #6E7681;
  text-decoration: none;
  padding: 5px 0;
  display: block;
}

.sidebar-nav a::before {
  content: './';
  color: #484F58;
}

.sidebar-nav a[aria-current="page"] {
  color: #79C0FF;
  font-weight: 400;
}

.sidebar-nav a[aria-current="page"]::before {
  content: '> ';
  color: #3FB950;
}

.sidebar-nav a:hover { color: #CDD9E5; }

.sidebar-footer {
  margin-top: auto;
  transform: translateY(-18px);
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-end;
}

.sidebar-footer a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  color: #8B949E;
  text-decoration: none;
}

.sidebar-footer a:hover { color: #79C0FF; }

/* === Main === */
main {
  flex: 1;
  padding: 80px 0 80px;
  min-width: 0;
}

/* === Home page === */
.prompt {
  font-family: 'JetBrains Mono', monospace;
  color: #3FB950;
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.3;
  margin-top: 14px;
  margin-bottom: 2rem;
}

.prompt .prompt-sep { color: #6E7681; }

h1 { font-size: 2.6rem; letter-spacing: -0.02em; line-height: 1.1; }
h1 .h1-accent { color: #79C0FF; }

.lead {
  font-size: 1.4rem;
  line-height: 1.65;
  color: #CDD9E5;
  margin-top: 2.4rem;
  max-width: 520px;
}

.sub {
  font-size: 1.4rem;
  color: #8B949E;
  margin-top: 1.2rem;
  max-width: 520px;
  line-height: 1.7;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 3.2rem;
}

.btn-terminal {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 400;
  color: #0D1117;
  background: #79C0FF;
  border: 1px solid #79C0FF;
  padding: 10px 22px;
  text-decoration: none;
  line-height: 1;
}

.btn-terminal:hover {
  background: #A5D6FF;
  border-color: #A5D6FF;
  color: #0D1117;
}

.btn-ghost-terminal {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 400;
  color: #6E7681;
  background: transparent;
  border: 1px solid #30363D;
  padding: 10px 22px;
  text-decoration: none;
  line-height: 1;
}

.btn-ghost-terminal:hover {
  color: #CDD9E5;
  border-color: #6E7681;
}

.home-divider {
  margin-top: 5rem;
  border: none;
  border-top: 1px solid #21262D;
}

.home-projects { margin-top: 3rem; }

.proj-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  color: #3FB950;
  margin-bottom: 1.6rem;
}

.proj-label::before {
  content: '$ ls ./projects\A';
  white-space: pre;
  color: #6E7681;
  display: block;
  margin-bottom: 0.5rem;
}

.proj-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.2rem 0;
}

.proj-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.4rem;
  font-weight: 500;
  color: #CDD9E5;
}

.proj-stack {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  color: #8B949E;
}

/* === Projects page === */
.eyebrow {
  color: #6E7681;
  font-size: 1.2rem;
  margin-bottom: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.project-list {
  display: grid;
  gap: 3rem;
  margin-top: 2.5rem;
}

.project-card {
  align-items: start;
  border-top: 1px solid #30363D;
  display: grid;
  gap: 1.75rem;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  padding-top: 2.5rem;
}

.project-card--with-preview {
  column-gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 40%);
  row-gap: 1rem;
}

.project-card-media {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 100%;
}

.project-card--with-preview .project-card-body {
  grid-column: 1;
  grid-row: 1;
}

.project-card h2 {
  font-size: 1.7rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: #E6EDF3;
}

.project-card p {
  font-size: 1.4rem;
  color: #8B949E;
  line-height: 1.65;
}

.project-card a {
  color: #79C0FF;
  text-decoration: none;
  font-size: 1.4rem;
}

.project-card a:hover { text-decoration: underline; }

.project-tags,
.project-tags li {
  list-style: none !important;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.project-tags li {
  background: #1C2128;
  border: 1px solid #30363D;
  border-radius: 3px;
  color: #8B949E;
  font-size: 1.2rem;
  line-height: 1;
  margin: 0;
  padding: 0.5rem 1.2rem;
}

.project-preview-dialog:not([open]) { display: none; }

.project-preview {
  aspect-ratio: 16 / 9;
  background: #161B22;
  border: 1px solid #21262D;
  margin: 0;
  overflow: hidden;
}

.project-thumb {
  background: #161B22;
  border: 1px solid #21262D;
  display: block;
  margin: 0;
  overflow: hidden;
}

.project-preview-trigger {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  cursor: zoom-in;
  display: block;
  height: auto;
  line-height: 0;
  margin: 0;
  padding: 0;
  width: 100%;
}

.project-thumb img {
  display: block;
  height: auto;
  max-width: 100%;
  width: 100%;
  opacity: 0.85;
}

.project-thumb img:hover { opacity: 1; }

.project-preview-trigger:focus-visible {
  outline: 2px solid #79C0FF;
  outline-offset: 2px;
}

.project-preview-dialog {
  background: transparent;
  border: none;
  margin: auto;
  max-height: none;
  max-width: none;
  padding: 0;
}

.project-preview-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  cursor: zoom-out;
}

.project-preview-dialog-body {
  display: inline-block;
  margin: 0;
  max-height: min(92vh, 100%);
  max-width: min(96vw, 100%);
  position: relative;
}

.project-preview-dialog-body img {
  border: 1px solid #30363D;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  display: block;
  height: auto;
  max-height: 92vh;
  max-width: 96vw;
  width: auto;
}

.project-preview-dialog-close-wrap {
  margin: 0;
  padding: 0;
  position: absolute;
  right: 0.6rem;
  top: 0.6rem;
  z-index: 1;
}

.project-preview-dialog-close {
  background: #161B22;
  border: 1px solid #30363D;
  border-radius: 4px;
  color: #8B949E;
  cursor: pointer;
  font-size: 2.2rem;
  height: 3.2rem;
  line-height: 1;
  padding: 0;
  width: 3.2rem;
}

.project-preview-dialog-close:hover {
  background: #21262D;
  color: #CDD9E5;
}

.project-preview iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

@media (max-width: 700px) {
  .project-card--with-preview {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.75rem;
  }
  .project-card-media,
  .project-card--with-preview .project-card-body {
    grid-column: auto;
    grid-row: auto;
  }
}

/* === About page === */
.about-headline {
  color: #8B949E;
  font-size: 1.5rem;
  margin-top: 0.4rem;
  margin-bottom: 2.4rem;
}

.section-header-row {
  align-items: baseline;
  border-bottom: 1px solid #21262D;
  display: flex;
  justify-content: space-between;
  margin-top: 3.5rem;
  padding-bottom: 0.8rem;
}

.section-heading {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
  color: #6E7681;
}

.cv-download {
  color: #79C0FF;
  font-size: 1.2rem;
  text-decoration: none;
  white-space: nowrap;
}

.cv-download:hover { text-decoration: underline; }

.experience { margin-top: 2rem; }

.job {
  border-top: 1px solid #21262D;
  margin-bottom: 0;
  padding-top: 2.4rem;
  padding-bottom: 2.4rem;
}

.job:first-child {
  border-top: none;
}

.job-header {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.job-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 0.2rem;
  color: #E6EDF3;
}

.job-company {
  color: #8B949E;
  font-size: 1.4rem;
  margin: 0;
}

.job-meta {
  color: #6E7681;
  font-size: 1.2rem;
  margin: 0.4rem 0 0;
  white-space: nowrap;
}

.job p {
  color: #8B949E;
  font-size: 1.4rem;
}

.job ul { margin-top: 0.8rem; }

.job ul:not(.project-tags) li {
  list-style: none !important;
  margin-bottom: 0.4rem;
  padding-left: 1.6rem;
  text-indent: -1.6rem;
  color: #8B949E;
  font-size: 1.4rem;
}

.job ul:not(.project-tags) li::before {
  content: "- ";
  color: #484F58;
}

.job-skills { margin-top: 1.2rem; }

/* Mirror sidebar title offset (56px + 14px) for prompt row; desktop + mobile */
@media (min-width: 801px) {
  main {
    padding-top: 56px;
  }
}

/* === Mobile === */
@media (max-width: 800px) {
  .layout {
    flex-direction: column;
    padding: 0 24px;
    min-height: auto;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 32px 0 24px;
    border-right: none;
    border-bottom: 1px solid #21262D;
    margin-right: 0;
    margin-bottom: 8px;
    text-align: left;
  }

  .sidebar-top { align-items: flex-start; }

  .sidebar-photo-link img { width: 44px; height: 44px; }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 20px;
    margin-top: 20px;
  }

  .sidebar-footer {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    margin-top: 20px;
  }

  main { padding: 32px 0 60px; }
}
