/* ============================================
   Elsay — Portfolio Styles
   ============================================ */

/* ---------- Variables ---------- */
:root {
  --primary: #E8733A;
  --secondary: #F4A261;
  --accent: #E76F51;
  --bg-light: #FFF8F0;
  --bg-dark: #2D1B0E;
  --text-light: #F5E6D3;
  --text-dark: #3D2B1F;
  --text-muted: rgba(61, 43, 31, 0.5);

  --radius: 8px;
  --radius-lg: 14px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 200ms var(--ease);
  --base: 350ms var(--ease);
  --slow: 550ms var(--ease);

  --max-w: 1080px;
  --nav-h: 60px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, textarea {
  font: inherit; color: inherit; border: none; outline: none; background: none;
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Reveal / Fade ---------- */
.fade-in,
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--slow), transform var(--slow);
}
.fade-in.visible,
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--nav-h);
  z-index: 1000;
  transition: background var(--base), box-shadow var(--base);
}
.header.scrolled {
  background: rgba(255, 248, 240, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(61, 43, 31, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-dark);
  transition: color var(--fast);
}
.logo-icon {
  color: var(--primary);
  transition: transform var(--base) var(--ease);
}
.logo:hover .logo-icon {
  transform: rotate(-10deg) scale(1.06);
}
.logo-text { display: none; }
@media (min-width: 768px) {
  .logo-text { display: inline; }
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
}
.nav-list {
  display: flex;
  gap: 28px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  padding: 4px 0;
  transition: color var(--fast);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width var(--base) var(--ease);
}
.nav-link:hover { color: var(--primary); }
.nav-link:hover::after { width: 100%; }

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle-line {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-dark);
  border-radius: 1px;
  transition: transform var(--fast), opacity var(--fast);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-list {
    position: fixed;
    top: var(--nav-h); left: 0; width: 100%;
    flex-direction: column;
    background: rgba(255, 248, 240, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 24px 0;
    gap: 0;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--base) var(--ease), opacity var(--base);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  }
  .nav-list.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link {
    display: block;
    padding: 14px 32px;
    font-size: 16px;
    width: 100%;
    text-align: center;
  }
  .nav-link::after { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 24px;
  overflow: hidden;
  background: var(--bg-light);
}

.hero-content { position: relative; z-index: 2; }

.hero-title {
  font-size: clamp(2.8rem, 1.2rem + 10vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.hero-tagline {
  font-size: clamp(1.1rem, 0.8rem + 2.5vw, 1.5rem);
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 36px;
  letter-spacing: 0.01em;
}

/* CTA */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 30px;
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  border-radius: var(--radius);
  transition: transform var(--fast), box-shadow var(--fast), background var(--fast), color var(--fast);
  cursor: pointer;
}
.cta svg {
  transition: transform var(--fast) var(--ease);
}
.cta:hover svg { transform: translate(3px, -3px); }
.cta:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 115, 58, 0.22);
}

/* Hero description */
.hero-desc {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto 32px;
}

/* Hero background */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-bg::before,
.hero-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0.035;
  background: var(--primary);
}
.hero-bg::before {
  width: 480px; height: 480px;
  top: -12%; right: -8%;
  animation: float 22s var(--ease) infinite alternate;
}
.hero-bg::after {
  width: 280px; height: 280px;
  bottom: -5%; left: -5%;
  animation: float 16s var(--ease) infinite alternate-reverse;
}
@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(25px, -18px) scale(1.06); }
}

/* ---------- Section base ---------- */
.section {
  padding: 80px 0;
}
.section-title {
  font-size: clamp(1.5rem, 1.1rem + 2.5vw, 2rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 36px;
  position: relative;
  display: block;
}
.section-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

/* About */
.about-text {
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 14px;
}
.about-sub {
  font-size: 17px;
  font-style: italic;
  color: var(--text-muted);
  border-left: 3px solid var(--secondary);
  padding-left: 18px;
}

/* Skills categories */
.skills-category {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 32px 0 16px;
}

/* Dark sections */
.section.projects,
.section.gf-section {
  background: var(--bg-dark);
}
.section.projects .section-title,
.section.gf-section .section-title {
  color: var(--text-light);
}
.section.skills {
  background: var(--bg-light);
}
.section.contact {
  background: var(--bg-light);
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: rgba(245, 230, 211, 0.04);
  border: 1px solid rgba(245, 230, 211, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--base), border-color var(--base);
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 230, 211, 0.18);
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(245, 230, 211, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-thumb img {
  width: 100%;
  object-fit: cover;
}

.project-info {
  padding: 24px;
}
.project-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
}
.project-desc {
  font-size: 14px;
  color: rgba(245, 230, 211, 0.6);
  margin-bottom: 18px;
  line-height: 1.6;
}

/* Placeholder card */




.project-note {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--secondary);
  opacity: 0.7;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--fast), box-shadow var(--fast), background var(--fast);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1.5px solid var(--primary);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(231, 111, 81, 0.25);
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(232, 115, 58, 0.04);
  border: 1px solid rgba(232, 115, 58, 0.06);
  border-radius: var(--radius-lg);
  transition: transform var(--base), box-shadow var(--base);
}
.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(232, 115, 58, 0.07);
}

.skill-icon {
  font-size: 28px;
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 115, 58, 0.07);
  border-radius: var(--radius);
  flex-shrink: 0;
}
.skill-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.skill-bar {
  width: 100%; height: 5px;
  background: rgba(61, 43, 31, 0.06);
  border-radius: 3px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  width: 0;
  transition: width 1s var(--ease);
 }

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Georges Factory ---------- */
.gf-text {
  font-size: 16px;
  color: rgba(245, 230, 211, 0.65);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 720px;
}

.gf-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.gf-node {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 18px 20px;
  background: rgba(245, 230, 211, 0.03);
  border: 1px solid rgba(245, 230, 211, 0.06);
  border-radius: var(--radius-lg);
  transition: border-color var(--fast);
}
.gf-node:hover {
  border-color: rgba(245, 230, 211, 0.14);
}

.gf-node-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gf-node-desc {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
}
.gf-node-badge {
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(232, 115, 58, 0.15);
  color: var(--primary);
  border-radius: 20px;
  white-space: nowrap;
}

.gf-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 0;
}
.gf-flow svg {
  width: 100%;
  max-width: 600px;
}

@media (max-width: 640px) {
  .gf-node {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .gf-node-label { display: block; }
}

/* ---------- Contact ---------- */
.contact-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.contact-status--success {
  color: var(--primary);
  font-size: 14px;
  margin-top: 12px;
}
.contact-status--error {
  color: var(--accent);
  font-size: 14px;
  margin-top: 12px;
}

.contact-form {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.form-input {
  padding: 12px 14px;
  font-size: 15px;
  background: #fff;
  border: 1.5px solid rgba(61, 43, 31, 0.1);
  border-radius: var(--radius);
  color: var(--text-dark);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.form-input::placeholder { color: rgba(61, 43, 31, 0.25); }
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 115, 58, 0.1);
}
.form-textarea {
  resize: vertical;
  min-height: 110px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 36px 0;
  text-align: center;
  border-top: 1px solid rgba(61, 43, 31, 0.07);
  background: var(--bg-light);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.social-links {
  display: flex;
  gap: 22px;
}

.social-link {
  color: var(--text-muted);
  transition: color var(--fast), transform var(--fast);
}
.social-link:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.copyright {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .fade-in, .reveal { opacity: 1; transform: none; }
}
