:root {
  --ink: #ffffff;
  --muted: #e0e0e0;
  --soft: #9c9c9c;
  --line: rgba(255, 255, 255, 0.58);
  --faint-line: rgba(255, 255, 255, 0.18);
  --glass: rgba(8, 8, 8, 0.72);
  --accent: #aa2c18;
  --accent-soft: #ffa192;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #080808 url("../img/painting-bg.jpg") center / cover fixed no-repeat;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.76)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 92px 92px, 92px 92px;
  opacity: 0.8;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 4.6rem;
  padding: 0 clamp(1.4rem, 5vw, 4.6rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #000000;
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  letter-spacing: 0;
  color: var(--ink);
}

.nav {
  gap: clamp(1.1rem, 2.4vw, 2rem);
  padding: 0;
  background: transparent;
}

.nav a {
  padding: 1.65rem 0;
  color: rgba(255, 255, 255, 0.78);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 400;
  text-align: center;
  transition: background 180ms ease, color 180ms ease;
}

.nav a:hover,
.nav a.active {
  color: #ffffff;
  background: transparent;
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  min-height: 100vh;
  padding: clamp(6rem, 11vw, 9rem) 0;
  scroll-margin-top: 5rem;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(18rem, 0.82fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.intro-copy,
.portrait-window,
.education-layout,
.contact-layout,
.timeline article,
.project-card {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.intro-copy {
  padding: clamp(1.4rem, 4vw, 3rem);
  border-radius: 0;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

h1 {
  max-width: 12ch;
  margin-bottom: 1rem;
  font-size: clamp(2.6rem, 5.8vw, 5.1rem);
  line-height: 1.02;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1;
}

h3 {
  margin-bottom: 0.55rem;
}

.lead {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.8;
}

.skill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 2rem;
}

.skill-row span {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.65rem 0.85rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
}

.portrait-window {
  overflow: hidden;
  border-radius: 0;
}

.portrait-window img {
  width: 100%;
  height: min(62vh, 38rem);
  object-fit: cover;
}

.window-caption {
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
  border-top: 1px solid var(--line);
}

.window-caption span {
  color: var(--muted);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.education-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  align-items: stretch;
  overflow: hidden;
  border-radius: 0;
}

.education-layout img {
  width: 100%;
  height: 100%;
  min-height: 24rem;
  object-fit: cover;
}

.education-layout .education-logo {
  align-self: center;
  justify-self: center;
  width: min(82%, 34rem);
  height: auto;
  min-height: 0;
  padding: clamp(1.2rem, 4vw, 3rem);
  object-fit: contain;
}

.education-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1.4rem, 4vw, 3rem);
}

.education-copy span {
  color: var(--accent-soft);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

.education-copy h3 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.education-copy p {
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.project-card {
  overflow: hidden;
  border-radius: 0;
  transition: translate 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  translate: 0 -0.35rem;
  border-color: var(--accent-soft);
}

.project-card img {
  width: 100%;
  aspect-ratio: 1.22;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.82);
  transition: filter 180ms ease;
}

.project-card:hover img {
  filter: grayscale(0.35) contrast(1.08) brightness(0.9);
}

.project-card div {
  padding: 1.2rem;
}

.project-card p,
.timeline span {
  margin-bottom: 0.55rem;
  color: var(--accent-soft);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
}

.project-card span,
.timeline p,
.timeline li,
.contact-layout p {
  color: var(--muted);
  line-height: 1.65;
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 0;
}

.contact-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
}

.contact-list a {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--faint-line);
  transition: background 180ms ease, color 180ms ease;
}

.contact-list a:last-child {
  border-bottom: 0;
}

.contact-list a:hover {
  color: #080808;
  background: var(--ink);
}

.contact-list span {
  color: var(--accent-soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.contact-list a:hover span {
  color: var(--accent);
}

.contact-list strong {
  overflow-wrap: anywhere;
  font-weight: 400;
}

button,
.resume-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2.9rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.85rem 1.15rem;
  color: #080808;
  background: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 180ms ease, color 180ms ease;
}

button:hover,
.resume-link:hover {
  color: var(--ink);
  background: var(--accent);
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline article {
  display: grid;
  grid-template-columns: 10rem 1fr;
  align-items: start;
  gap: 1.4rem;
  padding: 1.2rem;
  border-radius: 0;
}

.timeline article:has(.resume-logo-frame) {
  grid-template-columns: 10rem minmax(5rem, 7.5rem) 1fr;
}

.resume-logo-frame {
  display: grid;
  min-height: 5.4rem;
  place-items: center;
  border: 1px solid var(--faint-line);
  background: rgba(255, 255, 255, 0.92);
}

.resume-logo-frame img {
  width: min(82%, 5.8rem);
  max-height: 4.4rem;
  object-fit: contain;
}

.timeline ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding-left: 1.1rem;
}

.timeline li {
  padding-left: 0.15rem;
}

.resume-place {
  margin-bottom: 0.8rem;
  color: var(--accent-soft);
  font-weight: 700;
}

.resume-link {
  margin-top: 1.2rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #080808;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 820px) {
  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header {
    min-height: auto;
    padding-block: 1rem;
  }

  .brand {
    justify-content: center;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  .nav a {
    min-width: 0;
    padding: 0.8rem 0.45rem;
  }

  .intro,
  .education-layout,
  .project-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 9ch;
  }

  .section {
    min-height: auto;
  }

  .timeline article {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .resume-logo-frame {
    width: min(8rem, 100%);
  }
}

@media (max-width: 520px) {
  main {
    width: min(100% - 1rem, 1180px);
  }

  .nav a {
    font-size: 0.88rem;
  }

  h1 {
    font-size: 2.7rem;
  }
}
