/* Fonts are served from this site, so visiting it contacts no one else.
   Each font has one main file covering English and Romanian. The -latin-ext
   file is a fallback for other accented letters and only downloads if a page
   uses one. The two ranges never overlap, so no letter pulls in both files. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/cormorant-garamond.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0102-0103, U+0131, U+0152-0153, U+015E-015F, U+0162-0163, U+0218-021B, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-015D, U+0160-0161, U+0164-0217, U+021C-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/geist.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0102-0103, U+0131, U+0152-0153, U+015E-015F, U+0162-0163, U+0218-021B, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-015D, U+0160-0161, U+0164-0217, U+021C-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/geist-mono.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0102-0103, U+0131, U+0152-0153, U+015E-015F, U+0162-0163, U+0218-021B, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/geist-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-0101, U+0104-0130, U+0132-0151, U+0154-015D, U+0160-0161, U+0164-0217, U+021C-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  --bg: #0b0c0e;
  --text: #d4d7dc;
  --strong: #eef1f4;
  --bright: #e6e9ec;
  --soft: #c3c7cd;
  --body: #b4b9c0;
  --muted: #9aa0a8;
  --dim: #7c828a;
  --faint: #6b7179;
  --line: rgba(214, 220, 226, 0.12);
  --line-strong: rgba(214, 220, 226, 0.2);
  --red: #ca5556;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
}

@supports (color: oklch(0 0 0)) {
  :root {
    --red: oklch(0.6 0.15 22);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Type is in rem so it follows the reader's own text-size setting */

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

::selection {
  background: #c9ced4;
  color: var(--bg);
}

a {
  color: var(--bright);
  text-decoration: underline;
  text-decoration-color: rgba(230, 233, 236, 0.3);
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--bright);
  outline-offset: 4px;
  border-radius: 4px;
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* The light that follows the cursor; script.js moves --px and --py */

.light {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(480px circle at var(--px, 50vw) var(--py, 20vh), rgba(200, 215, 235, 0.1), transparent 60%);
}

/* Side padding grows to clear a notch or rounded corner */

.wrap {
  position: relative;
  z-index: 2;
  max-width: 47.5rem;
  margin: 0 auto;
  padding: 0 24px;
  padding-right: max(24px, env(safe-area-inset-right));
  padding-left: max(24px, env(safe-area-inset-left));
}

/* Nav */

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 28px 0;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--dim);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--bright);
}

.site-nav a:hover {
  color: #fff;
}

/* Chrome serif headline; script.js moves --mx so the shine follows the cursor.
   Browsers that cannot clip a background to text get a plain light name. */

.chrome {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--strong);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .chrome {
    background: linear-gradient(100deg, #8b929b 0%, #eef1f4 30%, #6b7179 50%, #ffffff 68%, #a3a9b1 100%);
    background-size: 200% 100%;
    background-position: calc(var(--mx, 0.5) * 100%) 50%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

/* Intro */

.intro {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 72px 0 64px;
}

.name {
  font-size: clamp(3.25rem, 9vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.01em;
}

.tagline {
  max-width: 36ch;
  font-size: 1.3125rem;
  line-height: 1.5;
  color: var(--soft);
}

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

.pill-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
  color: var(--soft);
  text-decoration: none;
}

.pill-link:hover {
  border-color: var(--bright);
  color: #fff;
}

/* At a glance */

.glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.glance > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 24px 24px 0;
}

.glance > div:last-child {
  padding-right: 0;
}

.glance dt {
  font-size: 0.8125rem;
  color: var(--dim);
}

.glance dd {
  margin: 0;
  color: var(--bright);
}

/* Sections */

section {
  padding: 72px 0 0;
}

section > h2,
.section-head h2 {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--strong);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
}

.row {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--body);
}

.empty {
  color: var(--dim);
}

.meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--dim);
}

/* Project filter */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter {
  all: unset;
  cursor: pointer;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--muted);
}

