/* home.css — homepage stylesheet for index.html.
   Editorial overlay on top of home.base.css. Aligns the homepage with the
   resume.html design system: Pretendard-led sans stack, warm-cream paper,
   Tailwind-stone neutrals, Oxford Blue accent.

   Shared design tokens live in _tokens.css; this file adds only the
   homepage-scoped sidebar surfaces.
   Cascade order matters — must load AFTER home.base.css.

   The `!important` declarations that remain are load-bearing: each one beats
   either a base.css utility class or a more specific rule in this file. The
   39 that only existed to out-specify the retired Bootstrap vendor sheet were
   removed, verified against a computed-style diff at 1440/768/375.
*/

:root {
  /* Homepage-only surfaces */
  --bg-sidebar: #0f1d34;
  --bg-sidebar-soft: rgba(255, 255, 255, 0.08);
}

/* Base */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.6;
}

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

a:hover,
a:focus,
a:active {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Icon and nav anchors are not running text — the global underline would
   draw through the glyph inside the circle. */
.social-icons .social-icon:hover,
.social-icons .social-icon:focus,
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  text-decoration: none;
}

/* Visible keyboard focus — the 1px border-color change alone was not one. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Reset template heading defaults (Saira + uppercase) */
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
  font-family: var(--font-body);
  text-transform: none;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  line-height: 1.3;
}

p {
  margin: 0 0 0.6rem;
}

.text-primary {
  color: var(--accent);
}

/* ───────── Sidebar ─────────
   Deep oxford field with paper-tone nav links. The dark surface lets the
   cream content area read as a single editorial paper sheet. */
#sideNav {
  background-color: var(--bg-sidebar);
}

#sideNav .navbar-brand {
  display: block;
  text-align: center;
}

#sideNav .navbar-brand .d-block.d-lg-none {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.94);
}

#sideNav .navbar-nav .nav-item .nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  padding: 0.55rem 0;
  transition: color 160ms ease;
}

#sideNav .navbar-nav .nav-item .nav-link:hover,
#sideNav .navbar-nav .nav-item .nav-link:focus,
#sideNav .navbar-nav .nav-item .nav-link.active {
  color: #fafaf7;
}

@media (min-width: 992px) {
  #sideNav {
    border-right: 1px solid var(--bg-sidebar-soft);
  }

  #sideNav .navbar-brand .img-profile {
    max-width: 9rem;
    max-height: 9rem;
    border: 0.25rem solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.5rem !important;
  }

  #sideNav #navbarResponsive .navbar-nav .nav-item .nav-link {
    padding: 0.4rem 0;
  }
}

@media (max-width: 991.98px) {
  #sideNav {
    padding: 0.55rem 1rem !important;
  }

  body {
    padding-top: 3.5rem;
  }
}

/* ───────── Section frame ─────────
   Drop full-viewport heights and let sections flow with editorial rhythm.
   Thin rules between sections provide cadence without being decorative. */
section {
  display: block !important;
  min-height: 0;
  align-items: initial;
  padding-top: clamp(3rem, 5vw, 5rem);
  padding-bottom: clamp(3rem, 5vw, 5rem);
  max-width: none;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 4.5rem;
}

section:last-of-type {
  border-bottom: none;
}

section .section-content {
  max-width: 56rem;
}

@media (min-width: 992px) {
  section {
    padding-left: clamp(2rem, 4vw, 4rem);
    padding-right: clamp(1.5rem, 3vw, 3rem);
  }
}

/* ───────── Hero ─────────
   Sans-serif name with restrained scale; Pretendard lead paragraph; ink
   emphasis on the three thread keywords using the shared display stack. */
#about h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: normal;
  font-size: clamp(2.75rem, 1.5rem + 4vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin-bottom: 1.25rem !important;
  color: var(--ink);
}

#about h1 .text-primary {
  color: var(--accent);
  font-style: normal;
  font-family: var(--font-display);
}

