/* ========================================
   Irksomewolf Landing Page
   Authored in plain CSS for the single-page site.
   Token-only color/typography/spacing values
   defined locally; shared tokens live in tokens.css.
   ======================================== */

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

:root {
  /* ---- Landing-specific colors ---- */
  --surface: #16130d;
  --outline-variant: #4d4637;
  --on-surface: #e9e1d7;
  --on-secondary-container: #bcb1ea;

  /* ---- Typography scale (landing uses its own scale) ---- */
  --font-display: "Outfit", sans-serif;
  --font-body: "Inter", sans-serif;

  --text-headline-lg: 1.8rem;
  --text-headline-lg-mobile: 1.55rem;
  --text-body-md: 0.92rem;
  --text-label-md: 1.02rem;
  --text-label-sm: 0.78rem;
  --text-footer: 0.75rem;

  --leading-headline: 1.2;
  --leading-body: 1.6;
  --leading-label: 1.4;

  --weight-headline: 700;
  --weight-label: 600;
  --weight-body: 400;
  --weight-footer: 400;

  /* ---- Spacing tokens ---- */
  --padding-mobile: 1rem;
  --padding-tablet: 1.5rem;
  --padding-desktop: 2rem;
  --container-max: 600px;
  --gap-card: 14px;

  /* ---- Radius tokens ---- */
  --radius-full: 9999px;
  --radius-xl: 0.75rem;

  /* ---- Shadow tokens ---- */
  --shadow-elevated: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-avatar-glow: 0 0 20px rgba(201, 168, 76, 0.3);
}

/* ========================================
   Base / Body
   ======================================== */
html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100%;
  overflow: hidden;
  line-height: 1.6;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  font-weight: var(--weight-body);
}

.scroll-root {
  height: 100%;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  padding-bottom: 3rem;
}

/* ========================================
   Atmospheric Backgrounds (landing-specific positioning)
   ======================================== */
.bg-glow {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 320px 220px at 50% 25%,
      rgba(26, 16, 64, 0.5) 0%,
      transparent 45%
    ),
    radial-gradient(
      ellipse 220px 320px at 30% 70%,
      rgba(201, 168, 76, 0.03) 0%,
      transparent 40%
    ),
    radial-gradient(
      ellipse 220px 320px at 70% 60%,
      rgba(201, 168, 76, 0.02) 0%,
      transparent 40%
    );
}

.particles-layer-1,
.particles-layer-2 {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.hidden-mobile {
  display: none;
}

@media (min-width: 769px) and (min-height: 601px) {
  .hidden-mobile {
    display: block;
  }
}

/* ========================================
   Mobile Performance Overrides (max-width: 768px)
   ======================================== */
@media (max-width: 768px) {
  .about {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background-color: rgba(26, 16, 64, 0.85);
  }

  .hero-avatar-img {
    box-shadow: 0 0 8px rgba(201, 168, 76, 0.4);
  }

}

/* ========================================
   Main Content Canvas
   ======================================== */
.main-content {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 3rem var(--padding-mobile) 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .main-content {
    padding-left: var(--padding-tablet);
    padding-right: var(--padding-tablet);
    padding-top: 5rem;
  }
}

/* ========================================
   Section 1: Hero
   ======================================== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-avatar {
  position: relative;
  width: 7rem;
  height: 7rem;
  margin-bottom: 1.5rem;
}

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

.hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
  border: 2px solid var(--gold);
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-avatar-glow);
}

.hero-name {
  font-family: var(--font-display);
  font-size: var(--text-headline-lg-mobile);
  font-weight: var(--weight-headline);
  line-height: var(--leading-headline);
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .hero-name {
    font-size: var(--text-headline-lg);
  }
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  line-height: var(--leading-body);
  font-weight: var(--weight-body);
  color: var(--text-secondary);
  max-width: 28rem;
  margin: 0 auto;
}

.hero-roles {
  font-family: var(--font-body);
  font-size: var(--text-label-sm);
  line-height: var(--leading-label);
  font-weight: var(--weight-body);
  color: var(--text-secondary);
}

/* ========================================
   Section 2: About
   ======================================== */
.about {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: rgba(26, 16, 64, 0.6);
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(77, 70, 55, 0.2);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-elevated);
}

@media (min-width: 768px) {
  .about {
    padding: 2rem;
  }
}

