﻿/* ============================================================
   TERMED — portfolio styles
   ============================================================ */

:root {
  --bg: #0b0e14;
  --bg-alt: #0f131c;
  --card: #131826;
  --card-hover: #182036;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --text-dim: #9aa4b8;
  --accent: #ef4444;
  --accent-2: #dc2626;
  --grad: linear-gradient(100deg, #b91c1c, #7f1d1d);
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --display: 'Unbounded', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: url('/assets/cursor.png') 1 1, auto;
}

a, button, [role="button"], label,
a *, button * {
  cursor: url('/assets/cursor-hand.png') 9 1, pointer;
}

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

.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

body.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.landing-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}
.landing-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.55) saturate(1.1);
}
.landing-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 0%, rgba(7, 9, 14, 0.55) 75%),
    linear-gradient(180deg, rgba(7, 9, 14, 0.25), rgba(7, 9, 14, 0.75));
}

.landing-card {
  width: 100%;
  max-width: 480px;
  padding: 48px 40px;
  text-align: center;
}

.landing-logo {
  margin: 18px auto 0;
}
.landing-logo img {
  width: 340px;
  height: auto;
  margin: -40px auto;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.55));
}
.landing-name {
  font-family: 'Minecraft', var(--display);
  font-size: clamp(1.8rem, 4.6vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  text-shadow:
    4px 4px 0 rgba(0, 0, 0, 0.75),
    0 10px 30px rgba(0, 0, 0, 0.9);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 44px;
  padding: 11px 24px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--grad);
  border: none;
  border-radius: 12px;
  cursor: url('/assets/cursor-hand.png') 9 1, pointer;
  transition: transform 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
}
/* landing "View Portfolio" button — liquid glass */
body.landing .btn-primary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(255, 255, 255, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.35);
  border-radius: 999px;
}
body.landing .btn-primary:hover {
  background: rgba(255, 255, 255, 0.13);
}
.btn-note {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.65;
  margin-left: 4px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }

.landing-socials {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}
.landing-socials a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
  cursor: url('/assets/cursor-hand.png') 9 1, pointer;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.landing-socials a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.landing-scroll-hint {
  position: fixed;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

/* click-to-enter overlay + music toggle */
.enter-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(5, 6, 10, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: url('/assets/cursor-hand.png') 9 1, pointer;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.enter-overlay.hidden { opacity: 0; visibility: hidden; }
.enter-text {
  font-family: 'Minecraft', var(--display);
  font-size: clamp(1rem, 2.6vw, 1.4rem);
  letter-spacing: 0.12em;
  color: var(--text);
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
  animation: enter-pulse 1.8s ease-in-out infinite;
}
@keyframes enter-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.music-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 19, 28, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-dim);
  cursor: url('/assets/cursor-hand.png') 9 1, pointer;
  transition: color 0.2s, background 0.2s;
}
.music-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.music-toggle[hidden] { display: none; }
.music-toggle svg[hidden] { display: none; }

/* load-in animation (landing) */
.fade-item {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(8px);
  animation: fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ============================================================
   PORTFOLIO PAGE
   ============================================================ */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 100;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(11, 14, 20, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}
.nav-brand img { width: 34px; height: 34px; object-fit: contain; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
}
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: #ffffff !important;
  background: var(--grad);
  padding: 8px 18px;
  border-radius: 10px;
}
.nav-cta:hover { opacity: 0.9; }

/* hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-content { position: relative; padding: 0 24px; max-width: 820px; }
.hero-kicker {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero-title {
  font-family: 'Minecraft', var(--display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}
.hero-sub {
  margin-top: 20px;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--text-dim);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.hero-arrow {
  margin-top: 48px;
  color: var(--text-dim);
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* sections */
.section { padding: 170px 24px; }
.section-alt { background: transparent; }
.section-inner { max-width: 1100px; margin: 0 auto; }

.section-kicker {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 22px;
}
.section-text {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 640px;
  margin-bottom: 16px;
}
.section-text strong { color: var(--text); }

/* about */
.personal-kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin-top: 26px;
}
.personal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 26px;
  margin-top: 24px;
  max-width: 760px;
}
.personal-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}
.personal-label svg { color: var(--accent); }
.personal-value {
  display: block;
  margin-top: 5px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.skill-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.skill-icon {
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  line-height: 1;
}
.skill-icon img,
.skill-icon svg { width: 22px; height: 22px; object-fit: contain; }
.skill-icon-discord { color: #5865f2; }
.skill-card p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.65; }

/* projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.project-card {
  display: flex;
  flex-direction: column;
}
.project-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(15, 19, 28, 0.5);
}
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-thumb img { transform: scale(1.06); }
.project-thumb img.pixelated {
  image-rendering: pixelated;
  object-fit: contain;
  padding: 18px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 30% 25%, rgba(239, 68, 68, 0.14), transparent 60%),
    var(--bg-alt);
}
.project-thumb-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.16), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(249, 115, 22, 0.16), transparent 55%),
    var(--bg-alt);
}
.project-body { padding: 16px 2px 0; display: flex; flex-direction: column; flex: 1; }
.project-body h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.project-body p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.65; flex: 1; }
.project-link {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}
.project-link:hover { text-decoration: underline; }

/* contact */
.contact-inner { text-align: center; }
.contact-inner .section-text { margin-left: auto; margin-right: auto; }
.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}
.contact-buttons .btn-primary { margin-top: 0; }

/* scroll reveal — rise + blur-to-sharp */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  filter: blur(10px);
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); filter: blur(0); }

/* hero title — masked word-by-word slide up */
.hero-title .mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.hero-title .word {
  display: inline-block;
  transform: translateY(115%);
  animation: word-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes word-up {
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .fade-item, .hero-title .word {
    opacity: 1; transform: none; filter: none; animation: none; transition: none;
  }
}

/* responsive */
@media (max-width: 860px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .section { padding: 80px 20px; }
  .landing-card { padding: 38px 26px; }
}
