/* =============================
   BOB AGDA | GRAPHIC DESIGNER
   Grayscale Portfolio Theme
   =============================
   - Theme: Minimal grayscale
   - Fade-in animation: 2s black-to-page
   - Noticeable paper texture overlay
   - Profile photo centered above About
   - Clean typography using 'Inter'
   ============================= */

:root {
  --bg: #F3F1EC;       /* light beige/gray background */
  --text: #1A1A1A;     /* deep charcoal text */
  --muted: #C7C7C7;    /* light gray accent */
  --card: rgba(26, 26, 26, 0.05);
  --transition-speed: 2s; /* Fade-in duration */
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
}

/* =============================
   Intro Fade-In Animation
   ============================= */
#intro {
  position: fixed;
  inset: 0;
  background: black;
  z-index: 9999;
  opacity: 1;
  transition: opacity var(--transition-speed) ease;
}

body.loaded #intro {
  opacity: 0;
  pointer-events: none;
}

/* Fade-in for hero text and elements */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.2s ease forwards 2s; /* starts after 2s fade */
}

.fade-in-delay {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.2s ease forwards 2.4s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================
   Header Navigation
   ============================= */
header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1px;
}

nav a {
  color: var(--text);
  text-decoration: none;
  margin-left: 18px;
  font-weight: 600;
  opacity: 0.8;
  transition: opacity 0.3s;
}

nav a:hover {
  opacity: 1;
}

/* =============================
   Hero Section
   ============================= */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  text-align: center;
  flex-direction: column;
}

.hero h1 {
  font-size: 110px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 0.9;
}

.hero .sub {
  font-size: 20px;
  color: var(--muted);
  margin-top: 10px;
  font-weight: 600;
}

.cta {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: center;
}

.btn {
  background: var(--text);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
}

.btn.outline {
  background: transparent;
  border: 2px solid var(--text);
  color: var(--text);
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* =============================
   About Section
   ============================= */
#about {
  text-align: center;
  padding: 80px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.profile-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  background: #E5E5E5;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

#about h2 {
  margin-bottom: 20px;
  font-size: 28px;
}

#about p {
  font-size: 16px;
  color: var(--text);
}

/* =============================
   Portfolio Section
   ============================= */
#portfolio {
  padding: 80px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

#portfolio h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 28px;
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: rgba(255,255,255,0.6);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card-info {
  padding: 14px;
}

.card-info h4 {
  margin-bottom: 6px;
}

.card-info p {
  color: var(--muted);
  font-size: 14px;
}

/* =============================
   Resume Section
   ============================= */
#resume {
  padding: 80px 20px;
  max-width: 900px;
  margin: 0 auto;
}

#resume h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 28px;
}

.resume-content h3 {
  margin-top: 20px;
  font-size: 20px;
}

.resume-content ul {
  margin-top: 10px;
  margin-left: 20px;
}

.resume-content li {
  list-style: square;
  color: var(--text);
  margin-bottom: 6px;
}

/* =============================
   Contact Section
   ============================= */
#contact {
  text-align: center;
  padding: 80px 20px;
  background: var(--bg);
}

#contact h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

#contact a {
  color: var(--text);
  font-weight: 600;
}

.socials {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.socials img {
  width: 28px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.socials img:hover {
  opacity: 1;
}

/* =============================
   Footer
   ============================= */
footer {
  text-align: center;
  padding: 30px 0;
  color: var(--muted);
  font-size: 14px;
}

/* =============================
   Paper Texture Overlay
   ============================= */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGNgYAAAAAMAASsJTYQAAAAASUVORK5CYII=");
  /* You can replace this with your own texture image later */
  mix-blend-mode: overlay;
  opacity: 0.4; /* increase to 0.6 for more visible texture */
  pointer-events: none;
  z-index: 0;
}

/* =============================
   Responsive Tweaks
   ============================= */
@media (max-width: 900px) {
  .hero h1 {
    font-size: 64px;
  }

  .hero .sub {
    font-size: 16px;
  }

  header {
    flex-direction: column;
  }

  nav {
    margin-top: 10px;
  }
}

/* Make portfolio cards clickable links */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease;
}

.card-link:hover .card {
  transform: translateY(-6px);
}