#about p.lead {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  max-width: 44rem;
  margin-bottom: 1.5rem !important;
}

#about p.lead s {
  color: var(--ink-muted);
  text-decoration-thickness: 1px;
}

/* Three-thread chips — promote the keyword triplet from inline italic to a
   visual signature row. 1px ink-faint border, paper-tone backing, accent
   on hover. Kept restrained so the chips read as editorial keywords, not
   marketing tags. */
.thread-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 2.25rem;
  padding: 0;
}

.thread-chips .thread-chip {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: #fff;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  line-height: 1.4;
  transition: border-color 160ms ease, color 160ms ease;
}

@media (hover: hover) {
  .thread-chips .thread-chip:hover {
    color: var(--accent);
    border-color: var(--accent);
  }
}

/* ───────── Section title ─────────
   An eyebrow label, not a competing heading. At 16px/600 it sat between two
   stools: too large to read as metadata, yet smaller than the 18.4px/600 item
   titles it governs — a measured hierarchy inversion. Uppercase + wide
   tracking + accent color carry the "this is a landmark label" signal instead
   of size, which takes it out of the contest entirely. Matches
   resume.css `.section-title h2` (11px/800/0.18em/accent + hairline rule) so
   the two pages read as one system. The fixed sidebar already carries
   wayfinding, so this heading is a marker, not the primary scan anchor. */
section h2 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem !important;
  line-height: 1.5;
}

@media (max-width: 991.98px) {
  section h2 {
    margin-bottom: 1.75rem !important;
  }
}

/* ───────── Item rows ─────────
   Experience, Education, Publication share the same row pattern: title
   block on the left, optional date column on the right, separated by a
   thin rule on all but the last item. */
section .d-flex.flex-column.flex-md-row {
  align-items: flex-start;
  gap: 1.25rem 2rem;
  margin-bottom: 1.75rem !important;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

section .d-flex.flex-column.flex-md-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0 !important;
}

section .flex-grow-1 h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 0.35rem !important;
}

section .flex-grow-1 h3 a {
  color: var(--ink);
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
  text-decoration: none;
  transition: color 160ms ease, border-bottom-color 160ms ease;
}

section .flex-grow-1 h3 a:hover,
section .flex-grow-1 h3 a:focus {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ───────── Subheading (role / major) ─────────
   Pretendard sans 500 ink-muted — unified with resume.css `.role`/`.major`
   per 2026-05-07 directive (supersedes 2026-05-06 v2 dual-font split). */
.subheading {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.002em;
  color: var(--ink-muted);
  margin-bottom: 0.5rem !important;
  line-height: 1.5;
}

.subheading .text-muted {
  font-style: normal;
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-family: var(--font-body);
  letter-spacing: 0;
}

/* Publication venue label — uppercase tracked accent badge, replaces the
   role/major italic on `.subheading` inside #publication. Adds a 4px
   accent square prefix to read as a venue tag, not a section subheading. */
#publication .subheading {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.65rem !important;
}

#publication .subheading::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex: 0 0 6px;
}

/* ───────── Date column ───────── */
section .flex-shrink-0 .text-primary {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 0.3rem;
  display: inline-block;
}

/* ───────── TLDR ───────── */
.tldr {
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ink);
  margin-top: 0.55rem;
  margin-bottom: 0;
  max-width: 52rem;
}

/* Past role within the same employer — same 2-column grid as the main
   role row, but visually subordinate via dashed top rule + smaller muted
   role/date. Mirrors resume.css `.row.past-role` treatment. */
.past-role {
  margin-top: 1.05rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--rule-strong);
  margin-bottom: 0 !important;
  padding-bottom: 0;
  border-bottom: none;
  align-items: baseline;
  /* must beat `section .d-flex.flex-column.flex-md-row` (0,3,1) */
  gap: 0.5rem 1.5rem !important;
}

