/* fazdev — Game Development Portfolio */

:root {
  --cream: #f5f3e7;
  --cream-alt: #fdf5e6;
  --red: #b01e43;
  --teal: #134e4a;
  --yellow: #fbbf24;
  --black: #111111;
  --border: 2px solid var(--black);
  --nav-height: 60px;
  --container-max: 1200px;
  --section-pad: clamp(2.5rem, 5vw, 4rem);
  --side-pad: clamp(1rem, 4vw, 2rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Layout container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--side-pad);
  padding-right: var(--side-pad);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--black);
  color: #fff;
  border-radius: 0 0 4px 4px;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Sticky top nav */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(245, 243, 231, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1.5px solid rgba(17, 17, 17, 0.12);
  padding-top: env(safe-area-inset-top);
}

.top-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

.top-nav-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
  color: var(--red);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  z-index: 110;
}

.menu-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  position: fixed;
  top: calc(var(--nav-height) + env(safe-area-inset-top));
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1.5rem var(--side-pad) 2rem;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.nav-menu.is-open {
  transform: translateX(0);
}

.nav-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  border-radius: 6px;
  transition: background 0.15s;
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu a.active {
  background: rgba(0, 0, 0, 0.06);
}

.nav-menu-cta {
  margin-top: 0.5rem;
  background: var(--red) !important;
  color: #fff !important;
  justify-content: center;
}

.nav-menu-cta:hover,
.nav-menu-cta:focus-visible {
  background: #8e1836 !important;
}

/* Site label — short on mobile, full on desktop */
.site-label-short {
  display: inline;
}

.site-label-full {
  display: none;
}

/* Typography */
.brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: 0.15em;
  color: var(--red);
}

.script-accent {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--red);
  display: block;
  line-height: 1;
  margin-bottom: -0.25rem;
}

.site-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(0.65rem, 1.5vw, 0.85rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

.divider {
  border: none;
  border-top: 1.5px solid var(--black);
  margin: 1.5rem 0 2rem;
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-height) + 1.5rem + env(safe-area-inset-top)) var(--side-pad) 2rem;
  background: var(--cream);
  max-width: 100%;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.hero-top .site-label {
  flex: 1;
  min-width: 0;
}

.hero-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 0.25rem;
}

.hero-dots span {
  width: 8px;
  height: 8px;
  background: var(--black);
  border-radius: 50%;
}

.hero-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 9vw, 7rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin: 0.5rem 0 1.5rem;
  word-break: break-word;
}

.hero-name-box {
  display: inline-block;
  max-width: 100%;
  border: var(--border);
  background: #e8e6da;
  padding: 0.6rem 1.2rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(0.85rem, 2.5vw, 1.4rem);
  letter-spacing: 0.1em;
  word-break: break-word;
}

.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.hero-fullname {
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  word-break: break-word;
}

.hero-role {
  font-size: clamp(0.8rem, 1.8vw, 0.95rem);
  color: #444;
  margin-top: 0.25rem;
}

.hero-arrow {
  color: var(--black);
  transition: transform 0.2s;
  min-width: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-arrow:hover {
  transform: translateX(6px);
}

/* Section headers */
.section-header h2,
.about-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  word-break: break-word;
}

