:root {
  --bg: #0f172a;
  --card: #111827;
  --primary: #38bdf8;
  --text: #e5e7eb;
  --muted: #9ca3af;
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(120deg, #020617, #0f172a);
  color: var(--text);
  line-height: 1.6;
}

/* ================= HEADER ================= */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 8%;
}

header h1 {
  font-size: 1.2rem;
  font-weight: 600;
}

.lang-btn {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.lang-btn:hover {
  background: var(--primary);
  color: #020617;
}

/* ================= SECTIONS ================= */
section {
  padding: 80px 8%;
}

/* ================= HERO ================= */
.hero {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: center;
  min-height: auto;
}

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

.hero span {
  color: var(--primary);
}

.hero p {
  max-width: 600px;
  color: var(--muted);
}

.hero-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--primary);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
}

/* ================= BUTTON ================= */
.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 28px;
  background: var(--primary);
  color: #020617;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
}

/* ================= ABOUT ================= */
.aboutText span { color: var(--primary); }

/* ================= GRID / CARDS ================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.card h3 {
  margin-bottom: 10px;
  color: var(--primary);
}

/* ================= PROJECTS ================= */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  transition: 0.3s;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.project-media img,
.project-media video {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.project-info {
  padding: 16px;
}

.project-info h3 {
  margin-bottom: 8px;
  color: var(--primary);
}

/* ================= CAROUSEL ================= */
.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}

.carousel-track {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-item.active {
  opacity: 1;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
}

.carousel-btn.prev {
  left: 8px;
}

.carousel-btn.next {
  right: 8px;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* ================= FOOTER ================= */
footer {
  text-align: center;
  padding: 40px 8%;
  color: var(--muted);
  font-size: 0.9rem;
}
/* ================= CONTACT ================= */
.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 0px;
}

.contact-card {
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--text);
  transition: 0.3s;
  border: 1px solid transparent;
}

.contact-card:hover {
  transform: translateY(-5px);
  background: #1e293b;
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.contact-card .icon {
  font-size: 2rem;
  background: rgba(56, 189, 248, 0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.contact-card .content h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.contact-card .content p {
  font-size: 0.9rem;
  color: var(--muted);
  word-break: break-all;
}

/* ================= ARTICLES ================= */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.article-card {
  background: var(--card);
  padding: 32px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.article-icon {
  font-size: 2.5rem;
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary);
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-content h3 {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 8px;
}

.article-actions {
  margin-top: auto;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: gap 0.2s ease;
}

.btn-link:hover {
  gap: 12px;
}

.btn-link::after {
  content: '→';
  font-size: 1.1em;
}

/* ================= MOBILE ADAPTATION ================= */
@media (max-width: 768px) {
  section {
    padding: 60px 5%;
  }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .hero-photo {
    justify-content: center;
    /* Image above */
    order: -1;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .hero p {
    margin: 0 auto;
  }

  header {
    padding: 20px 5%;
  }
}