.filter[aria-pressed="true"] {
  border-color: var(--bright);
  background: var(--bright);
  color: var(--bg);
}

.filter:focus-visible {
  outline: 1px solid var(--bright);
  outline-offset: 3px;
}

/* Projects */

.project {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.project h3 {
  margin: 0;
  font-weight: 500;
  font-size: 1.1875rem;
  color: var(--strong);
}

.project p {
  max-width: 56ch;
  color: var(--body);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8125rem;
}

.tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(214, 220, 226, 0.08);
  color: var(--soft);
}

.tag-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(160, 60, 60, 0.14);
  color: #e2bcbc;
}

.dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

/* Education */

.entry {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.entry-main {
  display: flex;
  flex-direction: column;
}

.entry-title {
  font-weight: 500;
  color: var(--strong);
}

.entry-sub {
  color: var(--body);
}

/* Notes */

.notes {
  padding: 72px 0 0;
}

.notes h1 {
  margin-bottom: 12px;
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 1;
}

.notes-intro {
  max-width: 44ch;
  margin-bottom: 48px;
  color: var(--muted);
}

.note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.note h2 {
  margin: 0;
  font-weight: 500;
  font-size: 1.1875rem;
  color: var(--strong);
}

.note p {
  max-width: 60ch;
  color: var(--body);
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 96px;
  padding: 28px 0 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--faint);
}

.notes + .site-footer {
  margin-top: 72px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: #fff;
}

/* Fingers need bigger targets than a mouse does */

@media (pointer: coarse) {
  .site-nav a {
    margin: -12px -8px;
    padding: 12px 8px;
  }

  .pill-link {
    padding: 12px 18px;
  }

  .filter {
    padding: 10px 16px;
  }
}

/* Very narrow screens: small phones, folded phones, split view */

@media (max-width: 23rem) {
  .wrap {
    padding-right: max(16px, env(safe-area-inset-right));
    padding-left: max(16px, env(safe-area-inset-left));
  }

  .intro {
    padding: 48px 0 48px;
  }

  .name {
    font-size: clamp(2.5rem, 14vw, 3.25rem);
  }

  .tagline {
    font-size: 1.1875rem;
  }
}

/* Short and wide: a phone held sideways */

@media (max-height: 30rem) and (orientation: landscape) {
  .site-nav {
    padding: 16px 0;
  }

  .intro {
    padding: 32px 0 40px;
  }
}

/* Windows high-contrast and similar modes replace the palette */

@media (forced-colors: active) {
  .light {
    display: none;
  }

  .chrome {
    background: none;
    color: CanvasText;
  }

  .filter[aria-pressed="true"] {
    forced-color-adjust: none;
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }

  .dot {
    background: CanvasText;
  }
}

/* Paper: dark ink on white, no effects */

@media print {
  :root {
    --bg: #fff;
    --text: #111;
    --strong: #000;
    --bright: #000;
    --soft: #222;
    --body: #333;
    --muted: #444;
    --dim: #555;
    --faint: #555;
    --line: #ccc;
    --line-strong: #999;
    --red: #000;
  }

  * {
    filter: none !important;
  }

  body {
    min-height: 0;
    font-size: 11pt;
  }

  .light,
  .site-nav,
  .filters {
    display: none !important;
  }

  .wrap {
    max-width: none;
    padding: 0;
  }

  .chrome {
    background: none;
    color: #000;
  }

  .intro {
    padding: 0 0 24px;
  }

  section {
    padding-top: 28px;
  }

  .project,
  .note,
  .row,
  .glance > div {
    break-inside: avoid;
  }

  .tag,
  .tag-status {
    border: 1px solid var(--line-strong);
    background: none;
    color: #000;
  }

  .pill-link {
    padding: 0;
    border: 0;
  }

  .site-footer,
  .notes + .site-footer {
    margin-top: 32px;
    padding-bottom: 0;
  }

  a {
    text-decoration: none;
  }
}
