/* ==========================================
   firecy — Portfolio Styles
   Editorial Brutalist · Dark Theme
   ========================================== */

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

:root {
  --bg: #0a0a0a;
  --bg-elevated: #141414;
  --surface: #1a1a1a;
  --text: #e8e8e8;
  --text-muted: #888;
  --accent: #ff5722;
  --accent-glow: #ff572233;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Syne', system-ui, sans-serif;
  --mono: 'Space Mono', monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; font-family: var(--serif); }
.italic-serif { font-family: var(--serif); font-style: italic; color: var(--accent); }

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ==========================================
   NAVIGATION
   ========================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  mix-blend-mode: difference;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.nav-links a:hover { opacity: 1; }

/* ==========================================
   HERO
   ========================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 3rem 3rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.hero-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-title .line {
  display: block;
}

.hero-title .accent {
  color: var(--accent);
}

.hero-title .accent em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

.hero-sub {
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 480px;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
}

.hero-visual {
  position: relative;
}

.hero-image-wrap {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.1);
}

.hero-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  mix-blend-mode: screen;
}

.hero-badge {
  position: absolute;
  bottom: -1.2rem;
  right: 2rem;
  background: var(--surface);
  border: 1px solid #333;
  border-radius: 100px;
  padding: 0.6rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.badge-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.badge-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4caf50;
  font-weight: 700;
}

.dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #ff6e40;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid #333;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  padding: 1.1rem 3rem;
  font-size: 0.9rem;
}

/* ==========================================
   SECTIONS COMMON
   ========================================== */
.section-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.about-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ==========================================
   ABOUT
   ========================================== */
.about {
  padding: 8rem 3rem;
}

.about-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.about-heading {
  font-family: var(--sans);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.about-body {
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  max-width: 650px;
}

.about-body em {
  color: var(--text);
}

/* ==========================================
   WORK
   ========================================== */
.work {
  padding: 4rem 3rem 8rem;
}

.work-header {
  max-width: 1400px;
  margin: 0 auto 3rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.work-card {
  background: var(--surface);
  border: 1px solid #222;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.4s var(--ease);
  cursor: pointer;
}

.work-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/11;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.work-card:hover .card-image img {
  transform: scale(1.05);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1.2rem;
}

.work-card:hover .card-overlay { opacity: 1; }

.card-arrow {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.card-info {
  padding: 1.5rem;
}

.card-title {
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-tags span {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  background: var(--bg);
  border: 1px solid #333;
  border-radius: 100px;
  color: var(--text-muted);
}

/* ==========================================
   PROCESS
   ========================================== */
.process {
  padding: 8rem 3rem;
  background: var(--bg-elevated);
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
}

.process-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 1rem;
}

.process-step {
  padding: 2rem;
  border-left: 2px solid #222;
  transition: border-color 0.3s ease;
}

.process-step:hover {
  border-color: var(--accent);
}

.step-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.step-title {
  font-family: var(--sans);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.step-body {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ==========================================
   CONTACT
   ========================================== */
.contact {
  padding: 8rem 3rem;
  text-align: center;
}

.contact-inner {
  max-width: 700px;
  margin: 0 auto;
}

.contact-heading {
  font-family: var(--sans);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}

.contact-links {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.social-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  transition: color 0.3s ease;
  position: relative;
}

.social-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.social-link:hover {
  color: var(--accent);
}

.social-link:hover::after {
  width: 100%;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  padding: 2rem 3rem;
  border-top: 1px solid #1a1a1a;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
}

.footer-copy {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ==========================================
   REVEAL ANIMATIONS
   ========================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.hero-title .line:nth-child(2) { transition-delay: 0.1s; }
.hero-title .line:nth-child(3) { transition-delay: 0.2s; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-visual { order: -1; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.5rem; }
  .nav-links a { font-size: 0.7rem; }
  .hero { padding: 6rem 1.5rem 2rem; }
  .hero-title { font-size: 2.5rem; }
  .about, .work, .process, .contact { padding: 4rem 1.5rem; }
  .work-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .contact-links { flex-wrap: wrap; gap: 1rem; }
  .footer-inner { flex-direction: column; gap: 0.5rem; }
}

/* ==========================================
   NOISE OVERLAY
   ========================================== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}
