/* design system */
:root {
  --bg-color: #fcfaf7;
  --text-color: #1a1a1a;
  --text-muted: #4a4a4a;
  --accent-color: #6385fd;
  /* --accent-color: #9d8df1; */
  --font-serif: 'Fraunces', serif;
  --font-sans: 'Outfit', sans-serif;
  --grain-opacity: 0.14;
}

/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--bg-color);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Adjusted for the fixed header */
}

/* Noise Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* Technical Grid Overlay */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.05;
  background-image:
    linear-gradient(to right, #1a1a1a 1px, transparent 1px),
    linear-gradient(to bottom, #1a1a1a 1px, transparent 1px);
  background-size: 100px 100px;
}

/* Metadata & Technical Accents */
.section-id {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 1rem;
  display: block;
  opacity: 0.6;
}

.meta-tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--accent-color);
  color: white;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--text-color);
  color: var(--bg-color);
}

.btn-secondary {
  display: inline-block;
  padding: 1rem 2rem;
  background: transparent;
  color: var(--accent-color);
  font-weight: 500;
  border: 1px solid var(--accent-color);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.02em;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--text-color);
  color: var(--bg-color);
  border-color: var(--text-color);
}

/* Hero Identity Layout */
.hero-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 4rem;
  z-index: 2;
  text-align: left;
}

.hero-text {
  flex: 1;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.profile-frame {
  position: relative;
  width: 180px;
  height: 180px;
}

.profile-frame::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 100%;
  height: 100%;
  border: 1px solid var(--accent-color);
  border-radius: 4px;
  z-index: -1;
}

.profile-img-container {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.profile-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

.profile-card:hover img {
  filter: grayscale(0%);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* center everything under the image */
  gap: 0.2rem;
}

.profile-meta .icons {
  display: flex;
  /* horizontal layout */
  flex-direction: row;
  gap: 0.75rem;
  margin: 1rem;

}

.profile-meta .social-icon {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  margin: 0.5rem;

}

.profile-meta .social-icon img {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
  display: block;
}


.social-icon img {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}

.social-icon img:hover {
  transform: scale(1.2);
  filter: grayscale(0%) brightness(1.1);
  opacity: 0.85;
}


/* Hero */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
}

.hero-text {
  max-width: 900px;
  z-index: 2;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 600;
  margin-bottom: 2rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-text p {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-visual {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 140%;
  opacity: 0.7;
  z-index: 1;
  overflow: hidden;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: float 20s ease-in-out infinite alternate;
}

@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }

  50% {
    transform: translate(2%, 3%) rotate(2deg) scale(1.05);
  }

  100% {
    transform: translate(-1%, -2%) rotate(-1deg) scale(0.98);
  }
}

/* Capabilities / Services */
/* ROI Feature Section */
.roi-section {
  padding: 5rem 2rem;
  background-color: #f8fafc;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
}

.roi-container {
  max-width: 1200px;
  margin: 0 auto;
}

.roi-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  margin-bottom: 2rem;
  max-width: 20ch;
  line-height: 1.1;
  color: var(--text-color);
  margin-left: auto;
  margin-right: auto;
}

.roi-section p {
  max-width: 750px;
  font-size: 1.4rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-weight: 400;
  margin: 0 auto 3rem;
}

.capabilities {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.capabilities h2 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 500;
  margin-bottom: 4rem;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}


.capability-card {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.capability-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.capability-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.capability-card p {
  font-size: 1rem;
  color: var(--text-muted);
}

/* The Stack / Skill Stack */
.stack-section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.stack-section h2 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 500;
  margin-bottom: 4rem;
}

.stack-tier {
  margin-bottom: 4rem;
}

.stack-tier:last-child {
  margin-bottom: 0;
}

.stack-tier h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  opacity: 1;
  font-weight: 700;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.stack-tags .meta-tag {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.95rem;
  padding: 0.6rem 1.1rem;
  background: white;
  border-color: rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: default;
}

.stack-tags .meta-tag:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
  background: #f0f7ff;
}

.stack-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: center;
}

.stack-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.stack-graphic {
  width: 100%;
  max-width: 300px;
  height: auto;
  opacity: 0.8;
}

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

  .stack-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .stack-visual {
    order: -1;
    /* Show image above text on mobile */
    margin-bottom: 2rem;
  }
}

/* Projects */
.projects {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.projects h2 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 500;
  margin-bottom: 6rem;
  text-align: left;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
  align-items: start;
}

