:root {
  --hero-black: #000;
}

html {
  scroll-padding-top: 82px;
}

.site-header {
  width: 100%;
  max-width: none;
  padding-inline: max(24px, calc((100% - 1320px) / 2));
  background: var(--hero-black);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .brand,
.site-header nav a,
.site-header .header-cta {
  color: #fff;
}

.site-header .header-cta {
  border-color: rgba(255, 255, 255, .8);
}

.site-header nav a:hover {
  color: var(--cyan);
}

.hero {
  position: relative;
  color: #fff;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(50% - 50vw);
  background: var(--hero-black);
}

.hero-lead {
  color: #aeb8c5;
}

.hero .button.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, .68);
}

.hero .button.ghost:hover {
  color: var(--ink);
  background: #fff;
}

.hero .button.primary {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
}

.hero .button.primary:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.hero-stats {
  border-color: #252525;
}

.hero-stats span {
  color: #8d99a8;
}

.hero-visual,
.portrait-frame {
  background: var(--hero-black);
}

.portrait-frame {
  overflow: visible;
}

.portrait-frame::after {
  display: none;
}

.portrait-frame img {
  -webkit-mask-image: radial-gradient(ellipse 72% 80% at 53% 46%, #000 56%, rgba(0, 0, 0, .78) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 80% at 53% 46%, #000 56%, rgba(0, 0, 0, .78) 72%, transparent 100%);
}

.corner {
  display: none;
}

.certificate-directory {
  margin-top: 64px;
  border-top: 1px solid var(--line);
}

.certificate-intro {
  display: grid;
  grid-template-columns: 160px 1fr .8fr;
  gap: 38px;
  padding: 42px 0 34px;
  align-items: start;
}

.certificate-intro > span,
.certificate-grid span {
  font: 500 10px var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.certificate-intro > span {
  color: var(--blue);
}

.certificate-intro h3 {
  font-size: 28px;
  line-height: 1.15;
}

.certificate-intro p {
  color: var(--muted);
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.certificate-grid a {
  min-height: 145px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  color: var(--ink);
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background .2s, color .2s;
}

.certificate-grid a:hover {
  color: #fff;
  background: var(--blue);
}

.certificate-grid b {
  font-size: 16px;
  line-height: 1.35;
}

.certificate-grid span {
  color: var(--muted);
}

.certificate-grid a:hover span {
  color: rgba(255, 255, 255, .75);
}

.photo-section {
  color: #fff;
  background: #050b13;
}

.education-section {
  background: #dfe7e3;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.education-card {
  min-height: 450px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-top: 3px solid var(--blue);
}

.education-card:last-child {
  border-color: var(--cyan);
}

.education-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font: 500 10px var(--mono);
  letter-spacing: .08em;
}

.education-mark {
  width: 74px;
  height: 74px;
  margin: 60px 0 35px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font: 500 16px var(--mono);
}

.education-card:last-child .education-mark {
  color: var(--ink);
  background: var(--cyan);
}

.education-type {
  margin-bottom: 9px;
  color: var(--blue);
  font: 500 10px var(--mono);
  letter-spacing: .09em;
}

.education-card h3 {
  margin-bottom: 6px;
  font-size: 34px;
  letter-spacing: -.035em;
}

.education-card > p:not(.education-type) {
  color: var(--muted);
}

.education-result {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.education-result span {
  color: var(--muted);
  font: 500 10px var(--mono);
  text-transform: uppercase;
}

.education-result strong {
  font-size: 34px;
  line-height: 1;
}

.photo-section .section-heading > span {
  color: var(--cyan);
}

.photo-section .section-heading p {
  color: #91a0b0;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.photo-card {
  position: relative;
  min-height: 320px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #0b1522;
  color: #fff;
  cursor: pointer;
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
  object-fit: cover;
  transition: transform .45s ease;
}

.photo-card:hover img {
  transform: scale(1.035);
}

.photo-card span {
  position: absolute;
  inset: auto 0 0;
  padding: 50px 22px 20px;
  text-align: left;
  font: 500 11px var(--mono);
  background: linear-gradient(transparent, rgba(0, 0, 0, .82));
}

.photo-empty {
  grid-column: 1 / -1;
  min-height: 260px;
  padding: 55px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid #253142;
  background: radial-gradient(circle at 80% 20%, rgba(53, 231, 197, .12), transparent 30%), #09121f;
}

.photo-empty span {
  color: var(--cyan);
  font: 500 10px var(--mono);
  letter-spacing: .1em;
}

.photo-empty h3 {
  margin: 14px 0 5px;
  font-size: 28px;
}

.photo-empty p {
  margin: 0;
  color: #91a0b0;
}

#photo-dialog {
  width: min(1100px, calc(100% - 30px));
  max-height: 92vh;
  background: #02060b;
}

#photo-dialog figure {
  margin: 0;
  padding: 18px;
}

#photo-dialog img {
  width: 100%;
  max-height: 78vh;
  display: block;
  object-fit: contain;
}

