/* ================================================
   Portfolio · Hoang Long DUONG
   Palette : Anthracite + Bronze brun (Kim + Thổ)
   ================================================ */

:root {
  /* Colors */
  --anthracite: #3D3D3D;
  --bronze: #A6742A;
  --bronze-light: #C99756;
  --bronze-tint: #F5EEE1;
  --paper: #FAF7F0;
  --paper-alt: #F0EBDF;
  --ink: #2C2C2C;
  --gray: #666666;
  --gray-light: #999999;
  --hairline: #DAD2C2;

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Layout */
  --max-width: 1120px;
  --gutter: 24px;
  --gutter-lg: 48px;
}

/* ================================================ */
/* RESET & BASE                                     */
/* ================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: var(--anthracite);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--bronze);
}

a:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ================================================ */
/* TOP BAR                                          */
/* ================================================ */

.top-bar {
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(6px);
  background: rgba(250, 247, 240, 0.92);
}

.top-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand-code {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--gray);
}

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

.nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--anthracite);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 14px !important;
  padding: 9px 16px;
  border: 1px solid var(--anthracite);
  border-radius: 0;
  transition: all 0.2s ease;
}

.nav-cta:hover {
  background: var(--anthracite);
  color: var(--paper) !important;
}

/* ================================================ */
/* HERO                                             */
/* ================================================ */

.hero {
  padding: 80px 0 100px;
  border-bottom: 1px solid var(--hairline);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--anthracite);
  margin-bottom: 20px;
}

.last-name {
  color: var(--bronze);
  font-style: italic;
  font-weight: 500;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 400;
  color: var(--gray);
  margin-bottom: 40px;
  letter-spacing: -0.005em;
}

.hero-bio {
  max-width: 680px;
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 56px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-light);
}

.meta-value {
  font-size: 16px;
  color: var(--anthracite);
  font-weight: 500;
}

.meta-value.link {
  color: var(--anthracite);
  text-decoration: none;
  border-bottom: 1px dashed var(--hairline);
  padding-bottom: 1px;
}

.meta-value.link:hover {
  color: var(--bronze);
  border-bottom-color: var(--bronze);
}

/* ================================================ */
/* PROJECTS                                         */
/* ================================================ */

.projects {
  padding: 80px 0 60px;
}

.project {
  padding: 60px 0;
  border-bottom: 1px solid var(--hairline);
}

.project:last-child {
  border-bottom: none;
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hairline);
}

.project-index {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.index-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-light);
}

.index-number {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--bronze);
}

.project-meta {
  display: flex;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 5px 11px;
  border-radius: 0;
  border: 1px solid var(--hairline);
}

.tag-status {
  background: var(--bronze-tint);
  border-color: var(--bronze);
  color: var(--bronze);
}

.tag-date {
  color: var(--gray);
}

.tag-soon {
  color: var(--gray-light);
  font-style: italic;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--anthracite);
  margin-bottom: 12px;
  max-width: 900px;
}

.project-context {
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 32px;
  font-family: var(--font-mono);
}

.project-context strong {
  color: var(--anthracite);
  font-weight: 500;
}

.project-summary {
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
  max-width: 820px;
  margin-bottom: 48px;
}

/* ================================================ */
/* GALLERY                                          */
/* ================================================ */

.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--hairline);
}

.image-placeholder {
  aspect-ratio: 4 / 3;
  background: var(--paper-alt);
  border: 1px dashed var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.image-placeholder:hover {
  background: var(--bronze-tint);
}

.placeholder-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--bronze);
  font-weight: 500;
}

.placeholder-hint {
  font-size: 13px;
  color: var(--gray-light);
  font-style: italic;
}

.gallery-item figcaption {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.5;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

/* ================================================ */
/* STACK                                            */
/* ================================================ */

.project-stack {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stack-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-light);
  min-width: 40px;
}

.stack-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.stack-list li {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--anthracite);
  position: relative;
  padding-left: 16px;
}

.stack-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--bronze);
  transform: translateY(-50%);
}

/* ================================================ */
/* CONFIDENTIAL NOTE                                */
/* ================================================ */

.confidential-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gray-light);
  font-style: italic;
}

.confidential-note .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bronze);
  animation: pulse 2s ease-in-out infinite;
}

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

/* ================================================ */
/* PLACEHOLDER PROJECT                              */
/* ================================================ */

.project-placeholder {
  opacity: 0.5;
}

.placeholder-text {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gray-light);
  font-style: italic;
  padding: 40px 0;
  text-align: center;
}

/* ================================================ */
/* FOOTER                                           */
/* ================================================ */

.footer {
  background: var(--anthracite);
  color: var(--paper);
  padding: 80px 0 32px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 32px;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 6px;
}

.footer-role {
  font-size: 15px;
  color: var(--bronze-light);
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-light);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--paper);
  font-size: 15px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--bronze-light);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gray-light);
}

/* ================================================ */
/* RESPONSIVE                                       */
/* ================================================ */

@media (max-width: 768px) {
  .top-bar .wrap { padding-top: 14px; padding-bottom: 14px; }
  .nav { gap: 20px; }
  .nav a:not(.nav-cta) { display: none; }

  .hero { padding: 56px 0 72px; }
  .hero-meta { gap: 24px; }
  .meta-item { min-width: 100px; }

  .projects { padding: 48px 0 32px; }
  .project { padding: 40px 0; }

  .project-header {
    flex-direction: column;
    gap: 12px;
  }

  .project-gallery {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-stack {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .footer { padding: 56px 0 24px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}