.about-title {
  font-family: var(--font-display);
  font-size: var(--text-headline-lg-mobile);
  font-weight: var(--weight-headline);
  line-height: var(--leading-headline);
  color: var(--gold);
  margin: 0;
  line-height: 1.1;
}

.about-text {
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  line-height: var(--leading-body);
  font-weight: var(--weight-body);
  color: var(--on-surface);
  line-height: 1.625;
}

/* ========================================
   Section 3: Projects (What I'm working on)
   ======================================== */
.projects {
  display: flex;
  flex-direction: column;
  gap: var(--gap-card);
}

.projects-title {
  font-family: var(--font-display);
  font-size: var(--text-headline-lg-mobile);
  font-weight: var(--weight-headline);
  line-height: var(--leading-headline);
  color: var(--gold);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-card);
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.project-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 1rem;
  border-radius: var(--radius);
  background-color: var(--card-bg);
  border: 1px solid rgba(77, 70, 55, 0.3);
  box-shadow: var(--shadow-card);
}

.project-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  border: 1px solid rgba(77, 70, 55, 0.2);
}

.project-icon-glyph {
  font-family: "Material Symbols Outlined", sans-serif;
  font-weight: normal;
  font-style: normal;
  color: var(--gold);
  font-variation-settings: "FILL" 1;
}

.project-info {
  flex: 1;
}

.project-name {
  font-family: var(--font-body);
  font-size: var(--text-label-md);
  line-height: var(--leading-label);
  font-weight: var(--weight-label);
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.project-status {
  font-family: var(--font-body);
  font-size: var(--text-label-sm);
  line-height: var(--leading-label);
  font-weight: var(--weight-body);
  color: var(--text-muted);
}

/* ========================================
   Section 4: Find me elsewhere
   ======================================== */
.elsewhere {
  display: flex;
  flex-direction: column;
  gap: var(--gap-card);
  width: 100%;
}

.elsewhere-title {
  font-family: var(--font-display);
  font-size: var(--text-headline-lg-mobile);
  font-weight: var(--weight-headline);
  line-height: var(--leading-headline);
  color: var(--gold);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-card);
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}

.link-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background-color: var(--card-bg);
  border: 1.5px solid transparent;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.link-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    0deg,
    transparent,
    transparent 30%,
    rgba(var(--gold-rgb), 0.18) 60%,
    rgba(255, 255, 255, 0.1) 80%,
    rgba(var(--gold-rgb), 0.12)
  );
  transform: rotate(-45deg);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.links-list > * {
  animation: link-card-reveal 0.5s ease-out both;
}

.links-list > :nth-child(1) {
  animation-delay: 0.15s;
}

.links-list > :nth-child(2) {
  animation-delay: 0.3s;
}

.links-list > :nth-child(3) {
  animation-delay: 0.45s;
}

.links-list > :nth-child(4) {
  animation-delay: 0.6s;
}

.links-list > :nth-child(5) {
  animation-delay: 0.75s;
}

.links-list > :nth-child(6) {
  animation-delay: 0.9s;
}

@keyframes link-card-reveal {
  from {
    opacity: 0;
    translate: 0 18px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.link-card:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
  transform: scale(1.05);
  border-color: var(--card-border);
  box-shadow: 0 0 20px rgba(var(--gold-rgb), 0.4);
}

.link-card:focus-visible::before {
  opacity: 1;
  transform: rotate(-45deg) translateY(100%);
}

.link-card:focus-visible .card-icon svg {
  fill: var(--gold-light);
}

.link-card:focus-visible .card-arrow {
  opacity: 0.8;
  transform: translateX(3px);
}

@media (hover: hover) and (pointer: fine) {
  .link-card:hover {
    transform: scale(1.05);
    border-color: var(--card-border);
    box-shadow: 0 0 20px rgba(var(--gold-rgb), 0.4);
  }

  .link-card:hover::before {
    opacity: 1;
    transform: rotate(-45deg) translateY(100%);
  }

  .link-card:hover .card-icon svg {
    fill: var(--gold-light);
  }

  .link-card:hover .card-arrow {
    opacity: 0.8;
    transform: translateX(3px);
  }
}

.link-card:active {
  transform: scale(1.05);
  border-color: var(--card-border);
  box-shadow: 0 0 20px rgba(var(--gold-rgb), 0.4);
}

.link-card:active::before {
  opacity: 1;
  transform: rotate(-45deg) translateY(100%);
}

.card-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.card-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--gold);
  transition: fill var(--transition-base);
}

