/* ================================================
   EMMANUEL OWUSU — PORTFOLIO CSS
   Dark theme · Magenta accent · Clean & short
   ================================================ */

@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap");

/* ── Variables ── */
:root {
  --bg: #141420;
  --bg2: #1e1e2e;
  --card: #252535;
  --input: #2a2a3d;
  --border: #2e2e45;
  --magenta: #e040fb;
  --magenta-sec: #df05ac;
  --purple: #7c3aed;
  --tag-bg: #3a1a5e;
  --tag-text: #c084fc;
  --text: #f0f0f8;
  --text2: #a0a0bc;
  --muted: #6b6b88;
  --display: "Syne", sans-serif;
  --body: "DM Sans", sans-serif;
  --radius: 12px;
  --nav-h: 68px;
  --t: 0.3s ease;
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--t);
}
img {
  display: block;
  max-width: 100%;
}
button {
  cursor: pointer;
  font-family: var(--body);
  border: none;
}

/* ── Shared ── */
.section-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.section-subtitle {
  font-size: 0.93rem;
  color: var(--text2);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}
.btn-primary {
  display: inline-block;
  background: linear-gradient(to right, var(--magenta-sec), var(--magenta));
  color: #fff;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(224, 64, 251, 0.35);
  transition:
    background var(--t),
    transform var(--t),
    box-shadow var(--t);
}
.btn-primary:hover {
  background: #cc30e0;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(224, 64, 251, 0.5);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--text);
  padding: 0.73rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  transition:
    border-color var(--t),
    color var(--t),
    background var(--t);
}
.btn-outline:hover {
  border-color: var(--magenta);
  color: var(--magenta);
  background: rgba(224, 64, 251, 0.05);
}