.project-card {
  text-decoration: none;
  color: var(--text-color);
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.02),
    0 4px 12px rgba(0, 0, 0, 0.03);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 550px;
  /* Ensure uniform size */
}

/* Staggered Offset */
.project-card:nth-child(even) {
  margin-top: 8rem;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 30px 60px rgba(0, 0, 0, 0.04);
  border-color: var(--accent-color);
}

.project-image {
  width: 100%;
  aspect-ratio: 16/10;
  background: #eee;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 2px;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-image img {
  filter: grayscale(0%) contrast(1);
  transform: scale(1.05);
}

.project-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
  pointer-events: none;
}

.project-card h3 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 1rem;
  border-bottom: 1px solid transparent;
  display: inline-block;
  transition: border-color 0.3s ease;
}

.project-card:hover h3 {
  border-color: var(--accent-color);
}

.project-card p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  max-width: 400px;
}

.project-card .meta-tag {
  margin-bottom: 0.5rem;
}

.project-card span:not(.meta-tag) {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 992px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .project-card:nth-child(even) {
    margin-top: 0;
  }
}

/* Divider Elements */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 2rem;
  opacity: 0.2;
}

.divider span {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.divider .line {
  flex-grow: 1;
  height: 1px;
  background: var(--text-color);
}

/* Credentials / Certifications */
.credentials {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.credentials h2 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 500;
  margin-bottom: 4rem;
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.credential-card {
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.credential-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.credential-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f0f0f0;
}

.credential-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.credential-card:nth-child(1) .credential-image img,
.credential-card:nth-child(2) .credential-image img {
  object-position: top;
}

.credential-card:nth-child(3) .credential-image img {
  object-position: bottom;
}

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

.credential-info {
  padding: 1.5rem 2rem 2rem;
}

.credential-issuer {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-color);
  display: block;
  margin-bottom: 0.75rem;
}

.credential-info h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 1.25rem;
  color: var(--text-color);
}

.credential-verify {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.credential-verify:hover {
  color: var(--accent-color);
}

@media (max-width: 992px) {
  .credentials-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
}

/* Philosophy / How I Build */
.philosophy {
  padding: 5rem 2rem;
  background: var(--bg-color);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.philosophy h2 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 500;
  margin-bottom: 4rem;
  text-align: center;
}

.philosophy-intro {
  max-width: 700px;
  margin: 0 auto 4rem;
  text-align: center;
  font-size: 1.3rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.philosophy ul {
  max-width: 800px;
  margin: 0 auto;
  list-style-type: none;
  color: var(--text-color);
}

.philosophy ul li {
  margin-bottom: 2.5rem;
  font-size: 1.25rem;
  border-left: 2px solid var(--accent-color);
  padding-left: 1.5rem;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.philosophy ul li strong {
  display: block;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
}


.philosophy ul li:hover {
  opacity: 1;
}

/* Homepage CTA Section */
.homepage-cta {
  padding: 5rem 2rem;
  text-align: center;
  background-color: #f8fafc;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin: 0 auto;
}

.homepage-cta h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--text-color);
  max-width: 25ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.1;
}

.homepage-cta p {
  font-size: 1.4rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}


/* Footer */
footer {
  padding: 5rem 2rem;
  text-align: center;
  background: var(--bg-color);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}


footer p {
  margin-bottom: 2rem;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  /*text-transform: uppercase;*/
}

footer h2 {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 500;
  margin-bottom: 4rem;
  text-align: center;
}

footer .copyright {
  margin-top: 2rem;
  margin-bottom: 0;
  font-size: 1rem;
  color: var(--text-muted);
  opacity: 0.7;
}

footer .links a {
  margin: 0 1.5rem;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

footer .links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

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

footer .links a:hover::after {
  width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
  }

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

  .hero-visual img {
    max-width: 100%;
    margin-bottom: 2rem;
  }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-container {
    flex-direction: column-reverse;
    text-align: center;
    gap: 3rem;
  }

  .hero-text p {
    margin-left: auto;
    margin-right: auto;
  }

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

  .profile-meta {
    align-items: center;
  }
}

/* Animations */
.reveal {
  opacity: 0 !important;
  transform: translateY(60px) scale(0.98) !important;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: transform, opacity;
}

.reveal.active {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

.delay-1 {
  transition-delay: 0.2s;
}

.delay-2 {
  transition-delay: 0.4s;
}

.delay-3 {
  transition-delay: 0.6s;
}