/* Past-role inherits .subheading (14.5px) / current-date treatment (0.82rem);
   subordination via weight (500→400) + dashed top-rule only. Per 2026-05-07
   frontend-design review — size override was redundant signaling. */
.past-role .subheading {
  font-weight: 400;
  margin-bottom: 0 !important;
  line-height: 1.45;
}

/* ───────── Hero social icons ─────────
   Flat outlined circle, ink default, accent on hover. The heavy filled
   gray circle from the template reads as 2018-portfolio-template. */
.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.social-icons .social-icon {
  height: 2.75rem;
  width: 2.75rem;
  margin-right: 0 !important;
  background-color: transparent;
  border: 1px solid var(--ink-faint);
  color: var(--ink);
  font-size: 0.95rem;
  border-radius: 100%;
  transition: border-color 160ms ease, color 160ms ease;
}

.social-icons .social-icon:hover,
.social-icons .social-icon:focus {
  background-color: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

/* ───────── Hard Skills ─────────
   Group label (small uppercase tracked tag, ink-muted) over a wordmark
   list with `·` separators. Wordmark grid replaces the prior icon row to
   eliminate visual register mix between line-art devicons and filled-tile
   Adobe brand glyphs. */
#skill .skill-group {
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

#skill .skill-group:first-of-type {
  padding-top: 4px;
}

#skill .skill-group:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

#skill .skill-group .subheading {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  /* must beat `.subheading { margin-bottom: 0.5rem !important }` */
  margin: 0 0 10px !important;
  line-height: 1.4;
}

.skill-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

.skill-list li {
  display: inline-flex;
  align-items: baseline;
}

.skill-list li:not(:last-child)::after {
  content: '·';
  color: var(--rule-strong);
  margin: 0 0.7em;
}

/* ───────── Education subheading link ───────── */
#education .subheading a {
  color: var(--ink-muted);
  font-style: normal;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1px;
  text-decoration: none;
}

#education .subheading a:hover,
#education .subheading a:focus {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ───────── Interest ───────── */
#interest p {
  font-size: 1rem;
  color: var(--ink);
  margin: 0;
  max-width: 44rem;
}

/* ───────── Mobile refinements ───────── */
@media (max-width: 991.98px) {
  body {
    padding-left: 0;
  }
}

@media (max-width: 575.98px) {
  section .d-flex.flex-column.flex-md-row {
    margin-bottom: 1.5rem !important;
    padding-bottom: 1.5rem;
    gap: 0.5rem;
  }

  section .flex-shrink-0 .text-primary {
    margin-top: 0.4rem;
    padding-top: 0;
  }

  #about h1 {
    margin-bottom: 1rem !important;
  }

  #about p.lead {
    margin-bottom: 2rem !important;
  }
}

/* ───────── Navbar disclosure ─────────
   Replaces Bootstrap's Collapse JS. Dropping `.collapse navbar-collapse` from
   the markup also drops the vendor sheet's layout rules for it, so the four
   that mattered (`flex-basis`/`flex-grow`, and the ≥992px vertical sidebar
   column) are ported here against the id instead. */
#navbarResponsive {
  display: none;
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}

#navbarResponsive.open {
  display: block;
}

@media (min-width: 992px) {
  #navbarResponsive {
    display: flex;
    align-items: flex-start;
    flex-grow: 0;
    width: 100%;
    margin-bottom: auto;
  }

  #sideNav #navbarResponsive .navbar-nav {
    flex-direction: column;
    width: 100%;
  }

  #sideNav #navbarResponsive .navbar-nav .nav-item,
  #sideNav #navbarResponsive .navbar-nav .nav-item .nav-link {
    display: block;
  }
}

/* ───────── Utilities ─────────
   .nowrap replaces the obsolete <nobr> element. */
.nowrap {
  white-space: nowrap;
}

/* Repository link under each paper abstract. */
.paper-links {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0.6rem 0 0;
}

.paper-links a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
