:root {
  --bg-color: #f4f4f4;
  --card-bg: #ffffff;
  --dark-card-bg: #1a1a1a;
  
  --text-main: #000000;
  --text-muted: #666666;
  --text-light: #ffffff;
  --text-light-muted: #999999;
  
  --border-light: #e0e0e0;
  --border-dark: #333333;
  
  --accent-green: #00c853;
  
  --font-body: 'Inter', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.5;
  overflow-x: hidden;
}

/* 1. Background */
.fixed-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-image: url('https://images.unsplash.com/photo-1532054955673-455b55230dc3?w=2000&q=50');
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: grayscale(100%);
}

/* 2. Layout & Cards */
.content-wrapper {
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-card {
  background: var(--card-bg);
  border-radius: 24px;
  padding: 4rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.03);
  position: relative;
  opacity: 0; 
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.dark-card {
  background: var(--dark-card-bg);
  color: var(--text-light);
}

/* 3. Typography & Utilities */
.section-title {
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-display);
}
.arrow {
  display: inline-block;
  transition: transform 0.3s;
}
a:hover .arrow, button:hover .arrow {
  transform: translate(3px, -3px);
}

/* Buttons */
.btn-dark {
  background: var(--text-main);
  color: var(--text-light);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.3s;
}
.btn-dark:hover {
  opacity: 0.8;
}

/* Status Pulse */
.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--border-light);
  background: #fff;
}
.status-pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  position: relative;
}
.status-pulse::after {
  content: '';
  position: absolute;
  top: -4px; left: -4px; right: -4px; bottom: -4px;
  border: 1px solid var(--accent-green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* 4. Hero Section */
.hero-section {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 10;
}
.nav-center {
  display: flex;
  gap: 2rem;
}
.nav-center a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-center a span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-top: 4rem;
}

/* Background Massive Text */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 10rem);
  font-weight: 700;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 2px rgba(0,0,0,0.1);
  text-align: center;
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 1;
  white-space: nowrap;
  transition: -webkit-text-stroke 1.5s ease, color 1.5s ease;
}

/* Loaded State for Text */
.page-loaded .hero-title {
  -webkit-text-stroke: 2px rgba(0,0,0,1);
}

/* Central Avatar */
.hero-avatar-container {
  position: absolute;
  bottom: -4rem;
  left: 50%;
  z-index: 2;
  width: 360px;
  height: 320px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  /* Animation setup */
  opacity: 0;
  transform: translateX(-50%) scale(0.9) translateY(20px);
  transition: opacity 1.5s ease, transform 1.5s ease;
}

/* Loaded State for Avatar */
.page-loaded .hero-avatar-container {
  opacity: 1;
  transform: translateX(-50%) scale(1) translateY(0);
}

.hero-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 180px 180px 0 0;
  filter: grayscale(10%);
}

.hero-layout {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 3;
}
.hero-left h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.hero-left p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.social-list {
  list-style: none;
}
.social-list li {
  margin-bottom: 0.8rem;
  text-align: right;
}
.social-list a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s;
}
.social-list a i {
  font-style: normal;
}
.social-list a:hover {
  color: var(--text-muted);
}

/* 5. Work Section */
.work-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}
.work-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.filter-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem;
  transition: color 0.3s;
}
.filter-btn.active, .filter-btn:hover {
  color: var(--text-main);
  font-weight: 500;
}
.view-all {
  text-decoration: none;
  color: var(--text-main);
  margin-left: 2rem;
  font-weight: 500;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}
.project-card {
  display: flex;
  flex-direction: column;
}
.project-image-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #f5f5f5;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-light);
}
.project-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.project-card:hover .project-image-wrapper img {
  transform: scale(1.03);
}
.project-info h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.project-info p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.project-tags {
  display: flex;
  gap: 0.5rem;
}
.p-tag {
  text-decoration: none;
  background: var(--bg-color);
  color: var(--text-main);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-light);
  transition: background 0.3s;
}
.p-tag:hover {
  background: var(--border-light);
}

/* 6. Services Accordion */
.services-section .section-title {
  margin-bottom: 2rem;
}
.accordion-list {
  border-top: 1px solid var(--border-light);
}
.accordion-item {
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
}
.accordion-header {
  padding: 2.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}
.accordion-header h3 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 500;
  transition: transform 0.3s;
}
.accordion-header .arrow {
  font-size: 1.5rem;
  transition: transform 0.3s;
}
.accordion-item.active .accordion-header h3 {
  transform: translateX(20px);
}
.accordion-item.active .accordion-header .arrow {
  transform: rotate(45deg);
}

.accordion-content {
  height: 0;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-inner {
  background: var(--dark-card-bg);
  color: var(--text-light);
  padding: 2.5rem;
  border-radius: 16px;
  margin-bottom: 2.5rem;
  display: flex;
  gap: 2rem;
}
.accordion-text {
  flex: 1;
  font-size: 1.2rem;
  color: #cccccc;
}

/* 7. Experience Section (Dark Mode) */
.experience-section {
  padding: 5rem 4rem;
}
.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4rem;
}
.exp-years {
  color: var(--text-light-muted);
}
.experience-list {
  list-style: none;
  border-top: 1px solid var(--border-dark);
}
.exp-item {
  display: flex;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border-dark);
  align-items: center;
  transition: color 0.3s;
  cursor: pointer;
}
.exp-item:hover {
  color: #ffffff;
}
.exp-company {
  flex: 2;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}
.exp-role {
  flex: 2;
  color: var(--text-light-muted);
}
.exp-date {
  flex: 1;
  text-align: right;
  color: var(--text-light-muted);
}

/* Hover Image Reveal Container */
.hover-reveal-container {
  position: fixed;
  top: 0; left: 0;
  width: 352px;
  height: 220px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.3s, transform 0.3s ease-out;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.hover-reveal-container.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.hover-reveal-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 8. Contact Section */
.contact-section {
  text-align: center;
  padding: 8rem 4rem;
}
.contact-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.contact-status {
  margin-bottom: 1rem;
}
.contact-title {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
}
.contact-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-title { font-size: 6rem; top: 30%; }
  .hero-layout { position: relative; flex-direction: column; align-items: center; text-align: center; gap: 2rem; margin-top: 2rem; }
  .hero-right { align-items: center; width: 100%; }
  .social-list li { text-align: center; display: inline-block; margin: 0 1rem; }
}

@media (max-width: 768px) {
  .top-nav { flex-direction: column; gap: 1.5rem; }
  .nav-center { display: none; }
  .hero-title { font-size: 4rem; }
  .hero-avatar-container { width: 300px; height: 350px; }
  .projects-grid { grid-template-columns: 1fr; }
  .exp-item { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .exp-date { text-align: left; }
  .section-card { padding: 2.5rem; }
  .accordion-header h3 { font-size: 1.5rem; }
}
