@import url('variables.css');

/* main.css — Base layouts, navigation, buttons, and homepage styles */

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

html {
  scroll-behavior: smooth;
}

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

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  transition: all 0.3s ease;
}

nav.scrolled {
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.nav-logo span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.25s ease;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-links a:hover, 
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after, 
.nav-links a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta {
  background: var(--green);
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(26, 58, 42, 0.2);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

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

.btn-primary:hover {
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 58, 42, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--green);
  color: var(--green);
  transform: translateY(-2px);
  background: rgba(26, 58, 42, 0.02);
}

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

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232, 160, 32, 0.25);
}

/* ── SECTION LABEL & TITLES ── */
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.section-title em {
  color: var(--accent);
  font-style: italic;
}

/* ── CARDS ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
  border-color: rgba(232, 160, 32, 0.3);
}

/* ── TAGS ── */
.tag {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tag-accent {
  background: rgba(232, 160, 32, 0.1);
  color: var(--accent-dark);
  border-color: rgba(232, 160, 32, 0.25);
}

.tag-green {
  background: rgba(26, 58, 42, 0.06);
  color: var(--green);
  border-color: rgba(26, 58, 42, 0.15);
}

/* ── PAGE WRAPPER ── */
.page-wrapper {
  padding-top: 72px;
}

/* ── HERO ── */
.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding: 5rem 5% 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-text {
  flex: 1.2;
  max-width: 580px;
}

.hero-greeting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-greeting .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: pulse 1.8s infinite;
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-heading em {
  color: var(--accent);
  font-style: italic;
}

.hero-bio {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2.2rem;
  max-width: 480px;
}

.hero-btns {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── HERO AVATAR / VISUAL ── */
.hero-visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  position: relative;
}

.hero-card-stack {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-ring {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(26, 58, 42, 0.22);
  animation: float 5s ease-in-out infinite;
  overflow: hidden;
  border: 4px solid var(--bg);
}

.avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 3.8rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--green), var(--green-light));
}

.avatar-initials img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.avatar-ring:hover img {
  transform: scale(1.08);
}

.float-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  white-space: nowrap;
  animation: float-badge-anim 6s ease-in-out infinite;
}

.badge-top {
  top: 15px;
  right: -20px;
  animation-delay: 0.5s;
}

.badge-bottom {
  bottom: 15px;
  left: -20px;
  animation-delay: 2s;
}

.hero-skills-orbit {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  max-width: 340px;
}

.orbit-tag {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.orbit-tag:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

/* ── SERVICES / WHAT I DO ── */
.services-section {
  padding: 6rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.services-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.learn-more {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.learn-more:hover {
  color: var(--accent-dark);
  gap: 8px;
}

/* ── FEATURED PROJECTS ── */
.featured-section {
  padding: 6rem 5%;
  max-width: 1200px;
  margin: 0 auto 4rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.featured-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.featured-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
  border-color: rgba(23, 58, 42, 0.15);
}

.featured-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.featured-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.fc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.fc-links {
  display: flex;
  gap: 0.8rem;
}

/* ── STATS ── */
.stats-section {
  background: var(--green);
  margin: 6rem 0 0;
  padding: 5rem 5%;
  border-top: 4px solid var(--accent);
}

.stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent);
}

.stat-label {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── FOOTER ── */
footer {
  background: var(--green);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 5%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.88rem;
  opacity: 0.6;
}

/* ── SCROLL OBSERVER REVEAL ── */
.observe {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.observe.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes float-badge-anim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.fade-up {
  animation: fadeUp 0.7s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.delay-1 { animation-delay: 0.12s; }
.delay-2 { animation-delay: 0.24s; }
.delay-3 { animation-delay: 0.36s; }
.delay-4 { animation-delay: 0.48s; }

/* ── RESPONSIVE ── */
@media (max-width: 992px) {
  .hero {
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 0 6%;
  }
  
  .nav-links {
    display: none;
  }
  
  .hamburger {
    display: flex;
    order: 3;
  }
  
  .nav-cta {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 2rem 6% 2.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }

  .hero {
    flex-direction: column-reverse;
    padding: 3rem 6% 4rem;
    text-align: center;
    min-height: auto;
    gap: 3rem;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-btns {
    justify-content: center;
  }

  .hero-location {
    justify-content: center;
  }

  .hero-bio {
    margin: 0 auto 2.2rem;
  }

  .hero-visual {
    width: 100%;
  }

  .badge-top {
    right: 10px;
  }

  .badge-bottom {
    left: 10px;
  }

  .services-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ── PAGE HERO GLOBAL ── */
.page-hero {
  padding: 5rem 5% 3rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.page-hero p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.5rem;
}
.page-hero .section-label {
  justify-content: center;
}
