/* ============================================
   Artiificial's Portfolio - shared styles
   Change colors here and it updates every page.
   ============================================ */
:root {
  --bg: #0d0d10;
  --card: #17171c;
  --text: #f2f2f5;
  --muted: #9a9aa6;
  --accent: #ff5a36;
  --line: #25252c;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(13, 13, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* ---------- Hero (header video / image behind text) ---------- */
/* HOME page:  images/header.mp4   (looping video)
   ABOUT page: images/about-header.mp4
   If the video is missing, or the visitor has "reduce motion" turned on, the still/GIF below is used instead:
   HOME: images/header.gif, header.jpg or header.png   ABOUT: images/about-header.gif, .jpg or .png
   If neither exists, a gradient shows. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Header extends 50px above and 50px below the text.
     Change the 50px values to make it taller or shorter. */
  padding: 50px 0;
  background-color: var(--bg);
  background-image:
    url("../images/header.gif"),
    url("../images/header.jpg"),
    url("../images/header.png"),
    linear-gradient(135deg, #1c1c2b 0%, #3a1c14 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero.about-hero {
  background-image:
    url("../images/about-header.gif"),
    url("../images/about-header.jpg"),
    url("../images/about-header.png"),
    linear-gradient(135deg, #14283a 0%, #2b1c28 100%);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* Color wash over the video/image so the text stays readable.
   Make the two numbers smaller to show more of your video. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(13, 13, 16, 0.45), rgba(13, 13, 16, 0.85));
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}
.eyebrow {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
/* Extra space between the "r" and "t" in the home page headline. Increase 0.06em for more space. */
.kern-rt { margin-right: 0.06em; }
.hero .tagline {
  font-size: 1.25rem;
  color: #d4d4dc;
  max-width: 560px;
  margin-bottom: 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--text);
  margin-left: 8px;
}

/* ---------- Page sections ---------- */
.page-head { padding: 72px 0 24px; }
.page-head h1 {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-head p { color: var(--muted); margin-top: 12px; max-width: 620px; }

section { padding: 48px 0 0; }
h2.label {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 20px;
}
.prose p { max-width: 680px; font-size: 1.05rem; margin-bottom: 18px; }

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
}
.tools li {
  background: var(--card);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 500;
}

/* ---------- Projects grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding-top: 24px;
}
.card {
  display: block;
  text-decoration: none;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.thumb {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  position: relative;
}
.thumb::after {
  content: "\25B6";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.card:hover .thumb::after { opacity: 1; }
.card-body { padding: 16px 20px 20px; }
.card-body h3 { font-size: 1.1rem; margin-bottom: 4px; }
.card-body p { color: var(--muted); font-size: 0.9rem; }

/* ---------- Single project page ---------- */
.crumbs {
  padding: 28px 0 0;
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:hover { color: var(--text); }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  margin-top: 24px;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* Floating YouTube icon, lower-right of the video.
   It sits just above YouTube's own control bar so it doesn't cover the fullscreen button.
   Adjust "bottom" and "right" to move it. */
.yt-link {
  position: absolute;
  right: 14px;
  bottom: 62px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(13, 13, 16, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  transition: background 0.15s ease, transform 0.15s ease;
}
.yt-link:hover { background: var(--accent); transform: scale(1.08); }
.yt-link svg { width: 24px; height: 24px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.meta strong { color: var(--text); display: block; font-weight: 600; }

/* ---------- Contact ---------- */
.contact-list { list-style: none; }
.contact-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.contact-list span { color: var(--muted); }
.contact-list a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.contact-list a:hover { color: var(--accent); }

/* ---------- Social icons ---------- */
.social {
  display: flex;
  gap: 14px;
  margin-top: 28px;
}
.social a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.social a:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.social svg { width: 22px; height: 22px; }

/* ---------- Footer ---------- */
footer {
  margin-top: 96px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 0.85rem; }
  .btn.ghost { margin-left: 0; margin-top: 12px; }
}
