:root {
  --bg: #fdfcf8;
  --bg-card: #ffffff;
  --text: #111111;
  --text-muted: #666666;
  --accent: #ff4a22;
  --border: rgba(0, 0, 0, 0.08);
  --font-serif: 'Instrument Serif', serif;
  --font-sans: 'Inter', sans-serif;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

.italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: normal;
}

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

/* Floating Navbar */
.floating-nav {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 900px;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}

.avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
}

.logo {
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.nav-center {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-center a {
  color: #a1a1aa;
}
.nav-center a:hover {
  color: #ffffff;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: brightness(1.1);
}

/* Sections */
.section {
  padding: 6rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 10rem;
}

.hero-intro {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 2rem;
}

.hero-headline {
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 900px;
  margin-bottom: 4rem;
}

.hero-polaroids {
  position: relative;
  width: 100%;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.polaroid {
  position: absolute;
  background: #fff;
  padding: 0.5rem 0.5rem 2rem 0.5rem;
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  border: 1px solid var(--border);
}

.polaroid img {
  width: 250px;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
}

.p-1 {
  transform: rotate(-12deg) translateX(-200px);
  z-index: 1;
}

.p-2 {
  transform: rotate(2deg) translateY(-20px);
  z-index: 2;
}

.p-3 {
  transform: rotate(6deg) translateX(210px) translateY(10px);
  z-index: 3;
}

.polaroid:hover {
  z-index: 10;
}
.p-1:hover { transform: rotate(-8deg) translateX(-200px) scale(1.05); }
.p-2:hover { transform: rotate(0deg) translateY(-20px) scale(1.05); }
.p-3:hover { transform: rotate(2deg) translateX(210px) translateY(10px) scale(1.05); }

.speech-bubble {
  position: absolute;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 500;
  white-space: nowrap;
  z-index: 20;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  width: 0;
  height: 0;
  border-style: solid;
}

.speech-bubble.blue {
  background: #007aff;
  color: #fff;
  top: -30px;
  left: -40px;
  transform: rotate(-10deg);
}

.speech-bubble.blue::after {
  left: 30px;
  border-width: 14px 14px 0 0;
  border-color: #007aff transparent transparent transparent;
}

.speech-bubble.beige {
  background: #e8ded1;
  color: #111;
  top: -35px;
  right: -20px;
  left: auto;
  transform: rotate(5deg);
}

.speech-bubble.beige::after {
  right: 25px;
  border-width: 14px 14px 0 0;
  border-color: #e8ded1 transparent transparent transparent;
}

/* Work Section */
.work {
  padding-top: 2rem;
}

.section-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  justify-content: center;
  margin-bottom: 1rem;
}

.square-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 500;
  margin-bottom: 4rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.card-image-wrapper {
  width: 100%;
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: #f5f5f5;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .card-image {
  transform: scale(1.05);
}

.card-content {
  padding: 0 0.5rem 0.5rem 0.5rem;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.card-text h3 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.card-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 90%;
}

.card-arrow {
  color: var(--accent);
  transition: transform 0.3s ease;
}

.project-card:hover .card-arrow {
  transform: translate(4px, -4px);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-bottom: 2rem;
}

.footer-status {
  display: flex;
  margin-bottom: 2rem;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
}

.green-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
}

.footer-headline {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 6rem;
}

.footer-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-link-large {
  font-size: 1.2rem;
  display: block;
  margin-bottom: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-links a {
  color: var(--text-muted);
}
.social-links a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-stagger {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.p-1.reveal-stagger.active { opacity: 1; transform: rotate(-12deg) translateX(-200px); }
.p-2.reveal-stagger.active { opacity: 1; transform: rotate(2deg) translateY(-20px); }
.p-3.reveal-stagger.active { opacity: 1; transform: rotate(6deg) translateX(210px) translateY(10px); }

/* Navbar Animation */
.fade-in-down {
  animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* About Section */
.about {
  padding: 6rem 2rem;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 4rem;
  align-items: center;
}

.about-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.about-image-wrapper {
  position: relative;
  width: 320px;
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  transform: rotate(-3deg);
  border: 10px solid #fff;
  transition: transform 0.4s ease;
}

.about-image-wrapper:hover {
  transform: rotate(0deg) scale(1.02);
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-title {
  font-family: 'Instrument Serif', serif;
  font-size: 4.5rem;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: #111;
  line-height: 1.1;
}

.about-right {
  flex: 1;
}

.about-right p {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 1rem;
}

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

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-card);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 24px;
  padding: 2rem;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  background: #f5f5f5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: #e5e5e5;
}

.modal-body h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.modal-body .card-tags {
  margin-bottom: 1.5rem;
}

.modal-body p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-gallery img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .nav-center { display: none; }
  .hero-polaroids { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
  .floating-nav { width: 95%; padding: 0.5rem; }
  .project-grid { grid-template-columns: 1fr; }
  .modal-content { padding: 1.5rem; }
}
