/* ========================================
   Gabriele Morano - Personal Website
   Light & Clean Design
   ======================================== */

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

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #6b7280;
  --color-border: #e5e7eb;
  --color-accent: #111827;
  --color-accent-hover: #374151;
  --color-link: #328cc1;
  --color-card-hover: #f9fafb;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 960px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Hero --- */
.hero {
  padding: 100px 24px 40px;
  text-align: center;
}

.hero-content {
  max-width: 580px;
  margin: 0 auto;
}

.hero-logo {
  margin: 0 auto 32px;
  animation: fadeInUp 0.5s ease-out both;
}

.hero-logo img {
  margin: 0 auto;
  border-radius: 8px;
}

.hero-photo {
  width: 160px;
  height: 160px;
  margin: 0 auto 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-surface);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  animation: fadeInScale 0.8s ease-out;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

h1 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-tagline {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-bio {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--color-link);
  color: var(--color-link);
  transition: all var(--transition);
  background: var(--color-surface);
}

.social-icon:hover {
  color: var(--color-surface);
  background: var(--color-link);
  border-color: var(--color-link);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* --- Section Titles --- */
.section-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 40px;
  text-align: center;
}

/* --- Projects --- */
.projects {
  padding: 40px 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  display: block;
  padding: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.project-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}

.project-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.project-card p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.project-card p a {
  color: var(--color-link);
  text-decoration: none;
}

.project-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-link);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: gap var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.project-card:hover .project-link {
  gap: 8px;
}


/* --- Scroll Hint --- */
.scroll-arrow {
  -webkit-animation: bounce 1.5s ease-in-out infinite;
  animation: bounce 1.5s ease-in-out infinite;
}

#scrollHint {
  -webkit-transition: opacity 0.5s ease-out;
  transition: opacity 0.5s ease-out;
  opacity: 0.8;
}

#scrollHint.hidden {
  opacity: 0;
  pointer-events: none;
}

@-webkit-keyframes bounce {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  50% { -webkit-transform: translateY(6px); transform: translateY(6px); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* --- Footer --- */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--color-border);
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-logo {
  border-radius: 4px;
  opacity: 0.5;
}

.footer p {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Scroll-triggered fade-in for sections */
.projects {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.projects.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero {
    padding: 72px 24px 64px;
  }

  h1 {
    font-size: 28px;
  }

  .hero-tagline {
    font-size: 16px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 24px;
  }

  .hero-photo {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
  }

  .project-card {
    padding: 24px;
  }
}
