/* ==========================================================================
   Geoffrey Asare — Personal Site
   Aesthetic: Typographic Manifesto / Warm Editorial
   ========================================================================== */

/* --- Custom Properties --- */
:root {
  --bg-dark: #0C0A09;
  --bg-light: #F8F5F1;
  --bg-warm: #F2EDE7;
  --surface: #FFFFFF;
  --text: #1C1917;
  --text-secondary: #57534E;
  --text-muted: #A8A29E;
  --accent: #EA580C;
  --accent-hover: #C2410C;
  --accent-light: #FFF7ED;
  --border: #E7E5E4;
  --border-dark: rgba(255, 255, 255, 0.08);

  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  --container: 1120px;
  --radius: 16px;
  --radius-sm: 8px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg-light);
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: white;
}

/* --- Grain Overlay --- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Container --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(12, 10, 9, 0.85);
  border-bottom: 1px solid var(--border-dark);
  transition: transform 0.3s ease;
}

.site-header.scroll-down {
  transform: translateY(-100%);
}

.site-header.scroll-up {
  transform: translateY(0);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: #FAFAF9;
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: #A8A29E;
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

nav a:hover {
  color: #FAFAF9;
}

nav a:hover::after {
  width: 100%;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  background: var(--bg-dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(234, 88, 12, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  padding-top: 8rem;
  padding-bottom: 5rem;
  position: relative;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  margin-bottom: 2.5rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.avatar:hover {
  transform: scale(1.03);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 6.5rem);
  font-weight: 400;
  font-style: italic;
  color: #FAFAF9;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-period {
  color: var(--accent);
}

.hero-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-size: 1.15rem;
  color: #78716C;
  line-height: 1.7;
  max-width: 40ch;
  margin-bottom: 2rem;
}

.hero-social {
  display: flex;
  gap: 1.25rem;
}

.hero-social a {
  color: #78716C;
  font-size: 1.35rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.hero-social a:hover {
  color: #FAFAF9;
  transform: translateY(-2px);
}

/* ==========================================================================
   Section Labels
   ========================================================================== */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.label-line {
  width: 3rem;
  height: 1px;
  background: var(--accent);
}

.label-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(234, 88, 12, 0.3);
}

.btn-primary svg {
  transition: transform 0.3s ease;
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-section {
  background: var(--bg-light);
  padding: 7rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-bio h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.about-bio h2 em {
  font-style: italic;
  color: var(--accent);
}

.about-bio p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 52ch;
}

.detail-group {
  margin-bottom: 2.5rem;
}

.detail-group:last-child {
  margin-bottom: 0;
}

.detail-group h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.tag-list li:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   Experience Section
   ========================================================================== */
.experience-section {
  background: var(--bg-warm);
  padding: 7rem 0;
}

.timeline {
  max-width: 700px;
}

.timeline-item {
  display: flex;
  gap: 2rem;
  position: relative;
}

.timeline-marker {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
  position: relative;
}

.timeline-marker::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: calc(100% + 2rem);
  background: var(--border);
}

.timeline-item:last-child .timeline-marker::after {
  display: none;
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.timeline-company {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.timeline-sep {
  color: var(--accent);
  margin: 0 0.15rem;
}

.timeline-duration {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 55ch;
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.work-section {
  background: var(--bg-light);
  padding: 7rem 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.project-card:hover {
  border-color: transparent;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(28, 25, 23, 0.08), 0 4px 12px rgba(28, 25, 23, 0.04);
}

.project-card:hover::before {
  transform: scaleX(1);
}

.project-number {
  font-family: var(--font-display);
  font-size: 4.5rem;
  color: rgba(28, 25, 23, 0.04);
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
  letter-spacing: -0.03em;
  transition: color 0.4s ease;
}

.project-card:hover .project-number {
  color: rgba(234, 88, 12, 0.08);
}

.project-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.project-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.project-content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.tech-stack {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tech-stack li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--bg-light);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
}

.project-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.project-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.project-links a:hover {
  color: var(--accent-hover);
}

.project-links a i {
  margin-right: 0.3rem;
}

/* ==========================================================================
   Education Section
   ========================================================================== */
.education-section {
  background: var(--bg-warm);
  padding: 7rem 0;
}

.education-card {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  max-width: 600px;
}

.education-accent {
  width: 4px;
  background: var(--accent);
  flex-shrink: 0;
}

.education-content {
  padding: 2rem;
}

.education-content h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.education-school {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.education-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
  background: var(--bg-dark);
  padding: 7rem 0;
}

.contact-inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.contact-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 400;
  color: #FAFAF9;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.contact-inner h2 em {
  font-style: italic;
  color: var(--accent);
}

.contact-location {
  font-size: 0.95rem;
  color: #78716C;
  margin-bottom: 2.5rem;
}

.contact-location i {
  color: var(--accent);
  margin-right: 0.4rem;
}

/* --- Contact Form --- */
.contact-form {
  text-align: left;
  margin-bottom: 2.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #78716C;
  margin-bottom: 0.5rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #FAFAF9;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #57534E;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.contact-form altcha-widget {
  margin: 1.25rem 0;
  display: block;
}

.contact-form .btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  margin-top: 0.5rem;
}

.contact-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-divider::before,
.contact-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.contact-divider span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #57534E;
  text-transform: uppercase;
  white-space: nowrap;
}

.social-links-footer {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: #D6D3D1;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.social-link:hover {
  color: #FAFAF9;
  border-color: var(--accent);
  background: rgba(234, 88, 12, 0.08);
  transform: translateY(-2px);
}

.social-link i {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.social-link:hover i {
  opacity: 1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-dark);
  border-top: 1px solid var(--border-dark);
  padding: 2rem 0;
  text-align: center;
}

.site-footer small {
  font-size: 0.8rem;
  color: #57534E;
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Hero entrance */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.projects-grid .scroll-reveal:nth-child(2) { transition-delay: 0.12s; }
.projects-grid .scroll-reveal:nth-child(3) { transition-delay: 0.24s; }

.timeline .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.timeline .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.timeline .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }

.about-details .scroll-reveal:nth-child(2) { transition-delay: 0.08s; }
.about-details .scroll-reveal:nth-child(3) { transition-delay: 0.16s; }
.about-details .scroll-reveal:nth-child(4) { transition-delay: 0.24s; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero-inner {
    padding-top: 7rem;
    padding-bottom: 4rem;
  }

  .hero-name {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .avatar {
    width: 140px;
    height: 140px;
  }

  nav {
    gap: 1rem;
    font-size: 0.8rem;
  }

  .about-section,
  .experience-section,
  .work-section,
  .education-section,
  .contact-section {
    padding: 5rem 0;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-badge {
    font-size: 0.6rem;
  }

  .project-card {
    min-height: auto;
  }

  .social-links-footer {
    flex-direction: column;
    align-items: center;
  }

  .section-label {
    margin-bottom: 2.5rem;
  }

  .timeline-item {
    gap: 1.25rem;
  }
}

@media (max-width: 400px) {
  .hero-name {
    font-size: 2.5rem;
  }

  nav {
    gap: 0.75rem;
  }
}
