/* Portfolio styles: layout, responsive rules, demo and gallery. */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --ink: #152033;
  --muted: #68758a;
  --blue: #1764d9;
  --line: #dce2ea;
  --paper: #f7f9fc;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans',sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

button,a,summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,button:focus-visible,summary:focus-visible {
  outline: 3px solid #388cfc;
  outline-offset: 5px;
}

.skip {
  position: fixed;
  left: 16px;
  top: -100px;
  background: white;
  padding: 10px;
  z-index: 10;
}

.skip:focus {
  top: 16px;
}

aside {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 340px;
  background: #121720;
  color: #f4f7ff;
  padding: 40px 38px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand span {
  font-family: monospace;
  font-size: 26px;
  color: #7dd3fc;
}

.brand b {
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 500;
}

.identity {
  margin-top: 70px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--blue);
}

aside .eyebrow {
  color: #8695aa;
}

h1,h2,h3,h4 {
  font-family: 'Space Grotesk',sans-serif;
  line-height: 1.2;
}

h1 {
  font-size: 62px;
  letter-spacing: -3px;
  margin: 20px 0;
}

h1 span {
  color: #7dd3fc;
}

.role {
  font-size: 16px;
  color: #d1d9e5;
}

.intro {
  font-size: 14px;
  line-height: 1.8;
  color: #8997ac;
  margin-top: 22px;
}

nav {
  display: grid;
  gap: 7px;
  margin: 35px 0;
}

nav a {
  padding: 9px 0;
  font-size: 14px;
  color: #98a6ba;
  transition: color .2s;
}

nav a span {
  font-family: monospace;
  font-size: 12px;
  margin-right: 16px;
  color: #5d6c81;
}

nav a:hover,nav a.active {
  color: #7dd3fc;
}

.aside-bottom {
  margin-top: auto;
  border-top: 1px solid #2b3340;
  padding-top: 23px;
}

.aside-bottom>span {
  font-family: monospace;
  font-size: 11px;
  letter-spacing: 1px;
  color: #8a9aaf;
}

.aside-bottom p {
  font-size: 13px;
  color: #8997ac;
}

.resume-link {
  font-size: 14px;
  border-bottom: 1px solid #7dd3fc;
  padding-bottom: 5px;
}

main {
  margin-left: 340px;
  padding: 0 70px;
  max-width: 1600px;
}

header {
  height: 92px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
}

