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

:root {
  --bg: #faf8f5;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --border: #e8e4df;
  --text: #2d2d2d;
  --text-muted: #6b6b7b;
  --accent: #e07a5f;
  --accent-hover: #c96a52;
  --accent-light: rgba(224, 122, 95, 0.1);
  --secondary: #81b29a;
  --secondary-light: rgba(129, 178, 154, 0.1);
  --angular-color: #dd0031;
  --ai-color: #3d8b6e;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--accent-hover);
}

/* === Nav === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.nav__logo:hover { color: var(--text); }
.nav__logo-bracket { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 2rem;
}
.nav__links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  transition: color 0.2s;
  position: relative;
}
.nav__links a:hover {
  color: var(--text);
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
  border-radius: 1px;
}
.nav__links a:hover::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.hero__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
}

.hero__greeting {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.hero__name {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero__tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.hero__highlight {
  color: var(--accent);
}

.hero__description {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

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

.hero__glow {
  position: absolute;
  top: 20%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(224, 122, 95, 0.06) 0%, rgba(129, 178, 154, 0.04) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* === Phone Mockups === */
.hero__mockups {
  position: relative;
  height: 500px;
  z-index: 1;
}

.phone-mockup {
  width: 220px;
  height: 440px;
  background: #ffffff;
  border-radius: 32px;
  border: 2px solid var(--border);
  padding: 12px;
  position: absolute;
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s ease;
}

.phone-mockup--front {
  top: 30px;
  left: 60px;
  z-index: 2;
  transform: rotate(-3deg);
}
.phone-mockup--front:hover {
  transform: rotate(-1deg) translateY(-8px);
}

.phone-mockup--back {
  top: 10px;
  left: 200px;
  z-index: 1;
  transform: rotate(6deg);
  opacity: 0.9;
}
.phone-mockup--back:hover {
  transform: rotate(4deg) translateY(-8px);
  opacity: 1;
}

.phone-mockup__screen {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
}

.phone-mockup__screen--angular {
  background: linear-gradient(180deg, #fff5f5 0%, #ffe8e0 100%);
}

.phone-mockup__screen--ai {
  background: linear-gradient(180deg, #f0faf5 0%, #e0f5ed 100%);
}

/* Mock App UI */
.mock-app {
  padding: 1.5rem 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mock-app__header {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

.phone-mockup__screen--angular .mock-app__header {
  color: var(--angular-color);
}
.phone-mockup__screen--ai .mock-app__header {
  color: var(--ai-color);
}

.mock-app__lesson {
  text-align: center;
  margin-bottom: 2rem;
}

.mock-app__icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.mock-app__title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.mock-app__subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.mock-app__progress {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 3px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.mock-app__bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.phone-mockup__screen--angular .mock-app__bar {
  background: var(--angular-color);
}
.phone-mockup__screen--ai .mock-app__bar {
  background: var(--ai-color);
}

.mock-app__dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
}
.dot--done {
  background: rgba(0, 0, 0, 0.18);
}
.dot--current {
  background: var(--accent);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}

.btn--primary {
  background: var(--accent);
  color: white;
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(224, 122, 95, 0.2);
}

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

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 8px;
}

/* === Sections === */
.section {
  padding: 7rem 2rem;
}

.section--alt {
  background: var(--bg-alt);
}

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

.section__title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section__title::before {
  content: '// ';
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 1.5rem;
}

/* === About === */
.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about__content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.skill-group {
  margin-bottom: 1.2rem;
}

.skill-group__title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.skill-group__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  padding: 0.35rem 0.75rem;
  background: var(--accent-light);
  border: 1px solid rgba(224, 122, 95, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--accent-hover);
  font-family: var(--mono);
  transition: all 0.2s;
}
.skill-tag:hover {
  background: rgba(224, 122, 95, 0.18);
  border-color: var(--accent);
  color: var(--accent);
}

/* === Projects === */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.project-card--angular::before {
  background: var(--angular-color);
}

.project-card--ai::before {
  background: var(--secondary);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(224, 122, 95, 0.25);
}

.project-card__badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.2rem;
}

.project-card__badge--soon {
  background: var(--secondary-light);
  color: var(--ai-color);
}

.project-card__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-card__icon {
  font-size: 2.2rem;
}

.project-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.project-card__tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.project-card__description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.project-card__tags span {
  padding: 0.2rem 0.5rem;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: var(--mono);
}

.project-card__links {
  display: flex;
  gap: 0.75rem;
}

/* === Books === */
.books__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.book-card {
  display: flex;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}
.book-card:hover {
  border-color: rgba(224, 122, 95, 0.25);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.book-card__cover {
  flex-shrink: 0;
  width: 100px;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-card__placeholder {
  font-size: 2.5rem;
}

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

.book-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.book-card__description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

/* === Contact === */
.contact__container {
  text-align: center;
  max-width: 600px !important;
}

.contact__text {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* === Footer === */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  background: var(--bg);
}

.footer__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}
.footer__links a {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.footer__links a:hover { color: var(--text); }

/* === Animations === */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(-3deg); }
}

@keyframes float-back {
  0%, 100% { transform: translateY(0) rotate(6deg); }
  50% { transform: translateY(-8px) rotate(6deg); }
}

.phone-mockup--front {
  animation: float 6s ease-in-out infinite;
}

.phone-mockup--back {
  animation: float-back 6s ease-in-out infinite 0.5s;
}

/* === Mobile === */
@media (max-width: 900px) {
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__cta {
    justify-content: center;
  }

  .hero__mockups {
    height: 400px;
    display: flex;
    justify-content: center;
  }

  .phone-mockup {
    width: 180px;
    height: 360px;
  }

  .phone-mockup--front {
    left: auto;
    position: relative;
    margin-right: -40px;
  }

  .phone-mockup--back {
    left: auto;
    position: relative;
    margin-left: -40px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

@media (max-width: 768px) {
  .nav__links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav__links.active { display: flex; }
  .nav__links a::after { display: none; }
  .nav__toggle { display: flex; }

  .section { padding: 5rem 1.5rem; }

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

  .book-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

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

  .footer__container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .phone-mockup {
    width: 160px;
    height: 320px;
  }
}
