/* =====================================================
   ADJAH FREEMAN — PROFESSIONAL PORTFOLIO
   Main website stylesheet
===================================================== */

/* 1. THEME */

:root {
  color-scheme: dark;

  --bg: #151615;
  --panel: #1d1f1d;
  --surface: #222422;

  --paper: #f1f1ed;
  --muted: #b0b2aa;
  --line: #393c37;

  --accent: #c4e879;

  --contact-bg: #dcebc2;
  --contact-text: #20241b;
  --contact-muted: #515a45;

  --header-bg: rgba(21, 22, 21, 0.97);

  --max: 1160px;
  --radius: 8px;
}

html[data-theme="light"] {
  color-scheme: light;

  --bg: #f7f7f4;
  --panel: #eeeeea;
  --surface: #ffffff;

  --paper: #242620;
  --muted: #62665d;
  --line: #dedfd8;

  --accent: #567c20;

  --contact-bg: #e5edda;
  --contact-text: #25291f;
  --contact-muted: #59604e;

  --header-bg: rgba(247, 247, 244, 0.97);
}


/* 2. RESET */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  background: var(--bg);
  color: var(--paper);

  font-family: "Segoe UI", Arial, Helvetica, sans-serif;

  font-size: 16px;
  line-height: 1.7;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}


/* 3. TYPOGRAPHY */

h1,
h2,
h3,
h4 {
  color: var(--paper);
  font-weight: 600;
  line-height: 1.3;
}

p {
  overflow-wrap: break-word;
}

.eyebrow,
.kicker,
.hero-index,
.project-number,
.post-type,
.post-date {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.035em;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 650;
}

.hero h1 em,
h2 em {
  color: var(--accent);
  font-style: normal;
}


/* 4. HEADER */