section {
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.about {
  padding-top: 74px;
}

.about h2 {
  font-size: clamp(36px,4vw,60px);
  letter-spacing: -2px;
  margin: 20px 0 25px;
  font-weight: 500;
}

.about h2>span {
  color: #78859a;
}

.about>p {
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
  margin-top: 42px;
}

.about-grid small,.contact small {
  font-family: monospace;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
}

.about-grid p {
  margin: 7px 0 0;
  font-size: 14px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.section-heading h2 {
  font-size: 35px;
  letter-spacing: -1px;
  margin: 12px 0 0;
  font-weight: 500;
}

.section-heading h2 span {
  color: var(--blue);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.project {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 32px 0;
  display: grid;
  grid-template-columns: 45px 1fr;
  gap: 12px;
}

.project-number {
  font-family: monospace;
  color: #97a2b3;
  font-size: 14px;
  padding-top: 3px;
}

.tag {
  font-size: 11px;
  font-family: monospace;
  color: var(--blue);
  letter-spacing: 1px;
}

.project h3 {
  font-size: 26px;
  letter-spacing: -.5px;
  margin: 12px 0;
}

.project-content>p {
  max-width: 570px;
  color: var(--muted);
  margin: 0;
  font-size: 15px;
}

.project-type {
  position: absolute;
  right: 0;
  top: 38px;
  font-family: monospace;
  font-size: 11px;
  color: #8793a4;
}

.tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.tech span {
  font-family: monospace;
  font-size: 12px;
  background: #eaf0f8;
  padding: 5px 10px;
  border-radius: 4px;
  color: #4c6586;
}

summary {
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  display: flex;
  gap: 25px;
  align-items: center;
  width: fit-content;
}

summary::-webkit-details-marker {
  display: none;
}

summary span {
  color: var(--blue);
  font-size: 20px;
}

details[open] summary span {
  transform: rotate(45deg);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background: #eef3fa;
  padding: 22px;
  margin-top: 15px;
  border-left: 2px solid var(--blue);
}

.detail-grid h4 {
  font-size: 15px;
  margin: 0 0 8px;
}

.detail-grid p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.experience-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 25px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.period {
  font-family: monospace;
  color: var(--muted);
  font-size: 11px;
  padding-top: 5px;
}

.experience-row h3 {
  font-size: 21px;
  margin: 0 0 8px;
  font-weight: 500;
}

.company {
  font-size: 14px;
  color: var(--blue);
}

.experience-row p {
  font-size: 15px;
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 0;
}

button {
  border: 1px solid #c7d2e3;
  background: transparent;
  color: var(--ink);
  border-radius: 5px;
  padding: 10px 15px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

button:hover {
  background: #e7eef8;
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.resume-grid h3 {
  font-size: 19px;
  font-weight: 500;
  margin: 0 0 25px;
}

.resume-grid h4 {
  font: 500 15px 'DM Sans',sans-serif;
  margin: 15px 0 5px;
}

.resume-grid p {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 8px;
}

.contact {
  margin-top: 35px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.contact p {
  color: var(--muted);
  font-size: 14px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 0;
  font-size: 12px;
  color: var(--muted);
}

footer a {
  color: var(--blue);
}

@media (min-width:1600px) {
  main {
    margin-right: auto;
  }
}

@media (max-width:1100px) {
  aside {
    width: 280px;
    padding: 30px;
  }
  .identity {
    margin-top: 45px;
  }
  h1 {
    font-size: 53px;
  }
  main {
    margin-left: 280px;
    padding: 0 40px;
  }
  .project-type {
    display: none;
  }
  .experience-row {
    grid-template-columns: 135px 1fr;
  }
}

@media (max-width:760px) {
  aside {
    position: relative;
    width: auto;
    padding: 25px;
  }
  .identity {
    margin-top: 35px;
  }
  h1 {
    font-size: 48px;
  }
  h1 br {
    display: none;
  }
  h1 br:after {
    content: ' ';
  }
  .identity .intro {
    max-width: 450px;
  }
  .identity h1 {
    white-space: normal;
  }
  nav {
    grid-template-columns: 1fr 1fr;
    margin: 25px 0 0;
    gap: 4px;
  }
  .aside-bottom {
    display: none;
  }
  main {
    margin-left: 0;
    padding: 0 24px;
  }
  header {
    height: 65px;
  }
  .edition {
    display: none;
  }
  section {
    padding: 44px 0;
  }
  .about {
    padding-top: 44px;
  }
  .about h2 {
    font-size: 40px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .section-heading {
    align-items: start;
    flex-wrap: wrap;
  }
  .section-heading>.muted {
    display: none;
  }
  .project {
    grid-template-columns: 28px 1fr;
  }
  .project h3 {
    font-size: 23px;
  }
  .experience-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .resume-grid,.detail-grid {
    grid-template-columns: 1fr;
  }
  footer {
    flex-wrap: wrap;
  }
  footer>span:nth-child(2) {
    display: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

@media print {
  aside,header,button,footer,.skip {
    display: none;
  }
  main {
    margin: 0;
    padding: 0;
  }
  body {
    background: white;
    color: black;
    font-size: 11pt;
  }
  section {
    padding: 20px 0;
    break-inside: avoid;
  }
  .about h2 {
    font-size: 30px;
  }
  .section-heading h2 {
    font-size: 24px;
  }
  details {
    display: none;
  }
  .project {
    break-inside: avoid;
  }
  .tech span {
    background: transparent;
    border: 1px solid #ccc;
  }
  .about-grid {
    grid-template-columns: repeat(3,1fr);
  }
}

.identity h1 {
  font-size: 42px;
  letter-spacing: -1.7px;
  line-height: 1.15;
}

.identity {
  margin-top: 48px;
}

.section-intro {
  color: var(--muted);
  font-size: 15px;
  max-width: 680px;
  margin: 0 0 25px;
}

.project-content>p {
  max-width: 680px;
}

.experience-points {
  padding-left: 20px;
  font-size: 15px;
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 0;
}

.experience-points li+li {
  margin-top: 8px;
}

.resume-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.download-button {
  display: inline-block;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 13px;
  line-height: 1.65;
}

.download-button:hover {
  background: #1252b5;
}

.resume-grid h4:not(:first-of-type) {
  margin-top: 24px;
}

.contact a {
  color: var(--blue);
  font-size: 16px;
}

.aside-bottom>span {
  font-size: 10px;
  letter-spacing: .7px;
}

.aside-bottom p a {
  overflow-wrap: anywhere;
}

@media (max-width:1100px) {
  .identity h1 {
    font-size: 34px;
  }
  .identity {
    margin-top: 35px;
  }
  .role {
    font-size: 15px;
  }
}

@media (max-width:760px) {
  .identity h1 {
    font-size: 40px;
  }
  .identity h1 br {
    display: block;
  }
  .section-heading h2 {
    font-size: 32px;
  }
  .resume-actions {
    margin-top: 4px;
  }
  .about h2 {
    font-size: clamp(32px,7vw,40px);
  }
}

@media print {
  .resume-actions {
    display: none;
  }
  .experience-points {
    font-size: 10pt;
  }
  .contact a {
    color: black;
  }
  .section-intro {
    font-size: 10pt;
  }
}

.project-status {
  display: inline-block;
  color: #52657f;
  background: #eaf0f8;
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 15px;
}

.internship-details {
  margin-top: 24px;
}

.module-list {
  margin-top: 20px;
}

.internship-module {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}

.module-title {
  font-size: 20px;
  letter-spacing: -.4px;
  margin: 12px 0;
}

.experience-row .internship-module p {
  margin-top: 0;
}

.internship-module .tag {
  font-size: 11px;
}

.internship-module .detail-grid {
  grid-template-columns: 1fr;
}

.internship-details>summary {
  font-weight: 500;
}

aside {
  overflow-y: auto;
}

@media print {
  details.internship-details {
    display: block;
  }
  .internship-details>summary {
    display: none;
  }
  .internship-module {
    break-inside: avoid;
  }
  .internship-module details {
    display: none;
  }
}

.download-button,.download-button:visited {
  background-color: #174ea6;
  color: #ffffff;
  border-color: #174ea6;
  font-weight: 600;
  min-height: 42px;
  box-shadow: 0 2px 5px #174ea622;
}

.download-button:hover {
  background-color: #103b80;
  color: #ffffff;
  border-color: #103b80;
}

.resume-link {
  display: inline-block;
  padding: 9px 14px;
  background: #7dd3fc;
  color: #121720;
  border: 1px solid #7dd3fc;
  border-radius: 5px;
  font-weight: 600;
}

.resume-link:hover {
  background: #bae6fd;
  color: #121720;
}

.project-demo {
  margin: 24px 0;
}

.project-demo video {
  display: block;
  width: 100%;
  max-height: 480px;
  background: #121720;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-demo figcaption {
  margin-top: 9px;
  font-size: 13px;
  color: var(--muted);
}

@media print {
  .project-demo {
    display: none;
  }
}

.project-demo[hidden] {
  display: none;
}

.demo-toggle {
  color: #174ea6;
  border-color: #174ea6;
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 20px;
}

.demo-toggle:hover {
  background: #e6efff;
}

@media print {
  .demo-toggle {
    display: none;
  }
}

.screenshot-gallery {
  margin: 8px 0 22px;
}

.screenshot-gallery>summary {
  border: 1px solid #174ea6;
  border-radius: 5px;
  padding: 10px 15px;
  color: #174ea6;
  font-weight: 600;
}

.screenshot-gallery>summary:hover {
  background: #e6efff;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 22px;
  margin-top: 24px;
}

.screenshot-grid figure {
  margin: 0;
  min-width: 0;
}

.screenshot-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #121720;
  cursor: zoom-in;
}

.screenshot-open img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: contain;
}

.screenshot-grid figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.screenshot-grid figcaption strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.screenshot-grid figcaption span {
  display: block;
}

.image-preview {
  border: 0;
  border-radius: 10px;
  padding: 16px;
  background: #121720;
  color: white;
  max-width: 95vw;
  max-height: 95vh;
}

.image-preview::backdrop {
  background: #070c14dd;
}

.image-preview img {
  display: block;
  max-width: 85vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  margin: auto;
}

.image-preview form {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.image-preview button {
  color: white;
  border-color: #657185;
}

.image-preview p {
  margin: 12px 0 0;
  font-size: 14px;
}

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

@media (max-width:760px) {
  .screenshot-grid {
    grid-template-columns: 1fr;
  }
  .screenshot-open img {
    height: auto;
    max-height: 300px;
  }
}

@media print {
  .screenshot-gallery,.image-preview {
    display: none;
  }
}
