/* ============================================================
   GLOBAL STYLES
   Imports variables.css — must be linked after it in HTML
   ============================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-content);
  font-size: var(--fs-p);
  line-height: var(--lh-p);
  color: var(--color-text-normal);
  background-color: var(--color-surface-white);
  -webkit-font-smoothing: antialiased;
}

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

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

/* ============================================================
   LAYOUT — Container & Grid
   ============================================================ */

/* Full-width section wrapper — controls background color */
.section {
  width: 100%;
}

/* Centered content container — max 1180px (12 cols)
   Always has 20px padding on both sides so content never
   touches the viewport edge at any width.                */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
  box-sizing: border-box;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

/* --- Title styles (DM Sans SemiBold) --- */
.t1 {
  font-family: var(--font-title);
  font-size: var(--fs-h1);
  font-weight: 600;
  line-height: var(--lh-title);
  letter-spacing: var(--ls-tight);
}

.t2 {
  font-family: var(--font-title);
  font-size: var(--fs-h2);
  font-weight: 600;
  line-height: var(--lh-title);
  letter-spacing: var(--ls-normal);
}

.t3 {
  font-family: var(--font-title);
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: var(--lh-title);
  letter-spacing: var(--ls-tight);
}

.t4 {
  font-family: var(--font-title);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: var(--lh-title);
  letter-spacing: var(--ls-tight);
}

.t5 {
  font-family: var(--font-title);
  font-size: var(--fs-h5);
  font-weight: 600;
  line-height: var(--lh-title);
  letter-spacing: var(--ls-tight);
}

.t6 {
  font-family: var(--font-title);
  font-size: var(--fs-h6);
  font-weight: 600;
  line-height: var(--lh-title);
  letter-spacing: var(--ls-tight);
}

/* --- Content styles (Inter) --- */
.body-text {
  font-family: var(--font-content);
  font-size: var(--fs-p);
  font-weight: 400;
  line-height: var(--lh-p);
  letter-spacing: var(--ls-normal);
}

.body-text p + p {
  margin-top: var(--paragraph-spacing);
}

.body-bold {
  font-family: var(--font-content);
  font-size: var(--fs-p);
  font-weight: 600;
  line-height: var(--lh-p);
  letter-spacing: var(--ls-normal);
}

.caption {
  font-family: var(--font-content);
  font-size: var(--fs-caption);
  font-weight: 400;
  line-height: var(--lh-caption);
  letter-spacing: var(--ls-normal);
}

.caption-bold {
  font-family: var(--font-content);
  font-size: var(--fs-caption);
  font-weight: 600;
  line-height: var(--lh-caption);
  letter-spacing: var(--ls-normal);
}

/* --- Color utilities --- */
.text-normal  { color: var(--color-text-normal); }
.text-subtle  { color: var(--color-text-subtle); }
.text-white   { color: var(--color-text-white); }

/* ============================================================
   HEADER
   Height: 80px | Background: white | Border-bottom: text/normal
   Logo: DM Sans Medium H3 | Nav: DM Sans SemiBold H5 subtle
   ============================================================ */
.site-header {
  width: 100%;
  height: 80px;
  background-color: var(--color-surface-white);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.site-header.hidden {
  transform: translateY(-100%);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-text-normal);
}

.site-header__logo {
  font-family: var(--font-title);
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: var(--lh-title);
  letter-spacing: var(--ls-tight);
  color: var(--color-text-normal);
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-header__nav a {
  font-family: var(--font-title);
  font-size: var(--fs-h5);
  font-weight: 600;
  line-height: var(--lh-title);
  letter-spacing: var(--ls-tight);
  color: var(--color-text-subtle);
  transition: color 0.2s ease;
}

.site-header__nav a:hover {
  color: var(--color-text-normal);
}

.site-header__nav a[aria-label="LinkedIn"] i {
  font-size: 28px;
  line-height: 1;
}

/* Mobile: hamburger placeholder (JS controlled) */
@media (max-width: 768px) {
  .site-header {
    height: 64px;
  }

  .site-header__nav {
    /* Always flex — visibility controlled via opacity/transform, not display */
    /* NOTE: .site-header has will-change:transform which creates a containing
       block, so bottom:0 resolves relative to the header, not the viewport.
       Use explicit height instead. */
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    height: calc(100dvh - 64px);
    z-index: 99;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 20px;
    gap: 24px;
    /* Slide-down animation — hidden state */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .site-header__nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-header__hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
  }

  .site-header__hamburger i {
    font-size: 20px;
    color: var(--color-text-normal);
    pointer-events: none;
  }
}

@media (min-width: 769px) {
  .site-header__hamburger {
    display: none;
  }
}

/* ============================================================
   FOOTER
   Height: 64px | Background: surface/darker | Text: white 70%
   ============================================================ */
.site-footer {
  width: 100%;
  height: 64px;
  background-color: var(--color-surface-darker);
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-footer p {
  font-family: var(--font-content);
  font-size: var(--fs-caption);
  font-weight: 400;
  line-height: var(--lh-caption);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

@media (max-width: 768px) {
  .site-footer {
    height: auto;
    padding: 20px;
  }

  /* .site-footer p already uses --fs-caption on desktop; no override needed */
}

/* ============================================================
   DIVIDER
   1px horizontal rule in border/gray color
   ============================================================ */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--color-text-normal);
  border: none;
}

/* ============================================================
   BUTTONS
   3 variants: primary | outlined | text
   3 icon positions: none | left | right (icon = 24×24 arrow SVG)
   Height: 48px | Radius: 28px (pill) | Padding: 12px 24px
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 12px 24px;
  border-radius: 28px;
  font-family: var(--font-content);
  font-size: var(--fs-p);
  font-weight: 600;
  line-height: var(--lh-p);
  letter-spacing: var(--ls-normal);
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-text-normal);
  border: none;
}

.btn--primary:hover {
  opacity: 0.85;
}

.btn--outlined {
  background-color: var(--color-surface-white);
  color: var(--color-text-normal);
  border: 2px solid var(--color-text-normal);
}

.btn--outlined:hover {
  background-color: var(--color-surface-light-gray);
}

.btn--text {
  background-color: transparent;
  color: var(--color-text-normal);
  border: none;
  padding-inline: 0;
}

.btn--text:hover {
  opacity: 0.7;
}

.btn__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ============================================================
   PROJECT CARD TAG (pill)
   Used on Home project cards
   ============================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 40px;
  background-color: rgba(51, 50, 48, 0.1);
  font-family: var(--font-content);
  font-size: var(--fs-caption);
  font-weight: 400;
  line-height: var(--lh-caption);
  color: var(--color-text-subtle);
  white-space: nowrap;
}

/* ============================================================
   MEDIA PLACEHOLDER
   Used during development when image/video files are pending.
   Height should match actual asset height.
   ============================================================ */
.media-placeholder {
  width: 100%;
  background-color: var(--color-surface-light-gray);
  border: 1px dashed var(--color-border-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-content);
  font-size: var(--fs-caption);
  color: var(--color-text-subtle);
}