#photo-dialog figcaption {
  padding: 14px 5px 2px;
  color: #c2ccd7;
  font: 500 11px var(--mono);
}

.photo-dialog-close {
  position: absolute;
  z-index: 2;
  top: 28px;
  right: 28px;
  width: 42px;
  height: 42px;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, .82);
  font-size: 25px;
  cursor: pointer;
}

@media (min-width: 901px) {
  .terminal-card {
    left: -285px;
  }
}

@media (max-width: 620px) {
  .site-header {
    width: 100%;
    padding-inline: 14px;
  }

  .hero h1 {
    font-size: clamp(48px, 14vw, 62px);
  }

  .portrait-frame img {
    -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
  }

  .certificate-intro,
  .certificate-grid,
  .photo-grid,
  .education-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 621px) and (max-width: 900px) {
  .certificate-intro {
    grid-template-columns: 1fr;
  }

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

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

/* Dark section system: small tonal shifts keep long pages easy to scan. */
body {
  color: #edf3f8;
  background: #08111c;
}

#expertise,
.journey,
.archive-section {
  color: #edf3f8;
  background: #08111c;
}

#expertise .section-heading p,
.journey .section-heading p,
.archive-section .section-heading p,
.timeline-item p,
.certificate-intro p,
.expertise-card p {
  color: #91a0b0;
}

.expertise-grid,
.timeline,
.timeline-item,
.certificate-directory,
.certificate-grid {
  border-color: #28384a;
}

.expertise-card {
  color: #edf3f8;
  background: #0b1624;
  border-color: #28384a;
}

.expertise-card:hover {
  background: #101e2e;
}

.expertise-card.featured {
  background: #0e1c2c;
}

.timeline-item::before {
  background: #08111c;
}

.cert-strip {
  color: #edf3f8;
  background: #0f1c2b;
}

.education-section {
  color: #edf3f8;
  background: #0b1624;
}

.education-card {
  color: #edf3f8;
  background: #101d2c;
}

.education-card > p:not(.education-type),
.education-meta,
.education-result span {
  color: #94a3b3;
}

.education-result {
  border-color: #2a3b4e;
}

.notes-section {
  color: #edf3f8;
  background: #0d1927;
}

.article-grid {
  background: #2b3b4c;
  border-color: #2b3b4c;
}

.article-card {
  color: #edf3f8;
  background: #101d2c;
}

.article-card:hover {
  background: #152538;
}

.article-card p {
  color: #94a3b3;
}

.certificate-grid a {
  color: #edf3f8;
  background: #0c1826;
  border-color: #29394c;
}

.certificate-grid a:hover {
  background: #173861;
}

dialog {
  color: #edf3f8;
  background: #0c1724;
}

#article-content {
  color: #dce5ee;
}

#article-content h1,
#article-content h2,
#article-content h3,
#article-content h4 {
  color: #fff;
}

.article-card {
  text-decoration: none;
}
