/* Design tokens — dark portfolio theme (ported from old-page, no Tailwind) */
:root {
  --color-bg: #141414;
  --color-bg-nav: rgba(20, 20, 20, 0.95);
  --color-text: #e5e7eb;
  --color-text-muted: #9ca3af;
  --color-text-dim: #6b7280;
  --color-border: #4b5563;
  --color-border-hover: #6b7280;
  --color-white: #ffffff;
  --max-width: 56rem;
  --nav-height: 4.5rem;
  --font-family:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

a:hover {
  color: var(--color-text-muted);
}

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

/* Layout */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-bg-nav);
}

@media (min-width: 768px) {
  .site-nav {
    justify-content: space-between;
  }
}

.site-nav__brand {
  margin: 0;
  display: none;
}

@media (min-width: 768px) {
  .site-nav__brand {
    display: block;
  }
}

.site-nav__links {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-main {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 2rem) 1rem 2rem;
  gap: 0 1rem;
}

.site-main > * {
  grid-column: 1 / -1;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem 0;
}

.site-divider {
  grid-column: 1 / -1;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  margin: 3rem 0;
}

@media (min-width: 768px) {
  .site-divider--inset {
    grid-column: 2 / 12;
  }
}

.about-col .section-title,
.skills-col .section-title {
  grid-column: auto;
}

.section-title {
  grid-column: 2 / 12;
  margin: 0 0 3rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Hero */
.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.hero__name {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.hero__name span {
  display: block;
}

.hero__social {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.hero__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--color-text);
}

.hero__social a:hover {
  color: var(--color-text-muted);
}

.hero__social i {
  font-size: 2.25rem;
  line-height: 1;
}

/* About + skills (sibling modules in main grid) */
.about-col {
  grid-column: 2 / 12;
}

.skills-col {
  grid-column: 2 / 12;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .about-col {
    grid-column: 2 / 7;
    padding-right: 2.25rem;
    margin-top: 0;
  }

  .skills-col {
    grid-column: 7 / 12;
    padding-left: 2.25rem;
    margin-top: 0;
  }
}

.skills-col--mobile-divider {
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
}

@media (min-width: 768px) {
  .skills-col--mobile-divider {
    border-top: 0;
    padding-top: 0;
  }
}

.about-skills__body {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
}

.about-skills__linkedin {
  font-size: 5rem;
  line-height: 1;
  display: inline-block;
}

.skills-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  font-size: 3.375rem;
  line-height: 1;
}

/* Portfolio */
#portfolio {
  scroll-margin-top: var(--nav-height);
}

.portfolio-item {
  grid-column: 2 / 12;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .portfolio-item {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .portfolio-item__card-col {
    padding-right: 2.25rem;
  }

  .portfolio-item__desc-col {
    padding-left: 2.25rem;
  }
}

.portfolio-card {
  display: block;
  text-align: center;
  border: 1px solid var(--color-border);
  padding: 1rem;
  font-size: 1.125rem;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.portfolio-card:hover {
  border-color: var(--color-border-hover);
  color: var(--color-text-muted);
}

.portfolio-card strong {
  display: block;
  margin-bottom: 0.5rem;
}

.portfolio-card__stack {
  display: block;
  font-size: 0.875rem;
  padding-bottom: 1rem;
}

.portfolio-card__type {
  display: block;
}

.portfolio-item__desc {
  margin: 0;
  font-size: 0.875rem;
}

.portfolio-item__desc strong {
  color: var(--color-text);
}

/* Experience / resume */
.resume {
  grid-column: 2 / 12;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .resume {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .resume__col-left {
    padding-right: 2.25rem;
  }

  .resume__col-right {
    padding-left: 2.25rem;
  }
}

.resume__subtitle {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.resume__text {
  margin: 0 0 1rem;
  font-size: 0.875rem;
}

.resume__text--muted {
  color: var(--color-text-dim);
}

.resume__entry {
  margin-bottom: 1rem;
}

.resume__entry-title {
  margin: 0;
  font-weight: 700;
}

/* Contact */
#contact {
  scroll-margin-top: var(--nav-height);
}

.contact {
  grid-column: 2 / 12;
  text-align: center;
}

.contact__heading {
  margin: 0 0 2.5rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  text-transform: uppercase;
}

.contact__intro {
  margin: 0 auto 2.5rem;
  max-width: 28rem;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .contact__intro {
    font-size: 0.875rem;
  }
}

.contact__form-wrap {
  max-width: 28rem;
  margin: 0 auto;
  text-align: left;
}

.contact-form {
  margin: 0;
}

.contact-form__field {
  margin-bottom: 1.5rem;
}

.contact-form__field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.contact-form__required {
  color: var(--color-text-muted);
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0;
}

.contact-form__field textarea {
  min-height: 6rem;
  resize: vertical;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: none;
  border-color: var(--color-border-hover);
}

.contact-form__submit {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.625rem 1.5rem;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.contact-form__submit:hover,
.contact-form__submit:focus {
  border-color: var(--color-border-hover);
}

.contact-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-form__status {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  text-align: center;
}

.contact-form__status--error {
  color: #f87171;
}

.contact__form-wrap:has(.contact-form__status:not([hidden])) {
  text-align: center;
}

.site-footer {
  grid-column: 2 / 12;
  margin: 3rem 0 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-dim);
}

/* System error pages */
.error-page {
  grid-column: 2 / 12;
  text-align: center;
  padding: 3rem 0 1rem;
}

.error-page__code {
  margin: 0 0 1.5rem;
  font-size: clamp(4rem, 18vw, 7rem);
  font-weight: 700;
  line-height: 1;
  color: var(--color-border);
}

.error-page__title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.error-page__message {
  margin: 0 auto 2rem;
  max-width: 24rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.error-page__action a {
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
