:root {
  color-scheme: dark;
  background: #0b0d0d;
  color: #ecf2ff;
  font-family: 'DM Sans', system-ui, sans-serif;
  --content-width: 1136px;
  --page-gutter: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body { min-height: 100svh; isolation: isolate; }

#dot-grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.container {
  width: min(var(--content-width), calc(100% - var(--page-gutter) * 2));
  margin-inline: auto;
  min-width: 0;
}

main { min-height: calc(100svh - 58px); }

html { scroll-behavior: smooth; scroll-padding-top: 30px; }
.projects-section { padding-block: 40px 100px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 32px; }
.eyebrow { margin: 0; color: #82bfff; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; font-weight: 600; }
.section-heading h2, .project-story h2 { margin: 10px 0 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -.04em; }
.section-count { color: #8b8e88; font-size: 12px; white-space: nowrap; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.project-card { min-width: 0; display: flex; flex-direction: column; color: inherit; background: #111617; border: 1px solid #273033; text-decoration: none; transition: border-color 180ms, transform 180ms; }
.project-card:hover { border-color: #65b8ff; transform: translateY(-4px); }
.project-card:focus-visible, .back-link:focus-visible, .next-project:focus-visible { outline: 2px solid #65b8ff; outline-offset: 5px; }
.project-image { position: relative; margin: 12px 12px 0; aspect-ratio: 1.5; overflow: hidden; background: #0a1018; }
.project-image img { width: 100%; height: 100%; object-fit: cover; }
.project-number { position: absolute; top: 10px; left: 10px; padding: 5px 8px; background: #0b0d0deb; color: #d4eaff; font-size: 11px; }
.project-card-body { display: flex; flex-direction: column; flex: 1; padding: 24px 20px 20px; }
.project-card h3 { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0; font-size: 23px; letter-spacing: -.035em; }
.project-card h3 span { color: #65b8ff; }
.project-card-body > p:not(.eyebrow) { margin: 0 0 28px; color: #a1abab; line-height: 1.7; font-size: 14px; }
.project-card-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between; margin-top: auto; padding-top: 18px; border-top: 1px solid #273033; font-size: 11px; }
.draft-label { color: #9aa7b1; font-size: 11px; }
.project-placeholder { height: 100%; min-height: 220px; display: grid; place-items: center; padding: 30px; background: radial-gradient(ellipse at center, #12324d, #0b1119 70%); }
.project-placeholder span { color: #7cb8ef; font-size: clamp(12px, 1.5vw, 19px); letter-spacing: .06em; text-align: center; }
.project-intro { padding-block: 64px 42px; }
.back-link { color: #a1abab; text-decoration: none; font-size: 13px; }
.back-link:hover { color: #65b8ff; }
.project-meta { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; margin-top: 64px; }
.project-intro h1 { font-size: clamp(40px, 7vw, 80px); line-height: 1.1; letter-spacing: -.055em; margin: 22px 0; overflow-wrap: anywhere; }
.project-lead { color: #aebabb; font-size: clamp(18px, 2vw, 23px); line-height: 1.6; max-width: 680px; }
.project-cover { margin: 0; }
.project-dashboard iframe { display: block; width: 100%; height: clamp(600px, 82svh, 960px); border: 1px solid #273033; background: #0b0d0d; box-sizing: border-box; }
.project-cover > img { display: block; width: 100%; max-height: 680px; object-fit: contain; background: #111617; border: 1px solid #273033; }
.project-cover .project-placeholder { min-height: 380px; }
.project-cover figcaption { color: #889496; font-size: 12px; margin-top: 12px; line-height: 1.6; }
.project-story { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; padding-block: 80px 48px; }
.project-story p:not(.eyebrow) { margin: 0 0 18px; color: #b4bec0; line-height: 1.8; }
.project-story .content-note { font-size: 13px; color: #819094 !important; }
.project-outline { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; }
.project-outline > div { border-top: 1px solid #34414a; padding-top: 24px; }
.project-outline h3 { font-size: 20px; font-weight: 500; }
.project-outline p { font-size: 14px; color: #889496; line-height: 1.7; }
.source-link { color: #82bfff; font-size: 13px; text-underline-offset: 4px; }
.source-link:hover { color: #c1e2ff; }
.project-demo { margin-top: 72px; }
.project-demo h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.04em; margin: 14px 0; }
.embed-container { margin-top: 24px; border: 1px solid #273033; padding: 32px; background: #111617; text-align: center; }
.embed-container .projects-button { margin-top: 0; cursor: pointer; border: 0; font-family: inherit; }
.embed-container p { font-size: 13px; line-height: 1.7; color: #889496; }
.embed-container:has(iframe) { padding: 0; }
.embed-container iframe { display: block; width: 100%; height: clamp(500px, 75vh, 850px); border: 0; background: #fff; }
.next-project { display: flex; flex-direction: column; gap: 16px; border-block: 1px solid #273033; margin-top: 80px; padding-block: 36px; color: #edf0e9; text-decoration: none; }
.next-project > span:last-child { display: flex; justify-content: space-between; font-size: clamp(24px, 4vw, 40px); letter-spacing: -.03em; }
.next-project:hover { color: #65b8ff; }
.site-footer { padding-block: 36px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; font-size: 12px; color: #889496; }

.about-section { padding-block: 12px 100px; }
.about-panel { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); border: 1px solid #273033; background: #111617; }
.about-portrait { min-width: 0; background: #202423; border-right: 1px solid #273033; }
.about-portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.about-content { min-width: 0; padding: clamp(24px, 4vw, 48px); }
.about-content h3 { margin: 14px 0 24px; font-size: clamp(28px, 3.3vw, 40px); line-height: 1.15; letter-spacing: -.04em; }
.about-content > p:not(.eyebrow), .about-opportunity > p:not(.eyebrow) { font-size: 15px; line-height: 1.8; color: #aebabb; margin: 0 0 16px; }
.about-content > .about-introduction { color: #e0e7e6 !important; font-size: 18px !important; line-height: 1.7 !important; }
.about-tools { border-top: 1px solid #273033; margin-top: 28px; padding-top: 24px; }
.about-tools h4 { color: #889496; font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 14px; }
.about-tools ul { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.about-tools li { padding: 7px 12px; color: #b7dbff; border: 1px solid #304658; background: #14202a; font-size: 13px; }
.about-skills-summary { color: #aebabb; font-size: 14px; line-height: 1.7; margin: 0 0 16px; }

.contact-section { padding-block: 12px 100px; }
.contact-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; gap: clamp(28px,5vw,64px); }
.contact-links > p { margin: 0 0 28px; max-width: 340px; color: #aebabb; font-size: 16px; line-height: 1.8; }
.contact-links > a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 24px; border-bottom: 1px solid #273033; text-decoration: none; color: #edf0e9; }
.contact-links > a > span:first-child { font-size: clamp(22px,2.5vw,30px); letter-spacing: -.035em; }
.contact-links > a > span:last-child { color: #8eaaBE; font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.contact-links > a:hover, .contact-links > a:hover > span { color: #65b8ff; }
.contact-terminal { min-width: 0; border: 1px solid #34414a; background: #101617; box-shadow: 4px 4px 0 #202b30; font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 13px; }
.terminal-bar { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 1px solid #273033; font-size: 11px; color: #97aab4; }
.terminal-lights { display: flex; gap: 6px; }
.terminal-lights i { width: 7px; height: 7px; border-radius: 50%; background: #35434a; }
.terminal-lights i:first-child { background: #65b8ff; }
.terminal-body { height: 310px; padding: 22px 18px; overflow-y: auto; scrollbar-color: #344c60 transparent; }
#terminal-output p { margin: 0 0 14px; line-height: 1.8; color: #c4d0d5; overflow-wrap: anywhere; white-space: pre-wrap; }
.terminal-highlight, #terminal-output a { color: #82bfff; }
#terminal-output a { text-underline-offset: 4px; }
#terminal-form { display: flex; align-items: baseline; gap: 10px; }
#terminal-prompt { white-space: nowrap; color: #65b8ff; }
#terminal-input { min-width: 0; width: 100%; border: none; border-radius: 0; outline: none; background: transparent; color: #edf0e9; font: inherit; line-height: 2; caret-color: #65b8ff; }
#terminal-input::placeholder { color: #697d88; }
#terminal-form:focus-within { box-shadow: 0 1px 0 #47677d; }
.terminal-enter { border: 0; padding: 4px 8px; background: transparent; color: #82bfff; cursor: pointer; font-size: 18px; }
.terminal-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-top: 1px solid #273033; }
.terminal-actions button { padding: 10px 12px; border: 1px solid #34414a; background: transparent; color: #bdcbd1; font: inherit; font-size: 11px; cursor: pointer; min-height: 40px; }
.terminal-actions button:first-child { background: #dcecff; color: #0b0d0d; border-color: #dcecff; }
.terminal-actions button:hover { background: #24415a; color: #fff; border-color: #65b8ff; }
.contact-section a:focus-visible, .contact-section button:focus-visible { outline: 2px solid #65b8ff; outline-offset: 4px; }
.terminal-fallback { padding: 16px; line-height: 1.8; }
.terminal-help { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px 20px; margin: 16px 0 22px; align-items: baseline; line-height: 1.6; }
.terminal-help button { padding: 0; border: 0; background: none; color: #82bfff; text-decoration: underline dotted; text-underline-offset: 4px; font: inherit; text-align: left; cursor: pointer; }
.terminal-help span { color: #aebabb; font-size: 12px; }
.terminal-game { display: grid; grid-template-columns: repeat(3,44px); gap: 6px; margin-block: 16px; }
.terminal-game button { width: 44px; height: 44px; border: 1px solid #34414a; background: #162027; color: #9aaebb; cursor: pointer; font: inherit; }
.terminal-game button:not(:disabled):hover { border-color: #82bfff; background: #24415a; }
.terminal-game button[data-player="X"] { color: #82bfff; }
.terminal-game button[data-player="O"] { color: #edf0e9; }
.terminal-game button:disabled { cursor: default; }
@media (max-width: 800px) { .contact-layout { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .contact-links > a { flex-wrap: wrap; gap: 8px; } #terminal-form { gap: 6px; } .terminal-body { padding-inline: 12px; } }

@media (max-width: 800px) {
  .about-panel { grid-template-columns: 1fr; }
  .about-portrait { border-right: 0; border-bottom: 1px solid #273033; }
  .about-portrait img { max-height: 460px; object-position: center 40%; }
}

@media (max-width: 960px) {
  .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .project-grid, .project-story, .project-outline { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .project-story { gap: 28px; padding-top: 48px; }
  .project-intro { padding-top: 40px; }
  .project-meta { margin-top: 40px; }
}

img, video, svg { max-width: 100%; height: auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 15px;
  min-height: 58px;
}

.site-header a {
  color: #8b8e88;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.7;
  text-transform: uppercase;
  transition: color 160ms ease;
}

.site-header .site-name,
.site-header .social-link { color: #edf0e9; }

.site-name { flex-shrink: 0; }

.site-header nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-header a:hover { color: #65b8ff; }

.site-header a:focus-visible {
  outline: 2px solid #65b8ff;
  outline-offset: 6px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero {
  padding-block: clamp(88px, 12vw, 144px) 64px;
}

.hero h1 {
  margin: 0;
  color: #edf0e9;
  font-size: clamp(44px, 6.3vw, 76px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.hero-period { color: #65b8ff; }

.hero-description {
  margin: 30px 0 0;
  color: #d4d8d1;
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: -0.02em;
}

.hero-description a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #616b72;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.hero-description .hero-university { color: #65b8ff; }
.hero-description a:hover { color: #a5d6ff; text-decoration-color: currentColor; }

.projects-button {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  min-height: 50px;
  margin-top: 34px;
  padding: 14px 24px;
  background: #edf0e9;
  color: #0b0d0d;
  box-shadow: 4px 4px 0 #353b38;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.projects-button:hover {
  background: #a5d6ff;
  box-shadow: 4px 4px 0 #254d70;
}

.hero-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 36px;
}

.hero-socials a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #8b8e88;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.hero-socials a:hover { color: #65b8ff; }

.hero a:focus-visible {
  outline: 2px solid #65b8ff;
  outline-offset: 6px;
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-block: 18px;
  }

  .site-header nav { flex-wrap: wrap; gap: 12px 20px; }
  .site-header a { font-size: 13px; letter-spacing: 0.1em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header a, .projects-button, .project-card { transition: none; }
  .project-card:hover { transform: none; }
}