.site-header {
  min-height: 76px;

  padding: 12px max(
    24px,
    calc((100vw - var(--max)) / 2)
  );

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;

  position: sticky;
  top: 0;
  z-index: 100;

  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.wordmark {
  flex-shrink: 0;

  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.06em;
}

.wordmark span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.site-nav a,
.header-cta {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.header-cta:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-cta {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.menu-toggle {
  display: none;

  padding: 9px 13px;

  background: transparent;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.theme-toggle {
  width: 40px;
  height: 40px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  color: var(--paper);

  border: 1px solid var(--line);
  border-radius: 50%;

  font-size: 19px;
}

.theme-toggle:hover {
  background: var(--accent);
  color: #202020;
  border-color: var(--accent);
}


/* 5. HERO */

.hero {
  min-height: 620px;

  padding-top: clamp(90px, 12vw, 145px);
  padding-bottom: 45px;

  display: flex;
  flex-direction: column;
}

.status-dot {
  display: inline-block;

  width: 8px;
  height: 8px;

  margin-right: 9px;

  background: var(--accent);
  border-radius: 50%;
}

.hero h1 {
  max-width: 950px;
  margin: 30px 0 25px;
}

.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 35px;
}

.intro {
  max-width: 650px;

  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.85;
}

.text-link {
  display: inline-block;

  padding-bottom: 5px;

  border-bottom: 1px solid var(--muted);

  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hero-index {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;

  margin-top: auto;
  padding-top: 20px;

  border-top: 1px solid var(--line);
}


/* 6. GENERAL SECTIONS */

.section {
  padding-block: 95px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;

  margin-bottom: 38px;
}

.section-heading h2,
.about-grid h2,
.contact-grid h2 {
  margin-top: 12px;

  font-size: clamp(2.1rem, 4.5vw, 3.6rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.section-heading > p {
  max-width: 340px;

  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.8;
}


/* 7. PROJECTS */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 28px;
}

.project-card {
  min-width: 0;
  padding-top: 20px;

  border-top: 1px solid var(--line);
}

.project-number {
  margin-bottom: 15px;
}

.project-image {
  display: block;

  width: 100%;
  aspect-ratio: 1.6;

  overflow: hidden;

  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.project-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  transition: transform 0.35s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.025);
}

.project-content h3 {
  margin: 17px 0 8px;
  font-size: 1.4rem;
}

.project-content p {
  max-width: 650px;

  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.8;
}

.project-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;

  margin: 17px 0;
}

.tech-tag {
  padding: 6px 10px;

  border: 1px solid var(--line);
  border-radius: 4px;

  color: var(--muted);
  font-size: 0.8rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;

  margin-top: 18px;
}

.project-links a,
.post-read-button {
  padding-bottom: 4px;

  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);

  color: var(--paper);
  font-size: 0.92rem;
}

.project-links a:hover,
.post-read-button:hover {
  color: var(--accent);
  border-color: var(--accent);
}


/* 8. ABOUT */

.about-band {
  padding: 95px 0;

  background: var(--panel);
  border-block: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9%;
}

.about-copy {
  max-width: 620px;
}

.about-copy p {
  margin-bottom: 20px;

  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.9;
}

.about-copy .text-link {
  margin-top: 8px;
}


/* 9. PROFESSIONAL PROFILE */

.professional-details {
  display: grid;
  gap: 25px;
  margin-top: 30px;
}

.professional-details h3 {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 1.15rem;
}

.professional-details h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.professional-details p {
  color: var(--muted);
  font-size: 0.96rem;
  white-space: pre-line;
}

.public-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.public-skills .tech-tag {
  display: inline-block;
}


/* 10. CV */

.cv-manager {
  display: grid;
  gap: 15px;

  padding: 20px;

  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.cv-manager h3 {
  margin: 0;
}

.current-cv {
  padding: 13px;

  border: 1px solid var(--line);
  border-radius: 5px;

  color: var(--muted);
  overflow-wrap: anywhere;
}

.current-cv a {
  color: var(--accent);
  text-decoration: underline;
}

.cv-manager input[type="file"] {
  width: 100%;
  max-width: 100%;
}


/* 11. JOURNAL */

.posts-list {
  border-top: 1px solid var(--line);
}

.post-item {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;

  padding: 25px 0;

  border-bottom: 1px solid var(--line);
}

.post-index {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 0.85rem;
}

.post-info h3 {
  margin: 7px 0 9px;
  font-size: 1.25rem;
}

.post-info p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.post-date {
  display: block;
  margin-top: 10px;
  font-size: 0.78rem;
}

.empty-note,
.loading-note {
  color: var(--muted);
}


/* 12. TESTIMONIALS */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;

  margin-top: 30px;
}

.testimonial-card {
  padding: 24px;

  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.testimonial-feedback {
  margin-bottom: 22px;

  color: var(--paper);
  font-size: 0.98rem;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.testimonial-author strong {
  font-size: 0.94rem;
}

.testimonial-author span,
.testimonial-author small {
  color: var(--muted);
  font-size: 0.83rem;
}


/* 13. CONTACT */

.contact-section {
  padding: 95px 0;

  background: var(--contact-bg);
  color: var(--contact-text);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9%;
}

.contact-grid .kicker {
  color: var(--contact-muted);
}

.contact-grid h2,
.contact-grid h2 em {
  color: var(--contact-text);
}

.contact-intro {
  max-width: 600px;
  margin-top: 22px;

  color: var(--contact-muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;

  margin-bottom: 35px;
}

.social-links a {
  padding-bottom: 4px;

  color: var(--contact-text);
  border-bottom: 1px solid currentColor;

  font-size: 0.95rem;
}

.social-links a:hover {
  opacity: 0.65;
}


/* 14. CONTACT FORM */

.contact-form {
  display: grid;
  gap: 20px;
}

.contact-form label {
  display: block;
  color: var(--contact-text);

  font-size: 0.94rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;

  margin-top: 7px;
  padding: 12px 10px;

  background: transparent;
  color: var(--contact-text);

  border: 0;
  border-bottom: 1px solid #929b80;
  border-radius: 0;

  outline: none;
  resize: vertical;

  font-size: 1rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--contact-muted);
  opacity: 0.85;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--contact-text);
}

.button {
  width: max-content;
  max-width: 100%;

  padding: 13px 21px;

  border: 0;
  border-radius: 5px;

  font-size: 0.94rem;
  font-weight: 650;
}

.button-light {
  background: #20241c;
  color: #ffffff;
}

.button-light:hover {
  background: #363c2e;
}

.button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-status {
  min-height: 24px;
  font-size: 0.9rem;
}


/* 15. FOOTER */

.site-footer {
  min-height: 95px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer p,
.site-footer > a:last-child {
  color: var(--muted);
  font-size: 0.85rem;
}


/* 16. JOURNAL DIALOG */

.post-dialog {
  width: min(850px, calc(100% - 30px));
  max-height: 88vh;

  margin: auto;
  padding: clamp(22px, 5vw, 45px);

  overflow: auto;

  background: var(--bg);
  color: var(--paper);

  border: 1px solid var(--line);
  border-radius: 7px;
}

.post-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.dialog-close {
  position: sticky;
  top: 0;
  float: right;

  width: 40px;
  height: 40px;

  background: var(--surface);
  color: var(--paper);

  border: 1px solid var(--line);
  border-radius: 5px;

  font-size: 23px;
}

#post-dialog-content h2 {
  margin: 20px 0;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
}

.dialog-image {
  width: 100%;
  max-height: 420px;

  margin: 22px 0;
  object-fit: cover;
}

.dialog-excerpt,
.dialog-body {
  margin: 20px 0;

  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;

  overflow-wrap: anywhere;
}

.dialog-body {
  white-space: pre-wrap;
}


/* 17. PROJECT AND ARTICLE PAGES */

.project-page,
.article-page {
  width: min(950px, calc(100% - 40px));
  margin: 75px auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 35px;
  color: var(--muted);
}

.back-link:hover {
  color: var(--accent);
}

.project-page h1,
.article-page h1 {
  margin-bottom: 22px;

  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.15;
}

.project-description,
.article-excerpt {
  max-width: 750px;

  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.project-cover,
.article-cover {
  display: block;

  width: 100%;
  max-height: 550px;

  margin: 35px 0;

  object-fit: cover;
  border-radius: 6px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;

  margin-top: 28px;
}

.project-actions a {
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}

.project-technologies .tag {
  padding: 7px 11px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.article-date {
  margin: 12px 0 25px;
  color: var(--muted);
}

.article-body {
  margin-top: 30px;

  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.95;

  white-space: pre-wrap;
  overflow-wrap: anywhere;
}


/* 18. TABLET */

@media (max-width: 900px) {
  .site-header {
    padding-inline: 24px;
  }

  .hero {
    min-height: 570px;
  }

  .about-grid,
  .contact-grid {
    gap: 6%;
  }

  .section {
    padding-block: 80px;
  }
}


/* 19. MOBILE */

@media (max-width: 700px) {

  body {
    font-size: 16px;
  }

  .wrap {
    width: calc(100% - 40px);
  }

  .site-header {
    min-height: 70px;

    padding: 10px 18px;
    gap: 10px;
  }

  .wordmark {
    font-size: 1.4rem;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 76px;
    min-height: 42px;

    order: 3;
    font-size: 0.9rem;
  }

  .header-actions {
    margin-left: auto;
    order: 2;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .header-cta {
    display: none;
  }

  .site-nav {
    display: none;

    position: absolute;
    top: 100%;
    left: 0;
    right: 0;

    padding: 15px 22px 22px;

    flex-direction: column;
    align-items: stretch;
    gap: 0;

    background: var(--header-bg);
    border-bottom: 1px solid var(--line);

    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    display: block;
    padding: 13px 0;

    color: var(--paper);
    font-size: 1rem;

    border-bottom: 1px solid var(--line);
  }

  /* HERO */

  .hero {
    min-height: auto;
    padding-top: 75px;
    padding-bottom: 38px;
  }

  .hero h1 {
    margin: 25px 0 22px;

    font-size: clamp(2.65rem, 9vw, 3.8rem);
    line-height: 1.14;
    letter-spacing: -0.04em;
  }

  .hero-bottom,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-bottom {
    gap: 20px;
  }

  .intro {
    font-size: 1rem;
    line-height: 1.8;
  }

  .hero-index {
    margin-top: 45px;
    font-size: 0.75rem;
  }

  /* SECTIONS */

  .section {
    padding-block: 68px;
  }

  .section-heading {
    gap: 14px;
    margin-bottom: 28px;
  }

  .section-heading h2,
  .about-grid h2,
  .contact-grid h2 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    line-height: 1.2;
  }

  .section-heading > p {
    font-size: 0.94rem;
  }

  /* PROJECTS */

  .project-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-image {
    aspect-ratio: 1.55;
  }

  .project-content h3 {
    font-size: 1.3rem;
  }

  .project-content p,
  .post-info p {
    font-size: 0.95rem;
  }

  /* ABOUT */

  .about-band,
  .contact-section {
    padding-block: 68px;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-copy p,
  .contact-intro {
    font-size: 0.98rem;
    line-height: 1.85;
  }

  /* JOURNAL */

  .post-item {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;

    padding: 22px 0;
  }

  .post-read-button {
    grid-column: 2;
    justify-self: start;
  }

  .post-info h3 {
    font-size: 1.15rem;
  }

  /* TESTIMONIALS */

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .testimonial-card {
    padding: 20px;
  }

  .testimonial-feedback {
    font-size: 0.94rem;
  }

  /* CONTACT */

  .contact-form {
    gap: 19px;
  }

  .contact-form label {
    font-size: 0.92rem;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
  }

  /* FOOTER */

  .site-footer {
    flex-wrap: wrap;
    padding-block: 22px;
  }

  .project-page,
  .article-page {
    margin: 45px auto;
  }

}


/* 20. SMALL PHONES */

@media (max-width: 380px) {

  .wrap {
    width: calc(100% - 30px);
  }

  .site-header {
    padding-inline: 13px;
  }

  .menu-toggle {
    min-width: 68px;
    padding-inline: 8px;
  }

  .theme-toggle {
    width: 37px;
    height: 37px;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .hero-index {
    flex-direction: column;
  }

}


/* 21. ACCESSIBILITY */

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}