/* === FREDDIE SPARROW PORTFOLIO === */
/* Modern, minimal, Apple-inspired design */

:root {
  --color-bg: #ffffff;
  --color-bg-secondary: #f5f5f5;
  --color-text: #1d1d1d;
  --color-text-secondary: #626262;
  --color-accent: #0071e3;
  --color-accent-hover: #0077ed;
  --color-border: #e5e5e5;
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #000000;
    --color-bg-secondary: #1d1d1d;
    --color-text: #ffffff;
    --color-text-secondary: #a1a1a1;
    --color-border: #424245;
  }
}

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

html {
  scroll-behavior: smooth;
}

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

/* === TYPOGRAPHY === */

h1 {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1rem 0;
  line-height: 1.1;
}

h2 {
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2rem 0 1rem 0;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem 0;
}

p {
  color: var(--color-text-secondary);
  margin: 0.5rem 0 1rem 0;
  font-size: 1rem;
  line-height: 1.7;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

/* === LAYOUT === */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

header {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  background-color: rgba(255, 255, 255, 0.7);
}

@media (prefers-color-scheme: dark) {
  header {
    background-color: rgba(0, 0, 0, 0.7);
  }
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  transition: var(--transition-smooth);
}

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

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

.nav-links a {
  font-size: 0.95rem;
  color: var(--color-text);
  font-weight: 500;
  transition: var(--transition-smooth);
  position: relative;
}

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

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

.nav-links a.active {
  color: var(--color-accent);
}

.nav-links a.active::after {
  width: 100%;
}

/* === CONTAINERS === */

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

section {
  padding: 4rem 0;
}

section:first-of-type {
  padding-top: 6rem;
}

/* === HERO SECTION === */

.hero {
  padding: 8rem 0;
  display: flex;
  align-items: center;
  min-height: 80vh;
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero .subtitle {
  font-size: 1.5rem;
  color: var(--color-text-secondary);
  margin: 1rem 0 2rem 0;
  font-weight: 400;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-photo {
  width: 250px;
  height: 250px;
  border-radius: 12px;
  background: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  margin-left: 4rem;
  animation: fadeInUp 0.8s ease 0.4s both;
  overflow: hidden;
}

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

@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
    min-height: auto;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .subtitle {
    font-size: 1.1rem;
  }

  .hero-photo {
    margin-left: 0;
    margin-top: 2rem;
    width: 200px;
    height: 200px;
  }

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

/* === BUTTONS === */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: var(--transition-smooth);
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 113, 227, 0.2);
}

.btn-secondary {
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

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

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* === CARDS === */

.card {
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
  transition: var(--transition-smooth);
}

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

@media (prefers-color-scheme: dark) {
  .card:hover {
    box-shadow: 0 12px 24px rgba(255, 255, 255, 0.1);
  }
}

/* === GRID === */

.grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

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

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* === SKILLS === */

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

.skill-item {
  padding: 1.5rem;
  background-color: var(--color-bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  transition: var(--transition-smooth);
}

.skill-item:hover {
  border-color: var(--color-accent);
  background-color: var(--color-bg);
}

.skill-item h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.skill-item p {
  margin: 0;
  font-size: 0.9rem;
}

/* === EXPERIENCE / EDUCATION === */

.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-accent), var(--color-border));
}

@media (max-width: 768px) {
  .timeline::before {
    left: 0;
  }
}

.timeline-item {
  padding-left: 3rem;
  padding-bottom: 2rem;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 14px;
  height: 14px;
  background-color: var(--color-accent);
  border-radius: 50%;
  border: 3px solid var(--color-bg);
}

.timeline-date {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.timeline-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.timeline-description {
  color: var(--color-text-secondary);
  margin: 0.5rem 0 0 0;
  font-size: 0.95rem;
}

.timeline-content {
  background-color: var(--color-bg-secondary);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  margin-top: 0.5rem;
}

/* === FOOTER === */

footer {
  background-color: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin: 0.5rem 0;
}

.footer-section ul a {
  color: var(--color-text-secondary);
  transition: var(--transition-smooth);
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* === FORMS === */

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--color-text);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: var(--transition-smooth);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* === ANIMATIONS === */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
  opacity: 0;
}

.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* === RESPONSIVE === */

@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  section {
    padding: 2.5rem 0;
  }

  .container {
    padding: 0 1.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-links a {
    font-size: 0.9rem;
  }
}

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

  h2 {
    font-size: 1.3rem;
  }

  section {
    padding: 1.5rem 0;
  }

  .container {
    padding: 0 1rem;
  }

  .nav-links {
    gap: 0.75rem;
    font-size: 0.8rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