/* ================================================
   NAVBAR
   ================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(20, 20, 32, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo-box {
  width: 36px;
  height: 36px;
  background: var(--magenta);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text2);
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--magenta);
  transition: width var(--t);
}
.nav-links a:hover {
  color: var(--text);
}
.nav-links a:hover::after {
  width: 100%;
}

.nav-social {
  display: flex;
  gap: 1.2rem;
}
.nav-social a {
  font-size: 0.85rem;
  color: var(--muted);
}
.nav-social a:hover {
  color: var(--magenta);
}

.nav-mobile-btn {
  display: none;
}

/* ================================================
   HERO
   ================================================ */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    ellipse,
    rgba(224, 64, 251, 0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.hero-content {
  max-width: 780px;
  padding: 3rem 2rem;
  position: relative;
  z-index: 1;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
}
.hero-name {
  color: var(--magenta-sec);
  display: block;
  font-size: clamp(2.4rem, 6vw, 2.8rem);
  font-weight: 800;
}
.hero-bio {
  font-size: 0.97rem;
  color: var(--text2);
  max-width: 580px;
  margin: 1.6rem auto;
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.hero-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin-top: 2.5rem;
}
.hero-social {
  display: flex;
  gap: 1.2rem;
}
.hero-social a {
  font-size: 0.85rem;
  color: var(--muted);
}
.hero-social a:hover {
  color: var(--magenta);
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.scroll-indicator span {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.scroll-arrow {
  color: var(--muted);
  animation: bounce 1.8s ease-in-out infinite;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* ================================================
   PROJECTS
   ================================================ */
.projects {
  padding: 6rem 2rem;
  background: var(--bg2);
  text-align: center;
}
.projects .section-subtitle {
  margin-bottom: 3rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
  max-width: 1100px;
  margin: 0 auto 3.5rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  text-align: left;
  transition:
    transform var(--t),
    box-shadow var(--t),
    border-color var(--t);
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(224, 64, 251, 0.25);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(224, 64, 251, 0.1);
}

.card-img {
  height: 200px;
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card-img img {
  transform: scale(1.04);
}

.card-title {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 1.2rem 1.4rem 0.5rem;
}
.card-desc {
  font-size: 0.88rem;
  color: var(--text2);
  padding: 0 1.4rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.4rem 1rem;
}
.card-tags span {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(192, 132, 252, 0.2);
}

.card-footer {
  padding: 0.5rem 1.4rem 1.4rem;
}
.btn-read {
  background: transparent;
  color: var(--magenta);
  font-size: 0.88rem;
  font-weight: 600;
  transition: letter-spacing var(--t);
}
.btn-read:hover {
  letter-spacing: 0.04em;
}

.collab-text {
  color: var(--text2);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ================================================
   TECH STACK
   ================================================ */
.techstack {
  padding: 6rem 2rem;
  background: var(--bg);
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.techstack-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.techstack-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem;
  justify-content: center;
  align-items: center;
}
.tech-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform var(--t),
    border-color var(--t),
    box-shadow var(--t);
}
.tech-card:hover {
  transform: translateY(-5px);
  border-color: rgba(224, 64, 251, 0.3);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.tech-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  transition: transform var(--t);
}
.tech-card:hover img {
  transform: scale(1.12);
}

/* ================================================
   CONTACT
   ================================================ */
.contact {
  padding: 6rem 2rem;
  background: var(--bg2);
}
.contact-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.contact-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
}

.contact-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-left h2 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.contact-left > p {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 1.8rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 2rem;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  transition:
    border-color var(--t),
    background var(--t);
  color: var(--text);
}
.contact-item:hover {
  border-color: rgba(224, 64, 251, 0.3);
  background: #2e2e42;
}
.contact-item-icon {
  width: 38px;
  height: 38px;
  background: var(--tag-bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item div {
  flex: 1;
}
.contact-item h3 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15rem;
}
.contact-item p {
  font-size: 0.88rem;
  color: var(--text);
}

.follow-me {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.follow-me strong {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.follow-links {
  display: flex;
  gap: 0.8rem;
}
.follow-links a {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  transition:
    border-color var(--t),
    color var(--t);
}
.follow-links a:hover {
  border-color: var(--magenta);
  color: var(--magenta);
}

.contact-right {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}
.contact-right h1 {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-form input,
.contact-form textarea {
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--body);
  font-size: 0.92rem;
  outline: none;
  transition:
    border-color var(--t),
    box-shadow var(--t);
  width: 100%;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}
.contact-form button {
  background: var(--magenta);
  color: #fff;
  padding: 0.85rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(224, 64, 251, 0.3);
  transition:
    background var(--t),
    transform var(--t);
}
.contact-form button:hover {
  background: #cc30e0;
  transform: translateY(-2px);
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1.5rem;
}

.footer-top {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.footer-profile-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.footer-logo {
  width: 40px;
  height: 40px;
  background: var(--magenta);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}
.footer-profile-head h1 {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
}
.footer-profile-head p {
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-bio {
  font-size: 0.88rem;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 1rem;
}
.footer-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.footer-tags p {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(192, 132, 252, 0.2);
}

.footer-links h1,
.footer-contact h1 {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}
.footer-links > div {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer-links a {
  font-size: 0.88rem;
  color: var(--text2);
}
.footer-links a:hover {
  color: var(--magenta);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}
.footer-contact-item p {
  font-size: 0.86rem;
  color: var(--text2);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-copy p {
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-copy span {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}
.footer-social {
  display: flex;
  gap: 1.2rem;
}
.footer-social a {
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-social a:hover {
  color: var(--magenta);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 900px) {
  .contact-body {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-profile {
    grid-column: 1 / -1;
  }
  .tech-grid{
    grid-template-columns: repeat(3, 1fr);
    width: 100vw;
    gap: 10px;
  }
  .tech-card{
    width: 80px;
  }
}

@media (max-width: 640px) {
  .nav-links,
  .nav-social {
    display: none;
  }
  .nav-mobile-btn {
    display: flex;
    align-items: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem 0.9rem;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
  }
  .hero-footer {
    flex-direction: column;
    gap: 1.5rem;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ================================================
   JS-DRIVEN STATES (main.js)
   ================================================ */

/* Navbar — scrolled state */
.navbar--scrolled {
  height: 56px;
  background: rgba(14, 14, 22, 0.97);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  transition: height 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* Active nav link */
.nav-links a.nav-link--active {
  color: var(--text);
}
.nav-links a.nav-link--active::after {
  width: 100%;
}

/* Mobile nav open state */
@media (max-width: 640px) {
  .nav-links--open {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(20, 20, 32, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1.2rem 2rem 1.6rem;
    gap: 1.2rem;
    z-index: 999;
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero typing role span */
.hero-role {
  display: inline-block;
  color: var(--magenta);
  font-weight: 600;
  min-width: 2ch;
  border-right: 2px solid var(--magenta);
  padding-right: 3px;
  animation: blink-cursor 0.75s step-end infinite;
}
@keyframes blink-cursor {
  0%, 100% { border-color: var(--magenta); }
  50%       { border-color: transparent; }
}

/* Contact form — error states */
.input--error {
  border-color: #e05555 !important;
  box-shadow: 0 0 0 3px rgba(224, 85, 85, 0.15) !important;
}
.field-error {
  display: block;
  font-size: 0.78rem;
  color: #e07070;
  margin-top: -0.4rem;
}

/* Submit button — sent state */
.btn--sent {
  background: #2a7a4b !important;
  box-shadow: 0 4px 18px rgba(42, 122, 75, 0.35) !important;
}
