/* autor: Michal Řezníček */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* smooth scrolling */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #e6f1ff;
  background-color: #0a2540;
  /* blueprint grid */
  background-image:
    linear-gradient(#1e4a7b 1px, transparent 1px),
    linear-gradient(90deg, #1e4a7b 1px, transparent 1px),
    linear-gradient(#143864 1px, transparent 1px),
    linear-gradient(90deg, #143864 1px, transparent 1px);
  background-size:
    200px 200px,
    200px 200px,
    40px 40px,
    40px 40px;
  min-height: 100vh;
}

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

ul {
  list-style: none;
}

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


/* TYPOGRAPHY */
h1,
h2,
h3 {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  color: #9bb6d4;
  max-width: 35rem;
}

/* "// " prefix on section titles */
section>h2::before {
  content: "// ";
  color: #ffd166;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
}


/* LAYOUT */
main>section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1rem;
}


/* HEADER + NAVIGATION */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background-color: rgba(10, 37, 64, 0.85);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #2f6aa8;
}

.site-title {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 1rem;
  font-weight: 600;
  color: #e6f1ff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

/* [ name ] brackets around title */
.site-title::before {
  content: "[";
  color: #ffd166;
  transition: transform 0.2s, color 0.2s;
}

.site-title::after {
  content: "]";
  color: #ffd166;
  transition: transform 0.2s, color 0.2s;
}

.site-title:hover {
  color: #5fc9f8;
}

.site-title:hover::before {
  transform: translateX(-4px);
  color: #5fc9f8;
}

.site-title:hover::after {
  transform: translateX(4px);
  color: #5fc9f8;
}

.main-nav ul {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.main-nav.is-open ul {
  display: flex;
}

.nav-toggle {
  display: inline-block;
  background: transparent;
  border: 1px solid #2f6aa8;
  padding: 0.4rem 0.9rem;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: #ffd166;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav-toggle:hover {
  border-color: #ffd166;
  color: #e6f1ff;
}

.main-nav a {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.9rem;
  color: #9bb6d4;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: #e6f1ff;
  border-bottom-color: #ffd166;
  outline: none;
}


/* HERO */
.hero {
  position: relative;
  /* fill viewport minus header */
  min-height: calc(100vh - 6.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}

/* corners decoration */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1px solid #5fc9f8;
}

.hero::before {
  top: 1rem;
  left: 1rem;
  border-right: none;
  border-bottom: none;
}

.hero::after {
  bottom: 1rem;
  right: 1rem;
  border-left: none;
  border-top: none;
}

.hero-label {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: #ffd166;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 2rem;
}

.hero-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.5rem;
  height: 1px;
  background-color: #ffd166;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  color: #e6f1ff;
  position: relative;
  padding: 1rem 0;
}

/* lines above and below the name */
.hero-name::before,
.hero-name::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background-color: #5fc9f8;
}

.hero-name::before {
  top: 0;
}

.hero-name::after {
  bottom: 0;
}

.hero-tagline {
  margin-top: 1.5rem;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 1rem;
  color: #9bb6d4;
  max-width: none;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.85rem;
  color: #9bb6d4;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease;
}

.hero-scroll span {
  font-size: 1.2rem;
  /* bobbing arrow */
  animation: bob 1.6s ease-in-out infinite;
}

.hero-scroll:hover,
.hero-scroll:focus-visible {
  color: #ffd166;
  outline: none;
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}


/* ABOUT */
.about-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.about-text {
  font-size: 1.05rem;
  line-height: 1.7;
}

.about-photo {
  border: 2px solid #5fc9f8;
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(100%) contrast(110%);
  transition: filter 0.3s ease;
}

/* show color photo on hover */
.about-photo:hover img {
  filter: none;
}

.about-specs {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.85rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1.2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #2f6aa8;
  background-color: rgba(7, 24, 43, 0.6);
}

.about-specs dt {
  color: #ffd166;
  letter-spacing: 0.1em;
}

.about-specs dd {
  color: #e6f1ff;
}


/* EDUCATION */
.timeline {
  margin-top: 2.5rem;
  position: relative;
  padding-left: 2.5rem;
}

/* vertical line */
.timeline::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background-color: #2f6aa8;
}

.timeline li {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

/* dot marker on the axis */
.timeline li::before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 0.5rem;
  width: 11px;
  height: 11px;
  background-color: #ffd166;
  border: 2px solid #0a2540;
  border-radius: 50%;
}

.timeline article {
  border: 1px solid #2f6aa8;
  background-color: rgba(7, 24, 43, 0.6);
  padding: 1.25rem 1.5rem;
}

.timeline-period {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.8rem;
  color: #5fc9f8;
  letter-spacing: 0.15em;
  margin-bottom: 0.4rem;
}

.timeline article h3 {
  margin-bottom: 0.5rem;
}


/* SKILLS */
.skills-intro {
  margin-top: 1.5rem;
  max-width: none;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #c5d6ea;
}

.skills-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.skill-group {
  border: 1px solid #2f6aa8;
  background-color: rgba(7, 24, 43, 0.6);
  padding: 1.25rem 1.5rem;
}

.skill-group h3 {
  color: #ffd166;
  font-size: 1rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #2f6aa8;
}

