/* ==========================================================================
   PORTFOLIO — Modern Black & White
   ========================================================================== */

:root {
  --black: #000000;
  --white: #ffffff;
  --gray-50: #f8f8f8;
  --gray-100: #f0f0f0;
  --gray-200: #e5e5e5;
  --gray-300: #d4d4d4;
  --gray-500: #737373;
  --gray-700: #404040;
  --gray-900: #171717;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --content-max: 1100px;
  --reading-max: 760px;
  --radius: 999px;
}

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

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

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

/* =============== NAVBAR =============== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-100);
}

.navbar-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-brand .dot {
  color: var(--black);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.25rem;
  align-items: center;
  margin-left: auto;
  margin-right: 1rem;
}

.nav-links a {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--black);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.375rem;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--black);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--white);
  color: var(--black);
}

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

.hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
}

.hero-content {
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-bottom: 0.75rem;
  color: var(--black);
}

.hero h1 .name {
  display: inline-block;
}

.hero .role {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero .description {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--gray-700);
  max-width: 560px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.visitor-counter {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-200);
  font-size: 0.875rem;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.visitor-counter strong {
  color: var(--black);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  margin: 0 0.125rem;
}

.counter-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-500);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.btn-primary:hover {
  background: var(--white);
  color: var(--black);
}

.btn-secondary {
  background: var(--white);
  color: var(--black);
  border-color: var(--black);
}

.btn-secondary:hover {
  background: var(--black);
  color: var(--white);
}

/* =============== MAIN CONTENT (other pages) =============== */

main {
  max-width: var(--reading-max);
  margin: 0 auto;
  padding: 4rem 2rem 3rem;
}

main > section + section {
  margin-top: 3.5rem;
}

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

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--black);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 0.375rem;
  letter-spacing: -0.01em;
}

p {
  font-size: 1rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
  line-height: 1.65;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.6;
}

strong {
  color: var(--black);
  font-weight: 700;
}

/* =============== PAGE HEADER =============== */

.page-title {
  margin-bottom: 3rem;
  padding-bottom: 1.75rem;
  border-bottom: 2px solid var(--black);
}

.page-title h1 {
  margin-bottom: 0.5rem;
}

.page-title .lead {
  font-size: 1.0625rem;
  color: var(--gray-700);
  margin: 0;
}

/* =============== SECTION HEADER =============== */

.section-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--black);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-200);
}

/* =============== ITEM LIST =============== */

.item-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.75rem;
  align-items: baseline;
}

.item-meta {
  font-size: 0.8125rem;
  color: var(--gray-500);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.item-content h3 {
  margin-bottom: 0.25rem;
}

.item-content .item-sub {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.item-content p {
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* =============== PROJECT LIST =============== */

.project {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}

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

.project-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.project-head h3 {
  margin-bottom: 0;
  font-size: 1.125rem;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
  background: var(--gray-50);
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  border: 1px solid var(--gray-200);
}

.project p {
  font-size: 0.9375rem;
  color: var(--gray-700);
  margin-bottom: 0;
}

/* =============== SKILLS =============== */

.skills-group {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.skills-group:last-child {
  border-bottom: none;
}

.skills-group h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--black);
  margin-bottom: 0.875rem;
}

.skills-group ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-group li {
  font-size: 0.8125rem;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--black);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-family: var(--font-mono);
}

/* =============== BLOG LIST =============== */

.posts {
  display: flex;
  flex-direction: column;
}

.post-link {
  display: block;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-200);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.post-link:last-child {
  border-bottom: none;
}

.post-link:hover {
  text-decoration: none;
  opacity: 1;
}

.post-link:hover h3 {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-link .post-date {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
  display: block;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.post-link h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.post-link p {
  font-size: 0.9375rem;
  margin: 0;
  color: var(--gray-700);
}

/* =============== ARTICLE =============== */

.article-meta {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.article h1 {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--black);
}

.article h2 {
  font-size: 1.125rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* =============== CONTACT =============== */

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

.contact-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.75rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 1rem;
  align-items: baseline;
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row dt {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.contact-row dd {
  color: var(--black);
}

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

footer {
  border-top: 1px solid var(--gray-200);
  margin-top: 5rem;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-inner p {
  font-size: inherit;
  color: inherit;
  margin: 0;
}

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

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .navbar-inner {
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .nav-links {
    gap: 1.25rem;
    order: 3;
    width: 100%;
    margin: 0;
    flex-wrap: wrap;
  }

  .nav-links a {
    font-size: 0.875rem;
  }

  .nav-cta {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }

  .hero {
    padding: 3rem 1.25rem 3rem;
  }

  main {
    padding: 2.5rem 1.25rem 2rem;
  }

  main > section + section {
    margin-top: 2.5rem;
  }

  .item {
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .footer-inner {
    padding: 1.5rem 1.25rem;
    flex-direction: column;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