.card-text {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.card-title {
  font-family: var(--font-display);
  font-weight: var(--weight-label);
  font-size: var(--text-label-md);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.card-subtitle {
  font-size: var(--text-label-sm);
  color: var(--text-secondary);
  font-weight: var(--weight-body);
}

.card-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 2;
  opacity: 0.4;
  transition:
    opacity var(--transition-base),
    transform var(--transition-base);
}

.card-arrow svg {
  width: 100%;
  height: 100%;
  fill: var(--text-secondary);
}

.disabled-card-wrapper {
  position: relative;
  width: 100%;
}

.disabled-card {
  background-color: #0d0822;
  cursor: default;
}

.disabled-card .card-icon,
.disabled-card .card-text,
.disabled-card .card-arrow {
  opacity: 0.6;
}

.disabled-card:focus-visible {
  transform: none;
  border-color: transparent;
  box-shadow: none;
  background-color: #0d0822;
  cursor: default;
}

.disabled-card:focus-visible .card-arrow {
  opacity: 0.6;
  transform: none;
}

.disabled-card:focus-visible .card-icon svg {
  fill: var(--gold);
}

@media (hover: hover) and (pointer: fine) {
  .disabled-card:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
    background-color: #0d0822;
    cursor: default;
  }

  .disabled-card:hover .card-arrow {
    opacity: 0.6;
    transform: none;
  }

  .disabled-card:hover .card-icon svg {
    fill: var(--gold);
  }
}

.disabled-card::before {
  display: none;
}

.disabled-card-wrapper .tooltip-bubble {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background-color: #f5f5f7;
  color: #1d1d1f;
  padding: 5px 11px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: var(--weight-label);
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  pointer-events: none;
  z-index: 100;
}

.disabled-card:focus + .tooltip-bubble {
  opacity: 1;
  visibility: visible;
}

@media (hover: hover) and (pointer: fine) {
  .disabled-card:hover + .tooltip-bubble {
    opacity: 1;
    visibility: visible;
  }
}

.disabled-card:active + .tooltip-bubble {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 480px) {
  .link-card {
    padding: 18px 22px;
  }
}

@media (min-width: 768px) {
  .elsewhere-title {
    padding-left: calc((100% - 450px) / 2);
    padding-right: calc((100% - 450px) / 2);
  }

  .link-card {
    padding: 18px 24px;
    gap: 16px;
  }

  .card-icon svg {
    width: 30px;
    height: 30px;
  }

  .disabled-card-wrapper .tooltip-bubble {
    right: auto;
    left: calc(100% + 12px);
  }

  .disabled-card-wrapper .tooltip-bubble::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -4px;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background-color: #f5f5f7;
    pointer-events: none;
    z-index: -1;
  }
}

/* ========================================
   Site Footer
   ======================================== */
.site-footer {
  width: 100%;
  padding-top: 3rem;
  padding-bottom: 3rem;
  border-top: 1px solid rgba(77, 70, 55, 0.2);
  margin-top: 4rem;
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  padding-left: var(--padding-mobile);
  padding-right: var(--padding-mobile);
  z-index: 10;
  position: relative;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-link {
  font-family: var(--font-body);
  font-size: var(--text-footer);
  line-height: var(--leading-label);
  font-weight: var(--weight-footer);
  color: var(--text-muted);
  text-decoration: underline;
  opacity: 0.8;
  transition:
    opacity 0.3s ease,
    color 0.3s ease;
}

.footer-link:hover {
  color: var(--gold-light);
  opacity: 1;
}

.footer-copyright {
  font-family: var(--font-body);
  font-size: var(--text-footer);
  line-height: var(--leading-label);
  font-weight: var(--weight-footer);
  color: var(--text-muted);
}

/* ========================================
   Animations
   ======================================== */
.ringPulse {
  position: absolute;
  inset: -4px;
  border-radius: var(--radius-full);
  border: 2px solid var(--gold);
  opacity: 0;
  animation: pulse-ring 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-1 {
  animation-delay: 0.1s;
}
.stagger-2 {
  animation-delay: 0.2s;
}
.stagger-3 {
  animation-delay: 0.3s;
}
.stagger-4 {
  animation-delay: 0.4s;
}

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