/* Fonts */
/* inter-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/inter-v20-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-700 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/inter-v20-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/fira-code-v27-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/fira-code-v27-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/*  Font Sizes */
:root {
  /* mobile */
  --fs-topnav:  0.625rem;   /* 10px */
  --fs-h1:      1.5rem;     /* 24px */
  --fs-h2:      1.5rem;     /* 24px */
  --fs-banner:  0.8125rem;  /* 13px */

  /* desktop — override at 600px+ */
  @media (width >= 37.5rem) {
    --fs-topnav:  1rem;     /* 16px */
    --fs-h1:      4.5rem;   /* 72px */
    --fs-h2:      2rem;     /* 32px */
    --fs-banner:  3.375rem; /* 54px */
  }
}

/* Color */
:root {
  --c-bg:     hsl(0, 0%, 12%);   /* #1e1e1e */
  --c-card:   hsl(0, 0%, 14%);   /* slightly lighter card */
  --c-white:  hsl(0, 0%, 100%);
  --c-muted:  rgba(255, 255, 255, 0.5);
  --c-border: rgba(255, 255, 255, 0.08);
  --c-blue:   #4fa3e0;            /* nav bottom border accent */
  --c-red:    #e06c75;            /* error text */
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

body {
  font-family: "Inter", Arial, Helvetica, sans-serif;
  line-height: 1.4;
  color: var(--c-white);
  background-color: var(--c-bg);
}

h1 { font-size: var(--fs-h1); line-height: 1.05; }
h2 { font-size: var(--fs-h2); line-height: 1.1;  }
h3 { font-size: var(--fs-banner); line-height: 1.2; }

a {
  color: var(--c-white);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}
a:hover { opacity: 0.65; }

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

/*  WRAPPER */
.wrapper {
  /* stays centered, max 1200px, 24px side padding */
  width: min(calc(100% - 48px), 75rem);
  margin-inline: auto;
}

/* Top Nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--c-bg);
  border-bottom: 2px solid var(--c-blue);
  padding-block: 12px;
}

.topnav__inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topnav__name {
  font-size: var(--fs-topnav);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topnav__icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

/* Hero Card */
.hero {
  padding-block: 32px;
}

/* rounded dark card; wraps hero + about */
.hero__card {
  background-color: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (width >= 37.5rem) {
  .hero__card {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 48px;
  }
}

/* about card is column only */
.hero__card--about {
  flex-direction: column;
  gap: 20px;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero__subtitle {
  color: var(--c-muted);
  font-size: 1rem;
}

.hero__socials-label {
  font-size: 0.875rem;
  margin-bottom: 6px;
}

.socials-list {
  list-style: disc;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.875rem;
  font-weight: 700;
}

/* Hero Image */
.hero__image {
  flex-shrink: 0;
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease;
  align-self: flex-start;
}

.hero__image:hover { transform: scale(1.02); }

.hero__image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

/*  About Section */
.about {
  padding-top: 0;     
  padding-bottom: 48px;
}

.about h2 { font-weight: 700; }

.about p {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.75;
  max-width: 750px;
}

.skills-list {
  list-style: disc;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.875rem;
  font-weight: 700;
}

/* PROJECTS BANNER */
.projects-banner {
  padding-block: 64px 24px;
}

.projects-banner h3 {
  font-family: "Fira code", monospace;
  font-weight: 700;
  min-height: 1.2em;
}

/* blinking cursor injected by JS */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background-color: var(--c-white);
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* PROJECTS ERROR + LOGO */
.projects {
  padding-block: 16px 80px;
}

.projects__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

@media (width >= 37.5rem) {
  .projects__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.error-type {
  font-family: "Fira Code", monospace;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--c-red);
  margin-bottom: 4px;
}

.error-msg {
  font-family: "Fira Code", monospace;
  font-size: clamp(1rem, 2.5vw, 1.625rem);
  font-weight: 700;
  color: var(--c-red);
  margin-bottom: 16px;
}

.error-note {
  font-family: "Fira Code", monospace;
  font-size: 0.8125rem;
  color: var(--c-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--c-border);
  padding-block: 20px;
}

.footer__inner {
  display: flex;
  justify-content: flex-end;
}

.footer a {
  font-size: 0.75rem;
  color: var(--c-muted);
  transition: color 0.2s;
}

.footer a:hover { color: var(--c-white); }

/* fade in animation for projects section */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
/* Fade-in on scroll */
section, h1, h2, h3, p, ul, img {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible, h1.visible, h2.visible, h3.visible, p.visible, ul.visible, img.visible {
  opacity: 1;
  transform: translateY(0);
}