/* style.css
   portfolio M. Rakka */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Instrument+Sans:wght@300;400;500&display=swap');

/* color palette */
:root {
  --dark:     #2f1d1e;
  --light:    #e7e3e2;
  --gray:     #a29fa3;
  --wine:     #9a2a53;
  --blue:     #325568;
  --bg:       #f4f0ef;
  --white:    #ffffff;
  --border:   #ddd8d6;
  --radius:   14px;
  --max:      960px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Instrument Sans', sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* navbar */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(244, 240, 239, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.nav.scrolled { border-color: var(--border); }

.nav-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  color: var(--dark);
}

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  font-size: 0.85rem;
  color: var(--gray);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--dark); }

/* hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 120px 40px 80px;
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  gap: 40px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
}

.hero-tag {
  font-size: 0.85rem;
  color: var(--wine);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 500;
}

.hero-name {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
  color: var(--dark);
}

.aka {
  display: block;
  font-style: italic;
  font-size: 0.5em;
  color: var(--gray);
}

.hero-desc {
  font-size: 1rem;
  color: var(--gray);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  background: var(--wine);
  color: var(--white);
  padding: 11px 26px;
  border-radius: 40px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover { opacity: 0.85; transform: translateY(-2px); }

.btn-ghost {
  border: 1.5px solid var(--border);
  color: var(--dark);
  padding: 11px 26px;
  border-radius: 40px;
  font-size: 0.88rem;
  transition: border-color 0.2s, transform 0.2s;
}

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

/* hero avatar */
.hero-avatar {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.avatar-big {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background-image: url('../assets/profile.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  z-index: 2;
}

.avatar-big span {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
  color: var(--light);
  letter-spacing: 2px;
}

/* spinning rings around avatar */
.avatar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed var(--border);
}

.r1 {
  width: 180px;
  height: 180px;
  animation: spin 10s linear infinite;
}

.r2 {
  width: 210px;
  height: 210px;
  border-color: var(--wine);
  opacity: 0.3;
  animation: spin 16s linear infinite reverse;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* decorative bg blobs */
.hero-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.deco-1 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(154,42,83,0.08) 0%, transparent 70%);
  right: -60px;
  bottom: 0;
}

.deco-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(50,85,104,0.08) 0%, transparent 70%);
  left: 0;
  top: 30%;
}

/* sections */
.section { padding: 100px 40px; }
.section-alt { background: var(--light); }

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

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--wine);
  margin-bottom: 10px;
}

.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 52px;
  letter-spacing: -0.5px;
  color: var(--dark);
}

/* about */
.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: start;
}

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

.about-text h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
  color: var(--dark);
}

.about-text h2 em { font-style: italic; color: var(--wine); }

.about-text p {
  font-size: 0.92rem;
  color: var(--gray);
  font-weight: 300;
  margin-bottom: 14px;
  line-height: 1.75;
}

.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.skills span {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  color: var(--dark);
  transition: all 0.2s;
}

.skills span:hover {
  background: var(--wine);
  color: var(--white);
  border-color: var(--wine);
}

/* stats */
.about-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  text-align: center;
  min-width: 130px;
}

.stat-num {
  display: block;
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
  color: var(--wine);
  line-height: 1;
}

.stat-lbl {
  display: block;
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 4px;
  font-weight: 400;
}

/* timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 24px 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 40px;
  position: relative;
}

.timeline-left {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: 2px;
}

.timeline-year {
  font-family: 'Instrument Serif', serif;
  font-size: 1rem;
  color: var(--dark);
  font-weight: 400;
}

.timeline-age {
  font-size: 0.72rem;
  color: var(--gray);
  margin-top: 2px;
}

/* dot and vertical line */
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--bg);
  margin-top: 4px;
  position: relative;
  flex-shrink: 0;
}

.timeline-dot.active {
  background: var(--wine);
  box-shadow: 0 0 0 4px rgba(154,42,83,0.15);
}

/* vertical line between dots */
.timeline-item:not(:last-child) .timeline-dot::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: calc(100% + 40px);
  background: var(--border);
}

.timeline-content { padding-top: 0; }

.timeline-content h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--dark);
  margin-bottom: 8px;
}

.timeline-content p {
  font-size: 0.88rem;
  color: var(--gray);
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 12px;
}

.timeline-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.timeline-tags span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--blue);
  background: rgba(50,85,104,0.08);
  padding: 3px 10px;
  border-radius: 20px;
}

/* projects */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(47,29,30,0.08);
  border-color: var(--wine);
}

.project-wip {
  opacity: 0.45;
  pointer-events: none;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-num {
  font-family: 'Instrument Serif', serif;
  font-size: 0.85rem;
  color: var(--gray);
}

.project-links a {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--wine);
  transition: opacity 0.2s;
}

.project-links a:hover { opacity: 0.7; }

.wip-badge {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--gray);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
}

.project-card h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 10px;
  color: var(--dark);
}

.project-card p {
  font-size: 0.85rem;
  color: var(--gray);
  font-weight: 300;
  line-height: 1.65;
  margin-bottom: 18px;
}

.project-stack { display: flex; gap: 6px; flex-wrap: wrap; }

.project-stack span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--blue);
  background: rgba(50,85,104,0.08);
  padding: 3px 10px;
  border-radius: 20px;
}

/* contact */
.contact-wrap h2 {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  color: var(--dark);
}

.contact-desc {
  font-size: 0.92rem;
  color: var(--gray);
  font-weight: 300;
  margin-bottom: 36px;
}

.contact-links { display: flex; flex-direction: column; gap: 12px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--gray);
  transition: all 0.2s;
  max-width: 420px;
}

.contact-item:hover {
  border-color: var(--wine);
  color: var(--dark);
  transform: translateX(5px);
}

.contact-icon { font-size: 1rem; flex-shrink: 0; color: var(--wine); }

/* footer */
.footer {
  text-align: center;
  padding: 32px 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: 300;
  background: var(--dark);
  color: var(--gray);
}

.footer strong { color: var(--light); }

/* fade up on page load */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}

.hero-tag    { animation-delay: 0.1s; }
.hero-name   { animation-delay: 0.2s; }
.hero-desc   { animation-delay: 0.3s; }
.hero-cta    { animation-delay: 0.4s; }
.hero-avatar { animation-delay: 0.35s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* reveal on scroll, triggered via JS */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (max-width: 640px) {
  .nav { padding: 16px 20px; }
  .hero { flex-direction: column; padding: 100px 20px 60px; text-align: center; }
  .hero-avatar { width: 150px; height: 150px; }
  .avatar-big { width: 110px; height: 110px; }
  .r1 { width: 140px; height: 140px; }
  .r2 { width: 165px; height: 165px; }
  .section { padding: 72px 20px; }
  .timeline-item { grid-template-columns: 60px 20px 1fr; gap: 12px; }
}