/* ============================================
   PERSONAL WEBSITE - MAIN STYLESHEET
   ============================================
   Table of Contents:
   1. CSS Variables & Reset
   2. Base Styles
   3. Navigation
   4. Hero Section
   5. Cards & Grid Layouts
   6. Page-Specific Styles
   7. Footer
   8. Utility Classes
   9. Responsive Design
   ============================================ */

/* ----- 1. CSS Variables & Reset ----- */
:root {
  /* COLORS - Dark theme. Change --primary to adjust accent color. */
  --primary: #38bdf8;           /* sky-blue accent */
  --primary-dark: #0ea5e9;
  --primary-light: rgba(56, 189, 248, 0.10);
  --accent: #f59e0b;
  --text: #e2e8f0;              /* light text on dark bg */
  --text-light: #94a3b8;        /* muted text */
  --bg: #080c10;                /* page background */
  --bg-alt: #0f1520;            /* alternate section background */
  --bg-card: #111c2a;           /* card surface */
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(56, 189, 248, 0.35);
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --glow: 0 0 18px rgba(56, 189, 248, 0.18);
  --radius: 8px;
  --radius-lg: 14px;
  --max-width: 1100px;
  --nav-height: 64px;
  --transition: 0.22s ease;
}

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

/* ----- 2. Base Styles ----- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  /* CHANGE: swap font stack here if you import a Google Font */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  padding-top: var(--nav-height);
}

h1, h2, h3, h4 {
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* Typography scale */
h1 { font-size: 2.5rem;  font-weight: 800; }
h2 { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: 1.2rem;  font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 1rem;    font-weight: 600; }

p { color: var(--text-light); line-height: 1.7; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: #7dd3fc; }

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

/* Container used on every page */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Standard page section spacing */
.section {
  padding: 5.5rem 0;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__header h2 {
  margin-bottom: 0.6rem;
}

.section__header p {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* Subtle label above section headings */
.section__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.65rem;
}

/* ----- 3. Navigation ----- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(8, 12, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

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

.nav__logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  transition: color var(--transition);
}

.nav__logo:hover { color: var(--primary); }

.nav__links {
  display: flex;
  list-style: none;
  gap: 0.15rem;
}

.nav__links a {
  display: block;
  padding: 0.45rem 0.8rem;
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--transition);
  letter-spacing: 0.01em;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* Hamburger button - visible only on mobile */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-light);
  margin: 5px 0;
  transition: all 0.3s;
  border-radius: 2px;
}

/* ----- 4. Hero Section ----- */
.hero {
  padding: 8rem 0 7rem;
  text-align: center;
  background: var(--bg);
}

.hero h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: #04090e;             /* dark text on bright accent */
  border-color: var(--primary);
}

.btn--primary:hover {
  background: #7dd3fc;
  border-color: #7dd3fc;
  color: #04090e;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: rgba(56, 189, 248, 0.45);
}

.btn--outline:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: #7dd3fc;
  transform: translateY(-1px);
}

/* Fully-clickable card wrapper */
a.card--link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

a.card--link h3 {
  color: var(--text);
}

a.card--link p {
  color: var(--text-light);
}

/* ----- 5. Cards & Grid Layouts ----- */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow), var(--shadow-md);
  transform: translateY(-3px);
}

.card__icon {
  width: 46px;
  height: 46px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  /* thin accent ring */
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.card h3 {
  margin-bottom: 0.6rem;
  color: var(--text);
}

.card p {
  font-size: 0.92rem;
  line-height: 1.7;
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.01em;
  transition: gap var(--transition), color var(--transition);
}

.card__link:hover {
  color: #7dd3fc;
  gap: 0.55rem;
}

/* Tag / Badge */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(56, 189, 248, 0.2);
  margin: 0.2rem;
}

.tag--accent {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}

/* ----- 6. Page-Specific Styles ----- */

/* -- Athletics Page -- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow);
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-card__label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 0.45rem;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.image-placeholder {
  background: var(--bg-card);
  border: 1.5px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* -- W3Dota Page -- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--primary-light), transparent);
}

.timeline__item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg);
  transform: translateX(-50%);
  margin-left: 1px;
}

.timeline__date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.timeline__content h3 {
  margin-bottom: 0.25rem;
}

/* -- About Page -- */
.about-intro {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.about-intro__photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.85rem;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.07);
}

.about-intro__text h1 {
  margin-bottom: 0.5rem;
}

.about-intro__text p {
  margin-bottom: 1rem;
}

/* -- Contact Page -- */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.contact-link:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow);
  transform: translateX(4px);
}

.contact-link__icon {
  width: 40px;
  height: 40px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.contact-link__text {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.contact-link__text small {
  display: block;
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.82rem;
  margin-top: 0.1rem;
}

/* ----- 7. Footer ----- */
.footer {
  background: #060a0e;
  border-top: 1px solid var(--border);
  color: var(--text-light);
  padding: 2.25rem 0;
  margin-top: auto;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer p {
  font-size: 0.875rem;
  color: var(--text-light);
}

.footer a {
  color: var(--text-light);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer a:hover {
  color: var(--primary);
}

.footer__links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

/* ----- 8. Utility Classes ----- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ----- 9. Responsive Design ----- */
@media (max-width: 768px) {
  h1 { font-size: 1.875rem; letter-spacing: -0.02em; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.1rem; }

  .hero h1 { font-size: 2.25rem; }
  .hero { padding: 6rem 0 5rem; }

  .section { padding: 3.5rem 0; }

  /* Mobile navigation */
  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: #0b1018;
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem 1rem;
    box-shadow: var(--shadow-lg);
  }

  .nav__links.open { display: flex; }

  .nav__toggle { display: block; }

  /* Hamburger animation when open */
  .nav__toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Stack grids on mobile */
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  /* About page layout */
  .about-intro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-intro__photo {
    width: 150px;
    height: 150px;
  }

  /* Footer stacks on mobile */
  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn { width: 100%; justify-content: center; }
}