.skill-desc {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #c5d6ea;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.85rem;
  color: #e6f1ff;
  padding: 0.25rem 0.6rem;
  border: 1px solid #2f6aa8;
}

/* [ tag ] brackets */
.tag-list li::before {
  content: "[ ";
  color: #5fc9f8;
}

.tag-list li::after {
  content: " ]";
  color: #5fc9f8;
}


/* PROJECTS */
.project-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.project-card {
  position: relative;
  border: 1px solid #2f6aa8;
  background-color: rgba(7, 24, 43, 0.6);
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: #ffd166;
  transform: translateY(-2px);
}

/* + mark in card corner */
.project-card::before {
  content: "+";
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  color: #5fc9f8;
  font-size: 1.2rem;
  line-height: 1;
}

.project-no {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.75rem;
  color: #5fc9f8;
  letter-spacing: 0.2em;
  margin: 0;
}

.project-card h3 {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e6f1ff;
  letter-spacing: 0.02em;
}

.project-card p {
  margin: 0;
  font-size: 0.95rem;
}

.project-card .tag-list {
  margin-top: auto;
}

.project-link {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #5fc9f8;
  text-decoration: none;
  align-self: flex-end;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.project-link:hover {
  color: #ffd166;
  border-bottom-color: #ffd166;
}


/* SUBSECTIONS (INTERESTS) */
.subsection {
  margin-top: 3rem;
}

.subsection>h3 {
  font-size: 1.3rem;
  color: #ffd166;
  letter-spacing: 0.1em;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #2f6aa8;
  margin-bottom: 1.75rem;
}

/* HOCKEY */
.hockey-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.hockey-text {
  font-size: 1.05rem;
  line-height: 1.7;
}


/* CONTACT */
.contact-card {
  margin-top: 2.5rem;
  border: 1px solid #2f6aa8;
  background-color: rgba(7, 24, 43, 0.6);
  padding: 1.5rem;
  text-align: center;
}

.contact-label {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.85rem;
  color: #ffd166;
  letter-spacing: 0.2em;
  margin: 0 0 1rem;
}

.contact-email {
  display: inline-block;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: #e6f1ff;
  border-bottom: 1px solid #5fc9f8;
  padding-bottom: 0.25rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-email:hover,
.contact-email:focus-visible {
  color: #ffd166;
  border-bottom-color: #ffd166;
  outline: none;
}

.contact-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact-links a {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.9rem;
  color: #9bb6d4;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  color: #e6f1ff;
  border-bottom-color: #ffd166;
  outline: none;
}


/* FOOTER */
.site-footer {
  max-width: 1100px;
  margin: 4rem auto 2rem;
  padding: 0 1.5rem;
}

.title-block {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid #2f6aa8;
  background-color: rgba(7, 24, 43, 0.8);
}

.title-block>div {
  padding: 0.75rem 1rem;
}

/* 2x2 layout on mobile */
.title-block>div:nth-child(odd) {
  border-right: 1px solid #2f6aa8;
}

.title-block>div:nth-child(-n+2) {
  border-bottom: 1px solid #2f6aa8;
}

.tb-label {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.65rem;
  color: #ffd166;
  letter-spacing: 0.2em;
  margin: 0 0 0.25rem;
}

.tb-value {
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.95rem;
  color: #e6f1ff;
  margin: 0;
}

.footer-copy {
  margin-top: 1rem;
  font-family: "JetBrains Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.75rem;
  color: #9bb6d4;
}


/* SECTION DIVIDER (RULER) */
.section-divider {
  height: 24px;
  margin: 0 auto;
  max-width: 1100px;
  background-image: url("../img/ruler.svg");
  background-repeat: repeat-x;
  background-size: 50px 24px;
  background-position: left center;
}


/* RESPONSIVE - DESKTOP (MOBILE-FIRST) */
@media (min-width: 768px) {
  .site-header {
    flex-direction: row;
    justify-content: space-between;
    gap: 0;
    padding: 1rem 2rem;
  }

  .nav-toggle {
    display: none;
  }

  .main-nav ul {
    display: flex;
    gap: 1.75rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: auto;
  }

  main>section {
    padding: 6rem 1.5rem;
  }

  .hero {
    min-height: calc(100vh - 4rem);
  }

  .about-grid,
  .hockey-grid {
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
  }

  .about-grid,
  .hockey-grid--photo {
    grid-template-rows: auto auto;
  }

  .about-grid>.about-text,
  .hockey-grid--photo>.hockey-text {
    grid-column: 1;
    grid-row: 1;
  }

  .about-grid>.about-specs,
  .hockey-grid--photo>.about-specs {
    grid-column: 1;
    grid-row: 2;
  }

  .about-grid>.about-photo,
  .hockey-grid--photo>.about-photo {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    height: 100%;
  }

  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

  .title-block {
    grid-template-columns: repeat(4, 1fr);
  }

  .title-block>div:nth-child(odd) {
    border-right: none;
  }

  .title-block>div:nth-child(-n+2) {
    border-bottom: none;
  }

  .title-block>div:not(:last-child) {
    border-right: 1px solid #2f6aa8;
  }

  .contact-card {
    padding: 2.5rem;
  }
}

/* RESPONSIVE - LARGE DESKTOPS */
@media (min-width: 1600px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}