/* CSS Variables */
:root {
  --bg: #fdfbf9;
  --surface: #f8f6f3;
  --text: #1a1a1a;
  --accent: #8b4513;
  --shadow: rgba(0, 0, 0, 0.1);
  --border: #ddd;
  --transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #121212;
  --text: #f5f3ef;
  --accent: #d4af37;
  --shadow: rgba(255, 255, 255, 0.05);
  --border: #333;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", sans-serif;
  line-height: 1.7;
  transition: var(--transition);
}

h1,
h2,
h3,
h4,
h5 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3.5rem;
}
h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}
.subtitle {
  font-size: 1.25rem;
  color: var(--accent);
  margin: 1rem 0 2rem;
}

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

.section {
  padding: 5rem 0;
}

.text-center {
  text-align: center;
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
    url("https://source.unsplash.com/random/1920x1080/?abstract,texture")
      no-repeat center center;
  background-size: cover;
  z-index: -1;
  opacity: 0.8;
}

[data-theme="light"] .hero-bg {
  background: linear-gradient(
      rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 0.6)
    ),
    url("https://source.unsplash.com/random/1920x1080/?paper,linen") no-repeat
      center center;
}

/* Buttons */
.btn {
  padding: 0.8rem 2rem;
  border-radius: 30px;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-primary {
  background: transparent;
  color: var(--text);
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px var(--shadow);
}

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-submit {
  background: var(--accent);
  color: white;
  border: none;
  width: 100%;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Project Card */
.project-card {
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow);
  transition: var(--transition);
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px var(--shadow);
}

.project-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Cert Card */
.cert-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* Carousel */
.carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0;
  scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.medium-card {
  min-width: 300px;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow);
}

.medium-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.medium-card h4 {
  font-size: 1.2rem;
  padding: 1rem;
}

.meta {
  color: var(--accent);
  font-size: 0.9rem;
  padding: 0 1rem 1rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--surface);
  padding: 2.5rem;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  position: relative;
}

.modal-content.wide {
  max-width: 800px;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #aaa;
}

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

/* Form */
#contactForm input,
textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

/* FAB */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  z-index: 999;
}

.fab:hover {
  transform: scale(1.1);
}

/* Theme Toggle */
#theme-toggle {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(5px);
  z-index: 10;
}

#theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.icon {
  font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  .hero {
    height: 80vh;
  }
  .container {
    padding: 0 1.5rem;
  }
}
