/*
Theme Name: Horizons
Theme URI: https://github.com/your-username/horizons
Author: Avery L. Smith
Author URI: #
Description: A minimal dark link-in-bio personal site theme. Built for creators, founders, and ambitious ideas.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: dark, one-column, custom-logo, custom-menu, portfolio
Text Domain: horizons
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  --background: hsl(0, 0%, 6%);
  --foreground: hsl(0, 0%, 98%);
  --card: hsl(0, 0%, 9%);
  --card-foreground: hsl(0, 0%, 98%);
  --primary: hsl(0, 0%, 98%);
  --primary-foreground: hsl(0, 0%, 9%);
  --secondary: hsl(0, 0%, 15%);
  --secondary-foreground: hsl(0, 0%, 98%);
  --muted: hsl(0, 0%, 15%);
  --muted-foreground: hsl(0, 0%, 65%);
  --border: hsl(0, 0%, 15%);
  --ring: hsl(0, 0%, 83%);
  --radius: 1rem;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p {
  line-height: 1.7;
}

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

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

/* ============================================================
   LAYOUT
   ============================================================ */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
}

.container {
  max-width: 672px; /* 2xl = max-w-2xl */
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: hsla(0, 0%, 6%, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid hsla(0, 0%, 15%, 0.5);
  animation: fadeDown 0.5s ease forwards;
}

.site-header .container {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title a {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.site-title a:hover {
  opacity: 0.7;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-navigation a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.main-navigation a:hover {
  color: var(--foreground);
}

/* ============================================================
   HERO / PROFILE SECTION
   ============================================================ */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 1.5rem 4rem;
  animation: fadeUp 0.6s ease forwards;
}

.hero-avatar-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.hero-avatar-glow {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: hsla(0, 0%, 98%, 0.08);
  filter: blur(20px);
  animation: pulse 3s ease-in-out infinite;
}

.hero-avatar {
  position: relative;
  width: 7rem;
  height: 7rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 20px 60px -10px rgba(0,0,0,0.5);
}

@media (min-width: 640px) {
  .hero-avatar {
    width: 8rem;
    height: 8rem;
  }
}

.hero-name {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .hero-name {
    font-size: 2.25rem;
  }
}

.hero-bio {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 28rem;
  margin-bottom: 1rem;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.status-dot-wrap {
  position: relative;
  display: flex;
  width: 0.5rem;
  height: 0.5rem;
}

.status-dot-ping {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #4ade80;
  opacity: 0.75;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #22c55e;
}

/* ============================================================
   LINKS SECTION
   ============================================================ */
.links-section {
  padding: 0 1.5rem 4rem;
}

.links-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid hsla(0, 0%, 15%, 0.5);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  animation: fadeUp 0.5s ease both;
  text-decoration: none;
  color: inherit;
}

.link-card:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.link-card:hover {
  border-color: hsla(0, 0%, 98%, 0.2);
  box-shadow: 0 10px 40px -10px hsla(0, 0%, 98%, 0.04);
  transform: translateY(-2px) scale(1.005);
}

.link-card:active {
  transform: scale(0.995);
}

@media (min-width: 640px) {
  .link-card {
    padding: 1.25rem;
  }
}

.link-icon-wrap {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: calc(var(--radius) - 2px);
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-foreground);
  transition: background 0.3s ease, color 0.3s ease;
}

.link-card:hover .link-icon-wrap {
  background: var(--primary);
  color: var(--primary-foreground);
}

.link-icon-wrap svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

.link-text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.link-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  transition: color 0.3s ease;
  margin-bottom: 0.125rem;
}

.link-card:hover .link-title {
  color: var(--primary);
}

.link-desc {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .link-desc {
    white-space: normal;
  }
}

.link-arrow {
  flex-shrink: 0;
  color: var(--muted-foreground);
  transition: color 0.3s ease, transform 0.3s ease;
}

.link-card:hover .link-arrow {
  color: var(--primary);
  transform: translateX(4px);
}

.link-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2;
}

/* Stagger animation delays for link cards */
.links-grid li:nth-child(1) .link-card { animation-delay: 0.1s; }
.links-grid li:nth-child(2) .link-card { animation-delay: 0.2s; }
.links-grid li:nth-child(3) .link-card { animation-delay: 0.3s; }
.links-grid li:nth-child(4) .link-card { animation-delay: 0.4s; }
.links-grid li:nth-child(5) .link-card { animation-delay: 0.5s; }
.links-grid li:nth-child(6) .link-card { animation-delay: 0.6s; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid hsla(0, 0%, 15%, 0.5);
  margin-top: 3rem;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  list-style: none;
}

.social-link {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-foreground);
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.social-link:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  transform: scale(1.1);
}

.social-link:active {
  transform: scale(0.95);
}

.social-link svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 2;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-tagline {
  font-size: 0.75rem;
  color: hsla(0, 0%, 65%, 0.6);
  margin-top: 0.5rem;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.page-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.page-404 h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-404 p {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

.page-404 a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   WORDPRESS CORE ALIGNMENT CLASSES
   ============================================================ */
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.aligncenter { display: block; margin: 0 auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: var(--muted-foreground); }

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

/* ============================================================
   ADMIN BAR OFFSET
   ============================================================ */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}
