/* ==========================================================================
   components.css — individual pieces of UI
   Each block below is one component. They don't depend on each other, so
   you can safely delete a whole block if you remove that section.
   ========================================================================== */


/* ==========================================================================
   Hero
   The signature element: a line of Whisper source that "runs" and prints
   the headline. Typing is driven by assets/js/hero.js, which adds the
   .has-run class when the animation finishes.
   ========================================================================== */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 7rem 4rem;
}

.hero__location {
  margin-bottom: 2.75rem;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

/* Source → output block */
.hero__runner {
  padding-left: 1.35rem;
  border-left: 1px solid var(--line);
}

.hero__source {
  margin-bottom: .4rem;
  font-family: var(--mono);
  font-size: clamp(.78rem, .72rem + .3vw, .9rem);
  letter-spacing: -.01em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.hero__source .kw  { color: var(--gold); }   /* language keyword */
.hero__source .str { color: var(--text); }   /* string literal */

.hero__caret {
  display: inline-block;
  width: .55ch;
  background: var(--gold);
  color: transparent;
  animation: caret-blink 1.1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

.hero__arrow {
  display: block;
  margin-bottom: .9rem;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--gold-dim);
  opacity: 0;
  transition: opacity .5s ease .1s;
}

.hero__output {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 1.3rem + 4.2vw, 4rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.hero__output em { font-style: italic; }

.hero__sub {
  margin-top: 2.5rem;
  max-width: 34rem;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--speed) ease .35s, transform var(--speed) ease .35s;
}

.hero__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2.25rem;
  opacity: 0;
  transition: opacity var(--speed) ease .55s;
}
.hero__socials a {
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease;
}
.hero__socials a:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

/* Applied by hero.js when the source has finished typing */
.hero.has-run .hero__arrow,
.hero.has-run .hero__sub,
.hero.has-run .hero__socials { opacity: 1; }
.hero.has-run .hero__output,
.hero.has-run .hero__sub     { opacity: 1; transform: none; }


/* ==========================================================================
   Project card
   An <article>, not a link — each card carries its own Code / Live links,
   and links can't be nested inside links.

   To add a project: copy one <article class="project"> block in index.html
   and edit the text. Nothing here needs changing.
   ========================================================================== */

.project-list { display: flex; flex-direction: column; }

.project {
  position: relative;
  display: block;
  padding-block: 2rem;
  border-top: 1px solid var(--line-soft);
}
.project:first-child { border-top-color: var(--line); }

/* Hover panel bleeds slightly past the text column */
.project::before {
  content: '';
  position: absolute;
  inset: 0 calc(var(--pad) * -.5);
  z-index: -1;
  background: var(--surface);
  border-radius: 3px;
  opacity: 0;
  transition: opacity .35s ease;
}
.project:hover::before,
.project:focus-within::before { opacity: .75; }

.project__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.project__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 1.15rem + .8vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  transition: color .2s ease;
}
.project:hover .project__title { color: var(--gold); }

/* What kind of thing this is — carries real information, not decoration */
.project__kind {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-dim);
  white-space: nowrap;
}

.project__desc {
  margin-top: .7rem;
  max-width: 36rem;
  font-size: .97rem;
  color: var(--muted);
}

/* Inline code inside a description — used for language syntax and
   install commands. Slightly brighter than the surrounding prose so it
   reads as a distinct kind of thing. */
.project__desc code {
  font-family: var(--mono);
  font-size: .85em;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .05em .35em;
}

/* The hard part you hit. This is the paragraph interviewers read. */
.project__snag {
  margin-top: .85rem;
  padding-left: .9rem;
  max-width: 36rem;
  border-left: 1px solid var(--line);
  font-size: .9rem;
  color: var(--muted-dim);
}
.project__snag code {
  font-family: var(--mono);
  font-size: .85em;
  color: var(--muted);
}


/* --- Code sample --------------------------------------------------------
   A short block of real Whisper. For a language project, showing the
   syntax is more persuasive than describing it. */
.code-sample {
  margin-top: 1.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold-dim);
  border-radius: 2px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: clamp(.74rem, .7rem + .2vw, .82rem);
  line-height: 1.75;
  color: var(--text);
  white-space: pre;
  tab-size: 4;
}