.section-subtitle {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* Nav section */
.nav-section {
  padding: var(--section-pad) 0;
  background: var(--cream-alt);
}

.nav-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

.nav-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 72px;
  padding: 1rem;
  border: var(--border);
  border-radius: 6px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(0.95rem, 2vw, 1.3rem);
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: transform 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-card small {
  font-size: 0.75em;
  letter-spacing: 0.05em;
  display: block;
  margin-top: 0.15rem;
}

.nav-card--red {
  background: var(--red);
  color: #fff;
}

.nav-card--teal {
  background: var(--teal);
  color: #fff;
}

.nav-card--yellow {
  background: var(--yellow);
  color: var(--black);
}

.nav-card:hover,
.nav-card.active {
  transform: translateY(-3px);
  box-shadow: 4px 4px 0 var(--black);
}

.nav-card:active {
  transform: translateY(-1px);
  box-shadow: 2px 2px 0 var(--black);
}

.section-footer-label {
  margin-top: 2.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

/* About */
.about {
  padding: var(--section-pad) 0;
  background: var(--cream);
}

.about-header {
  margin: 1.5rem 0 2rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.about-bio p {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  line-height: 1.7;
}

.about-photo {
  border: 3px solid var(--red);
  width: min(220px, 70vw);
  margin: 0 auto;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.about-skills {
  width: 100%;
}

.about-skills h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.about-skills ul {
  margin-bottom: 1.5rem;
}

.about-skills li {
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.about-skills li:last-child {
  border-bottom: none;
}

/* Content sections */
.content-section {
  padding: var(--section-pad) 0;
  background: var(--cream);
}

.content-section--alt {
  background: var(--cream-alt);
}

.section-body {
  max-width: 900px;
}

.section-body > p {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Placeholder cards */
.placeholder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.placeholder-card {
  border: var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.placeholder-thumb {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e8e6da 0%, #d4d2c6 100%);
}

.placeholder-card p {
  padding: 0.75rem 1rem;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-list li,
.tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: var(--border);
  border-radius: 4px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  background: #fff;
  min-height: 36px;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.project-card {
  border: var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: 4px 4px 0 var(--black);
}

.project-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--teal) 0%, #1a6b64 100%);
}

.project-info {
  padding: 1.25rem;
}

.project-info h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.project-info p {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tags .tag {
  background: var(--yellow);
}

/* Gameplay list */
.gameplay-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gameplay-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  border: var(--border);
  border-radius: 6px;
  background: #fff;
}

.gameplay-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--red);
  line-height: 1;
  flex-shrink: 0;
  min-width: 2.5rem;
}

.gameplay-item h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.gameplay-item p {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.6;
}

/* Footer */
.footer {
  padding: var(--section-pad) 0 calc(2rem + env(safe-area-inset-bottom));
  background: var(--black);
  color: #fff;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer .brand {
  color: var(--yellow);
  font-size: clamp(2rem, 5vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.footer-name {
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-role {
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.footer-contact p {
  color: #ccc;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.footer-email {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  letter-spacing: 0.06em;
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 4px;
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  word-break: break-all;
}

.footer-email:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.75rem;
  color: #666;
  border-top: 1px solid #333;
  padding-top: 1.5rem;
  line-height: 1.5;
  word-break: break-word;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* Tablet — 480px+ */
@media (min-width: 480px) {
  .nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .nav-card {
    min-height: 100px;
  }

  .placeholder-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .about-photo {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .about-bio {
    grid-column: 1 / -1;
  }
}

/* Tablet landscape — 640px+ */
@media (min-width: 640px) {
  .hero-bottom {
    align-items: flex-end;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

/* Desktop — 768px+ */
@media (min-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .menu-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    flex-direction: row;
    align-items: center;
    transform: none;
    padding: 0;
    background: transparent;
    overflow: visible;
    gap: 0.25rem;
  }

  .nav-menu a {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
  }

  .nav-menu-cta {
    margin-top: 0;
    margin-left: 0.5rem;
    padding: 0.5rem 1rem !important;
  }

  .site-label-short {
    display: none;
  }

  .site-label-full {
    display: inline;
  }

  .nav-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .nav-card {
    min-height: 120px;
    padding: 1.5rem 1rem;
  }

  .placeholder-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .project-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr auto 1fr;
    gap: 2.5rem;
    align-items: start;
  }

  .about-photo {
    grid-column: auto;
    margin: 0;
    width: 220px;
  }

  .about-bio {
    grid-column: auto;
  }

  .about-bio p {
    max-width: 36ch;
  }

  .gameplay-list {
    gap: 1.5rem;
  }

  .gameplay-item {
    gap: 1.5rem;
  }
}

/* Large desktop — 1024px+ */
@media (min-width: 1024px) {
  .hero {
    padding-left: clamp(2rem, 6vw, 4rem);
    padding-right: clamp(2rem, 6vw, 4rem);
  }

  .nav-menu a {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Body scroll lock when mobile menu open */
body.menu-open {
  overflow: hidden;
}