/* Syntax colours. Keep these to three — more turns the block into noise. */
.code-sample .c  { color: var(--muted-dim); font-style: italic; } /* comment */
.code-sample .k  { color: var(--gold); }                          /* keyword */
.code-sample .s  { color: var(--muted); }                         /* string  */


/* --- Project links -------------------------------------------------------
   Code first. For a programmer's portfolio the repository is the more
   informative destination, so it leads. */
.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.project__link {
  position: relative;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease;
}
.project__link:hover { color: var(--gold); border-color: var(--gold-dim); }

.project__link .arrow {
  display: inline-block;
  margin-left: .35rem;
  transition: transform .25s var(--ease);
}
.project__link:hover .arrow { transform: translate(2px, -2px); }

/* A project with no live site says so rather than linking nowhere */
.project__link--none {
  color: var(--muted-dim);
  border-bottom-style: dashed;
  border-bottom-color: var(--line-soft);
  cursor: default;
}


/* --- Tag list (shared by projects and skills) ---------------------------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: 1.1rem;
}
.tags span {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .06em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .22rem .5rem;
}


/* ==========================================================================
   Skill tiers
   ========================================================================== */

.tier {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line-soft);
}
.tier:first-of-type { border-top-color: var(--line); }

.tier__label {
  padding-top: .3rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.tier__items {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.tier__items span {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .28rem .6rem;
}

/* "Next up" tier — dashed border signals not-yet-learned */
.tier--aspirational .tier__items span {
  color: var(--muted);
  border-style: dashed;
}

@media (max-width: 560px) {
  .tier { grid-template-columns: 1fr; gap: .75rem; }
  .tier__label { padding-top: 0; }
}


/* ==========================================================================
   Now list
   ========================================================================== */

.now-list { list-style: none; margin-top: .5rem; }

.now-list li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line-soft);
}
.now-list li:first-child { border-top-color: var(--line); }

.now-list__when {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

@media (max-width: 560px) {
  .now-list li { grid-template-columns: 1fr; gap: .35rem; }
}


/* ==========================================================================
   Footer email
   ========================================================================== */

.big-mail {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 1.1rem + 2.6vw, 2.7rem);
  letter-spacing: -.02em;
  text-decoration: none;
  word-break: break-word;
  padding-bottom: .15rem;
  border-bottom: 1px solid var(--line);
  transition: color .25s ease, border-color .25s ease;
}
.big-mail:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}


/* ==========================================================================
   Scroll reveal
   Add class="reveal" to anything that should fade up as it enters the
   viewport. assets/js/reveal.js adds .is-visible.
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* ==========================================================================
   Section footer link
   The quiet "there is more this way" link at the end of a section.
   ========================================================================== */

.section-more {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}
.section-more a {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease;
}
.section-more a:hover { color: var(--gold); }
.section-more .arrow {
  display: inline-block;
  margin-left: .4rem;
  transition: transform .25s var(--ease);
}
.section-more a:hover .arrow { transform: translate(2px, -2px); }


/* ==========================================================================
   Archive list  (archive.html)
   A dense, scannable index. Deliberately plainer than the project cards on
   the homepage — these are things worth recording, not things worth
   selling. Keeping them visually quieter is what protects the three
   projects on the front page.
   ========================================================================== */

.archive-group { margin-top: 3.5rem; }
.archive-group:first-of-type { margin-top: 2rem; }

.archive-group__title {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}

.archive-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
}

.archive-item__year {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--muted-dim);
  padding-top: .28rem;
}

.archive-item__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: -.01em;
}

.archive-item__desc {
  margin-top: .35rem;
  font-size: .92rem;
  color: var(--muted);
  max-width: 34rem;
}

.archive-item__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: .7rem;
}
.archive-item__links a,
.archive-item__links span {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease;
}
.archive-item__links a:hover { color: var(--gold); border-color: var(--gold-dim); }
.archive-item__links span {
  color: var(--muted-dim);
  border-bottom-style: dashed;
  border-bottom-color: var(--line-soft);
}

@media (max-width: 560px) {
  .archive-item { grid-template-columns: 1fr; gap: .4rem; }
  .archive-item__year { padding-top: 0; }
}
